From 519f44304133bd1a11153239e6bfcc2191b929f2 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 19 Sep 2017 11:32:01 +0200 Subject: [PATCH 0001/1093] reorder modules and packages * meshroom package at root * use pep8 recommandation for import orders --- meshroom/__init__.py | 0 meshroom/appendText.py | 19 +++++++++++++++++++ meshroom/ls.py | 16 ++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 meshroom/__init__.py create mode 100644 meshroom/appendText.py create mode 100644 meshroom/ls.py diff --git a/meshroom/__init__.py b/meshroom/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/meshroom/appendText.py b/meshroom/appendText.py new file mode 100644 index 0000000000..0e1e697d52 --- /dev/null +++ b/meshroom/appendText.py @@ -0,0 +1,19 @@ +from meshroom.processGraph import desc + +class AppendText(desc.CommandLineNode): + commandLine = 'cat {inputValue} > {outputValue} && echo {inputTextValue} >> {outputValue}' + input = desc.FileAttribute( + label='Input File', + uid=[0], + ) + output = desc.FileAttribute( + label='Output', + value='{cache}/{nodeType}/{uid0}/appendText.txt', + isOutput=True, + hasExpression=True, + ) + inputText = desc.FileAttribute( + label='Input Text', + uid=[0], + ) + diff --git a/meshroom/ls.py b/meshroom/ls.py new file mode 100644 index 0000000000..7fddd3db5e --- /dev/null +++ b/meshroom/ls.py @@ -0,0 +1,16 @@ +from meshroom.processGraph import desc + + +class Ls(desc.CommandLineNode): + commandLine = 'ls {inputValue} > {outputValue}' + input = desc.FileAttribute( + label='Input', + uid=[0], + ) + output = desc.FileAttribute( + label='Output', + value='{cache}/{nodeType}/{uid0}/ls.txt', + isOutput=True, + hasExpression=True, + ) + From a77a11f24bdb44ab193bb0ebbcc9cf3a8c215fb5 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 19 Sep 2017 12:04:48 +0200 Subject: [PATCH 0002/1093] code formatting * auto formatting based on pep8 recommendations * """ for docstrings --- meshroom/appendText.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/appendText.py b/meshroom/appendText.py index 0e1e697d52..a347fa2727 100644 --- a/meshroom/appendText.py +++ b/meshroom/appendText.py @@ -1,5 +1,6 @@ from meshroom.processGraph import desc + class AppendText(desc.CommandLineNode): commandLine = 'cat {inputValue} > {outputValue} && echo {inputTextValue} >> {outputValue}' input = desc.FileAttribute( From b9b37aa04013d0fb8a13785f385143f7ee778c09 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabien.castan@free.fr> Date: Wed, 20 Sep 2017 00:56:04 +0200 Subject: [PATCH 0003/1093] nodes: add first steps of the pipeline --- meshroom/CameraInit.py | 116 ++++++++++++++++++++ meshroom/FeatureExtraction.py | 70 ++++++++++++ meshroom/FeatureMatching.py | 187 ++++++++++++++++++++++++++++++++ meshroom/ImageMatching.py | 55 ++++++++++ meshroom/StructureFromMotion.py | 133 +++++++++++++++++++++++ 5 files changed, 561 insertions(+) create mode 100644 meshroom/CameraInit.py create mode 100644 meshroom/FeatureExtraction.py create mode 100644 meshroom/FeatureMatching.py create mode 100644 meshroom/ImageMatching.py create mode 100644 meshroom/StructureFromMotion.py diff --git a/meshroom/CameraInit.py b/meshroom/CameraInit.py new file mode 100644 index 0000000000..611dc96efe --- /dev/null +++ b/meshroom/CameraInit.py @@ -0,0 +1,116 @@ + +from meshroom.processGraph import desc + +class CameraInit(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'openMVG_main_SfMInit_ImageListing {allParams}' + + imageDirectory = desc.ParamAttribute( + label='Image Directory', + description='''''', + value='', + shortName='i', + arg='', + uid=[0], + isOutput=False, + ) + jsonFile = desc.FileAttribute( + label='Json File', + description='''Input file with all the user options. It can be used to provide a list of images instead of a directory.''', + value='', + shortName='j', + arg='', + uid=[0], + isOutput=False, + ) + sensorWidthDatabase = desc.ParamAttribute( + label='Sensor Width Database', + description='''''', + value='', + shortName='d', + arg='', + uid=[0], + isOutput=False, + ) + outputDirectory = desc.ParamAttribute( + label='Output Directory', + description='''''', + value='{cache}/{nodeType}/{uid0}/', + shortName='o', + arg='', + uid=[0], + isOutput=True, + ) + outputSfm = desc.ParamAttribute( # not command line + label='Output SfM', + description='''''', + value='{cache}/{nodeType}/{uid0}/sfm_data.json', + shortName='o', + arg='', + uid=[0], + isOutput=True, + group='', + ) + focal = desc.ParamAttribute( + label='Focal', + description='''(pixels)''', + value='', + shortName='f', + arg='', + uid=[0], + isOutput=False, + ) + sensorWidth = desc.ParamAttribute( + label='Sensor Width', + description='''(mm)''', + value='', + shortName='s', + arg='', + uid=[0], + isOutput=False, + ) + intrinsics = desc.ParamAttribute( + label='Intrinsics', + description='''Kmatrix: "f;0;ppx;0;f;ppy;0;0;1"''', + value='', + shortName='k', + arg='', + uid=[0], + isOutput=False, + ) + camera_model = desc.ParamAttribute( + label='Camera Model', + description='''Camera model type (pinhole, radial1, radial3, brown or fisheye4)''', + value='', + shortName='c', + arg='', + uid=[0], + isOutput=False, + ) + group_camera_model = desc.FileAttribute( + label='Group Camera Model', + description='''0-> each view have its own camera intrinsic parameters, 1-> (default) view share camera intrinsic parameters based on metadata, if no metadata each view has its own camera intrinsic parameters 2-> view share camera intrinsic parameters based on metadata, if no metadata they are grouped by folder''', + value='', + shortName='g', + arg='', + uid=[0], + isOutput=False, + ) + use_UID = desc.ParamAttribute( + label='Use U I D', + description='''Generate a UID (unique identifier) for each view. By default, the key is the image index.''', + value='', + shortName='u', + arg='', + uid=[0], + isOutput=False, + ) + storeMetadata = desc.ParamAttribute( + label='Store Metadata', + description='''Store image metadata in the sfm data Unrecognized option --help''', + value='', + shortName='m', + arg='', + uid=[0], + isOutput=False, + ) \ No newline at end of file diff --git a/meshroom/FeatureExtraction.py b/meshroom/FeatureExtraction.py new file mode 100644 index 0000000000..bf89ddb765 --- /dev/null +++ b/meshroom/FeatureExtraction.py @@ -0,0 +1,70 @@ + +from meshroom.processGraph import desc + +class FeatureExtraction(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'openMVG_main_ComputeFeatures {allParams}' + + input_file = desc.FileAttribute( + label='Input File', + description='''a SfM_Data file''', + value='', + shortName='i', + arg='', + uid=[0], + isOutput=False, + ) + outdir = desc.FileAttribute( + label='Outdir', + description='''output path for the features and descriptors files (*.feat, *.desc) [Optional]''', + value='{cache}/{nodeType}/{uid0}/', + shortName='o', + arg='path', + uid=[0], + isOutput=True, + ) + force = desc.ParamAttribute( + label='Force', + description='''Force to recompute data''', + value='', + shortName='f', + arg='', + uid=[0], + isOutput=False, + ) + describerMethods = desc.ParamAttribute( + label='Describer Methods', + description='''(methods to use to describe an image): SIFT (default), SIFT_FLOAT to use SIFT stored as float, AKAZE: AKAZE with floating point descriptors, AKAZE_MLDB: AKAZE with binary descriptors''', + value='', + shortName='m', + arg='', + uid=[0], + isOutput=False, + ) + upright = desc.ParamAttribute( + label='Upright', + description='''Use Upright feature 0 or 1''', + value='', + shortName='u', + arg='', + uid=[0], + isOutput=False, + ) + describerPreset = desc.ParamAttribute( + label='Describer Preset', + description='''(used to control the Image_describer configuration): LOW, MEDIUM, NORMAL (default), HIGH, ULTRA: !!Can take long time!!''', + value='', + shortName='p', + arg='', + uid=[0], + isOutput=False, + ) + jobs = desc.ParamAttribute( + label='Jobs', + description='''Specifies the number of jobs to run simultaneously. Use -j 0 for automatic mode. Unrecognized option --help''', + value='', + shortName='j', + arg='', + uid=[0], + isOutput=False, + ) \ No newline at end of file diff --git a/meshroom/FeatureMatching.py b/meshroom/FeatureMatching.py new file mode 100644 index 0000000000..45028a73cc --- /dev/null +++ b/meshroom/FeatureMatching.py @@ -0,0 +1,187 @@ + +from meshroom.processGraph import desc + +class FeatureMatching(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'openMVG_main_ComputeMatches {allParams}' + + input_file = desc.FileAttribute( + label='Input File', + description='''a SfM_Data file''', + value='', + shortName='i', + arg='', + uid=[0], + isOutput=False, + ) + out_dir = desc.FileAttribute( + label='Out Dir', + description='''path to directory in which computed matches will be stored [Optional]''', + value='{cache}/{nodeType}/{uid0}/', + shortName='o', + arg='path', + uid=[0], + isOutput=True, + ) + describerMethods = desc.ParamAttribute( + label='Describer Methods', + description='''(methods to use to describe an image): SIFT (default), SIFT_FLOAT to use SIFT stored as float, AKAZE: AKAZE with floating point descriptors, AKAZE_MLDB: AKAZE with binary descriptors use the found model to improve the pairwise correspondences.''', + value='', + shortName='m', + arg='', + uid=[0], + isOutput=False, + ) + featuresDir = desc.FileAttribute( + label='Features Dir', + description='''Path to directory containing the extracted features (default: $out_dir)''', + value='', + shortName='F', + arg='', + uid=[0], + isOutput=False, + ) + save_putative_matches = desc.ParamAttribute( + label='Save Putative Matches', + description='''Save putative matches''', + value='', + shortName='p', + arg='', + uid=[0], + isOutput=False, + ) + ratio = desc.ParamAttribute( + label='Ratio', + description='''Distance ratio to discard non meaningful matches 0.8: (default).''', + value='', + shortName='r', + arg='', + uid=[0], + isOutput=False, + ) + geometric_model = desc.ParamAttribute( + label='Geometric Model', + description='''(pairwise correspondences filtering thanks to robust model estimation): f: (default) fundamental matrix, e: essential matrix, h: homography matrix.''', + value='', + shortName='g', + arg='', + uid=[0], + isOutput=False, + ) + video_mode_matching = desc.ParamAttribute( + label='Video Mode Matching', + description='''(sequence matching with an overlap of X images) X: with match 0 with (1->X), ...] 2: will match 0 with (1,2), 1 with (2,3), ... 3: will match 0 with (1,2,3), 1 with (2,3,4), ...''', + value='', + shortName='v', + arg='', + uid=[0], + isOutput=False, + ) + pair_list = desc.FileAttribute( + label='Pair List', + description='''filepath A file which contains the list of matches to perform.''', + value='', + shortName='l', + arg='', + uid=[0], + isOutput=False, + ) + range_start = desc.ParamAttribute( + label='Range Start', + description='''range image index start To compute only the matches for specified range. This allows to compute different matches on different computers in parallel.''', + value='', + shortName='s', + arg='', + uid=[0], + isOutput=False, + ) + range_size = desc.ParamAttribute( + label='Range Size', + description='''range size To compute only the matches for specified range. This allows to compute different matches on different computers in parallel.''', + value='', + shortName='d', + arg='', + uid=[0], + isOutput=False, + ) + nearest_matching_method = desc.ParamAttribute( + label='Nearest Matching Method', + description='''For Scalar based regions descriptor: BRUTE_FORCE_L2: L2 BruteForce matching, ANN_L2: L2 Approximate Nearest Neighbor matching (default), CASCADE_HASHING_L2: L2 Cascade Hashing matching. FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory). For Binary based descriptor: BRUTE_FORCE_HAMMING: BruteForce Hamming matching.''', + value='', + shortName='n', + arg='', + uid=[0], + isOutput=False, + ) + geometricEstimator = desc.ParamAttribute( + label='Geometric Estimator', + description='''Geometric estimator acransac: A-Contrario Ransac (default), loransac: LO-Ransac (only available for fundamental matrix)''', + value='', + shortName='G', + arg='', + uid=[0], + isOutput=False, + ) + guided_matching = desc.ParamAttribute( + label='Guided Matching', + description='''use the found model to improve the pairwise correspondences.''', + value='', + shortName='M', + arg='', + uid=[0], + isOutput=False, + ) + max_iteration = desc.ParamAttribute( + label='Max Iteration', + description='''number of maximum iterations allowed in ransac step.''', + value='', + shortName='I', + arg='', + uid=[0], + isOutput=False, + ) + match_file_per_image = desc.FileAttribute( + label='Match File Per Image', + description='''Save matches in a separate file per image''', + value='', + shortName='x', + arg='', + uid=[0], + isOutput=False, + ) + max_matches = desc.ParamAttribute( + label='Max Matches', + description='''''', + value='', + shortName='u', + arg='', + uid=[0], + isOutput=False, + ) + use_grid_sort = desc.ParamAttribute( + label='Use Grid Sort', + description='''Use matching grid sort''', + value='', + shortName='y', + arg='', + uid=[0], + isOutput=False, + ) + export_debug_files = desc.FileAttribute( + label='Export Debug Files', + description='''Export debug files (svg, dot)''', + value='', + shortName='e', + arg='', + uid=[0], + isOutput=False, + ) + fileExtension = desc.FileAttribute( + label='File Extension', + description='''File extension to store matches: bin (default), txt Unrecognized option --help''', + value='', + shortName='t', + arg='', + uid=[0], + isOutput=False, + ) \ No newline at end of file diff --git a/meshroom/ImageMatching.py b/meshroom/ImageMatching.py new file mode 100644 index 0000000000..ac97404c0b --- /dev/null +++ b/meshroom/ImageMatching.py @@ -0,0 +1,55 @@ + +from meshroom.processGraph import desc + +class ImageMatching(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'openMVG_main_generatePairList {allParams}' + + verbose = desc.ParamAttribute( + label='Verbose', + description='''Verbosity level, 0 to mute.''', + value=1, + shortName='v', + arg='arg', + uid=[0], + ) + weights = desc.FileAttribute( + label='Weights', + description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''', + value='', + shortName='w', + arg='arg', + uid=[0], + ) + tree = desc.FileAttribute( + label='Tree', + description='''Input name for the tree file''', + value='', + shortName='t', + arg='arg', + uid=[0], + ) + keylist = desc.FileAttribute( + label='Keylist', + description='''Path to the list file (list.txt or sfm_data) generated by OpenMVG or the path to a directory containing the descriptors.''', + value='', + shortName='l', + arg='arg', + uid=[0], + ) + nbMaxDescriptors = desc.ParamAttribute( + label='Nb Max Descriptors', + description='''Limit the number of descriptors you load per image. Zero means no limit.''', + value=0, + shortName='m', + arg='arg', + uid=[0], + ) + outfile = desc.FileAttribute( + label='Outfile', + description='''(=pairList.txt) Name of the output file.''', + value='', + shortName='o', + arg='arg', + uid=[0], + ) \ No newline at end of file diff --git a/meshroom/StructureFromMotion.py b/meshroom/StructureFromMotion.py new file mode 100644 index 0000000000..0d9aef09c6 --- /dev/null +++ b/meshroom/StructureFromMotion.py @@ -0,0 +1,133 @@ + +from meshroom.processGraph import desc + +class StructureFromMotion(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'openMVG_main_IncrementalSfM {allParams}' + + input_file = desc.FileAttribute( + label='Input File', + description='''path to a SfM_Data scene''', + value='', + shortName='i', + arg='', + uid=[0], + isOutput=False, + ) + describerMethods = desc.ParamAttribute( + label='Describer Methods', + description='''(methods to use to describe an image): SIFT (default), SIFT_FLOAT to use SIFT stored as float, AKAZE: AKAZE with floating point descriptors, AKAZE_MLDB: AKAZE with binary descriptors''', + value='SIFT', + shortName='d', + arg='', + uid=[0], + isOutput=False, + ) + matchdir = desc.FileAttribute( + label='Matchdir', + description='''path to the matches that corresponds to the provided SfM_Data scene''', + value='', + shortName='m', + arg='', + uid=[0], + isOutput=False, + ) + featuresDir = desc.FileAttribute( + label='Features Dir', + description='''path to directory containing the extracted features (default: $matchdir)''', + value='', + shortName='F', + arg='', + uid=[0], + isOutput=False, + ) + outdir = desc.FileAttribute( + label='Outdir', + description='''path where the output data will be stored''', + value='{cache}/{nodeType}/{uid0}/', + shortName='o', + arg='', + uid=[0], + isOutput=True, + ) + out_sfmdata_file = desc.FileAttribute( + label='Out Sfmdata File', + description='''path of the output sfmdata file (default: $outdir/sfm_data.json)''', + value='{cache}/{nodeType}/{uid0}/sfm.json', + shortName='s', + arg='', + uid=[0], + isOutput=True, + ) + inter_file_extension = desc.FileAttribute( + label='Inter File Extension', + description='''extension of the intermediate file export (default: .ply)''', + value='.ply', + shortName='e', + arg='', + uid=[0], + isOutput=False, + ) + # initialPairA = desc.FileAttribute( + # label='Initial Pair A', + # description='''filename of the first image (without path)''', + # value='', + # shortName='a', + # arg='', + # uid=[0], + # isOutput=False, + # ) + # initialPairB = desc.FileAttribute( + # label='Initial Pair B', + # description='''filename of the second image (without path)''', + # value='', + # shortName='b', + # arg='', + # uid=[0], + # isOutput=False, + # ) + camera_model = desc.ParamAttribute( + label='Camera Model', + description='''Camera model type for view with unknown intrinsic: 1: Pinhole 2: Pinhole radial 1 3: Pinhole radial 3 (default)''', + value=3, + shortName='c', + arg='', + uid=[0], + isOutput=False, + ) + refineIntrinsics = desc.ParamAttribute( + label='Refine Intrinsics', + description='''0-> intrinsic parameters are kept as constant 1-> refine intrinsic parameters (default).''', + value=1, + shortName='f', + arg='', + uid=[0], + isOutput=False, + ) + minInputTrackLength = desc.ParamAttribute( + label='Min Input Track Length', + description='''minimum track length in input of SfM (default: 2)''', + value=2, + shortName='t', + arg='N', + uid=[0], + isOutput=False, + ) + # matchFilePerImage = desc.FileAttribute( + # label='Match File Per Image', + # description='''To use one match file per image instead of a global file.''', + # value=1, + # shortName='p', + # arg='', + # uid=[0], + # isOutput=False, + # ) + allowUserInteraction = desc.ParamAttribute( + label='Allow User Interaction', + description='''Enable/Disable user interactions. (default: true) If the process is done on renderfarm, it doesn't make sense to wait for user inputs. Unrecognized option --help''', + value=0, + shortName='u', + arg='', + uid=[0], + isOutput=False, + ) \ No newline at end of file From aa051e584394ba9879b393b5f6b627c6fa812939 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabien.castan@free.fr> Date: Tue, 26 Sep 2017 11:11:57 +0200 Subject: [PATCH 0004/1093] Add first version of the MVS nodes --- meshroom/CamPairs.py | 15 +++++++++++++ meshroom/DepthMap.py | 15 +++++++++++++ meshroom/DepthMapFilter.py | 15 +++++++++++++ meshroom/Fuse.py | 15 +++++++++++++ meshroom/Meshing.py | 15 +++++++++++++ meshroom/PrepareDenseScene.py | 41 +++++++++++++++++++++++++++++++++++ meshroom/Texturing.py | 15 +++++++++++++ 7 files changed, 131 insertions(+) create mode 100644 meshroom/CamPairs.py create mode 100644 meshroom/DepthMap.py create mode 100644 meshroom/DepthMapFilter.py create mode 100644 meshroom/Fuse.py create mode 100644 meshroom/Meshing.py create mode 100644 meshroom/PrepareDenseScene.py create mode 100644 meshroom/Texturing.py diff --git a/meshroom/CamPairs.py b/meshroom/CamPairs.py new file mode 100644 index 0000000000..ef9414ae2c --- /dev/null +++ b/meshroom/CamPairs.py @@ -0,0 +1,15 @@ +from meshroom.processGraph import desc + +class CamPairs(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'CMPMVS {mvsConfigValue} --computeCamPairs' + + mvsConfig = desc.FileAttribute( + label='MVS Configuration file', + description='', + value=None, + shortName='', + arg='', + uid=[0], + isOutput=False, + ) diff --git a/meshroom/DepthMap.py b/meshroom/DepthMap.py new file mode 100644 index 0000000000..b6562ac14e --- /dev/null +++ b/meshroom/DepthMap.py @@ -0,0 +1,15 @@ +from meshroom.processGraph import desc + +class DepthMap(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'CMPMVS {mvsConfigValue} --createDepthmap' + + mvsConfig = desc.FileAttribute( + label='MVS Configuration file', + description='', + value='', + shortName='', + arg='', + uid=[0], + isOutput=False, + ) diff --git a/meshroom/DepthMapFilter.py b/meshroom/DepthMapFilter.py new file mode 100644 index 0000000000..6727b5bb0a --- /dev/null +++ b/meshroom/DepthMapFilter.py @@ -0,0 +1,15 @@ +from meshroom.processGraph import desc + +class DepthMapFilter(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'CMPMVS {mvsConfigValue} --filterDepthmap' + + mvsConfig = desc.FileAttribute( + label='MVS Configuration file', + description='', + value='', + shortName='', + arg='', + uid=[0], + isOutput=False, + ) diff --git a/meshroom/Fuse.py b/meshroom/Fuse.py new file mode 100644 index 0000000000..7ef9642edd --- /dev/null +++ b/meshroom/Fuse.py @@ -0,0 +1,15 @@ +from meshroom.processGraph import desc + +class Fuse(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'CMPMVS {mvsConfigValue} --fuse' + + mvsConfig = desc.FileAttribute( + label='MVS Configuration file', + description='', + value='', + shortName='', + arg='', + uid=[0], + isOutput=False, + ) diff --git a/meshroom/Meshing.py b/meshroom/Meshing.py new file mode 100644 index 0000000000..b69c32863f --- /dev/null +++ b/meshroom/Meshing.py @@ -0,0 +1,15 @@ +from meshroom.processGraph import desc + +class Meshing(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'CMPMVS {mvsConfigValue} --meshing' + + mvsConfig = desc.FileAttribute( + label='MVS Configuration file', + description='', + value='', + shortName='', + arg='', + uid=[0], + isOutput=False, + ) diff --git a/meshroom/PrepareDenseScene.py b/meshroom/PrepareDenseScene.py new file mode 100644 index 0000000000..4b87a49865 --- /dev/null +++ b/meshroom/PrepareDenseScene.py @@ -0,0 +1,41 @@ +from meshroom.processGraph import desc + +class PrepareDenseScene(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'openMVG_main_openMVG2CMPMVS2 {allParams}' + + outdir = desc.FileAttribute( + label='Outdir', + description='''path Invalid command line parameter.''', + value='{cache}/{nodeType}/{uid0}/', + shortName='o', + arg='', + isOutput=True, + ) + mvsConfig = desc.FileAttribute( + label='MVS Configuration file', + description='', + value='{cache}/{nodeType}/{uid0}/_tmp_scale{scaleValue}/mvs.ini', + shortName='', + arg='', + isOutput=True, + ) + + sfmdata = desc.FileAttribute( + label='Sfmdata', + description='''filename, the SfM_Data file to convert''', + value='', + shortName='i', + arg='', + uid=[0], + isOutput=False, + ) + scale = desc.ParamAttribute( + label='Scale', + description='''downscale image factor''', + value=2, + shortName='s', + arg='', + uid=[0], + isOutput=False, + ) diff --git a/meshroom/Texturing.py b/meshroom/Texturing.py new file mode 100644 index 0000000000..038054ae5c --- /dev/null +++ b/meshroom/Texturing.py @@ -0,0 +1,15 @@ +from meshroom.processGraph import desc + +class Texturing(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'CMPMVS {mvsConfigValue} --texturing' + + mvsConfig = desc.FileAttribute( + label='MVS Configuration file', + description='', + value='', + shortName='', + arg='', + uid=[0], + isOutput=False, + ) From 262acbc7b2abf380431d9b7f69ea7d263e21b5cf Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabien.castan@free.fr> Date: Mon, 2 Oct 2017 08:04:48 +0200 Subject: [PATCH 0005/1093] [nodes] use FileAttribute for file params --- meshroom/CameraInit.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/meshroom/CameraInit.py b/meshroom/CameraInit.py index 611dc96efe..bdea90c842 100644 --- a/meshroom/CameraInit.py +++ b/meshroom/CameraInit.py @@ -5,7 +5,7 @@ class CameraInit(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'openMVG_main_SfMInit_ImageListing {allParams}' - imageDirectory = desc.ParamAttribute( + imageDirectory = desc.FileAttribute( label='Image Directory', description='''''', value='', @@ -23,7 +23,7 @@ class CameraInit(desc.CommandLineNode): uid=[0], isOutput=False, ) - sensorWidthDatabase = desc.ParamAttribute( + sensorWidthDatabase = desc.FileAttribute( label='Sensor Width Database', description='''''', value='', @@ -32,22 +32,20 @@ class CameraInit(desc.CommandLineNode): uid=[0], isOutput=False, ) - outputDirectory = desc.ParamAttribute( + outputDirectory = desc.FileAttribute( label='Output Directory', description='''''', value='{cache}/{nodeType}/{uid0}/', shortName='o', arg='', - uid=[0], isOutput=True, ) - outputSfm = desc.ParamAttribute( # not command line + outputSfm = desc.FileAttribute( # not command line label='Output SfM', description='''''', value='{cache}/{nodeType}/{uid0}/sfm_data.json', shortName='o', arg='', - uid=[0], isOutput=True, group='', ) @@ -113,4 +111,4 @@ class CameraInit(desc.CommandLineNode): arg='', uid=[0], isOutput=False, - ) \ No newline at end of file + ) From dd6f526ea99c89caef2307370cdb945f013c6798 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabien.castan@free.fr> Date: Mon, 2 Oct 2017 08:05:14 +0200 Subject: [PATCH 0006/1093] [nodes] mvsConfig is not a command line argument --- meshroom/PrepareDenseScene.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/PrepareDenseScene.py b/meshroom/PrepareDenseScene.py index 4b87a49865..6ce16f8b76 100644 --- a/meshroom/PrepareDenseScene.py +++ b/meshroom/PrepareDenseScene.py @@ -12,12 +12,13 @@ class PrepareDenseScene(desc.CommandLineNode): arg='', isOutput=True, ) - mvsConfig = desc.FileAttribute( + mvsConfig = desc.FileAttribute( # not a command line arg label='MVS Configuration file', description='', value='{cache}/{nodeType}/{uid0}/_tmp_scale{scaleValue}/mvs.ini', shortName='', arg='', + group='', isOutput=True, ) From dd78198804aaa62606c5229630ff9aab9369fa8d Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 9 Oct 2017 12:16:20 +0200 Subject: [PATCH 0007/1093] rename package 'processGraph' to 'core' --- meshroom/CamPairs.py | 2 +- meshroom/CameraInit.py | 2 +- meshroom/DepthMap.py | 2 +- meshroom/DepthMapFilter.py | 2 +- meshroom/FeatureExtraction.py | 2 +- meshroom/FeatureMatching.py | 2 +- meshroom/Fuse.py | 2 +- meshroom/ImageMatching.py | 2 +- meshroom/Meshing.py | 2 +- meshroom/PrepareDenseScene.py | 2 +- meshroom/StructureFromMotion.py | 2 +- meshroom/Texturing.py | 2 +- meshroom/appendText.py | 2 +- meshroom/ls.py | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/meshroom/CamPairs.py b/meshroom/CamPairs.py index ef9414ae2c..dee87dba60 100644 --- a/meshroom/CamPairs.py +++ b/meshroom/CamPairs.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class CamPairs(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/CameraInit.py b/meshroom/CameraInit.py index bdea90c842..eae3cc212e 100644 --- a/meshroom/CameraInit.py +++ b/meshroom/CameraInit.py @@ -1,5 +1,5 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class CameraInit(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/DepthMap.py b/meshroom/DepthMap.py index b6562ac14e..9a8174e524 100644 --- a/meshroom/DepthMap.py +++ b/meshroom/DepthMap.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class DepthMap(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/DepthMapFilter.py b/meshroom/DepthMapFilter.py index 6727b5bb0a..d15f6ebc1d 100644 --- a/meshroom/DepthMapFilter.py +++ b/meshroom/DepthMapFilter.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class DepthMapFilter(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/FeatureExtraction.py b/meshroom/FeatureExtraction.py index bf89ddb765..784cc2731e 100644 --- a/meshroom/FeatureExtraction.py +++ b/meshroom/FeatureExtraction.py @@ -1,5 +1,5 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class FeatureExtraction(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/FeatureMatching.py b/meshroom/FeatureMatching.py index 45028a73cc..1242c3737f 100644 --- a/meshroom/FeatureMatching.py +++ b/meshroom/FeatureMatching.py @@ -1,5 +1,5 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class FeatureMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/Fuse.py b/meshroom/Fuse.py index 7ef9642edd..8bd9dd1748 100644 --- a/meshroom/Fuse.py +++ b/meshroom/Fuse.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class Fuse(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/ImageMatching.py b/meshroom/ImageMatching.py index ac97404c0b..83a658d162 100644 --- a/meshroom/ImageMatching.py +++ b/meshroom/ImageMatching.py @@ -1,5 +1,5 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class ImageMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/Meshing.py b/meshroom/Meshing.py index b69c32863f..2bd7b966c4 100644 --- a/meshroom/Meshing.py +++ b/meshroom/Meshing.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class Meshing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/PrepareDenseScene.py b/meshroom/PrepareDenseScene.py index 6ce16f8b76..a95bd70fde 100644 --- a/meshroom/PrepareDenseScene.py +++ b/meshroom/PrepareDenseScene.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class PrepareDenseScene(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/StructureFromMotion.py b/meshroom/StructureFromMotion.py index 0d9aef09c6..f2e5a54ce2 100644 --- a/meshroom/StructureFromMotion.py +++ b/meshroom/StructureFromMotion.py @@ -1,5 +1,5 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class StructureFromMotion(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/Texturing.py b/meshroom/Texturing.py index 038054ae5c..4113e6ee0d 100644 --- a/meshroom/Texturing.py +++ b/meshroom/Texturing.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class Texturing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' diff --git a/meshroom/appendText.py b/meshroom/appendText.py index a347fa2727..da912113d2 100644 --- a/meshroom/appendText.py +++ b/meshroom/appendText.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class AppendText(desc.CommandLineNode): diff --git a/meshroom/ls.py b/meshroom/ls.py index 7fddd3db5e..532be991e1 100644 --- a/meshroom/ls.py +++ b/meshroom/ls.py @@ -1,4 +1,4 @@ -from meshroom.processGraph import desc +from meshroom.core import desc class Ls(desc.CommandLineNode): From c613c507fe032c95008d70d0c099bc9a8e14a085 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Wed, 11 Oct 2017 18:12:28 +0200 Subject: [PATCH 0008/1093] Move nodes into subfolders --- meshroom/{ => aliceVision}/CamPairs.py | 0 meshroom/{ => aliceVision}/CameraInit.py | 0 meshroom/{ => aliceVision}/DepthMap.py | 0 meshroom/{ => aliceVision}/DepthMapFilter.py | 0 meshroom/{ => aliceVision}/FeatureExtraction.py | 0 meshroom/{ => aliceVision}/FeatureMatching.py | 0 meshroom/{ => aliceVision}/Fuse.py | 0 meshroom/{ => aliceVision}/ImageMatching.py | 0 meshroom/{ => aliceVision}/Meshing.py | 0 meshroom/{ => aliceVision}/PrepareDenseScene.py | 0 meshroom/{ => aliceVision}/StructureFromMotion.py | 0 meshroom/{ => aliceVision}/Texturing.py | 0 meshroom/aliceVision/__init__.py | 2 ++ meshroom/test/__init__.py | 2 ++ meshroom/{ => test}/appendText.py | 0 meshroom/{ => test}/ls.py | 0 16 files changed, 4 insertions(+) rename meshroom/{ => aliceVision}/CamPairs.py (100%) rename meshroom/{ => aliceVision}/CameraInit.py (100%) rename meshroom/{ => aliceVision}/DepthMap.py (100%) rename meshroom/{ => aliceVision}/DepthMapFilter.py (100%) rename meshroom/{ => aliceVision}/FeatureExtraction.py (100%) rename meshroom/{ => aliceVision}/FeatureMatching.py (100%) rename meshroom/{ => aliceVision}/Fuse.py (100%) rename meshroom/{ => aliceVision}/ImageMatching.py (100%) rename meshroom/{ => aliceVision}/Meshing.py (100%) rename meshroom/{ => aliceVision}/PrepareDenseScene.py (100%) rename meshroom/{ => aliceVision}/StructureFromMotion.py (100%) rename meshroom/{ => aliceVision}/Texturing.py (100%) create mode 100644 meshroom/aliceVision/__init__.py create mode 100644 meshroom/test/__init__.py rename meshroom/{ => test}/appendText.py (100%) rename meshroom/{ => test}/ls.py (100%) diff --git a/meshroom/CamPairs.py b/meshroom/aliceVision/CamPairs.py similarity index 100% rename from meshroom/CamPairs.py rename to meshroom/aliceVision/CamPairs.py diff --git a/meshroom/CameraInit.py b/meshroom/aliceVision/CameraInit.py similarity index 100% rename from meshroom/CameraInit.py rename to meshroom/aliceVision/CameraInit.py diff --git a/meshroom/DepthMap.py b/meshroom/aliceVision/DepthMap.py similarity index 100% rename from meshroom/DepthMap.py rename to meshroom/aliceVision/DepthMap.py diff --git a/meshroom/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py similarity index 100% rename from meshroom/DepthMapFilter.py rename to meshroom/aliceVision/DepthMapFilter.py diff --git a/meshroom/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py similarity index 100% rename from meshroom/FeatureExtraction.py rename to meshroom/aliceVision/FeatureExtraction.py diff --git a/meshroom/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py similarity index 100% rename from meshroom/FeatureMatching.py rename to meshroom/aliceVision/FeatureMatching.py diff --git a/meshroom/Fuse.py b/meshroom/aliceVision/Fuse.py similarity index 100% rename from meshroom/Fuse.py rename to meshroom/aliceVision/Fuse.py diff --git a/meshroom/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py similarity index 100% rename from meshroom/ImageMatching.py rename to meshroom/aliceVision/ImageMatching.py diff --git a/meshroom/Meshing.py b/meshroom/aliceVision/Meshing.py similarity index 100% rename from meshroom/Meshing.py rename to meshroom/aliceVision/Meshing.py diff --git a/meshroom/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py similarity index 100% rename from meshroom/PrepareDenseScene.py rename to meshroom/aliceVision/PrepareDenseScene.py diff --git a/meshroom/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py similarity index 100% rename from meshroom/StructureFromMotion.py rename to meshroom/aliceVision/StructureFromMotion.py diff --git a/meshroom/Texturing.py b/meshroom/aliceVision/Texturing.py similarity index 100% rename from meshroom/Texturing.py rename to meshroom/aliceVision/Texturing.py diff --git a/meshroom/aliceVision/__init__.py b/meshroom/aliceVision/__init__.py new file mode 100644 index 0000000000..d879df156c --- /dev/null +++ b/meshroom/aliceVision/__init__.py @@ -0,0 +1,2 @@ +__version__ = 'develop' + diff --git a/meshroom/test/__init__.py b/meshroom/test/__init__.py new file mode 100644 index 0000000000..d879df156c --- /dev/null +++ b/meshroom/test/__init__.py @@ -0,0 +1,2 @@ +__version__ = 'develop' + diff --git a/meshroom/appendText.py b/meshroom/test/appendText.py similarity index 100% rename from meshroom/appendText.py rename to meshroom/test/appendText.py diff --git a/meshroom/ls.py b/meshroom/test/ls.py similarity index 100% rename from meshroom/ls.py rename to meshroom/test/ls.py From 9693241f6abc4661d5842120d2e06836004fdbb6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 16 Oct 2017 10:56:05 +0200 Subject: [PATCH 0009/1093] [core] split Param into specific types and update nodes accordingly --- meshroom/aliceVision/CamPairs.py | 6 +- meshroom/aliceVision/CameraInit.py | 118 ++++------- meshroom/aliceVision/DepthMap.py | 4 +- meshroom/aliceVision/DepthMapFilter.py | 4 +- meshroom/aliceVision/FeatureExtraction.py | 86 ++++---- meshroom/aliceVision/FeatureMatching.py | 221 +++++++++----------- meshroom/aliceVision/Fuse.py | 15 -- meshroom/aliceVision/ImageMatching.py | 75 +++---- meshroom/aliceVision/Meshing.py | 4 +- meshroom/aliceVision/PrepareDenseScene.py | 54 ++--- meshroom/aliceVision/StructureFromMotion.py | 158 ++++++-------- meshroom/aliceVision/Texturing.py | 4 +- meshroom/test/appendText.py | 15 +- meshroom/test/ls.py | 10 +- 14 files changed, 335 insertions(+), 439 deletions(-) delete mode 100644 meshroom/aliceVision/Fuse.py diff --git a/meshroom/aliceVision/CamPairs.py b/meshroom/aliceVision/CamPairs.py index dee87dba60..e6a3d7e685 100644 --- a/meshroom/aliceVision/CamPairs.py +++ b/meshroom/aliceVision/CamPairs.py @@ -4,12 +4,10 @@ class CamPairs(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --computeCamPairs' - mvsConfig = desc.FileAttribute( + mvsConfig = desc.File( label='MVS Configuration file', description='', - value=None, - shortName='', - arg='', + value='', uid=[0], isOutput=False, ) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index eae3cc212e..a9fb02f616 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,114 +1,88 @@ - +import sys from meshroom.core import desc + class CameraInit(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'openMVG_main_SfMInit_ImageListing {allParams}' + commandLine = 'aliceVision_cameraInit {allParams}' - imageDirectory = desc.FileAttribute( + imageDirectory = desc.File( label='Image Directory', - description='''''', + description='''Input images folder.''', value='', - shortName='i', - arg='', uid=[0], isOutput=False, ) - jsonFile = desc.FileAttribute( + jsonFile = desc.File( label='Json File', description='''Input file with all the user options. It can be used to provide a list of images instead of a directory.''', value='', - shortName='j', - arg='', uid=[0], isOutput=False, ) - sensorWidthDatabase = desc.FileAttribute( - label='Sensor Width Database', - description='''''', + sensorDatabase = desc.File( + label='Sensor Database', + description='''Camera sensor width database path.''', value='', - shortName='d', - arg='', uid=[0], isOutput=False, ) - outputDirectory = desc.FileAttribute( - label='Output Directory', - description='''''', + output = desc.File( + label='Output', + description='''Output directory for the new SfMData file Optional parameters:''', value='{cache}/{nodeType}/{uid0}/', - shortName='o', - arg='', + uid=[], isOutput=True, ) - outputSfm = desc.FileAttribute( # not command line + outputSfm = desc.File( label='Output SfM', description='''''', value='{cache}/{nodeType}/{uid0}/sfm_data.json', - shortName='o', - arg='', + uid=[], isOutput=True, - group='', + group='', # not a command line argument ) - focal = desc.ParamAttribute( - label='Focal', - description='''(pixels)''', - value='', - shortName='f', - arg='', + defaultFocalLengthPix = desc.IntParam( + label='Default Focal Length Pix', + description='''Focal length in pixels.''', + value=-1, + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - isOutput=False, ) - sensorWidth = desc.ParamAttribute( - label='Sensor Width', - description='''(mm)''', - value='', - shortName='s', - arg='', + defaultSensorWidth = desc.IntParam( + label='Default Sensor Width', + description='''Sensor width in mm.''', + value=-1, + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - isOutput=False, ) - intrinsics = desc.ParamAttribute( - label='Intrinsics', - description='''Kmatrix: "f;0;ppx;0;f;ppy;0;0;1"''', + defaultIntrinsics = desc.StringParam( + label='Default Intrinsics', + description='''Intrinsics Kmatrix "f;0;ppx;0;f;ppy;0;0;1".''', value='', - shortName='k', - arg='', uid=[0], - isOutput=False, ) - camera_model = desc.ParamAttribute( - label='Camera Model', - description='''Camera model type (pinhole, radial1, radial3, brown or fisheye4)''', + defaultCameraModel = desc.ChoiceParam( + label='Default Camera Model', + description='''Camera model type (pinhole, radial1, radial3, brown, fisheye4).''', value='', - shortName='c', - arg='', + values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], + exclusive=True, uid=[0], - isOutput=False, ) - group_camera_model = desc.FileAttribute( + groupCameraModel = desc.ChoiceParam( label='Group Camera Model', - description='''0-> each view have its own camera intrinsic parameters, 1-> (default) view share camera intrinsic parameters based on metadata, if no metadata each view has its own camera intrinsic parameters 2-> view share camera intrinsic parameters based on metadata, if no metadata they are grouped by folder''', - value='', - shortName='g', - arg='', - uid=[0], - isOutput=False, - ) - use_UID = desc.ParamAttribute( - label='Use U I D', - description='''Generate a UID (unique identifier) for each view. By default, the key is the image index.''', - value='', - shortName='u', - arg='', + description='''* 0: each view have its own camera intrinsic parameters * 1: view share camera intrinsic parameters based on metadata, if no metadata each view has its own camera intrinsic parameters * 2: view share camera intrinsic parameters based on metadata, if no metadata they are grouped by folder Log parameters:''', + value=1, + values=[0, 1, 2], + exclusive=True, uid=[0], - isOutput=False, ) - storeMetadata = desc.ParamAttribute( - label='Store Metadata', - description='''Store image metadata in the sfm data Unrecognized option --help''', - value='', - shortName='m', - arg='', + verboseLevel = desc.ChoiceParam( + label='Verbose Level', + description='''verbosity level (fatal, error, warning, info, debug, trace).''', + value='info', + values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], + exclusive=True, uid=[0], - isOutput=False, - ) + ) \ No newline at end of file diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 9a8174e524..881b59b720 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -4,12 +4,10 @@ class DepthMap(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --createDepthmap' - mvsConfig = desc.FileAttribute( + mvsConfig = desc.File( label='MVS Configuration file', description='', value='', - shortName='', - arg='', uid=[0], isOutput=False, ) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index d15f6ebc1d..d4d5be62e8 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -4,12 +4,10 @@ class DepthMapFilter(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --filterDepthmap' - mvsConfig = desc.FileAttribute( + mvsConfig = desc.File( label='MVS Configuration file', description='', value='', - shortName='', - arg='', uid=[0], isOutput=False, ) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 784cc2731e..63eb4122ab 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -1,70 +1,64 @@ - +import sys from meshroom.core import desc + class FeatureExtraction(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'openMVG_main_ComputeFeatures {allParams}' + commandLine = 'aliceVision_featureExtraction {allParams}' - input_file = desc.FileAttribute( - label='Input File', - description='''a SfM_Data file''', + input = desc.File( + label='Input', + description='''SfMData file.''', value='', - shortName='i', - arg='', uid=[0], isOutput=False, ) - outdir = desc.FileAttribute( - label='Outdir', - description='''output path for the features and descriptors files (*.feat, *.desc) [Optional]''', + output = desc.File( + label='Output', + description='''Output path for the features and descriptors files (*.feat, *.desc). Optional parameters:''', value='{cache}/{nodeType}/{uid0}/', - shortName='o', - arg='path', - uid=[0], + uid=[], isOutput=True, ) - force = desc.ParamAttribute( - label='Force', - description='''Force to recompute data''', - value='', - shortName='f', - arg='', + describerTypes = desc.StringParam( + label='Describer Types', + description='''Describer types to use to describe an image:''', + value='SIFT', uid=[0], - isOutput=False, ) - describerMethods = desc.ParamAttribute( - label='Describer Methods', - description='''(methods to use to describe an image): SIFT (default), SIFT_FLOAT to use SIFT stored as float, AKAZE: AKAZE with floating point descriptors, AKAZE_MLDB: AKAZE with binary descriptors''', - value='', - shortName='m', - arg='', + describerPreset = desc.ChoiceParam( + label='Describer Preset', + description='''Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration 'ultra' can take long time !''', + value='NORMAL', + values=['low', 'medium', 'normal', 'high', 'ultra'], + exclusive=True, uid=[0], - isOutput=False, ) - upright = desc.ParamAttribute( + upright = desc.StringParam( label='Upright', - description='''Use Upright feature 0 or 1''', + description='''Upright feature.''', value='', - shortName='u', - arg='', uid=[0], - isOutput=False, ) - describerPreset = desc.ParamAttribute( - label='Describer Preset', - description='''(used to control the Image_describer configuration): LOW, MEDIUM, NORMAL (default), HIGH, ULTRA: !!Can take long time!!''', - value='', - shortName='p', - arg='', + rangeStart = desc.IntParam( + label='Range Start', + description='''Range image index start.''', + value=-1, + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - isOutput=False, ) - jobs = desc.ParamAttribute( - label='Jobs', - description='''Specifies the number of jobs to run simultaneously. Use -j 0 for automatic mode. Unrecognized option --help''', - value='', - shortName='j', - arg='', + rangeSize = desc.IntParam( + label='Range Size', + description='''Range size. Log parameters:''', + value=1, + range=(-sys.maxsize, sys.maxsize, 1), + uid=[0], + ) + verboseLevel = desc.ChoiceParam( + label='Verbose Level', + description='''verbosity level (fatal, error, warning, info, debug, trace).''', + value='info', + values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], + exclusive=True, uid=[0], - isOutput=False, ) \ No newline at end of file diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 1242c3737f..d67ea5fcf0 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -1,187 +1,156 @@ - +import sys from meshroom.core import desc + class FeatureMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'openMVG_main_ComputeMatches {allParams}' + commandLine = 'aliceVision_featureMatching {allParams}' - input_file = desc.FileAttribute( - label='Input File', - description='''a SfM_Data file''', + input = desc.File( + label='Input', + description='''SfMData file.''', value='', - shortName='i', - arg='', uid=[0], isOutput=False, ) - out_dir = desc.FileAttribute( - label='Out Dir', - description='''path to directory in which computed matches will be stored [Optional]''', + output = desc.File( + label='Output', + description='''Path to a directory in which computed matches will be stored. Optional parameters:''', value='{cache}/{nodeType}/{uid0}/', - shortName='o', - arg='path', - uid=[0], + uid=[], isOutput=True, ) - describerMethods = desc.ParamAttribute( - label='Describer Methods', - description='''(methods to use to describe an image): SIFT (default), SIFT_FLOAT to use SIFT stored as float, AKAZE: AKAZE with floating point descriptors, AKAZE_MLDB: AKAZE with binary descriptors use the found model to improve the pairwise correspondences.''', - value='', - shortName='m', - arg='', + geometricModel = desc.ChoiceParam( + label='Geometric Model', + description='''Pairwise correspondences filtering thanks to robust model estimation: * f: fundamental matrix * e: essential matrix * h: homography matrix''', + value='f', + values=['f', 'e', 'h'], + exclusive=True, uid=[0], - isOutput=False, ) - featuresDir = desc.FileAttribute( - label='Features Dir', - description='''Path to directory containing the extracted features (default: $out_dir)''', - value='', - shortName='F', - arg='', + describerTypes = desc.StringParam( + label='Describer Types', + description='''Describer types to use to describe an image:''', + value='SIFT', uid=[0], - isOutput=False, ) - save_putative_matches = desc.ParamAttribute( - label='Save Putative Matches', - description='''Save putative matches''', + featuresDirectory = desc.File( + label='Features Directory', + description='''Path to a directory containing the extracted features.''', value='', - shortName='p', - arg='', uid=[0], isOutput=False, ) - ratio = desc.ParamAttribute( - label='Ratio', - description='''Distance ratio to discard non meaningful matches 0.8: (default).''', + imagePairsList = desc.File( + label='Image Pairs List', + description='''Path to a file which contains the list of image pairs to match.''', value='', - shortName='r', - arg='', uid=[0], isOutput=False, ) - geometric_model = desc.ParamAttribute( - label='Geometric Model', - description='''(pairwise correspondences filtering thanks to robust model estimation): f: (default) fundamental matrix, e: essential matrix, h: homography matrix.''', - value='', - shortName='g', - arg='', + photometricMatchingMethod = desc.ChoiceParam( + label='Photometric Matching Method', + description='''For Scalar based regions descriptor: * BRUTE_FORCE_L2: L2 BruteForce matching * ANN_L2: L2 Approximate Nearest Neighbor matching * CASCADE_HASHING_L2: L2 Cascade Hashing matching * FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory) For Binary based descriptor: * BRUTE_FORCE_HAMMING: BruteForce Hamming matching''', + value='ANN_L2', + values=['BRUTE_FORCE_L2', 'ANN_L2', 'CASCADE_HASHING_L2', 'FAST_CASCADE_HASHING_L2', 'BRUTE_FORCE_HAMMING'], + exclusive=True, uid=[0], - isOutput=False, ) - video_mode_matching = desc.ParamAttribute( - label='Video Mode Matching', - description='''(sequence matching with an overlap of X images) X: with match 0 with (1->X), ...] 2: will match 0 with (1,2), 1 with (2,3), ... 3: will match 0 with (1,2,3), 1 with (2,3,4), ...''', - value='', - shortName='v', - arg='', + geometricEstimator = desc.ChoiceParam( + label='Geometric Estimator', + description='''Geometric estimator: * acransac: A-Contrario Ransac * loransac: LO-Ransac (only available for fundamental matrix)''', + value='acransac', + values=['acransac', 'loransac'], + exclusive=True, uid=[0], - isOutput=False, ) - pair_list = desc.FileAttribute( - label='Pair List', - description='''filepath A file which contains the list of matches to perform.''', + savePutativeMatches = desc.StringParam( + label='Save Putative Matches', + description='''putative matches.''', value='', - shortName='l', - arg='', uid=[0], - isOutput=False, ) - range_start = desc.ParamAttribute( - label='Range Start', - description='''range image index start To compute only the matches for specified range. This allows to compute different matches on different computers in parallel.''', + guidedMatching = desc.StringParam( + label='Guided Matching', + description='''the found model to improve the pairwise correspondences.''', value='', - shortName='s', - arg='', uid=[0], - isOutput=False, ) - range_size = desc.ParamAttribute( - label='Range Size', - description='''range size To compute only the matches for specified range. This allows to compute different matches on different computers in parallel.''', + matchFilePerImage = desc.File( + label='Match File Per Image', + description='''matches in a separate file per image.''', value='', - shortName='d', - arg='', uid=[0], isOutput=False, ) - nearest_matching_method = desc.ParamAttribute( - label='Nearest Matching Method', - description='''For Scalar based regions descriptor: BRUTE_FORCE_L2: L2 BruteForce matching, ANN_L2: L2 Approximate Nearest Neighbor matching (default), CASCADE_HASHING_L2: L2 Cascade Hashing matching. FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory). For Binary based descriptor: BRUTE_FORCE_HAMMING: BruteForce Hamming matching.''', - value='', - shortName='n', - arg='', + distanceRatio = desc.FloatParam( + label='Distance Ratio', + description='''Distance ratio to discard non meaningful matches.''', + value=0.800000012, + range=(-float('inf'), float('inf'), 0.01), uid=[0], - isOutput=False, ) - geometricEstimator = desc.ParamAttribute( - label='Geometric Estimator', - description='''Geometric estimator acransac: A-Contrario Ransac (default), loransac: LO-Ransac (only available for fundamental matrix)''', - value='', - shortName='G', - arg='', + videoModeMatching = desc.ChoiceParam( + label='Video Mode Matching', + description='''sequence matching with an overlap of X images: * 0: will match 0 with (1->X), ... * 2: will match 0 with (1,2), 1 with (2,3), ... * 3: will match 0 with (1,2,3), 1 with (2,3,4), ...''', + value=0, + values=['0', '2', '3'], + exclusive=True, uid=[0], - isOutput=False, ) - guided_matching = desc.ParamAttribute( - label='Guided Matching', - description='''use the found model to improve the pairwise correspondences.''', + maxIteration = desc.IntParam( + label='Max Iteration', + description='''Maximum number of iterations allowed in ransac step.''', + value=2048, + range=(-sys.maxsize, sys.maxsize, 1), + uid=[0], + ) + useGridSort = desc.StringParam( + label='Use Grid Sort', + description='''matching grid sort.''', value='', - shortName='M', - arg='', uid=[0], - isOutput=False, ) - max_iteration = desc.ParamAttribute( - label='Max Iteration', - description='''number of maximum iterations allowed in ransac step.''', + exportDebugFiles = desc.File( + label='Export Debug Files', + description='''debug files (svg, dot).''', value='', - shortName='I', - arg='', uid=[0], isOutput=False, ) - match_file_per_image = desc.FileAttribute( - label='Match File Per Image', - description='''Save matches in a separate file per image''', - value='', - shortName='x', - arg='', + fileExtension = desc.File( + label='File Extension', + description='''File extension to store matches (bin or txt).''', + value='bin', uid=[0], isOutput=False, ) - max_matches = desc.ParamAttribute( + maxMatches = desc.IntParam( label='Max Matches', - description='''''', - value='', - shortName='u', - arg='', + description='''Maximum number pf matches to keep.''', + value=0, + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - isOutput=False, ) - use_grid_sort = desc.ParamAttribute( - label='Use Grid Sort', - description='''Use matching grid sort''', - value='', - shortName='y', - arg='', + rangeStart = desc.IntParam( + label='Range Start', + description='''Range image index start.''', + value=-1, + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - isOutput=False, ) - export_debug_files = desc.FileAttribute( - label='Export Debug Files', - description='''Export debug files (svg, dot)''', - value='', - shortName='e', - arg='', + rangeSize = desc.IntParam( + label='Range Size', + description='''Range size. Log parameters:''', + value=0, + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - isOutput=False, ) - fileExtension = desc.FileAttribute( - label='File Extension', - description='''File extension to store matches: bin (default), txt Unrecognized option --help''', - value='', - shortName='t', - arg='', + verboseLevel = desc.ChoiceParam( + label='Verbose Level', + description='''verbosity level (fatal, error, warning, info, debug, trace).''', + value='info', + values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], + exclusive=True, uid=[0], - isOutput=False, ) \ No newline at end of file diff --git a/meshroom/aliceVision/Fuse.py b/meshroom/aliceVision/Fuse.py deleted file mode 100644 index 8bd9dd1748..0000000000 --- a/meshroom/aliceVision/Fuse.py +++ /dev/null @@ -1,15 +0,0 @@ -from meshroom.core import desc - -class Fuse(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'CMPMVS {mvsConfigValue} --fuse' - - mvsConfig = desc.FileAttribute( - label='MVS Configuration file', - description='', - value='', - shortName='', - arg='', - uid=[0], - isOutput=False, - ) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 83a658d162..bf9e445265 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -1,55 +1,58 @@ - +import sys from meshroom.core import desc + class ImageMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'openMVG_main_generatePairList {allParams}' + commandLine = 'aliceVision_imageMatching {allParams}' - verbose = desc.ParamAttribute( - label='Verbose', - description='''Verbosity level, 0 to mute.''', - value=1, - shortName='v', - arg='arg', - uid=[0], - ) - weights = desc.FileAttribute( - label='Weights', - description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''', + input = desc.File( + label='Input', + description='''SfMData file or filepath to a simple text file with one image filepath per line, or path to the descriptors folder.''', value='', - shortName='w', - arg='arg', uid=[0], + isOutput=False, ) - tree = desc.FileAttribute( + tree = desc.File( label='Tree', - description='''Input name for the tree file''', + description='''Input name for the vocabulary tree file.''', value='', - shortName='t', - arg='arg', uid=[0], + isOutput=False, ) - keylist = desc.FileAttribute( - label='Keylist', - description='''Path to the list file (list.txt or sfm_data) generated by OpenMVG or the path to a directory containing the descriptors.''', - value='', - shortName='l', - arg='arg', - uid=[0], + output = desc.File( + label='Output', + description='''Filepath to the output file with the list of selected image pairs. Optional parameters:''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + isOutput=True, ) - nbMaxDescriptors = desc.ParamAttribute( - label='Nb Max Descriptors', + maxDescriptors = desc.IntParam( + label='Max Descriptors', description='''Limit the number of descriptors you load per image. Zero means no limit.''', - value=0, - shortName='m', - arg='arg', + value=500, + range=(-sys.maxsize, sys.maxsize, 1), + uid=[0], + ) + nbMatches = desc.IntParam( + label='Nb Matches', + description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', + value=50, + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], ) - outfile = desc.FileAttribute( - label='Outfile', - description='''(=pairList.txt) Name of the output file.''', + weights = desc.File( + label='Weights', + description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set. Log parameters:''', value='', - shortName='o', - arg='arg', + uid=[0], + isOutput=False, + ) + verboseLevel = desc.ChoiceParam( + label='Verbose Level', + description='''verbosity level (fatal, error, warning, info, debug, trace).''', + value='info', + values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], + exclusive=True, uid=[0], ) \ No newline at end of file diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 2bd7b966c4..9996ceaba5 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -4,12 +4,10 @@ class Meshing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --meshing' - mvsConfig = desc.FileAttribute( + mvsConfig = desc.File( label='MVS Configuration file', description='', value='', - shortName='', - arg='', uid=[0], isOutput=False, ) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index a95bd70fde..b86e7c9199 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -1,42 +1,46 @@ +import sys from meshroom.core import desc + class PrepareDenseScene(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'openMVG_main_openMVG2CMPMVS2 {allParams}' + commandLine = 'aliceVision_prepareDenseScene {allParams}' - outdir = desc.FileAttribute( - label='Outdir', - description='''path Invalid command line parameter.''', - value='{cache}/{nodeType}/{uid0}/', - shortName='o', - arg='', - isOutput=True, + input = desc.File( + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + isOutput=False, ) - mvsConfig = desc.FileAttribute( # not a command line arg + mvsConfig = desc.File( label='MVS Configuration file', description='', value='{cache}/{nodeType}/{uid0}/_tmp_scale{scaleValue}/mvs.ini', - shortName='', - arg='', - group='', + uid=[0], isOutput=True, + group='', # not a command line arg ) - sfmdata = desc.FileAttribute( - label='Sfmdata', - description='''filename, the SfM_Data file to convert''', - value='', - shortName='i', - arg='', - uid=[0], - isOutput=False, + output = desc.File( + label='Output', + description='''Output directory.''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + isOutput=True, ) - scale = desc.ParamAttribute( + scale = desc.IntParam( label='Scale', - description='''downscale image factor''', + description='''Image downscale factor.''', value=2, - shortName='s', - arg='', + range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - isOutput=False, ) + verboseLevel = desc.ChoiceParam( + label='Verbose Level', + description='''verbosity level (fatal, error, warning, info, debug, trace).''', + value='info', + values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], + exclusive=True, + uid=[0], + ) \ No newline at end of file diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index f2e5a54ce2..b964ce0194 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,133 +1,99 @@ - +import sys from meshroom.core import desc + class StructureFromMotion(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'openMVG_main_IncrementalSfM {allParams}' + commandLine = 'aliceVision_incrementalSfM {allParams}' - input_file = desc.FileAttribute( - label='Input File', - description='''path to a SfM_Data scene''', + input = desc.File( + label='Input', + description='''SfMData file.''', value='', - shortName='i', - arg='', uid=[0], isOutput=False, ) - describerMethods = desc.ParamAttribute( - label='Describer Methods', - description='''(methods to use to describe an image): SIFT (default), SIFT_FLOAT to use SIFT stored as float, AKAZE: AKAZE with floating point descriptors, AKAZE_MLDB: AKAZE with binary descriptors''', - value='SIFT', - shortName='d', - arg='', - uid=[0], - isOutput=False, + output = desc.File( + label='Output SfM data file', + description='''Path to the output sfmdata file''', + value='{cache}/{nodeType}/{uid0}/sfm.abc', + uid=[], + isOutput=True, ) - matchdir = desc.FileAttribute( - label='Matchdir', - description='''path to the matches that corresponds to the provided SfM_Data scene''', + extraInfoDirectory = desc.File( + label='Output', + description='''Directory for intermediate reconstruction files and additional reconstruction information files.''', + value='{cache}/{nodeType}/{uid0}/', + uid=[0], + isOutput=True, + ) + featuresDirectory = desc.File( + label='Features Directory', + description='''Path to a directory containing the extracted features.''', value='', - shortName='m', - arg='', uid=[0], isOutput=False, ) - featuresDir = desc.FileAttribute( - label='Features Dir', - description='''path to directory containing the extracted features (default: $matchdir)''', + matchesDirectory = desc.File( + label='Matches Directory', + description='''Path to a directory in which computed matches are stored. Optional parameters:''', value='', - shortName='F', - arg='', uid=[0], isOutput=False, ) - outdir = desc.FileAttribute( - label='Outdir', - description='''path where the output data will be stored''', - value='{cache}/{nodeType}/{uid0}/', - shortName='o', - arg='', - uid=[0], - isOutput=True, - ) - out_sfmdata_file = desc.FileAttribute( - label='Out Sfmdata File', - description='''path of the output sfmdata file (default: $outdir/sfm_data.json)''', - value='{cache}/{nodeType}/{uid0}/sfm.json', - shortName='s', - arg='', + describerTypes = desc.StringParam( + label='Describer Types', + description='''Describer types to use to describe an image:''', + value='SIFT', uid=[0], - isOutput=True, ) - inter_file_extension = desc.FileAttribute( + interFileExtension = desc.File( label='Inter File Extension', - description='''extension of the intermediate file export (default: .ply)''', + description='''Extension of the intermediate file export.''', value='.ply', - shortName='e', - arg='', uid=[0], isOutput=False, ) - # initialPairA = desc.FileAttribute( - # label='Initial Pair A', - # description='''filename of the first image (without path)''', - # value='', - # shortName='a', - # arg='', - # uid=[0], - # isOutput=False, - # ) - # initialPairB = desc.FileAttribute( - # label='Initial Pair B', - # description='''filename of the second image (without path)''', - # value='', - # shortName='b', - # arg='', - # uid=[0], - # isOutput=False, - # ) - camera_model = desc.ParamAttribute( + minInputTrackLength = desc.IntParam( + label='Min Input Track Length', + description='''Minimum track length in input of SfM''', + value=2, + range=(-sys.maxsize, sys.maxsize, 1), + uid=[0], + ) + cameraModel = desc.ChoiceParam( label='Camera Model', - description='''Camera model type for view with unknown intrinsic: 1: Pinhole 2: Pinhole radial 1 3: Pinhole radial 3 (default)''', + description='''* 1: Pinhole * 2: Pinhole radial 1 * 3: Pinhole radial 3''', value=3, - shortName='c', - arg='', + values=['1', '2', '3'], + exclusive=True, uid=[0], - isOutput=False, ) - refineIntrinsics = desc.ParamAttribute( - label='Refine Intrinsics', - description='''0-> intrinsic parameters are kept as constant 1-> refine intrinsic parameters (default).''', - value=1, - shortName='f', - arg='', + initialPairA = desc.File( + label='Initial Pair A', + description='''filename of the first image (without path).''', + value='', uid=[0], isOutput=False, ) - minInputTrackLength = desc.ParamAttribute( - label='Min Input Track Length', - description='''minimum track length in input of SfM (default: 2)''', - value=2, - shortName='t', - arg='N', + initialPairB = desc.File( + label='Initial Pair B', + description='''filename of the second image (without path).''', + value='', uid=[0], isOutput=False, ) - # matchFilePerImage = desc.FileAttribute( - # label='Match File Per Image', - # description='''To use one match file per image instead of a global file.''', - # value=1, - # shortName='p', - # arg='', - # uid=[0], - # isOutput=False, - # ) - allowUserInteraction = desc.ParamAttribute( - label='Allow User Interaction', - description='''Enable/Disable user interactions. (default: true) If the process is done on renderfarm, it doesn't make sense to wait for user inputs. Unrecognized option --help''', - value=0, - shortName='u', - arg='', + refineIntrinsics = desc.StringParam( + label='Refine Intrinsics', + description='''intrinsic parameters. Log parameters:''', + value='', + uid=[0], + ) + verboseLevel = desc.ChoiceParam( + label='Verbose Level', + description='''verbosity level (fatal, error, warning, info, debug, trace).''', + value='info', + values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], + exclusive=True, uid=[0], - isOutput=False, ) \ No newline at end of file diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 4113e6ee0d..23dd8eb4c1 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -4,12 +4,10 @@ class Texturing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --texturing' - mvsConfig = desc.FileAttribute( + mvsConfig = desc.File( label='MVS Configuration file', description='', value='', - shortName='', - arg='', uid=[0], isOutput=False, ) diff --git a/meshroom/test/appendText.py b/meshroom/test/appendText.py index da912113d2..665a08bb8e 100644 --- a/meshroom/test/appendText.py +++ b/meshroom/test/appendText.py @@ -3,18 +3,25 @@ class AppendText(desc.CommandLineNode): commandLine = 'cat {inputValue} > {outputValue} && echo {inputTextValue} >> {outputValue}' - input = desc.FileAttribute( + input = desc.File( label='Input File', + description='''''', + value='', uid=[0], + isOutput=False, ) - output = desc.FileAttribute( + output = desc.File( label='Output', + description='''''', value='{cache}/{nodeType}/{uid0}/appendText.txt', + uid=None, isOutput=True, - hasExpression=True, ) - inputText = desc.FileAttribute( + inputText = desc.File( label='Input Text', + description='''''', + value='', uid=[0], + isOutput=False, ) diff --git a/meshroom/test/ls.py b/meshroom/test/ls.py index 532be991e1..0ce4f0f5da 100644 --- a/meshroom/test/ls.py +++ b/meshroom/test/ls.py @@ -3,14 +3,18 @@ class Ls(desc.CommandLineNode): commandLine = 'ls {inputValue} > {outputValue}' - input = desc.FileAttribute( + input = desc.File( label='Input', + description='''''', + value='', uid=[0], + isOutput=False, ) - output = desc.FileAttribute( + output = desc.File( label='Output', + description='''''', value='{cache}/{nodeType}/{uid0}/ls.txt', + uid=None, isOutput=True, - hasExpression=True, ) From a0d4dc111d50d107a6de9eb4ff540bf9102388e9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 16 Oct 2017 17:55:54 +0200 Subject: [PATCH 0010/1093] Use imageMatching node in the multiview pipeline --- meshroom/aliceVision/ImageMatching.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index bf9e445265..79336928b8 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -13,6 +13,13 @@ class ImageMatching(desc.CommandLineNode): uid=[0], isOutput=False, ) + featuresDirectory = desc.File( + label='Features Directory', + description='''Directory containing the extracted features and descriptors. By default, it is the directory containing the SfMData.''', + value='', + uid=[0], + isOutput=False, + ) tree = desc.File( label='Tree', description='''Input name for the vocabulary tree file.''', @@ -22,8 +29,8 @@ class ImageMatching(desc.CommandLineNode): ) output = desc.File( label='Output', - description='''Filepath to the output file with the list of selected image pairs. Optional parameters:''', - value='{cache}/{nodeType}/{uid0}/', + description='''Filepath to the output file with the list of selected image pairs.''', + value='{cache}/{nodeType}/{uid0}/imageMatches.txt', uid=[], isOutput=True, ) From 03f9ab8cd7d4cf8054c1ad5c4ec92802cf64f6d4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 16 Oct 2017 19:25:01 +0200 Subject: [PATCH 0011/1093] [nodes] ImageMatching: add minNbImages parameter --- meshroom/aliceVision/ImageMatching.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 79336928b8..d8d193a001 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -34,6 +34,13 @@ class ImageMatching(desc.CommandLineNode): uid=[], isOutput=True, ) + minNbImages = desc.IntParam( + label='Minimal Number of Images', + description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''', + value=200, + range=(0, 500, 1), + uid=[0], + ) maxDescriptors = desc.IntParam( label='Max Descriptors', description='''Limit the number of descriptors you load per image. Zero means no limit.''', From 2d99444769eaa50834260107825418c518237a68 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 19 Oct 2017 12:27:30 +0200 Subject: [PATCH 0012/1093] [nodes] verbose param should not invalidate --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/FeatureExtraction.py | 2 +- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index a9fb02f616..6cae15d47f 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -84,5 +84,5 @@ class CameraInit(desc.CommandLineNode): value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, - uid=[0], + uid=[], ) \ No newline at end of file diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 63eb4122ab..db2624d8bd 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -60,5 +60,5 @@ class FeatureExtraction(desc.CommandLineNode): value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, - uid=[0], + uid=[], ) \ No newline at end of file diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index d67ea5fcf0..9d675a9244 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -152,5 +152,5 @@ class FeatureMatching(desc.CommandLineNode): value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, - uid=[0], + uid=[], ) \ No newline at end of file diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index d8d193a001..bc6ea3eca3 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -68,5 +68,5 @@ class ImageMatching(desc.CommandLineNode): value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, - uid=[0], + uid=[], ) \ No newline at end of file diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index b964ce0194..74af882eb8 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -95,5 +95,5 @@ class StructureFromMotion(desc.CommandLineNode): value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, - uid=[0], + uid=[], ) \ No newline at end of file From f83cf8189dbf128f82da013725f357b34ddc0ec6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 19 Oct 2017 12:28:19 +0200 Subject: [PATCH 0013/1093] [nodes] refineIntrinsics param as a choice --- meshroom/aliceVision/StructureFromMotion.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 74af882eb8..dd1ba2df3b 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -83,10 +83,12 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], isOutput=False, ) - refineIntrinsics = desc.StringParam( + refineIntrinsics = desc.ChoiceParam( label='Refine Intrinsics', description='''intrinsic parameters. Log parameters:''', - value='', + value=0, + values=[0, 1], + exclusive=True, uid=[0], ) verboseLevel = desc.ChoiceParam( From 1accb7b533bfbcf9ebcdb82905efcd188fe5ab8f Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 19 Oct 2017 12:30:05 +0200 Subject: [PATCH 0014/1093] [nodes] use non-exclusive choice for describerTypes param --- meshroom/aliceVision/FeatureExtraction.py | 11 +++++++---- meshroom/aliceVision/FeatureMatching.py | 11 +++++++---- meshroom/aliceVision/StructureFromMotion.py | 11 +++++++---- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index db2624d8bd..aa7cc50eb8 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -20,11 +20,14 @@ class FeatureExtraction(desc.CommandLineNode): uid=[], isOutput=True, ) - describerTypes = desc.StringParam( + describerTypes = desc.ChoiceParam( label='Describer Types', - description='''Describer types to use to describe an image:''', - value='SIFT', + description='''Describer types used to describe an image.''', + value=['SIFT'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + exclusive=False, uid=[0], + joinChar=',', ) describerPreset = desc.ChoiceParam( label='Describer Preset', @@ -61,4 +64,4 @@ class FeatureExtraction(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ) \ No newline at end of file + ) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 9d675a9244..c8b94eca86 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -28,11 +28,14 @@ class FeatureMatching(desc.CommandLineNode): exclusive=True, uid=[0], ) - describerTypes = desc.StringParam( + describerTypes = desc.ChoiceParam( label='Describer Types', - description='''Describer types to use to describe an image:''', - value='SIFT', + description='''Describer types used to describe an image.''', + value=['SIFT'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + exclusive=False, uid=[0], + joinChar=',', ) featuresDirectory = desc.File( label='Features Directory', @@ -153,4 +156,4 @@ class FeatureMatching(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ) \ No newline at end of file + ) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index dd1ba2df3b..d4096ee8e8 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -41,11 +41,14 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], isOutput=False, ) - describerTypes = desc.StringParam( + describerTypes = desc.ChoiceParam( label='Describer Types', - description='''Describer types to use to describe an image:''', - value='SIFT', + description='''Describer types used to describe an image.''', + value=['SIFT'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + exclusive=False, uid=[0], + joinChar=',', ) interFileExtension = desc.File( label='Inter File Extension', @@ -98,4 +101,4 @@ class StructureFromMotion(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ) \ No newline at end of file + ) From 55c976f5ab016cce810ac741bc85ebdf2f868a0d Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 24 Oct 2017 20:08:28 +0200 Subject: [PATCH 0015/1093] [nodes] fix uid in test nodes --- meshroom/test/appendText.py | 2 +- meshroom/test/ls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/test/appendText.py b/meshroom/test/appendText.py index 665a08bb8e..347898b279 100644 --- a/meshroom/test/appendText.py +++ b/meshroom/test/appendText.py @@ -14,7 +14,7 @@ class AppendText(desc.CommandLineNode): label='Output', description='''''', value='{cache}/{nodeType}/{uid0}/appendText.txt', - uid=None, + uid=[], isOutput=True, ) inputText = desc.File( diff --git a/meshroom/test/ls.py b/meshroom/test/ls.py index 0ce4f0f5da..e8dc045619 100644 --- a/meshroom/test/ls.py +++ b/meshroom/test/ls.py @@ -14,7 +14,7 @@ class Ls(desc.CommandLineNode): label='Output', description='''''', value='{cache}/{nodeType}/{uid0}/ls.txt', - uid=None, + uid=[], isOutput=True, ) From 94ebf69f280fd58d398b3126bfadc3d9ef8b627f Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 24 Oct 2017 20:13:40 +0200 Subject: [PATCH 0016/1093] [test] add more graph tests --- meshroom/test/appendFiles.py | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 meshroom/test/appendFiles.py diff --git a/meshroom/test/appendFiles.py b/meshroom/test/appendFiles.py new file mode 100644 index 0000000000..313510727c --- /dev/null +++ b/meshroom/test/appendFiles.py @@ -0,0 +1,40 @@ +from meshroom.core import desc + + +class AppendFiles(desc.CommandLineNode): + commandLine = 'cat {inputValue} {input2Value} {input3Value} {input4Value} > {outputValue}' + input = desc.File( + label='Input File', + description='''''', + value='', + uid=[0], + isOutput=False, + ) + input2 = desc.File( + label='Input File 2', + description='''''', + value='', + uid=[0], + isOutput=False, + ) + input3 = desc.File( + label='Input File 3', + description='''''', + value='', + uid=[0], + isOutput=False, + ) + input4 = desc.File( + label='Input File 4', + description='''''', + value='', + uid=[0], + isOutput=False, + ) + output = desc.File( + label='Output', + description='''''', + value='{cache}/{nodeType}/{uid0}/appendText.txt', + uid=[], + isOutput=True, + ) From 5166bf79316399b31ad37bd8872a73a5e5dcb184 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 26 Oct 2017 12:25:51 +0200 Subject: [PATCH 0017/1093] [node] CameraInit: clean param description --- meshroom/aliceVision/CameraInit.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 6cae15d47f..d72cc95f7c 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -15,7 +15,8 @@ class CameraInit(desc.CommandLineNode): ) jsonFile = desc.File( label='Json File', - description='''Input file with all the user options. It can be used to provide a list of images instead of a directory.''', + description='''Input file with all the user options. ''' + '''It can be used to provide a list of images instead of a directory.''', value='', uid=[0], isOutput=False, @@ -72,7 +73,11 @@ class CameraInit(desc.CommandLineNode): ) groupCameraModel = desc.ChoiceParam( label='Group Camera Model', - description='''* 0: each view have its own camera intrinsic parameters * 1: view share camera intrinsic parameters based on metadata, if no metadata each view has its own camera intrinsic parameters * 2: view share camera intrinsic parameters based on metadata, if no metadata they are grouped by folder Log parameters:''', + description='''* 0: each view have its own camera intrinsic parameters ''' + '''* 1: view share camera intrinsic parameters based on metadata, ''' + '''if no metadata each view has its own camera intrinsic parameters ''' + '''* 2: view share camera intrinsic parameters based on metadata, ''' + '''if no metadata they are grouped by folder''', value=1, values=[0, 1, 2], exclusive=True, From f878045e8dc5ae03abbda50a82b333d7f9d56350 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 26 Oct 2017 14:21:42 +0200 Subject: [PATCH 0018/1093] Add the notion of cpu, gpu, ram ressources requirements --- meshroom/aliceVision/DepthMap.py | 1 + meshroom/aliceVision/DepthMapFilter.py | 1 + meshroom/aliceVision/Meshing.py | 2 ++ meshroom/aliceVision/Texturing.py | 2 ++ 4 files changed, 6 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 881b59b720..717a085632 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -3,6 +3,7 @@ class DepthMap(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --createDepthmap' + gpu = desc.Level.INTENSIVE mvsConfig = desc.File( label='MVS Configuration file', diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index d4d5be62e8..acaffa37f0 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -3,6 +3,7 @@ class DepthMapFilter(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --filterDepthmap' + gpu = desc.Level.NORMAL mvsConfig = desc.File( label='MVS Configuration file', diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 9996ceaba5..d683db02c1 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -3,6 +3,8 @@ class Meshing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --meshing' + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE mvsConfig = desc.File( label='MVS Configuration file', diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 23dd8eb4c1..474e14257e 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -3,6 +3,8 @@ class Texturing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'CMPMVS {mvsConfigValue} --texturing' + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE mvsConfig = desc.File( label='MVS Configuration file', From 82463da0d3931475bb5a65018b805d7860a26802 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 26 Oct 2017 16:10:14 +0200 Subject: [PATCH 0019/1093] [nodes] create default values from os.environ directly in nodes --- meshroom/aliceVision/CameraInit.py | 3 ++- meshroom/aliceVision/ImageMatching.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index d72cc95f7c..8fe6427f9e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,5 @@ import sys +import os from meshroom.core import desc @@ -24,7 +25,7 @@ class CameraInit(desc.CommandLineNode): sensorDatabase = desc.File( label='Sensor Database', description='''Camera sensor width database path.''', - value='', + value=os.environ.get('ALICEVISION_SENSOR_DB', ''), uid=[0], isOutput=False, ) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index bc6ea3eca3..1d365d94a2 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -1,4 +1,5 @@ import sys +import os from meshroom.core import desc @@ -23,7 +24,7 @@ class ImageMatching(desc.CommandLineNode): tree = desc.File( label='Tree', description='''Input name for the vocabulary tree file.''', - value='', + value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[0], isOutput=False, ) From d82fa971bb0b8adf4b2758346198d07e5cdc2b0b Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 30 Oct 2017 17:04:37 +0100 Subject: [PATCH 0020/1093] [aliceVision] Add Viewpoint parameter on CameraInit --- meshroom/aliceVision/CameraInit.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 8fe6427f9e..75502e2a03 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,12 +1,26 @@ import sys +from collections import OrderedDict import os + from meshroom.core import desc +Viewpoint = OrderedDict([ + ("path", desc.File(label="Image", description="Image filepath", value="", uid=[0], isOutput=False)), + ("focal", desc.FloatParam(label="Focal Length", description="Focal Length", value=0.0, uid=[0], range=(5, 200, 1))), +]) + + class CameraInit(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_cameraInit {allParams}' + viewpoints = desc.ListAttribute( + elementDesc=desc.GroupAttribute(label="Viewpoint", description="", groupDesc=Viewpoint, group='allParams'), + label="Viewpoints", + description="Input viewpoints", + group="" + ) imageDirectory = desc.File( label='Image Directory', description='''Input images folder.''', @@ -91,4 +105,4 @@ class CameraInit(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ) \ No newline at end of file + ) From f035020bc1af7343bab780b56df8079555e357c7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 10:50:49 +0100 Subject: [PATCH 0021/1093] [tests] test multiview pipeline and List/GroupAttributes set/get --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 75502e2a03..640a3244b7 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -6,7 +6,7 @@ Viewpoint = OrderedDict([ - ("path", desc.File(label="Image", description="Image filepath", value="", uid=[0], isOutput=False)), + ("image", desc.File(label="Image", description="Image filepath", value="", uid=[0], isOutput=False)), ("focal", desc.FloatParam(label="Focal Length", description="Focal Length", value=0.0, uid=[0], range=(5, 200, 1))), ]) From 1ae428b3fd9b7ac5f64c0f4d05b3f506ec0c9f22 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 12:11:08 +0100 Subject: [PATCH 0022/1093] [nodes] fix: output attributes cannot be part of UIDs --- meshroom/aliceVision/StructureFromMotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index d4096ee8e8..1457aa4dc7 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -24,7 +24,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Output', description='''Directory for intermediate reconstruction files and additional reconstruction information files.''', value='{cache}/{nodeType}/{uid0}/', - uid=[0], + uid=[], isOutput=True, ) featuresDirectory = desc.File( From 88782b20f2e073cc9519020387faabdc813fe727 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 16:46:09 +0100 Subject: [PATCH 0023/1093] [nodes] CamPairs renamed to CameraConnection --- meshroom/aliceVision/{CamPairs.py => CameraConnection.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meshroom/aliceVision/{CamPairs.py => CameraConnection.py} (69%) diff --git a/meshroom/aliceVision/CamPairs.py b/meshroom/aliceVision/CameraConnection.py similarity index 69% rename from meshroom/aliceVision/CamPairs.py rename to meshroom/aliceVision/CameraConnection.py index e6a3d7e685..994a763dc5 100644 --- a/meshroom/aliceVision/CamPairs.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -1,8 +1,8 @@ from meshroom.core import desc -class CamPairs(desc.CommandLineNode): +class CameraConnection(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'CMPMVS {mvsConfigValue} --computeCamPairs' + commandLine = 'aliceVision_cameraConnection --ini {mvsConfigValue}' mvsConfig = desc.File( label='MVS Configuration file', From 5b1b84f17fb72b2f13e30af24d49b68b9444757f Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 16:47:06 +0100 Subject: [PATCH 0024/1093] [nodes] update MVS to aliceVision binaries --- meshroom/aliceVision/DepthMap.py | 2 +- meshroom/aliceVision/DepthMapFilter.py | 2 +- meshroom/aliceVision/Texturing.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 717a085632..0c091938d9 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -2,7 +2,7 @@ class DepthMap(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'CMPMVS {mvsConfigValue} --createDepthmap' + commandLine = 'aliceVision_depthMapEstimation --ini {mvsConfigValue}' gpu = desc.Level.INTENSIVE mvsConfig = desc.File( diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index acaffa37f0..33b6168ce5 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -2,7 +2,7 @@ class DepthMapFilter(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'CMPMVS {mvsConfigValue} --filterDepthmap' + commandLine = 'aliceVision_depthMapFiltering --ini {mvsConfigValue}' gpu = desc.Level.NORMAL mvsConfig = desc.File( diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 474e14257e..e778b5ab9b 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -2,7 +2,7 @@ class Texturing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'CMPMVS {mvsConfigValue} --texturing' + commandLine = 'aliceVision_texturing --ini {mvsConfigValue} {allParams}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE From b87710104d50983f4804f117f662870f86f345c1 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 16:47:34 +0100 Subject: [PATCH 0025/1093] [nodes] expose texturing parameters --- meshroom/aliceVision/Texturing.py | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index e778b5ab9b..969c6a763c 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -12,4 +12,50 @@ class Texturing(desc.CommandLineNode): value='', uid=[0], isOutput=False, + group='', ) + + output = desc.File( + label='Output Folder', + description='Folder for output mesh: OBJ, material and texture files.', + value='{cache}/{nodeType}/{uid0}/', + uid=[0], + isOutput=True, + ) + + inputMesh = desc.File( + label='Other Input Mesh', + description='Optional input mesh to texture. By default, it will texture the result of the reconstruction.', + value='', + uid=[0], + isOutput=False, + ) + + textureSide = desc.IntParam( + label='Texture Side', + description='''Output texture size''', + value=8192, + range=(1024, 16384, 1024), + uid=[0], + ) + padding = desc.IntParam( + label='Padding', + description='''Texture edge padding size in pixel''', + value=15, + range=(0, 100, 1), + uid=[0], + ) + downscale = desc.IntParam( + label='Downscale', + description='''Texture downscale factor''', + value=2, + range=(0, 16, 1), + uid=[0], + ) + flipNormals = desc.BoolParam( + label='Flip Normals', + description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + value=False, + uid=[0], + ) + From 57cdfce16030ff0044fa8b42207f649303040134 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 16:49:21 +0100 Subject: [PATCH 0026/1093] [nodes] use Choice param for scale --- meshroom/aliceVision/PrepareDenseScene.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index b86e7c9199..41d38ab6bd 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -29,11 +29,12 @@ class PrepareDenseScene(desc.CommandLineNode): uid=[], isOutput=True, ) - scale = desc.IntParam( + scale = desc.ChoiceParam( label='Scale', description='''Image downscale factor.''', value=2, - range=(-sys.maxsize, sys.maxsize, 1), + values=[1, 2, 4, 8, 16], + exclusive=True, uid=[0], ) verboseLevel = desc.ChoiceParam( From 663e5c41051a848e3e893cc349bac964527adff9 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 31 Oct 2017 19:47:32 +0100 Subject: [PATCH 0027/1093] [core] change Attributes declaration on Node description Inputs and outputs Attributes are now declared in two separate lists * no more isOutput field on Attribute description * guarantee attributes order (was not the case in Python2 with class attributes) * Attribute's name is now part of its description Note: for now, input and output Attributes are still stored in a single model inside a Graph. --- meshroom/aliceVision/CameraConnection.py | 12 +- meshroom/aliceVision/CameraInit.py | 102 ++++++++------ meshroom/aliceVision/DepthMap.py | 11 +- meshroom/aliceVision/DepthMapFilter.py | 10 +- meshroom/aliceVision/FeatureExtraction.py | 57 ++++---- meshroom/aliceVision/FeatureMatching.py | 144 ++++++++++---------- meshroom/aliceVision/ImageMatching.py | 63 +++++---- meshroom/aliceVision/Meshing.py | 8 +- meshroom/aliceVision/PrepareDenseScene.py | 53 +++---- meshroom/aliceVision/StructureFromMotion.py | 98 +++++++------ meshroom/aliceVision/Texturing.py | 57 ++++---- meshroom/test/appendFiles.py | 75 +++++----- meshroom/test/appendText.py | 45 +++--- meshroom/test/ls.py | 30 ++-- 14 files changed, 426 insertions(+), 339 deletions(-) diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py index 994a763dc5..7796440654 100644 --- a/meshroom/aliceVision/CameraConnection.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -1,13 +1,17 @@ from meshroom.core import desc + class CameraConnection(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_cameraConnection --ini {mvsConfigValue}' + commandLine = 'aliceVision_cameraConnection {allParams}' - mvsConfig = desc.File( + inputs = [ + desc.File( + name="ini", label='MVS Configuration file', description='', value='', uid=[0], - isOutput=False, - ) + ), + ] + diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 640a3244b7..155990323d 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -4,89 +4,81 @@ from meshroom.core import desc - -Viewpoint = OrderedDict([ - ("image", desc.File(label="Image", description="Image filepath", value="", uid=[0], isOutput=False)), - ("focal", desc.FloatParam(label="Focal Length", description="Focal Length", value=0.0, uid=[0], range=(5, 200, 1))), -]) +Viewpoint = [ + desc.File(name="image", label="Image", description="Image filepath", value="", uid=[0]), + desc.FloatParam(name="focal", label="Focal Length", description="Focal Length", value=0.0, uid=[0], range=(5, 200, 1)), +] class CameraInit(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_cameraInit {allParams}' - viewpoints = desc.ListAttribute( - elementDesc=desc.GroupAttribute(label="Viewpoint", description="", groupDesc=Viewpoint, group='allParams'), + inputs = [ + desc.ListAttribute( + name='viewpoints', + elementDesc=desc.GroupAttribute(name='viewpoint', label="Viewpoint", description="", groupDesc=Viewpoint, + group='allParams'), label="Viewpoints", description="Input viewpoints", group="" - ) - imageDirectory = desc.File( + ), + desc.File( + name='imageDirectory', label='Image Directory', description='''Input images folder.''', value='', uid=[0], - isOutput=False, - ) - jsonFile = desc.File( + ), + desc.File( + name='jsonFile', label='Json File', description='''Input file with all the user options. ''' - '''It can be used to provide a list of images instead of a directory.''', + '''It can be used to provide a list of images instead of a directory.''', value='', uid=[0], - isOutput=False, - ) - sensorDatabase = desc.File( + ), + desc.File( + name='sensorDatabase', label='Sensor Database', description='''Camera sensor width database path.''', value=os.environ.get('ALICEVISION_SENSOR_DB', ''), uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output', - description='''Output directory for the new SfMData file Optional parameters:''', - value='{cache}/{nodeType}/{uid0}/', - uid=[], - isOutput=True, - ) - outputSfm = desc.File( - label='Output SfM', - description='''''', - value='{cache}/{nodeType}/{uid0}/sfm_data.json', - uid=[], - isOutput=True, - group='', # not a command line argument - ) - defaultFocalLengthPix = desc.IntParam( + ), + desc.IntParam( + name='defaultFocalLengthPix', label='Default Focal Length Pix', description='''Focal length in pixels.''', value=-1, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - defaultSensorWidth = desc.IntParam( + ), + desc.IntParam( + name='defaultSensorWidth', label='Default Sensor Width', description='''Sensor width in mm.''', value=-1, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - defaultIntrinsics = desc.StringParam( + ), + desc.StringParam( + name='defaultIntrinsics', label='Default Intrinsics', description='''Intrinsics Kmatrix "f;0;ppx;0;f;ppy;0;0;1".''', value='', uid=[0], - ) - defaultCameraModel = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='defaultCameraModel', label='Default Camera Model', description='''Camera model type (pinhole, radial1, radial3, brown, fisheye4).''', value='', values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], exclusive=True, uid=[0], - ) - groupCameraModel = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='groupCameraModel', label='Group Camera Model', description='''* 0: each view have its own camera intrinsic parameters ''' '''* 1: view share camera intrinsic parameters based on metadata, ''' @@ -97,12 +89,32 @@ class CameraInit(desc.CommandLineNode): values=[0, 1, 2], exclusive=True, uid=[0], - ) - verboseLevel = desc.ChoiceParam( + ), + 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', + description='''Output directory for the new SfMData file Optional parameters:''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + desc.File( + name='outputSfm', + label='Output SfM', + description='''''', + value='{cache}/{nodeType}/{uid0}/sfm_data.json', + uid=[], + group='', # not a command line argument + ) + ] diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 0c091938d9..ee97a0119a 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -2,13 +2,16 @@ class DepthMap(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_depthMapEstimation --ini {mvsConfigValue}' + commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE - mvsConfig = desc.File( + inputs = [ + desc.File( + name="ini", label='MVS Configuration file', description='', value='', uid=[0], - isOutput=False, - ) + ), + ] + diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 33b6168ce5..57f6cc16ae 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -2,13 +2,15 @@ class DepthMapFilter(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_depthMapFiltering --ini {mvsConfigValue}' + commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL - mvsConfig = desc.File( + inputs = [ + desc.File( + name="ini", label='MVS Configuration file', description='', value='', uid=[0], - isOutput=False, - ) + ), + ] diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index aa7cc50eb8..f481bfb20d 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -6,21 +6,16 @@ class FeatureExtraction(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureExtraction {allParams}' - input = desc.File( + inputs = [ + desc.File( + name='input', label='Input', description='''SfMData file.''', value='', uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output', - description='''Output path for the features and descriptors files (*.feat, *.desc). Optional parameters:''', - value='{cache}/{nodeType}/{uid0}/', - uid=[], - isOutput=True, - ) - describerTypes = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='describerTypes', label='Describer Types', description='''Describer types used to describe an image.''', value=['SIFT'], @@ -28,40 +23,56 @@ class FeatureExtraction(desc.CommandLineNode): exclusive=False, uid=[0], joinChar=',', - ) - describerPreset = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='describerPreset', label='Describer Preset', description='''Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration 'ultra' can take long time !''', value='NORMAL', - values=['low', 'medium', 'normal', 'high', 'ultra'], + values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], exclusive=True, uid=[0], - ) - upright = desc.StringParam( + ), + desc.StringParam( + name='upright', label='Upright', description='''Upright feature.''', value='', uid=[0], - ) - rangeStart = desc.IntParam( + ), + desc.IntParam( + name='rangeStart', label='Range Start', description='''Range image index start.''', value=-1, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - rangeSize = desc.IntParam( + ), + desc.IntParam( + name='rangeSize', label='Range Size', description='''Range size. Log parameters:''', value=1, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - verboseLevel = desc.ChoiceParam( + ), + 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', + description='''Output path for the features and descriptors files (*.feat, *.desc). Optional parameters:''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index c8b94eca86..ddf4682399 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -6,154 +6,158 @@ class FeatureMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureMatching {allParams}' - input = desc.File( + inputs = [ + desc.File( + name='input', label='Input', description='''SfMData file.''', value='', uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output', - description='''Path to a directory in which computed matches will be stored. Optional parameters:''', - value='{cache}/{nodeType}/{uid0}/', - uid=[], - isOutput=True, - ) - geometricModel = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='geometricModel', label='Geometric Model', description='''Pairwise correspondences filtering thanks to robust model estimation: * f: fundamental matrix * e: essential matrix * h: homography matrix''', value='f', values=['f', 'e', 'h'], exclusive=True, uid=[0], - ) - describerTypes = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='describerTypes', label='Describer Types', description='''Describer types used to describe an image.''', value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', + 'AKAZE_OCV'], exclusive=False, uid=[0], joinChar=',', - ) - featuresDirectory = desc.File( + ), + desc.File( + name='featuresDirectory', label='Features Directory', description='''Path to a directory containing the extracted features.''', value='', uid=[0], - isOutput=False, - ) - imagePairsList = desc.File( + ), + desc.File( + name='imagePairsList', label='Image Pairs List', description='''Path to a file which contains the list of image pairs to match.''', value='', uid=[0], - isOutput=False, - ) - photometricMatchingMethod = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='photometricMatchingMethod', label='Photometric Matching Method', description='''For Scalar based regions descriptor: * BRUTE_FORCE_L2: L2 BruteForce matching * ANN_L2: L2 Approximate Nearest Neighbor matching * CASCADE_HASHING_L2: L2 Cascade Hashing matching * FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory) For Binary based descriptor: * BRUTE_FORCE_HAMMING: BruteForce Hamming matching''', value='ANN_L2', - values=['BRUTE_FORCE_L2', 'ANN_L2', 'CASCADE_HASHING_L2', 'FAST_CASCADE_HASHING_L2', 'BRUTE_FORCE_HAMMING'], + values=('BRUTE_FORCE_L2', 'ANN_L2', 'CASCADE_HASHING_L2', 'FAST_CASCADE_HASHING_L2', 'BRUTE_FORCE_HAMMING'), exclusive=True, uid=[0], - ) - geometricEstimator = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='geometricEstimator', label='Geometric Estimator', description='''Geometric estimator: * acransac: A-Contrario Ransac * loransac: LO-Ransac (only available for fundamental matrix)''', value='acransac', values=['acransac', 'loransac'], exclusive=True, uid=[0], - ) - savePutativeMatches = desc.StringParam( + ), + desc.StringParam( + name='savePutativeMatches', label='Save Putative Matches', description='''putative matches.''', value='', uid=[0], - ) - guidedMatching = desc.StringParam( + ), + desc.BoolParam( + name='guidedMatching', label='Guided Matching', description='''the found model to improve the pairwise correspondences.''', - value='', + value=False, uid=[0], - ) - matchFilePerImage = desc.File( + ), + desc.File( + name='matchFilePerImage', label='Match File Per Image', description='''matches in a separate file per image.''', value='', uid=[0], - isOutput=False, - ) - distanceRatio = desc.FloatParam( + ), + desc.FloatParam( + name='distanceRatio', label='Distance Ratio', description='''Distance ratio to discard non meaningful matches.''', - value=0.800000012, + value=0.8, range=(-float('inf'), float('inf'), 0.01), uid=[0], - ) - videoModeMatching = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='videoModeMatching', label='Video Mode Matching', description='''sequence matching with an overlap of X images: * 0: will match 0 with (1->X), ... * 2: will match 0 with (1,2), 1 with (2,3), ... * 3: will match 0 with (1,2,3), 1 with (2,3,4), ...''', value=0, - values=['0', '2', '3'], + values=('0', '2', '3'), exclusive=True, uid=[0], - ) - maxIteration = desc.IntParam( + ), + desc.IntParam( + name='maxIteration', label='Max Iteration', description='''Maximum number of iterations allowed in ransac step.''', value=2048, - range=(-sys.maxsize, sys.maxsize, 1), + range=(0, sys.maxsize, 1), uid=[0], - ) - useGridSort = desc.StringParam( + ), + desc.BoolParam( + name='useGridSort', label='Use Grid Sort', description='''matching grid sort.''', - value='', + value=False, uid=[0], - ) - exportDebugFiles = desc.File( + ), + desc.File( + name='exportDebugFiles', label='Export Debug Files', description='''debug files (svg, dot).''', value='', uid=[0], - isOutput=False, - ) - fileExtension = desc.File( + ), + desc.StringParam( + name='fileExtension', label='File Extension', description='''File extension to store matches (bin or txt).''', value='bin', uid=[0], - isOutput=False, - ) - maxMatches = desc.IntParam( + ), + desc.IntParam( + name='maxMatches', label='Max Matches', description='''Maximum number pf matches to keep.''', value=0, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - rangeStart = desc.IntParam( - label='Range Start', - description='''Range image index start.''', - value=-1, - range=(-sys.maxsize, sys.maxsize, 1), - uid=[0], - ) - rangeSize = desc.IntParam( - label='Range Size', - description='''Range size. Log parameters:''', - value=0, - range=(-sys.maxsize, sys.maxsize, 1), - uid=[0], - ) - verboseLevel = desc.ChoiceParam( + ), + 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', + description='''Path to a directory in which computed matches will be stored. Optional parameters:''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 1d365d94a2..79066e7a52 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -7,67 +7,76 @@ class ImageMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_imageMatching {allParams}' - input = desc.File( + inputs = [ + desc.File( + name='input', label='Input', description='''SfMData file or filepath to a simple text file with one image filepath per line, or path to the descriptors folder.''', value='', uid=[0], - isOutput=False, - ) - featuresDirectory = desc.File( + ), + desc.File( + name='featuresDirectory', label='Features Directory', description='''Directory containing the extracted features and descriptors. By default, it is the directory containing the SfMData.''', value='', uid=[0], - isOutput=False, - ) - tree = desc.File( + ), + desc.File( + name='tree', label='Tree', description='''Input name for the vocabulary tree file.''', value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output', - description='''Filepath to the output file with the list of selected image pairs.''', - value='{cache}/{nodeType}/{uid0}/imageMatches.txt', - uid=[], - isOutput=True, - ) - minNbImages = desc.IntParam( + ), + desc.IntParam( + name='minNbImages', label='Minimal Number of Images', description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''', value=200, range=(0, 500, 1), uid=[0], - ) - maxDescriptors = desc.IntParam( + ), + desc.IntParam( + name='maxDescriptors', label='Max Descriptors', description='''Limit the number of descriptors you load per image. Zero means no limit.''', value=500, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - nbMatches = desc.IntParam( + ), + desc.IntParam( + name='nbMatches', label='Nb Matches', description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', value=50, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - weights = desc.File( + ), + desc.File( + name='weights', label='Weights', description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set. Log parameters:''', value='', uid=[0], - isOutput=False, - ) - verboseLevel = desc.ChoiceParam( + ), + 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=[], - ) \ No newline at end of file + ) + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='''Filepath to the output file with the list of selected image pairs.''', + value='{cache}/{nodeType}/{uid0}/imageMatches.txt', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index d683db02c1..501979d2f7 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -6,10 +6,12 @@ class Meshing(desc.CommandLineNode): cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE - mvsConfig = desc.File( + inputs = [ + desc.File( + name="ini", label='MVS Configuration file', description='', value='', uid=[0], - isOutput=False, - ) + ), + ] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 41d38ab6bd..259aa254ce 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -6,42 +6,49 @@ class PrepareDenseScene(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_prepareDenseScene {allParams}' - input = desc.File( + inputs = [ + desc.File( + name='input', label='Input', description='''SfMData file.''', value='', uid=[0], - isOutput=False, - ) - mvsConfig = desc.File( - label='MVS Configuration file', - description='', - value='{cache}/{nodeType}/{uid0}/_tmp_scale{scaleValue}/mvs.ini', - uid=[0], - isOutput=True, - group='', # not a command line arg - ) - - output = desc.File( - label='Output', - description='''Output directory.''', - value='{cache}/{nodeType}/{uid0}/', - uid=[], - isOutput=True, - ) - scale = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='scale', label='Scale', description='''Image downscale factor.''', value=2, values=[1, 2, 4, 8, 16], exclusive=True, uid=[0], - ) - verboseLevel = desc.ChoiceParam( + ), + 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=[0], - ) \ No newline at end of file + ), + ] + + outputs = [ + desc.File( + name='ini', + label='MVS Configuration file', + description='', + value='{cache}/{nodeType}/{uid0}/_tmp_scale{scaleValue}/mvs.ini', + uid=[0], + group='', # not a command line arg + ), + + desc.File( + name='output', + label='Output', + description='''Output directory.''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ) + ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 1457aa4dc7..ca3f398a91 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -6,99 +6,111 @@ class StructureFromMotion(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_incrementalSfM {allParams}' - input = desc.File( + inputs = [ + desc.File( + name='input', label='Input', description='''SfMData file.''', value='', uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output SfM data file', - description='''Path to the output sfmdata file''', - value='{cache}/{nodeType}/{uid0}/sfm.abc', - uid=[], - isOutput=True, - ) - extraInfoDirectory = desc.File( - label='Output', - description='''Directory for intermediate reconstruction files and additional reconstruction information files.''', - value='{cache}/{nodeType}/{uid0}/', - uid=[], - isOutput=True, - ) - featuresDirectory = desc.File( + ), + + desc.File( + name='featuresDirectory', label='Features Directory', description='''Path to a directory containing the extracted features.''', value='', uid=[0], - isOutput=False, - ) - matchesDirectory = desc.File( + ), + desc.File( + name='matchesDirectory', label='Matches Directory', description='''Path to a directory in which computed matches are stored. Optional parameters:''', value='', uid=[0], - isOutput=False, - ) - describerTypes = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='describerTypes', label='Describer Types', description='''Describer types used to describe an image.''', value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', + 'AKAZE_OCV'], exclusive=False, uid=[0], joinChar=',', - ) - interFileExtension = desc.File( + ), + desc.File( + name='interFileExtension', label='Inter File Extension', description='''Extension of the intermediate file export.''', value='.ply', uid=[0], - isOutput=False, - ) - minInputTrackLength = desc.IntParam( + ), + desc.IntParam( + name='minInputTrackLength', label='Min Input Track Length', description='''Minimum track length in input of SfM''', value=2, range=(-sys.maxsize, sys.maxsize, 1), uid=[0], - ) - cameraModel = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='cameraModel', label='Camera Model', description='''* 1: Pinhole * 2: Pinhole radial 1 * 3: Pinhole radial 3''', value=3, values=['1', '2', '3'], exclusive=True, uid=[0], - ) - initialPairA = desc.File( + ), + desc.File( + name='initialPairA', label='Initial Pair A', description='''filename of the first image (without path).''', value='', uid=[0], - isOutput=False, - ) - initialPairB = desc.File( + ), + desc.File( + name='initialPairB', label='Initial Pair B', description='''filename of the second image (without path).''', value='', uid=[0], - isOutput=False, - ) - refineIntrinsics = desc.ChoiceParam( + ), + desc.ChoiceParam( + name='refineIntrinsics', label='Refine Intrinsics', description='''intrinsic parameters. Log parameters:''', value=0, values=[0, 1], exclusive=True, uid=[0], - ) - verboseLevel = desc.ChoiceParam( + ), + 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 SfM data file', + description='''Path to the output sfmdata file''', + value='{cache}/{nodeType}/{uid0}/sfm.abc', + uid=[], + ), + desc.File( + name='extraInfoDirectory', + label='Output', + description='''Directory for intermediate reconstruction files and additional reconstruction information files.''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 969c6a763c..33d66c3145 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,61 +1,66 @@ from meshroom.core import desc + class Texturing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_texturing --ini {mvsConfigValue} {allParams}' + commandLine = 'aliceVision_texturing {allParams}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE - mvsConfig = desc.File( + inputs = [ + desc.File( + name='ini', label='MVS Configuration file', description='', value='', uid=[0], - isOutput=False, - group='', - ) - - output = desc.File( - label='Output Folder', - description='Folder for output mesh: OBJ, material and texture files.', - value='{cache}/{nodeType}/{uid0}/', - uid=[0], - isOutput=True, - ) - - inputMesh = desc.File( + ), + desc.File( + name='inputMesh', label='Other Input Mesh', description='Optional input mesh to texture. By default, it will texture the result of the reconstruction.', value='', uid=[0], - isOutput=False, - ) - - textureSide = desc.IntParam( + ), + desc.IntParam( + name='textureSide', label='Texture Side', description='''Output texture size''', value=8192, range=(1024, 16384, 1024), uid=[0], - ) - padding = desc.IntParam( + ), + desc.IntParam( + name='padding', label='Padding', description='''Texture edge padding size in pixel''', value=15, range=(0, 100, 1), uid=[0], - ) - downscale = desc.IntParam( + ), + desc.IntParam( + name='downscale', label='Downscale', description='''Texture downscale factor''', value=2, range=(0, 16, 1), uid=[0], - ) - flipNormals = desc.BoolParam( + ), + desc.BoolParam( + name='flipNormals', label='Flip Normals', description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', value=False, uid=[0], - ) + ) + ] + outputs = [ + desc.File( + name='output', + label='Output Folder', + description='Folder for output mesh: OBJ, material and texture files.', + value='{cache}/{nodeType}/{uid0}/', + uid=[0], + ) + ] diff --git a/meshroom/test/appendFiles.py b/meshroom/test/appendFiles.py index 313510727c..a60eed18f0 100644 --- a/meshroom/test/appendFiles.py +++ b/meshroom/test/appendFiles.py @@ -3,38 +3,45 @@ class AppendFiles(desc.CommandLineNode): commandLine = 'cat {inputValue} {input2Value} {input3Value} {input4Value} > {outputValue}' - input = desc.File( - label='Input File', - description='''''', - value='', - uid=[0], - isOutput=False, - ) - input2 = desc.File( - label='Input File 2', - description='''''', - value='', - uid=[0], - isOutput=False, - ) - input3 = desc.File( - label='Input File 3', - description='''''', - value='', - uid=[0], - isOutput=False, - ) - input4 = desc.File( - label='Input File 4', - description='''''', - value='', - uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output', - description='''''', - value='{cache}/{nodeType}/{uid0}/appendText.txt', - uid=[], - isOutput=True, + + inputs = [ + desc.File( + name='input', + label='Input File', + description='''''', + value='', + uid=[0], + ), + desc.File( + name='input2', + label='Input File 2', + description='''''', + value='', + uid=[0], + ), + desc.File( + name='input3', + label='Input File 3', + description='''''', + value='', + uid=[0], + ), + desc.File( + name='input4', + label='Input File 4', + description='''''', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='''''', + value='{cache}/{nodeType}/{uid0}/appendText.txt', + uid=[], ) + ] + diff --git a/meshroom/test/appendText.py b/meshroom/test/appendText.py index 347898b279..0b88938a30 100644 --- a/meshroom/test/appendText.py +++ b/meshroom/test/appendText.py @@ -3,25 +3,30 @@ class AppendText(desc.CommandLineNode): commandLine = 'cat {inputValue} > {outputValue} && echo {inputTextValue} >> {outputValue}' - input = desc.File( - label='Input File', - description='''''', - value='', - uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output', - description='''''', - value='{cache}/{nodeType}/{uid0}/appendText.txt', - uid=[], - isOutput=True, - ) - inputText = desc.File( - label='Input Text', - description='''''', - value='', - uid=[0], - isOutput=False, + + inputs = [ + desc.File( + name='input', + label='Input File', + description='''''', + value='', + uid=[0], + ), + desc.File( + name='inputText', + label='Input Text', + description='''''', + value='', + uid=[0], ) + ] + outputs = [ + desc.File( + name='output', + label='Output', + description='''''', + value='{cache}/{nodeType}/{uid0}/appendText.txt', + uid=[], + ), + ] diff --git a/meshroom/test/ls.py b/meshroom/test/ls.py index e8dc045619..c22df5662c 100644 --- a/meshroom/test/ls.py +++ b/meshroom/test/ls.py @@ -3,18 +3,22 @@ class Ls(desc.CommandLineNode): commandLine = 'ls {inputValue} > {outputValue}' - input = desc.File( - label='Input', - description='''''', - value='', - uid=[0], - isOutput=False, - ) - output = desc.File( - label='Output', - description='''''', - value='{cache}/{nodeType}/{uid0}/ls.txt', - uid=[], - isOutput=True, + inputs = [ + desc.File( + name='input', + label='Input', + description='''''', + value='', + uid=[0], ) + ] + outputs = [ + desc.File( + name='output', + label='Output', + description='''''', + value='{cache}/{nodeType}/{uid0}/ls.txt', + uid=[], + ) + ] From 55d73d5862277c000bbbbc5378f8a920020dc7d7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 21:11:34 +0100 Subject: [PATCH 0028/1093] [nodes] texturing: add output files --- meshroom/aliceVision/Texturing.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 33d66c3145..247da9c503 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -61,6 +61,30 @@ class Texturing(desc.CommandLineNode): label='Output Folder', description='Folder for output mesh: OBJ, material and texture files.', value='{cache}/{nodeType}/{uid0}/', - uid=[0], - ) + uid=[], + ), + desc.File( + name='outputMesh', + label='Output Mesh', + description='Folder for output mesh: OBJ, material and texture files.', + value='{cache}/{nodeType}/{uid0}/texturedMesh.obj', + uid=[], + group='', + ), + desc.File( + name='outputMaterial', + label='Output Material', + description='Folder for output mesh: OBJ, material and texture files.', + value='{cache}/{nodeType}/{uid0}/texturedMesh.mtl', + uid=[], + group='', + ), + desc.File( + name='outputTextures', + label='Output Textures', + description='Folder for output mesh: OBJ, material and texture files.', + value='{cache}/{nodeType}/{uid0}/texture_*.png', + uid=[], + group='', + ), ] From 87ba861e2ddfc2f53209d52e0644ea5a4c7951eb Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 21:19:07 +0100 Subject: [PATCH 0029/1093] [nodes] meshing: fix command line --- meshroom/aliceVision/Meshing.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 501979d2f7..ccd9bfa6e6 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -2,7 +2,7 @@ class Meshing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'CMPMVS {mvsConfigValue} --meshing' + commandLine = 'aliceVision_meshing {allParams}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE @@ -15,3 +15,13 @@ class Meshing(desc.CommandLineNode): uid=[0], ), ] + + outputs = [ + desc.File( + name="output", + label="Output mesh", + description="Output mesh (OBJ file format).", + value='{cache}/{nodeType}/{uid0}/mesh.obj', + uid=[], + ), + ] From 1958a2d919b1cbc727a966e68a7d7954ceb121f4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 31 Oct 2017 21:26:18 +0100 Subject: [PATCH 0030/1093] [nodes] new Publish node --- meshroom/aliceVision/Publish.py | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 meshroom/aliceVision/Publish.py diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py new file mode 100644 index 0000000000..baea25b632 --- /dev/null +++ b/meshroom/aliceVision/Publish.py @@ -0,0 +1,55 @@ +from __future__ import print_function +from meshroom.core import desc +import shutil +import glob +import os + + +class Publish(desc.Node): + inputs = [ + desc.ListAttribute( + elementDesc=desc.File( + name="input", + label="Input", + description="", + value="", + uid=[0], + ), + name="inputFiles", + label="Input Files", + description="Input Files to publish.", + group="", + ), + desc.File( + name="output", + label="Output Folder", + description="", + value="", + uid=[0], + ), + ] + + def process(self, node): + print("Publish") + if not node.inputFiles: + print("Nothing to publish") + return + if not node.output.value: + return + + inputFiles = [] + for inputFile in node.inputFiles: + iFiles = glob.glob(inputFile.value) + inputFiles.extend(iFiles) + if not inputFiles: + raise RuntimeError("Publish: input files listed, but nothing to publish. Listed input files: {}".format(node.inputFiles)) + + if not os.path.exists(node.output.value): + os.mkdir(node.output.value) + + for iFile in inputFiles: + filename = os.path.basename(iFile) + oFile = os.path.join(node.output.value, filename) + print('Publish file', iFile, 'into', oFile) + shutil.copyfile(iFile, oFile) + print('Publish end') From fe04ac5f572edf9d5adae62e98c4812ccecb1d36 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 7 Nov 2017 15:47:14 +0100 Subject: [PATCH 0031/1093] Add chunk notion for parallelization and implement specific updateInternals in CameraInit node * Add chunk notion for parallelization * Allows Node desc to implement custom updateInternals * CameraInit node implement a specific updateInternals to update the input image list * FeatureExtraction, FeatureMatching, DepthMap, DepthMapFilter: implement parallelization --- meshroom/aliceVision/CameraInit.py | 157 ++++++++++++++++++---- meshroom/aliceVision/DepthMap.py | 1 + meshroom/aliceVision/DepthMapFilter.py | 1 + meshroom/aliceVision/FeatureExtraction.py | 18 +-- meshroom/aliceVision/FeatureMatching.py | 2 + 5 files changed, 138 insertions(+), 41 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 155990323d..8b7b2773a7 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,12 +1,32 @@ +import os import sys from collections import OrderedDict -import os +import json +import psutil +import shutil +import tempfile +import logging from meshroom.core import desc +from meshroom.core.graph import GraphModification + Viewpoint = [ - desc.File(name="image", label="Image", description="Image filepath", value="", uid=[0]), - desc.FloatParam(name="focal", label="Focal Length", description="Focal Length", value=0.0, uid=[0], range=(5, 200, 1)), + desc.IntParam(name="id", label="Id", description="Image UID", value=-1, uid=[0], range=(0, 200, 1)), + desc.File(name="image", label="Image", description="Image Filepath", value="", uid=[0, 1]), + desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=(0, 200, 1)), + desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=(0, 200, 1)), + desc.IntParam(name="rigSubPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=(0, 200, 1)), +] + +Intrinsic = [ + desc.IntParam(name="id", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=(0, 200, 1)), + desc.IntParam(name="initialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1, uid=[0], range=(0, 200, 1)), + desc.IntParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1, uid=[0], range=(0, 200, 1)), + desc.ChoiceParam(name="cameraType", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], exclusive=True, uid=[0]), + desc.StringParam(name="deviceMake", label="Make", description="Camera Make", value="", uid=[]), + desc.StringParam(name="deviceModel", label="Model", description="Camera Model", value="", uid=[]), + desc.StringParam(name="sensorWidth", label="Sensor Width", description="Camera Sensor Width", value="", uid=[0]), ] @@ -16,34 +36,27 @@ class CameraInit(desc.CommandLineNode): inputs = [ desc.ListAttribute( - name='viewpoints', - elementDesc=desc.GroupAttribute(name='viewpoint', label="Viewpoint", description="", groupDesc=Viewpoint, - group='allParams'), + name="viewpoints", + elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="", groupDesc=Viewpoint, + group="allParams"), label="Viewpoints", description="Input viewpoints", - group="" - ), - desc.File( - name='imageDirectory', - label='Image Directory', - description='''Input images folder.''', - value='', - uid=[0], + group="", ), - desc.File( - name='jsonFile', - label='Json File', - description='''Input file with all the user options. ''' - '''It can be used to provide a list of images instead of a directory.''', - value='', - uid=[0], + desc.ListAttribute( + name="intrinsics", + elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="", groupDesc=Intrinsic, + group="allParams"), + label="Intrinsics", + description="Camera Intrinsics", + group="", ), desc.File( name='sensorDatabase', label='Sensor Database', description='''Camera sensor width database path.''', value=os.environ.get('ALICEVISION_SENSOR_DB', ''), - uid=[0], + uid=[], ), desc.IntParam( name='defaultFocalLengthPix', @@ -98,16 +111,32 @@ class CameraInit(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ) + ), + desc.StringParam( + name='_viewpointsUid', + label='Internal Intrinsics Uid', + description='', + value='', + uid=[], + group='', + ), ] outputs = [ desc.File( name='output', label='Output', - description='''Output directory for the new SfMData file Optional parameters:''', - value='{cache}/{nodeType}/{uid0}/', + description='''Output SfMData.''', + value='{cache}/{nodeType}/{uid0}', # TODO + uid=[], + ), + desc.File( # TODO: TO REMOVE + name='outputSfM', + label='Output SfM', + description='''Output SfMData.''', + value='{cache}/{nodeType}/{uid0}/sfm_data.json', uid=[], + group="", ), desc.File( name='outputSfm', @@ -118,3 +147,81 @@ class CameraInit(desc.CommandLineNode): group='', # not a command line argument ) ] + + def updateInternals(self, node): + if not node.viewpoints: + return + lastViewpointsUid = node.attribute("_viewpointsUid").value + if lastViewpointsUid == node.viewpoints.uid(1): + return + + origCmdVars = node._cmdVars.copy() + # Python3: with tempfile.TemporaryDirectory(prefix="Meshroom_CameraInit") as tmpCache + tmpCache = tempfile.mkdtemp() + localCmdVars = { + 'cache': tmpCache, + 'nodeType': node.nodeType, + } + node._buildCmdVars(localCmdVars) + node._cmdVars = localCmdVars + try: + os.makedirs(os.path.join(tmpCache, node.internalFolder)) + self.createViewpointsFile(node) + cmd = self.buildCommandLine(node.chunks[0]) + # logging.debug(' - commandLine:', cmd) + subprocess = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) + stdout, stderr = subprocess.communicate() + subprocess.wait() + if subprocess.returncode != 0: + logging.warning('CameraInit: Error on updateInternals of node "{}".'.format(node.name)) + except Exception: + logging.warning('CameraInit: Error on updateInternals of node "{}".'.format(node.name)) + raise + finally: + node._cmdVars = origCmdVars + shutil.rmtree(tmpCache) + # TODO: reload result of aliceVision_cameraInit + # cameraInitSfM = node.viewpointsFile # localCmdVars['outputSfMValue'] + # jsonData = open(cameraInitSfM, 'r').read() + # data = json.loads(jsonData) + # with GraphModification(node.graph): + # node.viewpoints.value = data.get("views", []) + # node.intrinsics.value = data.get("intrinsics", []) + + node.attribute("_viewpointsUid").value = node.viewpoints.uid(1) + + def createViewpointsFile_new(self, node): + if node.viewpoints: + sfmData = { + "version": [1, 0, 0], + "views": node.viewpoints.getPrimitiveValue(exportDefault=False), + "intrinsics": node.intrinsics.getPrimitiveValue(exportDefault=False), + } + node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.json'.format(**node._cmdVars) + with open(node.viewpointsFile, 'w') as f: + f.write(json.dumps(sfmData, indent=4)) + # python3: json.dumps(node.viewpoints, f, indent=4) + + def createViewpointsFile(self, node): + """ + Temporary compatibility method. + """ + if node.viewpoints: + sfmData = { + "resources": [v["image"] for v in node.viewpoints.getPrimitiveValue(exportDefault=False)], + } + node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.json'.format(**node._cmdVars) + with open(node.viewpointsFile, 'w') as f: + f.write(json.dumps(sfmData, indent=4)) + # python3: json.dumps(node.viewpoints, f, indent=4) + + def buildCommandLine(self, chunk): + cmd = desc.CommandLineNode.buildCommandLine(self, chunk) + if len(chunk.node.viewpoints): + cmd += ' --jsonFile ' + chunk.node.viewpointsFile + return cmd + + def processChunk(self, chunk): + self.createViewpointsFile(chunk.node) + desc.CommandLineNode.processChunk(self, chunk) + diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index ee97a0119a..3b57ab6880 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -4,6 +4,7 @@ class DepthMap(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE + parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=3) inputs = [ desc.File( diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 57f6cc16ae..4a470d7979 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -4,6 +4,7 @@ class DepthMapFilter(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL + parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=10) inputs = [ desc.File( diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index f481bfb20d..56ec2168d9 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -5,6 +5,8 @@ class FeatureExtraction(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureExtraction {allParams}' + parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=10) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ desc.File( @@ -40,22 +42,6 @@ class FeatureExtraction(desc.CommandLineNode): value='', uid=[0], ), - desc.IntParam( - name='rangeStart', - label='Range Start', - description='''Range image index start.''', - value=-1, - range=(-sys.maxsize, sys.maxsize, 1), - uid=[0], - ), - desc.IntParam( - name='rangeSize', - label='Range Size', - description='''Range size. Log parameters:''', - value=1, - range=(-sys.maxsize, sys.maxsize, 1), - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index ddf4682399..488f48db54 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -5,6 +5,8 @@ class FeatureMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureMatching {allParams}' + parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=20) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ desc.File( From a135a8ba30aeeccdd0f36bd19cd5abc4b9e20254 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 7 Nov 2017 18:46:14 +0100 Subject: [PATCH 0032/1093] [node] Publish: fix node with new chunk notion --- meshroom/aliceVision/Publish.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index baea25b632..71670b2377 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -29,27 +29,27 @@ class Publish(desc.Node): ), ] - def process(self, node): + def processChunk(self, chunk): print("Publish") - if not node.inputFiles: + if not chunk.node.inputFiles: print("Nothing to publish") return - if not node.output.value: + if not chunk.node.output.value: return inputFiles = [] - for inputFile in node.inputFiles: + for inputFile in chunk.node.inputFiles: iFiles = glob.glob(inputFile.value) inputFiles.extend(iFiles) if not inputFiles: raise RuntimeError("Publish: input files listed, but nothing to publish. Listed input files: {}".format(node.inputFiles)) - if not os.path.exists(node.output.value): - os.mkdir(node.output.value) + if not os.path.exists(chunk.node.output.value): + os.mkdir(chunk.node.output.value) for iFile in inputFiles: filename = os.path.basename(iFile) - oFile = os.path.join(node.output.value, filename) + oFile = os.path.join(chunk.node.output.value, filename) print('Publish file', iFile, 'into', oFile) shutil.copyfile(iFile, oFile) print('Publish end') From 4d238b202399f548828fea6abf0547a05ac9916b Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Wed, 8 Nov 2017 17:49:22 +0100 Subject: [PATCH 0033/1093] [nodes] DepthMap: add missing parallelization command line arguments --- meshroom/aliceVision/DepthMap.py | 1 + meshroom/aliceVision/DepthMapFilter.py | 1 + 2 files changed, 2 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 3b57ab6880..5b9bf9da8c 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -5,6 +5,7 @@ class DepthMap(desc.CommandLineNode): commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=3) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ desc.File( diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 4a470d7979..8bdb6db781 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -5,6 +5,7 @@ class DepthMapFilter(desc.CommandLineNode): commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=10) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ desc.File( From 14d713be4b31c2469886aeb3c67831f1f81adf36 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Wed, 8 Nov 2017 18:43:27 +0100 Subject: [PATCH 0034/1093] [nodes] CameraInit: remove extra outputSfM + fix sfmData for empty filepaths --- meshroom/aliceVision/CameraInit.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 8b7b2773a7..a7c79f1ebe 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -130,14 +130,6 @@ class CameraInit(desc.CommandLineNode): value='{cache}/{nodeType}/{uid0}', # TODO uid=[], ), - desc.File( # TODO: TO REMOVE - name='outputSfM', - label='Output SfM', - description='''Output SfMData.''', - value='{cache}/{nodeType}/{uid0}/sfm_data.json', - uid=[], - group="", - ), desc.File( name='outputSfm', label='Output SfM', @@ -208,7 +200,7 @@ def createViewpointsFile(self, node): """ if node.viewpoints: sfmData = { - "resources": [v["image"] for v in node.viewpoints.getPrimitiveValue(exportDefault=False)], + "resources": [v.get("image", "") for v in node.viewpoints.getPrimitiveValue(exportDefault=False)], } node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.json'.format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: From 2e30d1dd39416da716c5e628b25a54084c8c9e4a Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Wed, 8 Nov 2017 18:43:53 +0100 Subject: [PATCH 0035/1093] [nodes] PrepareDenseScene: remove incorrect uid on output --- meshroom/aliceVision/PrepareDenseScene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 259aa254ce..47488436ca 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -40,7 +40,7 @@ class PrepareDenseScene(desc.CommandLineNode): label='MVS Configuration file', description='', value='{cache}/{nodeType}/{uid0}/_tmp_scale{scaleValue}/mvs.ini', - uid=[0], + uid=[], group='', # not a command line arg ), From 64ead46f59b24e0f6b351d95d0bea914e27c2de0 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Fri, 10 Nov 2017 11:37:01 +0100 Subject: [PATCH 0036/1093] [nodes] CameraInit: update to support views and intrinsics update --- meshroom/aliceVision/CameraInit.py | 111 ++++++++++++++++------------- 1 file changed, 63 insertions(+), 48 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 8b7b2773a7..7dc4c86de3 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -12,21 +12,35 @@ Viewpoint = [ - desc.IntParam(name="id", label="Id", description="Image UID", value=-1, uid=[0], range=(0, 200, 1)), - desc.File(name="image", label="Image", description="Image Filepath", value="", uid=[0, 1]), + desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=(0, 200, 1)), + desc.IntParam(name="poseId", label="Pose Id", description="Pose Id", value=-1, uid=[0], range=(0, 200, 1)), + desc.File(name="path", label="Image Path", description="Image Filepath", value="", uid=[0, 1]), desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=(0, 200, 1)), desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=(0, 200, 1)), - desc.IntParam(name="rigSubPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=(0, 200, 1)), + desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=(0, 200, 1)), ] Intrinsic = [ - desc.IntParam(name="id", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=(0, 200, 1)), - desc.IntParam(name="initialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1, uid=[0], range=(0, 200, 1)), - desc.IntParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1, uid=[0], range=(0, 200, 1)), - desc.ChoiceParam(name="cameraType", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], exclusive=True, uid=[0]), - desc.StringParam(name="deviceMake", label="Make", description="Camera Make", value="", uid=[]), - desc.StringParam(name="deviceModel", label="Model", description="Camera Model", value="", uid=[]), - desc.StringParam(name="sensorWidth", label="Sensor Width", description="Camera Sensor Width", value="", uid=[0]), + desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=(0, 200, 1)), + desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1.0, uid=[0], range=(0.0, 200.0, 1.0)), + desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1.0, uid=[0], range=(0.0, 200.0, 1.0)), + desc.ChoiceParam(name="type", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], exclusive=True, uid=[0]), + # desc.StringParam(name="deviceMake", label="Make", description="Camera Make", value="", uid=[]), + # desc.StringParam(name="deviceModel", label="Model", description="Camera Model", value="", uid=[]), + # desc.StringParam(name="sensorWidth", label="Sensor Width", description="Camera Sensor Width", value="", uid=[0]), + desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), + desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), + desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (camera and lens combined)", value="", uid=[]), + desc.GroupAttribute(name="principalPoint", label="Principal Point", description="", groupDesc=[ + desc.IntParam(name="x", label="x", description="", value=0, uid=[], range=(0, 10000, 1)), + desc.IntParam(name="y", label="y", description="", value=0, uid=[], range=(0, 10000, 1)), + ]), + desc.ListAttribute( + name="distortionParams", + elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), + label="Distortion Params", + description="Distortion Parameters", + ), ] @@ -37,16 +51,14 @@ class CameraInit(desc.CommandLineNode): inputs = [ desc.ListAttribute( name="viewpoints", - elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="", groupDesc=Viewpoint, - group="allParams"), + elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="", groupDesc=Viewpoint), label="Viewpoints", description="Input viewpoints", group="", ), desc.ListAttribute( name="intrinsics", - elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="", groupDesc=Intrinsic, - group="allParams"), + elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="", groupDesc=Intrinsic), label="Intrinsics", description="Camera Intrinsics", group="", @@ -75,9 +87,9 @@ class CameraInit(desc.CommandLineNode): uid=[0], ), desc.StringParam( - name='defaultIntrinsics', - label='Default Intrinsics', - description='''Intrinsics Kmatrix "f;0;ppx;0;f;ppy;0;0;1".''', + name='defaultIntrinsic', + label='Default Intrinsic', + description='''Intrinsic K matrix "f;0;ppx;0;f;ppy;0;0;1".''', value='', uid=[0], ), @@ -127,25 +139,9 @@ class CameraInit(desc.CommandLineNode): name='output', label='Output', description='''Output SfMData.''', - value='{cache}/{nodeType}/{uid0}', # TODO - uid=[], - ), - desc.File( # TODO: TO REMOVE - name='outputSfM', - label='Output SfM', - description='''Output SfMData.''', - value='{cache}/{nodeType}/{uid0}/sfm_data.json', + value='{cache}/{nodeType}/{uid0}/cameraInit.sfm', uid=[], - group="", ), - desc.File( - name='outputSfm', - label='Output SfM', - description='''''', - value='{cache}/{nodeType}/{uid0}/sfm_data.json', - uid=[], - group='', # not a command line argument - ) ] def updateInternals(self, node): @@ -174,41 +170,60 @@ def updateInternals(self, node): subprocess.wait() if subprocess.returncode != 0: logging.warning('CameraInit: Error on updateInternals of node "{}".'.format(node.name)) + + # Reload result of aliceVision_cameraInit + cameraInitSfM = localCmdVars['outputValue'] + jsonData = open(cameraInitSfM, 'r').read() + data = json.loads(jsonData) + + intrinsicsKeys = [i.name for i in Intrinsic] + intrinsics = [{k: v for k, v in item.items() if k in intrinsicsKeys} for item in data.get("intrinsics", [])] + for intrinsic in intrinsics: + pp = intrinsic['principalPoint'] + intrinsic['principalPoint'] = {} + intrinsic['principalPoint']['x'] = pp[0] + intrinsic['principalPoint']['y'] = pp[1] + # print('intrinsics:', intrinsics) + viewsKeys = [v.name for v in Viewpoint] + views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] + # print('views:', views) + + with GraphModification(node.graph): + node.viewpoints.value = views + node.intrinsics.value = intrinsics + node.attribute("_viewpointsUid").value = node.viewpoints.uid(1) + except Exception: logging.warning('CameraInit: Error on updateInternals of node "{}".'.format(node.name)) raise finally: node._cmdVars = origCmdVars shutil.rmtree(tmpCache) - # TODO: reload result of aliceVision_cameraInit - # cameraInitSfM = node.viewpointsFile # localCmdVars['outputSfMValue'] - # jsonData = open(cameraInitSfM, 'r').read() - # data = json.loads(jsonData) - # with GraphModification(node.graph): - # node.viewpoints.value = data.get("views", []) - # node.intrinsics.value = data.get("intrinsics", []) - node.attribute("_viewpointsUid").value = node.viewpoints.uid(1) - - def createViewpointsFile_new(self, node): + def createViewpointsFile(self, node): if node.viewpoints: + intrinsics = node.intrinsics.getPrimitiveValue(exportDefault=True) + for intrinsic in intrinsics: + intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] sfmData = { "version": [1, 0, 0], "views": node.viewpoints.getPrimitiveValue(exportDefault=False), - "intrinsics": node.intrinsics.getPrimitiveValue(exportDefault=False), + "intrinsics": intrinsics, + "featureFolder": "", + "matchingFolder": "", } node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.json'.format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: f.write(json.dumps(sfmData, indent=4)) # python3: json.dumps(node.viewpoints, f, indent=4) - def createViewpointsFile(self, node): + def createViewpointsFile_old(self, node): """ Temporary compatibility method. """ if node.viewpoints: sfmData = { - "resources": [v["image"] for v in node.viewpoints.getPrimitiveValue(exportDefault=False)], + "resources": [v["path"] for v in node.viewpoints.getPrimitiveValue(exportDefault=False)], } node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.json'.format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: @@ -218,7 +233,7 @@ def createViewpointsFile(self, node): def buildCommandLine(self, chunk): cmd = desc.CommandLineNode.buildCommandLine(self, chunk) if len(chunk.node.viewpoints): - cmd += ' --jsonFile ' + chunk.node.viewpointsFile + cmd += ' --input ' + chunk.node.viewpointsFile return cmd def processChunk(self, chunk): From 4b286173627567c7b706d9cdd062697ef2f972d0 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Fri, 10 Nov 2017 19:32:08 +0100 Subject: [PATCH 0037/1093] [nodes] aliceVision: update param names to "folder" --- meshroom/aliceVision/FeatureMatching.py | 8 ++++---- meshroom/aliceVision/ImageMatching.py | 6 +++--- meshroom/aliceVision/PrepareDenseScene.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 16 ++++++++-------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 488f48db54..c543883567 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -37,9 +37,9 @@ class FeatureMatching(desc.CommandLineNode): joinChar=',', ), desc.File( - name='featuresDirectory', - label='Features Directory', - description='''Path to a directory containing the extracted features.''', + name='featuresFolder', + label='Features Folder', + description='''Path to a folder containing the extracted features.''', value='', uid=[0], ), @@ -158,7 +158,7 @@ class FeatureMatching(desc.CommandLineNode): desc.File( name='output', label='Output', - description='''Path to a directory in which computed matches will be stored. Optional parameters:''', + description='''Path to a folder in which computed matches will be stored.''', value='{cache}/{nodeType}/{uid0}/', uid=[], ), diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 79066e7a52..62af5ba1d5 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -16,9 +16,9 @@ class ImageMatching(desc.CommandLineNode): uid=[0], ), desc.File( - name='featuresDirectory', - label='Features Directory', - description='''Directory containing the extracted features and descriptors. By default, it is the directory containing the SfMData.''', + name='featuresFolder', + label='Features Folder', + description='''Folder containing the extracted features and descriptors. By default, it is the folder containing the SfMData.''', value='', uid=[0], ), diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 47488436ca..daccb16e17 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -47,7 +47,7 @@ class PrepareDenseScene(desc.CommandLineNode): desc.File( name='output', label='Output', - description='''Output directory.''', + description='''Output folder.''', value='{cache}/{nodeType}/{uid0}/', uid=[], ) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index ca3f398a91..e4887777fd 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -16,16 +16,16 @@ class StructureFromMotion(desc.CommandLineNode): ), desc.File( - name='featuresDirectory', - label='Features Directory', - description='''Path to a directory containing the extracted features.''', + name='featuresFolder', + label='Features Folder', + description='''Path to a folder containing the extracted features.''', value='', uid=[0], ), desc.File( - name='matchesDirectory', - label='Matches Directory', - description='''Path to a directory in which computed matches are stored. Optional parameters:''', + name='matchesFolder', + label='Matches Folder', + description='''Path to a folder in which computed matches are stored.''', value='', uid=[0], ), @@ -107,9 +107,9 @@ class StructureFromMotion(desc.CommandLineNode): uid=[], ), desc.File( - name='extraInfoDirectory', + name='extraInfoFolder', label='Output', - description='''Directory for intermediate reconstruction files and additional reconstruction information files.''', + description='''Folder for intermediate reconstruction files and additional reconstruction information files.''', value='{cache}/{nodeType}/{uid0}/', uid=[], ), From 52588f9f28d064a27ea71d5a4c4e959316da0a20 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 13 Nov 2017 20:28:00 +0100 Subject: [PATCH 0038/1093] [nodes] Cleanup CameraInit * remove non user pertinent parameters * revamp old updateInternals into buildIntrinsics method: * works with node's current values + optional new images * does not update the graph, making it thread safe and does not break undo/redo when used from UI * returns updated intrinsics and views instead --- meshroom/aliceVision/CameraInit.py | 96 +++++++----------------------- 1 file changed, 22 insertions(+), 74 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index a92b3167fc..9051a2d0b1 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,6 +1,4 @@ import os -import sys -from collections import OrderedDict import json import psutil import shutil @@ -8,7 +6,6 @@ import logging from meshroom.core import desc -from meshroom.core.graph import GraphModification Viewpoint = [ @@ -70,51 +67,6 @@ class CameraInit(desc.CommandLineNode): value=os.environ.get('ALICEVISION_SENSOR_DB', ''), uid=[], ), - desc.IntParam( - name='defaultFocalLengthPix', - label='Default Focal Length Pix', - description='''Focal length in pixels.''', - value=-1, - range=(-sys.maxsize, sys.maxsize, 1), - uid=[0], - ), - desc.IntParam( - name='defaultSensorWidth', - label='Default Sensor Width', - description='''Sensor width in mm.''', - value=-1, - range=(-sys.maxsize, sys.maxsize, 1), - uid=[0], - ), - desc.StringParam( - name='defaultIntrinsic', - label='Default Intrinsic', - description='''Intrinsic K matrix "f;0;ppx;0;f;ppy;0;0;1".''', - value='', - uid=[0], - ), - desc.ChoiceParam( - name='defaultCameraModel', - label='Default Camera Model', - description='''Camera model type (pinhole, radial1, radial3, brown, fisheye4).''', - value='', - values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], - exclusive=True, - uid=[0], - ), - desc.ChoiceParam( - name='groupCameraModel', - label='Group Camera Model', - description='''* 0: each view have its own camera intrinsic parameters ''' - '''* 1: view share camera intrinsic parameters based on metadata, ''' - '''if no metadata each view has its own camera intrinsic parameters ''' - '''* 2: view share camera intrinsic parameters based on metadata, ''' - '''if no metadata they are grouped by folder''', - value=1, - values=[0, 1, 2], - exclusive=True, - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -124,14 +76,6 @@ class CameraInit(desc.CommandLineNode): exclusive=True, uid=[], ), - desc.StringParam( - name='_viewpointsUid', - label='Internal Intrinsics Uid', - description='', - value='', - uid=[], - group='', - ), ] outputs = [ @@ -144,13 +88,17 @@ class CameraInit(desc.CommandLineNode): ), ] - def updateInternals(self, node): - if not node.viewpoints: - return - lastViewpointsUid = node.attribute("_viewpointsUid").value - if lastViewpointsUid == node.viewpoints.uid(1): - return + def buildIntrinsics(self, node, additionalViews=()): + """ Build intrinsics from node current views and optional additional views + + Args: + node: the CameraInit node instance to build intrinsics for + additionalViews: (optional) the new views (list of path to images) to add to the node's viewpoints + Returns: + The updated views and intrinsics as two separate lists + """ + assert isinstance(node.desc, CameraInit) origCmdVars = node._cmdVars.copy() # Python3: with tempfile.TemporaryDirectory(prefix="Meshroom_CameraInit") as tmpCache tmpCache = tempfile.mkdtemp() @@ -162,14 +110,14 @@ def updateInternals(self, node): node._cmdVars = localCmdVars try: os.makedirs(os.path.join(tmpCache, node.internalFolder)) - self.createViewpointsFile(node) + self.createViewpointsFile(node, additionalViews) cmd = self.buildCommandLine(node.chunks[0]) # logging.debug(' - commandLine:', cmd) subprocess = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) stdout, stderr = subprocess.communicate() subprocess.wait() if subprocess.returncode != 0: - logging.warning('CameraInit: Error on updateInternals of node "{}".'.format(node.name)) + logging.warning('CameraInit: Error on buildIntrinsics of node "{}".'.format(node.name)) # Reload result of aliceVision_cameraInit cameraInitSfM = localCmdVars['outputValue'] @@ -187,27 +135,27 @@ def updateInternals(self, node): viewsKeys = [v.name for v in Viewpoint] views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] # print('views:', views) - - with GraphModification(node.graph): - node.viewpoints.value = views - node.intrinsics.value = intrinsics - node.attribute("_viewpointsUid").value = node.viewpoints.uid(1) + return views, intrinsics except Exception: - logging.warning('CameraInit: Error on updateInternals of node "{}".'.format(node.name)) + logging.warning('CameraInit: Error on buildIntrinsics of node "{}".'.format(node.name)) raise finally: node._cmdVars = origCmdVars shutil.rmtree(tmpCache) - def createViewpointsFile(self, node): - if node.viewpoints: + def createViewpointsFile(self, node, additionalViews=()): + node.viewpointsFile = "" + if node.viewpoints or additionalViews: + newViews = [] + for path in additionalViews: # format additional views to match json format + newViews.append({"path": path}) intrinsics = node.intrinsics.getPrimitiveValue(exportDefault=True) for intrinsic in intrinsics: intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] sfmData = { "version": [1, 0, 0], - "views": node.viewpoints.getPrimitiveValue(exportDefault=False), + "views": node.viewpoints.getPrimitiveValue(exportDefault=False) + newViews, "intrinsics": intrinsics, "featureFolder": "", "matchingFolder": "", @@ -232,7 +180,7 @@ def createViewpointsFile_old(self, node): def buildCommandLine(self, chunk): cmd = desc.CommandLineNode.buildCommandLine(self, chunk) - if len(chunk.node.viewpoints): + if chunk.node.viewpointsFile: cmd += ' --input ' + chunk.node.viewpointsFile return cmd From 71378bb30718b9d044cb877875195e8f262696ff Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 13 Nov 2017 20:31:16 +0100 Subject: [PATCH 0039/1093] [nodes] update aliceVision nodes * remove non-pertinent parameters * fix parameters types / description * tweak value ranges * fix incorrect uids * update default values --- meshroom/aliceVision/FeatureExtraction.py | 6 ++-- meshroom/aliceVision/FeatureMatching.py | 33 ++++++++------------- meshroom/aliceVision/ImageMatching.py | 6 ++-- meshroom/aliceVision/PrepareDenseScene.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 19 ++++-------- 5 files changed, 24 insertions(+), 42 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 56ec2168d9..c59323291e 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -35,11 +35,11 @@ class FeatureExtraction(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.StringParam( + desc.BoolParam( name='upright', label='Upright', description='''Upright feature.''', - value='', + value=False, uid=[0], ), desc.ChoiceParam( @@ -57,7 +57,7 @@ class FeatureExtraction(desc.CommandLineNode): desc.File( name='output', label='Output', - description='''Output path for the features and descriptors files (*.feat, *.desc). Optional parameters:''', + description='''Output path for the features and descriptors files (*.feat, *.desc).''', value='{cache}/{nodeType}/{uid0}/', uid=[], ), diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index c543883567..ef86bbe423 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -68,7 +68,7 @@ class FeatureMatching(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.StringParam( + desc.BoolParam( name='savePutativeMatches', label='Save Putative Matches', description='''putative matches.''', @@ -82,11 +82,11 @@ class FeatureMatching(desc.CommandLineNode): value=False, uid=[0], ), - desc.File( + desc.BoolParam( name='matchFilePerImage', label='Match File Per Image', description='''matches in a separate file per image.''', - value='', + value=True, uid=[0], ), desc.FloatParam( @@ -94,16 +94,7 @@ class FeatureMatching(desc.CommandLineNode): label='Distance Ratio', description='''Distance ratio to discard non meaningful matches.''', value=0.8, - range=(-float('inf'), float('inf'), 0.01), - uid=[0], - ), - desc.ChoiceParam( - name='videoModeMatching', - label='Video Mode Matching', - description='''sequence matching with an overlap of X images: * 0: will match 0 with (1->X), ... * 2: will match 0 with (1,2), 1 with (2,3), ... * 3: will match 0 with (1,2,3), 1 with (2,3,4), ...''', - value=0, - values=('0', '2', '3'), - exclusive=True, + range=(0.0, 1.0, 0.01), uid=[0], ), desc.IntParam( @@ -111,36 +102,36 @@ class FeatureMatching(desc.CommandLineNode): label='Max Iteration', description='''Maximum number of iterations allowed in ransac step.''', value=2048, - range=(0, sys.maxsize, 1), + range=(1, 20000, 1), uid=[0], ), desc.BoolParam( name='useGridSort', label='Use Grid Sort', description='''matching grid sort.''', - value=False, + value=True, uid=[0], ), - desc.File( + desc.BoolParam( name='exportDebugFiles', label='Export Debug Files', description='''debug files (svg, dot).''', - value='', - uid=[0], + value=False, + uid=[], ), desc.StringParam( name='fileExtension', label='File Extension', description='''File extension to store matches (bin or txt).''', - value='bin', - uid=[0], + value='txt', + uid=[], ), desc.IntParam( name='maxMatches', label='Max Matches', description='''Maximum number pf matches to keep.''', value=0, - range=(-sys.maxsize, sys.maxsize, 1), + range=(0, 10000, 1), uid=[0], ), desc.ChoiceParam( diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 62af5ba1d5..5244e8ef5d 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -42,7 +42,7 @@ class ImageMatching(desc.CommandLineNode): label='Max Descriptors', description='''Limit the number of descriptors you load per image. Zero means no limit.''', value=500, - range=(-sys.maxsize, sys.maxsize, 1), + range=(0, 100000, 1), uid=[0], ), desc.IntParam( @@ -50,13 +50,13 @@ class ImageMatching(desc.CommandLineNode): label='Nb Matches', description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', value=50, - range=(-sys.maxsize, sys.maxsize, 1), + range=(0, 1000, 1), uid=[0], ), desc.File( name='weights', label='Weights', - description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set. Log parameters:''', + description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''', value='', uid=[0], ), diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index daccb16e17..69713e4fd0 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -30,7 +30,7 @@ class PrepareDenseScene(desc.CommandLineNode): value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, - uid=[0], + uid=[], ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index e4887777fd..0e38f6d6a9 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -40,19 +40,19 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], joinChar=',', ), - desc.File( + desc.StringParam( name='interFileExtension', label='Inter File Extension', description='''Extension of the intermediate file export.''', - value='.ply', - uid=[0], + value='.abc', + uid=[], ), desc.IntParam( name='minInputTrackLength', label='Min Input Track Length', description='''Minimum track length in input of SfM''', value=2, - range=(-sys.maxsize, sys.maxsize, 1), + range=(2, 10, 1), uid=[0], ), desc.ChoiceParam( @@ -60,7 +60,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Camera Model', description='''* 1: Pinhole * 2: Pinhole radial 1 * 3: Pinhole radial 3''', value=3, - values=['1', '2', '3'], + values=[1, 2, 3], exclusive=True, uid=[0], ), @@ -78,15 +78,6 @@ class StructureFromMotion(desc.CommandLineNode): value='', uid=[0], ), - desc.ChoiceParam( - name='refineIntrinsics', - label='Refine Intrinsics', - description='''intrinsic parameters. Log parameters:''', - value=0, - values=[0, 1], - exclusive=True, - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 010918f67f31ce916d2a0af4a2ce12fd849c4436 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 14 Nov 2017 10:12:03 +0100 Subject: [PATCH 0040/1093] [nodes] CameraInit: fix typo --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 9051a2d0b1..dc24071c7e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -98,7 +98,7 @@ def buildIntrinsics(self, node, additionalViews=()): Returns: The updated views and intrinsics as two separate lists """ - assert isinstance(node.desc, CameraInit) + assert isinstance(node.nodeDesc, CameraInit) origCmdVars = node._cmdVars.copy() # Python3: with tempfile.TemporaryDirectory(prefix="Meshroom_CameraInit") as tmpCache tmpCache = tempfile.mkdtemp() From 1da8b196a10c1adeb4fc1b64216fa17f6be21cea Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 17 Nov 2017 17:56:33 +0100 Subject: [PATCH 0041/1093] [nodes] turn several parameters into Choices --- meshroom/aliceVision/FeatureMatching.py | 4 +++- meshroom/aliceVision/StructureFromMotion.py | 4 +++- meshroom/aliceVision/Texturing.py | 7 ++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index ef86bbe423..f8303ad340 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -119,11 +119,13 @@ class FeatureMatching(desc.CommandLineNode): value=False, uid=[], ), - desc.StringParam( + desc.ChoiceParam( name='fileExtension', label='File Extension', description='''File extension to store matches (bin or txt).''', value='txt', + values=('txt', 'bin'), + exclusive=True, uid=[], ), desc.IntParam( diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 0e38f6d6a9..76eae74484 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -40,11 +40,13 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], joinChar=',', ), - desc.StringParam( + desc.ChoiceParam( name='interFileExtension', label='Inter File Extension', description='''Extension of the intermediate file export.''', value='.abc', + values=('.abc', '.ply'), + exclusive=True, uid=[], ), desc.IntParam( diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 247da9c503..98aecce55d 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -22,13 +22,14 @@ class Texturing(desc.CommandLineNode): value='', uid=[0], ), - desc.IntParam( + desc.ChoiceParam( name='textureSide', label='Texture Side', description='''Output texture size''', value=8192, - range=(1024, 16384, 1024), - uid=[0], + values=(1024, 2048, 4096, 8192, 16384), + exclusive=True, + uid=[], ), desc.IntParam( name='padding', From a8239842d22d69ee7b7c388a500f5b546639e6cb Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 17 Nov 2017 18:46:21 +0100 Subject: [PATCH 0042/1093] [core] parallelization: introduce the notion of node 'size' * node size is an estimation of the number of element to process on a given node, that may be used for parallelization. * replace the explicit reference to an attribute on a node (Parallelization.inputListParamName) * size can be: * dynamic: depends on the size of the node connected to a specific Attribute * static --- meshroom/aliceVision/CameraConnection.py | 1 + meshroom/aliceVision/CameraInit.py | 2 ++ meshroom/aliceVision/DepthMap.py | 3 ++- meshroom/aliceVision/DepthMapFilter.py | 3 ++- meshroom/aliceVision/FeatureExtraction.py | 3 ++- meshroom/aliceVision/FeatureMatching.py | 3 ++- meshroom/aliceVision/ImageMatching.py | 1 + meshroom/aliceVision/Meshing.py | 1 + meshroom/aliceVision/PrepareDenseScene.py | 1 + meshroom/aliceVision/Publish.py | 1 + meshroom/aliceVision/StructureFromMotion.py | 1 + 11 files changed, 16 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py index 7796440654..d3259d857d 100644 --- a/meshroom/aliceVision/CameraConnection.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -4,6 +4,7 @@ class CameraConnection(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_cameraConnection {allParams}' + size = desc.DynamicNodeSize('ini') inputs = [ desc.File( diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index dc24071c7e..cf96155c5c 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -45,6 +45,8 @@ class CameraInit(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_cameraInit {allParams}' + size = desc.DynamicNodeSize('viewpoints') + inputs = [ desc.ListAttribute( name="viewpoints", diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 5b9bf9da8c..9ed10c951b 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -4,7 +4,8 @@ class DepthMap(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE - parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=3) + size = desc.DynamicNodeSize('ini') + parallelization = desc.Parallelization(blockSize=3) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 8bdb6db781..4d8d4e864d 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -4,7 +4,8 @@ class DepthMapFilter(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL - parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=10) + size = desc.DynamicNodeSize('ini') + parallelization = desc.Parallelization(blockSize=10) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index c59323291e..900be30e6f 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -5,7 +5,8 @@ class FeatureExtraction(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureExtraction {allParams}' - parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=10) + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=10) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index f8303ad340..2b9c14095e 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -5,7 +5,8 @@ class FeatureMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureMatching {allParams}' - parallelization = desc.Parallelization(inputListParamName='viewpoints', blockSize=20) + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=20) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 5244e8ef5d..046350f6c5 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -6,6 +6,7 @@ class ImageMatching(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_imageMatching {allParams}' + size = desc.DynamicNodeSize('input') inputs = [ desc.File( diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index ccd9bfa6e6..71b85087e9 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -3,6 +3,7 @@ class Meshing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_meshing {allParams}' + cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 69713e4fd0..4a04c11217 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -5,6 +5,7 @@ class PrepareDenseScene(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_prepareDenseScene {allParams}' + size = desc.DynamicNodeSize('input') inputs = [ desc.File( diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 71670b2377..a331520a4b 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -6,6 +6,7 @@ class Publish(desc.Node): + size = desc.DynamicNodeSize('inputFiles') inputs = [ desc.ListAttribute( elementDesc=desc.File( diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 76eae74484..5606bd6496 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -5,6 +5,7 @@ class StructureFromMotion(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_incrementalSfM {allParams}' + size = desc.DynamicNodeSize('input') inputs = [ desc.File( From 52d4e5d2fa90b4f99c502a2b4196796f7b605a84 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 17 Nov 2017 18:57:00 +0100 Subject: [PATCH 0043/1093] [nodes] Texturing: turn downscale into a ChoiceParam --- meshroom/aliceVision/Texturing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 98aecce55d..6777924744 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -39,12 +39,13 @@ class Texturing(desc.CommandLineNode): range=(0, 100, 1), uid=[0], ), - desc.IntParam( + desc.ChoiceParam( name='downscale', label='Downscale', description='''Texture downscale factor''', value=2, - range=(0, 16, 1), + values=(1, 2, 4, 8), + exclusive=True, uid=[0], ), desc.BoolParam( From a1e4ad44e8efdc95fb8906e9a9f6d619a92adeff Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 17 Nov 2017 18:59:27 +0100 Subject: [PATCH 0044/1093] [nodes] Publish: move filepaths resolution into a method --- meshroom/aliceVision/Publish.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index a331520a4b..16ee964c3b 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -30,6 +30,13 @@ class Publish(desc.Node): ), ] + def resolvedPaths(self, inputFiles, outDir): + paths = {} + for inputFile in inputFiles: + for f in glob.glob(inputFile.value): + paths[f] = os.path.join(outDir, os.path.basename(f)) + return paths + def processChunk(self, chunk): print("Publish") if not chunk.node.inputFiles: @@ -38,19 +45,15 @@ def processChunk(self, chunk): if not chunk.node.output.value: return - inputFiles = [] - for inputFile in chunk.node.inputFiles: - iFiles = glob.glob(inputFile.value) - inputFiles.extend(iFiles) - if not inputFiles: - raise RuntimeError("Publish: input files listed, but nothing to publish. Listed input files: {}".format(node.inputFiles)) + outFiles = self.resolvedPaths(chunk.node.inputFiles, chunk.node.output.value) + + if not outFiles: + raise RuntimeError("Publish: input files listed, but nothing to publish. Listed input files: {}".format(chunk.node.inputFiles)) if not os.path.exists(chunk.node.output.value): os.mkdir(chunk.node.output.value) - for iFile in inputFiles: - filename = os.path.basename(iFile) - oFile = os.path.join(chunk.node.output.value, filename) + for iFile, oFile in outFiles: print('Publish file', iFile, 'into', oFile) shutil.copyfile(iFile, oFile) print('Publish end') From f3f0b52043a4be3e77281e7f952a3402c9c86745 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 20 Nov 2017 14:39:27 +0100 Subject: [PATCH 0045/1093] [nodes] fix Publish node incorrect iteration over resolved paths --- meshroom/aliceVision/Publish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 16ee964c3b..10127a0cf6 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -53,7 +53,7 @@ def processChunk(self, chunk): if not os.path.exists(chunk.node.output.value): os.mkdir(chunk.node.output.value) - for iFile, oFile in outFiles: + for iFile, oFile in outFiles.items(): print('Publish file', iFile, 'into', oFile) shutil.copyfile(iFile, oFile) print('Publish end') From f83bc98d56fb311452137ddd822361e37b4767bf Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 20 Nov 2017 19:01:14 +0100 Subject: [PATCH 0046/1093] [nodes] Texturing: textureSide invalidates uid --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 6777924744..9afebd81bf 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -29,7 +29,7 @@ class Texturing(desc.CommandLineNode): value=8192, values=(1024, 2048, 4096, 8192, 16384), exclusive=True, - uid=[], + uid=[0], ), desc.IntParam( name='padding', From df5879c7901be83e1acb808fe0ab2f9e3d3f0b81 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Wed, 22 Nov 2017 15:19:18 +0100 Subject: [PATCH 0047/1093] [nodes] add meshResampling node --- meshroom/aliceVision/MeshResampling.py | 68 ++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 meshroom/aliceVision/MeshResampling.py diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py new file mode 100644 index 0000000000..69d023b843 --- /dev/null +++ b/meshroom/aliceVision/MeshResampling.py @@ -0,0 +1,68 @@ +from meshroom.core import desc + +class MeshResampling(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_meshing {allParams}' + + cpu = desc.Level.NORMAL + ram = desc.Level.NORMAL + + inputs = [ + desc.File( + name="intput", + label='Input Mesh (OBJ file format).', + description='', + value='', + uid=[0], + ), + desc.FloatParam( + name='simplificationFactor', + label='Simplification factor', + description='Simplification factor', + value=0.5, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.IntParam( + name='nbVertices', + label='Fixed Number of Vertices', + description='Fixed number of output vertices.', + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.IntParam( + name='minVertices', + label='Min Vertices', + description='Min number of output vertices.', + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.IntParam( + name='maxVertices', + label='Max Vertices', + description='Max number of output vertices.', + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.IntParam( + name='nbLloydIter', + label='Number of Pre-Smoothing Iteration', + description='Number of iterations for Lloyd pre-smoothing.', + value=40, + range=(0, 100, 1), + uid=[0], + ), + ] + + outputs = [ + desc.File( + name="output", + label="Output mesh", + description="Output mesh (OBJ file format).", + value='{cache}/{nodeType}/{uid0}/mesh.obj', + uid=[], + ), + ] From 46a49cebed5ac4a2ffac9843fa178aba9710b604 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 27 Nov 2017 13:55:01 +0100 Subject: [PATCH 0048/1093] [nodes] CameraInit: change viewpoints file extension to .sfm + remove old method --- meshroom/aliceVision/CameraInit.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index cf96155c5c..485e0de28b 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -162,20 +162,7 @@ def createViewpointsFile(self, node, additionalViews=()): "featureFolder": "", "matchingFolder": "", } - node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.json'.format(**node._cmdVars) - with open(node.viewpointsFile, 'w') as f: - f.write(json.dumps(sfmData, indent=4)) - # python3: json.dumps(node.viewpoints, f, indent=4) - - def createViewpointsFile_old(self, node): - """ - Temporary compatibility method. - """ - if node.viewpoints: - sfmData = { - "resources": [v.get("path", "") for v in node.viewpoints.getPrimitiveValue(exportDefault=False)], - } - node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.json'.format(**node._cmdVars) + node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.sfm'.format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: f.write(json.dumps(sfmData, indent=4)) # python3: json.dumps(node.viewpoints, f, indent=4) From e80c4a608ffb8666e0caccc31f5720f5869ffff3 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 27 Nov 2017 16:20:27 +0100 Subject: [PATCH 0049/1093] [nodes] meshing/texturing: expose parameters --- meshroom/aliceVision/Meshing.py | 35 ++++++++++++++++++++++++++++++- meshroom/aliceVision/Texturing.py | 7 +++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 71b85087e9..90ca9f415c 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -15,6 +15,31 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), + desc.IntParam( + name='maxPts', + label='maxPts', + description='Max points', + value=6000000, + range=(500000, 30000000, 1000), + uid=[0], + ), + desc.IntParam( + name='maxPtsPerVoxel', + label='maxPtsPerVoxel', + description='Max points per voxel', + value=1000000, + range=(500000, 30000000, 1000), + uid=[0], + ), + desc.ChoiceParam( + name='partitioning', + label='Partitioning', + description='', + value='singleBlock', + values=('singleBlock', 'auto'), + exclusive=True, + uid=[0], + ), ] outputs = [ @@ -22,7 +47,15 @@ class Meshing(desc.CommandLineNode): name="output", label="Output mesh", description="Output mesh (OBJ file format).", - value='{cache}/{nodeType}/{uid0}/mesh.obj', + value="{cache}/{nodeType}/{uid0}/mesh.obj", + uid=[], + ), + desc.File( + name="outputDenseReconstruction", + label="Output reconstruction", + description="Output dense reconstruction (BIN file format).", + value="{cache}/{nodeType}/{uid0}/denseReconstruction.bin", uid=[], + group="", ), ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 9afebd81bf..e81eeb3c45 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -15,6 +15,13 @@ class Texturing(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='inputDenseReconstruction', + label='Input Dense Reconstruction', + description='Path to the dense reconstruction result (mesh with per vertex visibility).', + value='', + uid=[0], + ), desc.File( name='inputMesh', label='Other Input Mesh', From fb3ae83dc0c8220fcd7570f342cbea47a6750e52 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 27 Nov 2017 16:21:55 +0100 Subject: [PATCH 0050/1093] [nodes] SfM: add new parameters localBA and maxNumberOfMatches --- meshroom/aliceVision/StructureFromMotion.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 5606bd6496..32871331db 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -50,6 +50,14 @@ class StructureFromMotion(desc.CommandLineNode): exclusive=True, uid=[], ), + desc.BoolParam( + name='useLocalBA', + label='Local Bundle Adjustment', + description='It reduces the reconstruction time, especially for large datasets (500+ images), ' + 'by avoiding computation of the Bundle Adjustment on areas that are not changing.', + value=True, + uid=[0], + ), desc.IntParam( name='minInputTrackLength', label='Min Input Track Length', @@ -58,6 +66,14 @@ class StructureFromMotion(desc.CommandLineNode): range=(2, 10, 1), uid=[0], ), + desc.IntParam( + name='maxNumberOfMatches', + label='Maximum Number of Matches', + description='Maximum number of matches per image pair (and per feature type). This can be useful to have a quick reconstruction overview. 0 means no limit.', + value=0, + range=(0, 50000, 1), + uid=[0], + ), desc.ChoiceParam( name='cameraModel', label='Camera Model', From b2a78c3120f9c3b1a8e3fb80257248fbf7510d9d Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 28 Nov 2017 20:48:31 +0100 Subject: [PATCH 0051/1093] [nodes] SfM: disable userInteraction + disable localBA by default + reformat descriptions --- meshroom/aliceVision/StructureFromMotion.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 32871331db..9c30bed6fc 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -4,7 +4,7 @@ class StructureFromMotion(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_incrementalSfM {allParams}' + commandLine = 'aliceVision_incrementalSfM {allParams} --allowUserInteraction 0' size = desc.DynamicNodeSize('input') inputs = [ @@ -53,9 +53,9 @@ class StructureFromMotion(desc.CommandLineNode): desc.BoolParam( name='useLocalBA', label='Local Bundle Adjustment', - description='It reduces the reconstruction time, especially for large datasets (500+ images), ' + description='It reduces the reconstruction time, especially for large datasets (500+ images),\n' 'by avoiding computation of the Bundle Adjustment on areas that are not changing.', - value=True, + value=False, uid=[0], ), desc.IntParam( @@ -69,7 +69,9 @@ class StructureFromMotion(desc.CommandLineNode): desc.IntParam( name='maxNumberOfMatches', label='Maximum Number of Matches', - description='Maximum number of matches per image pair (and per feature type). This can be useful to have a quick reconstruction overview. 0 means no limit.', + description='Maximum number of matches per image pair (and per feature type). \n' + 'This can be useful to have a quick reconstruction overview. \n' + '0 means no limit.', value=0, range=(0, 50000, 1), uid=[0], @@ -77,7 +79,9 @@ class StructureFromMotion(desc.CommandLineNode): desc.ChoiceParam( name='cameraModel', label='Camera Model', - description='''* 1: Pinhole * 2: Pinhole radial 1 * 3: Pinhole radial 3''', + description="1: Pinhole \n" + "2: Pinhole 2\n" + "3: Pinhole 3", value=3, values=[1, 2, 3], exclusive=True, @@ -86,21 +90,21 @@ class StructureFromMotion(desc.CommandLineNode): desc.File( name='initialPairA', label='Initial Pair A', - description='''filename of the first image (without path).''', + description='''Filename of the first image (without path).''', value='', uid=[0], ), desc.File( name='initialPairB', label='Initial Pair B', - description='''filename of the second image (without path).''', + description='''Filename of the second image (without path).''', value='', uid=[0], ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''verbosity level (fatal, error, warning, info, debug, trace).''', + description='''Verbosity level (fatal, error, warning, info, debug, trace).''', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, From b8feab7ef21eea0b210dbefa9a2f5e7eb7119e5c Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 11 Dec 2017 17:10:31 +0100 Subject: [PATCH 0052/1093] [nodes] sfm: expose localBA graph distance param --- meshroom/aliceVision/StructureFromMotion.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 9c30bed6fc..76ca70679f 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -58,6 +58,14 @@ class StructureFromMotion(desc.CommandLineNode): value=False, uid=[0], ), + desc.IntParam( + name='localBAGraphDistance', + label='LocalBA Graph Distance', + description='Graph-distance limit to define the Active region in the Local Bundle Adjustment strategy.', + value=1, + range=(2, 10, 1), + uid=[0], + ), desc.IntParam( name='minInputTrackLength', label='Min Input Track Length', From 42ee4402e243ab9d96f58e1bec6840c30552d48e Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 11 Dec 2017 17:11:45 +0100 Subject: [PATCH 0053/1093] [nodes] featureMatching: remove useless parameters --- meshroom/aliceVision/FeatureMatching.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 2b9c14095e..e02477de1d 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -83,13 +83,6 @@ class FeatureMatching(desc.CommandLineNode): value=False, uid=[0], ), - desc.BoolParam( - name='matchFilePerImage', - label='Match File Per Image', - description='''matches in a separate file per image.''', - value=True, - uid=[0], - ), desc.FloatParam( name='distanceRatio', label='Distance Ratio', @@ -106,13 +99,6 @@ class FeatureMatching(desc.CommandLineNode): range=(1, 20000, 1), uid=[0], ), - desc.BoolParam( - name='useGridSort', - label='Use Grid Sort', - description='''matching grid sort.''', - value=True, - uid=[0], - ), desc.BoolParam( name='exportDebugFiles', label='Export Debug Files', From 296ff8ea2a19bc461403a3960dfad5603881f5e6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 11 Dec 2017 17:12:33 +0100 Subject: [PATCH 0054/1093] [nodes] prepareDenseScene: no more _tmp_scaleX --- meshroom/aliceVision/PrepareDenseScene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 4a04c11217..b24a330963 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -40,7 +40,7 @@ class PrepareDenseScene(desc.CommandLineNode): name='ini', label='MVS Configuration file', description='', - value='{cache}/{nodeType}/{uid0}/_tmp_scale{scaleValue}/mvs.ini', + value='{cache}/{nodeType}/{uid0}/mvs.ini', uid=[], group='', # not a command line arg ), From f743fae9910f6ee70ed8eeb47949f7188da7c744 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 11 Dec 2017 20:35:35 +0100 Subject: [PATCH 0055/1093] [nodes] MVS: export data per node folder --- meshroom/aliceVision/DepthMap.py | 9 +++++++++ meshroom/aliceVision/DepthMapFilter.py | 17 +++++++++++++++++ meshroom/aliceVision/Meshing.py | 14 ++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 9ed10c951b..411e1c9e92 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -18,3 +18,12 @@ class DepthMap(desc.CommandLineNode): ), ] + outputs = [ + desc.File( + name='output', + label='Output', + description='Output folder for generated depth maps.', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 4d8d4e864d..fa1c8fc6ff 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -16,4 +16,21 @@ class DepthMapFilter(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name="depthMapFolder", + label='Depth Map Folder', + description='Input depth map folder', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='Output folder for generated depth maps.', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 90ca9f415c..e92bb9c999 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -40,6 +40,20 @@ class Meshing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.File( + name="depthMapFolder", + label='Depth Maps Folder', + description='Input depth maps folder', + value='', + uid=[0], + ), + desc.File( + name="depthMapFilterFolder", + label='Filtered Depth Maps Folder', + description='Input filtered depth maps folder', + value='', + uid=[0], + ), ] outputs = [ From 7255f1d8a3a21dbeeb018d72effd93e7d2e00894 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 11 Dec 2017 20:36:04 +0100 Subject: [PATCH 0056/1093] [nodes] MVS: support multiple image file formats --- meshroom/aliceVision/PrepareDenseScene.py | 9 +++++++++ meshroom/aliceVision/Texturing.py | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index b24a330963..1c1f425b7a 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -24,6 +24,15 @@ class PrepareDenseScene(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='outputFileType', + label='Image File Type', + description='Output Image File Type', + value='exr', + values=['jpg', 'png', 'tif', 'exr'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index e81eeb3c45..ad7f99dbb4 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -55,6 +55,15 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='outputTextureFileType', + label='Texture File Type', + description='Texture File Type', + value='png', + values=('jpg', 'png', 'tiff', 'exr'), + exclusive=True, + uid=[0], + ), desc.BoolParam( name='flipNormals', label='Flip Normals', From bbdb723f6e6f59308d46714becc73bd7b600bd7d Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 11 Dec 2017 21:00:59 +0100 Subject: [PATCH 0057/1093] [nodes] depthMapFilter: expose new parameters --- meshroom/aliceVision/DepthMapFilter.py | 52 +++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index fa1c8fc6ff..8b8c5049af 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -11,18 +11,58 @@ class DepthMapFilter(desc.CommandLineNode): inputs = [ desc.File( name="ini", - label='MVS Configuration file', - description='', - value='', + label="MVS Configuration file", + description="", + value="", uid=[0], ), desc.File( name="depthMapFolder", - label='Depth Map Folder', - description='Input depth map folder', - value='', + label="Depth Map Folder", + description="Input depth map folder", + value="", uid=[0], ), + desc.IntParam( + name="nNearestCams", + label="Number of Nearest Cameras", + description="Number of nearest cameras used for filtering.", + value=10, + range=(0, 20, 1), + uid=[0], + ), + desc.IntParam( + name="minNumOfConsistensCams", + label="Min Consistent Cameras", + description="Min Number of Consistent Cameras", + value=3, + range=(0, 10, 1), + uid=[0], + ), + desc.IntParam( + name="minNumOfConsistensCamsWithLowSimilarity", + label="Min Consistent Cameras Bad Similarity", + description="Min Number of Consistent Cameras for pixels with weak similarity value", + value=4, + range=(0, 10, 1), + uid=[0], + ), + desc.IntParam( + name="pixSizeBall", + label="Filtering Size in Pixels", + description="Filtering size in pixels", + value=0, + range=(0, 10, 1), + uid=[0], + ), + desc.IntParam( + name="pixSizeBallWithLowSimilarity", + label="Filtering Size in Pixels Bad Similarity", + description="Filtering size in pixels", + value=0, + range=(0, 10, 1), + uid=[0], + ), ] outputs = [ From 9892dd10d4f85e774f2efee57ec2b960dc2e62fc Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 12 Dec 2017 16:44:43 +0100 Subject: [PATCH 0058/1093] [nodes] DepthMap: expose algo parameters --- meshroom/aliceVision/DepthMap.py | 105 ++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 411e1c9e92..d132986b8c 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -15,7 +15,110 @@ class DepthMap(desc.CommandLineNode): description='', value='', uid=[0], - ), + ), + desc.IntParam( + name='sgmMaxTCams', + label='SGM Max TCams', + description='Semi Global Matching Number of neighbour cameras.', + value=10, + range=(1, 100, 1), + uid=[0], + ), + desc.IntParam( + name='sgmWSH', + label='SGM WSH', + description='Semi Global Matching Size of the patch used to compute the similarity.', + value=4, + range=(1, 20, 1), + uid=[0], + ), + desc.FloatParam( + name='sgmGammaC', + label='SGM GammaC', + description='Semi Global Matching GammaC threshold.', + value=5.5, + range=(0.0, 30.0, 0.5), + uid=[0], + ), + desc.FloatParam( + name='sgmGammaP', + label='SGM GammaP', + description='Semi Global Matching GammaP threshold.', + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + ), + desc.IntParam( + name='refineNSamplesHalf', + label='Refine Number of samples', + description='Refine Number of samples.', + value=150, + range=(1, 500, 10), + uid=[0], + ), + desc.IntParam( + name='refineNDepthsToRefine', + label='Refine Number of depths', + description='Refine Number of depths.', + value=31, + range=(1, 100, 1), + uid=[0], + ), + desc.IntParam( + name='refineNiters', + label='Refine Number of iterations', + description='Refine: Number of iterations.', + value=100, + range=(1, 500, 10), + uid=[0], + ), + desc.IntParam( + name='refineWSH', + label='Refine WSH', + description='Refine Size of the patch used to compute the similarity.', + value=3, + range=(1, 20, 1), + uid=[0], + ), + desc.IntParam( + name='refineMaxTCams', + label='Refine Max TCams', + description='Refine Number of neighbour cameras.', + value=6, + range=(1, 20, 1), + uid=[0], + ), + desc.FloatParam( + name='refineSigma', + label='Refine Sigma', + description='Refine Sigma threshold.', + value=15, + range=(0.0, 30.0, 0.5), + uid=[0], + ), + desc.FloatParam( + name='refineGammaC', + label='Refine GammaC', + description='Refine GammaC threshold.', + value=15.5, + range=(0.0, 30.0, 0.5), + uid=[0], + ), + desc.FloatParam( + name='refineGammaP', + label='Refine GammaP', + description='Refine GammaP threshold.', + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + ), + desc.BoolParam( + name='refineUseTcOrRcPixSize', + label='Refine Use Tc or Rc pixel size', + description='Refine Use current camera pixel size or minimum pixel size of neighbour cameras.', + value=False, + uid=[0], + ), ] outputs = [ From 5cbf69b5b05681afea8f5e29e9e2d0d634115b0c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 12 Dec 2017 19:52:46 +0100 Subject: [PATCH 0059/1093] [nodes] DepthMap: clean param labels --- meshroom/aliceVision/DepthMap.py | 54 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index d132986b8c..5a25b8c6f9 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -11,111 +11,111 @@ class DepthMap(desc.CommandLineNode): inputs = [ desc.File( name="ini", - label='MVS Configuration file', + label='MVS Configuration File', description='', value='', uid=[0], ), desc.IntParam( name='sgmMaxTCams', - label='SGM Max TCams', - description='Semi Global Matching Number of neighbour cameras.', + label='SGM: Nb Neighbour Cameras', + description='Semi Global Matching: Number of neighbour cameras.', value=10, range=(1, 100, 1), uid=[0], ), desc.IntParam( name='sgmWSH', - label='SGM WSH', - description='Semi Global Matching Size of the patch used to compute the similarity.', + label='SGM: WSH', + description='Semi Global Matching: Half-size of the patch used to compute the similarity.', value=4, range=(1, 20, 1), uid=[0], ), desc.FloatParam( name='sgmGammaC', - label='SGM GammaC', - description='Semi Global Matching GammaC threshold.', + label='SGM: GammaC', + description='Semi Global Matching: GammaC Threshold.', value=5.5, range=(0.0, 30.0, 0.5), uid=[0], ), desc.FloatParam( name='sgmGammaP', - label='SGM GammaP', - description='Semi Global Matching GammaP threshold.', + label='SGM: GammaP', + description='Semi Global Matching: GammaP Threshold.', value=8.0, range=(0.0, 30.0, 0.5), uid=[0], ), desc.IntParam( name='refineNSamplesHalf', - label='Refine Number of samples', - description='Refine Number of samples.', + label='Refine: Number of Samples', + description='Refine: Number of samples.', value=150, range=(1, 500, 10), uid=[0], ), desc.IntParam( name='refineNDepthsToRefine', - label='Refine Number of depths', - description='Refine Number of depths.', + label='Refine: Number of Depths', + description='Refine: Number of depths.', value=31, range=(1, 100, 1), uid=[0], ), desc.IntParam( name='refineNiters', - label='Refine Number of iterations', - description='Refine: Number of iterations.', + label='Refine: Number of Iterations', + description='Refine:: Number of iterations.', value=100, range=(1, 500, 10), uid=[0], ), desc.IntParam( name='refineWSH', - label='Refine WSH', - description='Refine Size of the patch used to compute the similarity.', + label='Refine: WSH', + description='Refine: Half-size of the patch used to compute the similarity.', value=3, range=(1, 20, 1), uid=[0], ), desc.IntParam( name='refineMaxTCams', - label='Refine Max TCams', - description='Refine Number of neighbour cameras.', + label='Refine: Nb Neighbour Cameras', + description='Refine: Number of neighbour cameras.', value=6, range=(1, 20, 1), uid=[0], ), desc.FloatParam( name='refineSigma', - label='Refine Sigma', - description='Refine Sigma threshold.', + label='Refine: Sigma', + description='Refine: Sigma Threshold.', value=15, range=(0.0, 30.0, 0.5), uid=[0], ), desc.FloatParam( name='refineGammaC', - label='Refine GammaC', - description='Refine GammaC threshold.', + label='Refine: GammaC', + description='Refine: GammaC Threshold.', value=15.5, range=(0.0, 30.0, 0.5), uid=[0], ), desc.FloatParam( name='refineGammaP', - label='Refine GammaP', - description='Refine GammaP threshold.', + label='Refine: GammaP', + description='Refine: GammaP threshold.', value=8.0, range=(0.0, 30.0, 0.5), uid=[0], ), desc.BoolParam( name='refineUseTcOrRcPixSize', - label='Refine Use Tc or Rc pixel size', - description='Refine Use current camera pixel size or minimum pixel size of neighbour cameras.', + label='Refine: Tc or Rc pixel size', + description='Refine: Use minimum pixel size of neighbour cameras (Tc) or current camera pixel size (Rc)', value=False, uid=[0], ), From 4081a758959e4df08eb1416f9cff8d0a77a1d08a Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Thu, 14 Dec 2017 19:20:46 +0100 Subject: [PATCH 0060/1093] [nodes] CameraInit: store image metadata in Viewpoint * store image metadata in StringParam 'metadata' on Viewpoints * filter it out from viewpoints.sfm file (not needed) --- meshroom/aliceVision/CameraInit.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 485e0de28b..b2622fcda0 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -15,6 +15,7 @@ desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=(0, 200, 1)), desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=(0, 200, 1)), desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=(0, 200, 1)), + desc.StringParam(name="metadata", label="Image Metadata", description="", value="", uid=[]), ] Intrinsic = [ @@ -136,6 +137,8 @@ def buildIntrinsics(self, node, additionalViews=()): # print('intrinsics:', intrinsics) viewsKeys = [v.name for v in Viewpoint] views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] + for view in views: + view['metadata'] = json.dumps(view['metadata']) # convert metadata to string # print('views:', views) return views, intrinsics @@ -155,9 +158,15 @@ def createViewpointsFile(self, node, additionalViews=()): intrinsics = node.intrinsics.getPrimitiveValue(exportDefault=True) for intrinsic in intrinsics: intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] + views = node.viewpoints.getPrimitiveValue(exportDefault=False) + + for view in views: + # filter out unnecessary attributes + del view['metadata'] + sfmData = { "version": [1, 0, 0], - "views": node.viewpoints.getPrimitiveValue(exportDefault=False) + newViews, + "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", "matchingFolder": "", From ee7ed666055deb9f2eb937e7cca1cb668dcad9c5 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 19 Dec 2017 10:38:39 +0100 Subject: [PATCH 0061/1093] [nodes] new ExportMayaMVG node --- meshroom/aliceVision/ExportMayaMVG.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meshroom/aliceVision/ExportMayaMVG.py diff --git a/meshroom/aliceVision/ExportMayaMVG.py b/meshroom/aliceVision/ExportMayaMVG.py new file mode 100644 index 0000000000..a951a0c45f --- /dev/null +++ b/meshroom/aliceVision/ExportMayaMVG.py @@ -0,0 +1,26 @@ +from meshroom.core import desc + + +class ExportMayaMVG(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_exportMayaMVG {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description='', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output Folder', + description='Folder for MayaMVG outputs: undistorted images and thumbnails.', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + ] From b88a281606f5062034d18d0e5773f15ea6f22849 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Wed, 20 Dec 2017 16:14:56 +0100 Subject: [PATCH 0062/1093] [nodes] cameraInit: principal point is float --- meshroom/aliceVision/CameraInit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index b2622fcda0..e54a17bc0b 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -30,8 +30,8 @@ desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (camera and lens combined)", value="", uid=[]), desc.GroupAttribute(name="principalPoint", label="Principal Point", description="", groupDesc=[ - desc.IntParam(name="x", label="x", description="", value=0, uid=[], range=(0, 10000, 1)), - desc.IntParam(name="y", label="y", description="", value=0, uid=[], range=(0, 10000, 1)), + desc.FloatParam(name="x", label="x", description="", value=0, uid=[], range=(0, 10000, 1)), + desc.FloatParam(name="y", label="y", description="", value=0, uid=[], range=(0, 10000, 1)), ]), desc.ListAttribute( name="distortionParams", From d1ab334bf67f4d8598cfe91c347abf1f7d1b1c42 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Wed, 20 Dec 2017 16:16:09 +0100 Subject: [PATCH 0063/1093] [nodes] meshResampling: multiple copy/paste errors fixed --- meshroom/aliceVision/MeshResampling.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 69d023b843..cb03d870f0 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -2,14 +2,14 @@ class MeshResampling(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_meshing {allParams}' + commandLine = 'aliceVision_meshResampling {allParams}' cpu = desc.Level.NORMAL ram = desc.Level.NORMAL inputs = [ desc.File( - name="intput", + name="input", label='Input Mesh (OBJ file format).', description='', value='', @@ -27,24 +27,24 @@ class MeshResampling(desc.CommandLineNode): name='nbVertices', label='Fixed Number of Vertices', description='Fixed number of output vertices.', - value=0.0, - range=(0.0, 1.0, 0.01), + value=0, + range=(0, 1000000, 1), uid=[0], ), desc.IntParam( name='minVertices', label='Min Vertices', description='Min number of output vertices.', - value=0.0, - range=(0.0, 1.0, 0.01), + value=0, + range=(0, 1000000, 1), uid=[0], ), desc.IntParam( name='maxVertices', label='Max Vertices', description='Max number of output vertices.', - value=0.0, - range=(0.0, 1.0, 0.01), + value=0, + range=(0, 1000000, 1), uid=[0], ), desc.IntParam( From eb91689bf48e5d00b665bfd17734457ca5d5e148 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 1 Jan 2018 20:27:58 +0100 Subject: [PATCH 0064/1093] [nodes] New node CameraLocalization --- meshroom/aliceVision/CameraLocalization.py | 222 +++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 meshroom/aliceVision/CameraLocalization.py diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py new file mode 100644 index 0000000000..eb02d3d8eb --- /dev/null +++ b/meshroom/aliceVision/CameraLocalization.py @@ -0,0 +1,222 @@ +import sys, os +from meshroom.core import desc + + +class CameraLocalization(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_cameraLocalization {allParams}' + + inputs = [ + desc.File( + name='sfmdata', + label='SfM Data', + description='''The sfm_data.json kind of file generated by AliceVision.''', + value='', + uid=[0], + ), + desc.File( + name='mediafile', + label='Media File', + description='''The folder path or the filename for the media to track''', + value='', + uid=[0], + ), + desc.File( + name='visualDebug', + label='Visual Debug Folder', + description='''If a folder is provided it enables visual debug and saves all the debugging info in that folder''', + value='', + uid=[0], + ), + desc.File( + name='descriptorPath', + label='Descriptor Path', + description='''Folder containing the descriptors for all the images (ie the *.desc.)''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='matchDescTypes', + label='Match Desc Types', + description='''Describer types to use for the matching.''', + value=['SIFT'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ChoiceParam( + name='preset', + label='Preset', + description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', + value='NORMAL', + values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='resectionEstimator', + label='Resection Estimator', + description='''The type of *sac framework to use for resection (acransac, loransac)''', + value='acransac', + values=['acransac', 'loransac'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='matchingEstimator', + label='Matching Estimator', + description='''The type of *sac framework to use for matching (acransac, loransac)''', + value='acransac', + values=['acransac', 'loransac'], + exclusive=True, + uid=[0], + ), + desc.File( + name='calibration', + label='Calibration', + description='''Calibration file''', + value='', + uid=[0], + ), + desc.BoolParam( + name='refineIntrinsics', + label='Refine Intrinsics', + description='''Enable/Disable camera intrinsics refinement for each localized image''', + value=False, + uid=[0], + ), + desc.FloatParam( + name='reprojectionError', + label='Reprojection Error', + description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + value=4.0, + range=(0.1, 50.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='nbImageMatch', + label='Nb Image Match', + description='''[voctree] Number of images to retrieve in database''', + value=4, + range=(1, 1000, 1), + uid=[0], + ), + desc.IntParam( + name='maxResults', + label='Max Results', + description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + value=10, + range=(1, 100, 1), + uid=[0], + ), + desc.IntParam( + name='commonviews', + label='Commonviews', + description='''[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking''', + value=3, + range=(2, 50, 1), + uid=[0], + ), + desc.File( + name='voctree', + label='Voctree', + description='''[voctree] Filename for the vocabulary tree''', + value=os.environ.get('ALICEVISION_VOCTREE', ''), + uid=[0], + ), + desc.File( + name='voctreeWeights', + label='Voctree Weights', + description='''[voctree] Filename for the vocabulary tree weights''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='algorithm', + label='Algorithm', + description='''[voctree] Algorithm type: FirstBest, AllResults''', + value='AllResults', + values=['FirstBest', 'AllResults'], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name='matchingError', + label='Matching Error', + description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + value=4.0, + range=(0.0, 50.0, 1.0), + uid=[0], + ), + desc.IntParam( + name='nbFrameBufferMatching', + label='Nb Frame Buffer Matching', + description='''[voctree] Number of previous frame of the sequence to use for matching (0 = Disable)''', + value=10, + range=(0, 100, 1), + uid=[0], + ), + desc.BoolParam( + name='robustMatching', + label='Robust Matching', + description='''[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.''', + value=True, + uid=[0], + ), + desc.IntParam( + name='nNearestKeyFrames', + label='N Nearest Key Frames', + description='''[cctag] Number of images to retrieve in the database Parameters specific for final (optional) bundle adjustment optimization of the sequence:''', + value=5, + range=(1, 100, 1), + uid=[0], + ), + desc.StringParam( + name='globalBundle', + label='Global Bundle', + description='''[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.''', + value='', + uid=[0], + ), + desc.BoolParam( + name='noDistortion', + label='No Distortion', + description='''[bundle adjustment] It does not take into account distortion during the BA, it consider the distortion coefficients all equal to 0''', + value=False, + uid=[0], + ), + desc.BoolParam( + name='noBArefineIntrinsics', + label='No BA Refine Intrinsics', + description='''[bundle adjustment] It does not refine intrinsics during BA''', + value=False, + uid=[0], + ), + desc.IntParam( + name='minPointVisibility', + label='Min Point Visibility', + description='''[bundle adjustment] Minimum number of observation that a point must have in order to be considered for bundle adjustment''', + value=2, + range=(2, 50, 1), + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='outputAlembic', + label='Output Alembic', + description='''Filename for the SfMData export file (where camera poses will be stored)''', + value='{cache}/{nodeType}/{uid0}/trackedCameras.abc', + uid=[], + ), + desc.File( + name='outputBinary', + label='Output Binary', + description='''Filename for the localization results (raw data) as .bin''', + value='{cache}/{nodeType}/{uid0}/trackedCameras.bin', + uid=[], + ), + ] + From 7a6e618276e0ebddaf39d635e99121d48683afd6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 1 Jan 2018 20:28:27 +0100 Subject: [PATCH 0065/1093] [nodes] New node ConvertAnimatedCamera --- meshroom/aliceVision/ConvertAnimatedCamera.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 meshroom/aliceVision/ConvertAnimatedCamera.py diff --git a/meshroom/aliceVision/ConvertAnimatedCamera.py b/meshroom/aliceVision/ConvertAnimatedCamera.py new file mode 100644 index 0000000000..1c9e749ffe --- /dev/null +++ b/meshroom/aliceVision/ConvertAnimatedCamera.py @@ -0,0 +1,27 @@ +import sys +from meshroom.core import desc + + +class ConvertAnimatedCamera(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_convertAnimatedCamera {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='''Path to the output Alembic file.''', + value='{cache}/{nodeType}/{uid0}/animatedCamera.abc', + uid=[], + ), + ] From d12bba4d2fc9faae5843653c4ee7ee33c7049afa Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 1 Jan 2018 20:28:54 +0100 Subject: [PATCH 0066/1093] [nodes] New node KeyframeSelection --- meshroom/aliceVision/KeyframeSelection.py | 113 ++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 meshroom/aliceVision/KeyframeSelection.py diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py new file mode 100644 index 0000000000..0e08cacb3f --- /dev/null +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -0,0 +1,113 @@ +import sys, os +from meshroom.core import desc + + +class KeyframeSelection(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_utils_keyframeSelection {allParams}' + + inputs = [ + desc.File( + name='mediaPaths', + label='Media Paths', + description='''Input video files or image sequence directories.''', + 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=[], + ), + 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='', + uid=[0], + ), + desc.StringParam( + name='models', + label='Models', + description='''Camera models.''', + value='', + 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), + 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}''', + value='normal', + values=['ultra', 'high', 'normal', 'low', 'very_low', 'none'], + 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=12, + 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=36, + range=(2, 1000, 1), + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='outputFolder', + label='Output Folder', + description='''Output keyframes folder for extracted frames.''', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + ] + From cc81929a3c007373aa8ec388fb2caf22b5139a8a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 1 Jan 2018 20:29:18 +0100 Subject: [PATCH 0067/1093] [nodes] New node ConvertSfMFormat --- meshroom/aliceVision/ConvertSfMFormat.py | 82 ++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 meshroom/aliceVision/ConvertSfMFormat.py diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py new file mode 100644 index 0000000000..593833e13f --- /dev/null +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -0,0 +1,82 @@ +import sys +from meshroom.core import desc + + +class ConvertSfMFormat(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_convertSfMFormat {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='fileExt', + label='SfM File Format', + description='''SfM File Format''', + value='abc', + values=['abc', 'sfm', 'ply', 'bin', 'json'], + exclusive=True, + uid=[0], + group='', # exclude from command line + ), + desc.BoolParam( + name='views', + label='Views', + description='''Export views.''', + value=True, + uid=[0], + ), + desc.BoolParam( + name='intrinsics', + label='Intrinsics', + description='''Export intrinsics.''', + value=True, + uid=[0], + ), + desc.BoolParam( + name='extrinsics', + label='Extrinsics', + description='''Export extrinsics.''', + value=True, + uid=[0], + ), + desc.BoolParam( + name='structure', + label='Structure', + description='''Export structure.''', + value=True, + uid=[0], + ), + desc.BoolParam( + name='observations', + label='Observations', + description='''Export observations.''', + value=True, + 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=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='''Path to the output SfM Data file.''', + value='{cache}/{nodeType}/{uid0}/sfm.{fileExtValue}', + uid=[], + ), + ] + From 0dacc7533f68d255831a1e36e61796f03a7fb131 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 2 Jan 2018 12:04:15 +0100 Subject: [PATCH 0068/1093] [nodes] new node CameraCalibration --- meshroom/aliceVision/CameraCalibration.py | 127 ++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 meshroom/aliceVision/CameraCalibration.py diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py new file mode 100644 index 0000000000..3b5b542954 --- /dev/null +++ b/meshroom/aliceVision/CameraCalibration.py @@ -0,0 +1,127 @@ +import sys +from meshroom.core import desc + + +class CameraCalibration(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_cameraCalibration {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''Input images in one of the following form: + - folder containing images + - image sequence like "/path/to/seq.@.jpg" + - video file''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='pattern', + label='Pattern', + description='''Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).''', + value='CHESSBOARD', + values=['CHESSBOARD', 'CIRCLES', 'ASYMMETRIC_CIRCLES', 'ASYMMETRIC_CCTAG'], + exclusive=True, + uid=[0], + ), + desc.GroupAttribute(name="size", label="Size", description="Number of inner corners per one of board dimension like W H.", groupDesc=[ + desc.IntParam( + name='width', + label='Width', + description='', + value=7, + range=(0, 10000, 1), + uid=[0], + ), + desc.IntParam( + name='height', + label='Height', + description='', + value=5, + range=(0, 10000, 1), + uid=[0], + ), + ]), + desc.FloatParam( + name='squareSize', + label='Square Size', + description='''Size of the grid's square cells (mm).''', + value=1.0, + range=(0.0, 100.0, 1.0), + uid=[0], + ), + desc.IntParam( + name='nbDistortionCoef', + label='Nb Distortion Coef', + description='''Number of distortion coefficient.''', + value=3, + range=(0, 5, 1), + uid=[0], + ), + desc.IntParam( + name='maxFrames', + label='Max Frames', + description='''Maximal number of frames to extract from the video file.''', + value=0, + range=(0, 5, 1), + uid=[0], + ), + desc.IntParam( + name='maxCalibFrames', + label='Max Calib Frames', + description='''Maximal number of frames to use to calibrate from the selected frames.''', + value=100, + range=(0, 1000, 1), + uid=[0], + ), + desc.IntParam( + name='calibGridSize', + label='Calib Grid Size', + description='''Define the number of cells per edge.''', + value=10, + range=(0, 50, 1), + uid=[0], + ), + desc.IntParam( + name='minInputFrames', + label='Min Input Frames', + description='''Minimal number of frames to limit the refinement loop.''', + value=10, + range=(0, 100, 1), + uid=[0], + ), + desc.FloatParam( + name='maxTotalAvgErr', + label='Max Total Avg Err', + description='''Max Total Average Error.''', + value=0.10000000000000001, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.File( + name='debugRejectedImgFolder', + label='Debug Rejected Img Folder', + description='''Folder to export delete images during the refinement loop.''', + value='', + uid=[0], + ), + desc.File( + name='debugSelectedImgFolder', + label='Debug Selected Img Folder', + description='''Folder to export debug images.''', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='''Output filename for intrinsic [and extrinsic] parameters.''', + value='{cache}/{nodeType}/{uid0}/cameraCalibration.cal', + uid=[], + ), + ] From 2aac22305eb3c8c6cc85d75b5e28b6ea53267b11 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 2 Jan 2018 12:04:30 +0100 Subject: [PATCH 0069/1093] [nodes] new node CameraRigCalibration --- meshroom/aliceVision/CameraRigCalibration.py | 171 +++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 meshroom/aliceVision/CameraRigCalibration.py diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py new file mode 100644 index 0000000000..bcdc21ee87 --- /dev/null +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -0,0 +1,171 @@ +import sys, os +from meshroom.core import desc + + +class CameraRigCalibration(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_rigCalibration {allParams}' + + inputs = [ + desc.File( + name='sfmdata', + label='SfM Data', + description='''The sfmData file.''', + value='', + uid=[0], + ), + desc.File( + name='mediapath', + label='Media Path', + description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', + value='', + uid=[0], + ), + desc.File( + name='cameraIntrinsics', + label='Camera Intrinsics', + description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', + value='', + uid=[0], + ), + desc.File( + name='export', + label='Export', + description='''Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.''', + value='trackedcameras.abc', + uid=[0], + ), + desc.File( + name='descriptorPath', + label='Descriptor Path', + description='''Folder containing the .desc.''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='matchDescTypes', + label='Match Describer Types', + description='''The describer types to use for the matching''', + value=['SIFT'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', + 'AKAZE_OCV'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ChoiceParam( + name='preset', + label='Preset', + description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', + value='NORMAL', + values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='resectionEstimator', + label='Resection Estimator', + description='''The type of *sac framework to use for resection (acransac,loransac)''', + value='acransac', + values=['acransac', 'loransac'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='matchingEstimator', + label='Matching Estimator', + description='''The type of *sac framework to use for matching (acransac,loransac)''', + value='acransac', + values=['acransac', 'loransac'], + exclusive=True, + uid=[0], + ), + desc.StringParam( + name='refineIntrinsics', + label='Refine Intrinsics', + description='''Enable/Disable camera intrinsics refinement for each localized image''', + value='', + uid=[0], + ), + desc.FloatParam( + name='reprojectionError', + label='Reprojection Error', + description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + value=4.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='maxInputFrames', + label='Max Input Frames', + description='''Maximum number of frames to read in input. 0 means no limit.''', + value=0, + range=(0, 1000, 1), + uid=[0], + ), + desc.File( + name='voctree', + label='Voctree', + description='''[voctree] Filename for the vocabulary tree''', + value=os.environ.get('ALICEVISION_VOCTREE', ''), + uid=[0], + ), + desc.File( + name='voctreeWeights', + label='Voctree Weights', + description='''[voctree] Filename for the vocabulary tree weights''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='algorithm', + label='Algorithm', + description='''[voctree] Algorithm type: {FirstBest,AllResults}''', + value='AllResults', + values=['FirstBest', 'AllResults'], + exclusive=True, + uid=[0], + ), + desc.IntParam( + name='nbImageMatch', + label='Nb Image Match', + description='''[voctree] Number of images to retrieve in the database''', + value=4, + range=(0, 50, 1), + uid=[0], + ), + desc.IntParam( + name='maxResults', + label='Max Results', + description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + value=10, + range=(0, 100, 1), + uid=[0], + ), + desc.FloatParam( + name='matchingError', + label='Matching Error', + description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + value=4.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='nNearestKeyFrames', + label='N Nearest Key Frames', + description='''[cctag] Number of images to retrieve in database''', + value=5, + range=(0, 50, 1), + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='outfile', + label='Output File', + description='''The name of the file where to store the calibration data''', + value='{cache}/{nodeType}/{uid0}/cameraRigCalibration.rigCal', + uid=[], + ), + ] From acb5e6121c72dd6571ea7cfe8c5ebf03766b8b25 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 2 Jan 2018 12:04:43 +0100 Subject: [PATCH 0070/1093] [nodes] new node CameraRigLocalization --- meshroom/aliceVision/CameraRigLocalization.py | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 meshroom/aliceVision/CameraRigLocalization.py diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py new file mode 100644 index 0000000000..8369c9a891 --- /dev/null +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -0,0 +1,178 @@ +import sys, os +from meshroom.core import desc + + +class CameraRigLocalization(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_rigLocalization {allParams}' + + inputs = [ + desc.File( + name='sfmdata', + label='Sfm Data', + description='''The sfmData file.''', + value='', + uid=[0], + ), + desc.File( + name='mediapath', + label='Media Path', + description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', + value='', + uid=[0], + ), + desc.File( + name='calibration', + label='Rig Calibration File', + description='''The file containing the calibration data for the rig (subposes)''', + value='', + uid=[0], + ), + desc.File( + name='cameraIntrinsics', + label='Camera Intrinsics', + description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', + value='', + uid=[0], + ), + desc.File( + name='descriptorPath', + label='Descriptor Path', + description='''Folder containing the .desc.''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='matchDescTypes', + label='Match Describer Types', + description='''The describer types to use for the matching''', + value=['SIFT'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', + 'AKAZE_OCV'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ChoiceParam( + name='preset', + label='Preset', + description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', + value='NORMAL', + values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='resectionEstimator', + label='Resection Estimator', + description='''The type of *sac framework to use for resection (acransac, loransac)''', + value='acransac', + values=['acransac', 'loransac'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='matchingEstimator', + label='Matching Estimator', + description='''The type of *sac framework to use for matching (acransac, loransac)''', + value='acransac', + values=['acransac', 'loransac'], + exclusive=True, + uid=[0], + ), + desc.StringParam( + name='refineIntrinsics', + label='Refine Intrinsics', + description='''Enable/Disable camera intrinsics refinement for each localized image''', + value='', + uid=[0], + ), + desc.FloatParam( + name='reprojectionError', + label='Reprojection Error', + description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + value=4.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.BoolParam( + name='useLocalizeRigNaive', + label='Use Localize Rig Naive', + description='''Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.''', + value=False, + uid=[0], + ), + desc.FloatParam( + name='angularThreshold', + label='Angular Threshold', + description='''The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.''', + value=0.1, + range=(0.0, 10.0, 0.01), + uid=[0], + ), + desc.File( + name='voctree', + label='Voctree', + description='''[voctree] Filename for the vocabulary tree''', + value=os.environ.get('ALICEVISION_VOCTREE', ''), + uid=[0], + ), + desc.File( + name='voctreeWeights', + label='Voctree Weights', + description='''[voctree] Filename for the vocabulary tree weights''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='algorithm', + label='Algorithm', + description='''[voctree] Algorithm type: {FirstBest,AllResults}''', + value='AllResults', + values=['FirstBest', 'AllResults'], + exclusive=True, + uid=[0], + ), + desc.IntParam( + name='nbImageMatch', + label='Nb Image Match', + description='''[voctree] Number of images to retrieve in the database''', + value=4, + range=(0, 100, 1), + uid=[0], + ), + desc.IntParam( + name='maxResults', + label='Max Results', + description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + value=10, + range=(0, 100, 1), + uid=[0], + ), + desc.FloatParam( + name='matchingError', + label='Matching Error', + description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + value=4.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='nNearestKeyFrames', + label='N Nearest Key Frames', + description='''[cctag] Number of images to retrieve in database''', + value=5, + range=(0, 50, 1), + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='outputAlembic', + label='Output Alembic', + description='''Filename for the SfMData export file (where camera poses will be stored).''', + value='{cache}/{nodeType}/{uid0}/trackedcameras.abc', + uid=[], + ), + ] From 90f166cb5df76475ed85d9214208686f6d09f0e2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Fri, 5 Jan 2018 16:59:31 +0100 Subject: [PATCH 0071/1093] [core] add quotes on strings to deal with space characters on command line --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index e54a17bc0b..90d8da7a3b 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -179,7 +179,7 @@ def createViewpointsFile(self, node, additionalViews=()): def buildCommandLine(self, chunk): cmd = desc.CommandLineNode.buildCommandLine(self, chunk) if chunk.node.viewpointsFile: - cmd += ' --input ' + chunk.node.viewpointsFile + cmd += ' --input "{}"'.format(chunk.node.viewpointsFile) return cmd def processChunk(self, chunk): From 47967863b9e05f1c5a16286de2b8c5365daeab45 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Fri, 5 Jan 2018 18:52:01 +0100 Subject: [PATCH 0072/1093] [nodes] CameraInit: fix when metadata param is empty --- meshroom/aliceVision/CameraInit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 90d8da7a3b..e2e3033b5d 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -162,7 +162,8 @@ def createViewpointsFile(self, node, additionalViews=()): for view in views: # filter out unnecessary attributes - del view['metadata'] + if 'metadata' in view: + del view['metadata'] sfmData = { "version": [1, 0, 0], From b5525d62d8a19ff45a14525228c694ffbf26a78d Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Fri, 5 Jan 2018 18:55:14 +0100 Subject: [PATCH 0073/1093] [nodes] new IncrementalSfM augmentation --- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/ImageMatchingMultiSfM.py | 106 ++++++++++++++++++ meshroom/aliceVision/StructureFromMotion.py | 20 ++-- 3 files changed, 115 insertions(+), 13 deletions(-) create mode 100644 meshroom/aliceVision/ImageMatchingMultiSfM.py diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 046350f6c5..37059a7fec 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -12,7 +12,7 @@ class ImageMatching(desc.CommandLineNode): desc.File( name='input', label='Input', - description='''SfMData file or filepath to a simple text file with one image filepath per line, or path to the descriptors folder.''', + description='''SfMData file .''', value='', uid=[0], ), diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py new file mode 100644 index 0000000000..19ae8b74a5 --- /dev/null +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -0,0 +1,106 @@ +import sys +import os +from meshroom.core import desc + + +class ImageMatchingMultiSfM(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_imageMatching {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input A', + description='''SfMData file .''', + value='', + uid=[0], + ), + desc.File( + name='inputB', + label='Input B', + description='''SfMData file .''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='modeMultiSfM', + label='Multiple SfM mode', + description='''Image matching multiple SfM mode. "a_ab" for images in input SfMData A plus between A and B. "a_b" for images between input SfMData A and B''', + value='a_ab', + values=['a_ab', 'a_b'], + exclusive=True, + uid=[0], + ), + desc.File( + name='featuresFolder', + label='Features Folder', + description='''Folder containing the extracted features and descriptors. By default, it is the folder containing the SfMData.''', + value='', + uid=[0], + ), + desc.File( + name='tree', + label='Tree', + description='''Input name for the vocabulary tree file.''', + value=os.environ.get('ALICEVISION_VOCTREE', ''), + uid=[0], + ), + desc.IntParam( + name='minNbImages', + label='Minimal Number of Images', + description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''', + value=200, + range=(0, 500, 1), + uid=[0], + ), + desc.IntParam( + name='maxDescriptors', + label='Max Descriptors', + description='''Limit the number of descriptors you load per image. Zero means no limit.''', + value=500, + range=(0, 100000, 1), + uid=[0], + ), + desc.IntParam( + name='nbMatches', + label='Nb Matches', + description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', + value=50, + range=(0, 1000, 1), + uid=[0], + ), + desc.File( + name='weights', + label='Weights', + description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''', + 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', + description='''Filepath to the output file with the list of selected image pairs.''', + value='{cache}/{nodeType}/{uid0}/imageMatches.txt', + uid=[], + ), + desc.File( + name='outputCombinedSfM', + label='Output Combined SfM', + description='''Path for the combined SfMData file''', + value='{cache}/{nodeType}/{uid0}/combineSfM.sfm', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 76ca70679f..7daea3b134 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -4,7 +4,7 @@ class StructureFromMotion(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_incrementalSfM {allParams} --allowUserInteraction 0' + commandLine = 'aliceVision_incrementalSfM {allParams}' size = desc.DynamicNodeSize('input') inputs = [ @@ -84,17 +84,6 @@ class StructureFromMotion(desc.CommandLineNode): range=(0, 50000, 1), uid=[0], ), - desc.ChoiceParam( - name='cameraModel', - label='Camera Model', - description="1: Pinhole \n" - "2: Pinhole 2\n" - "3: Pinhole 3", - value=3, - values=[1, 2, 3], - exclusive=True, - uid=[0], - ), desc.File( name='initialPairA', label='Initial Pair A', @@ -128,6 +117,13 @@ class StructureFromMotion(desc.CommandLineNode): value='{cache}/{nodeType}/{uid0}/sfm.abc', uid=[], ), + desc.File( + name='outputViewsAndPoses', + label='Output SfM Views and Poses', + description='''Path to the output SfMData file (with only views and poses).''', + value='{cache}/{nodeType}/{uid0}/viewsAndPoses.sfm', + uid=[], + ), desc.File( name='extraInfoFolder', label='Output', From 95aa4565625cd82e5b3828f758bb524587f28971 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 8 Jan 2018 21:50:14 +0100 Subject: [PATCH 0074/1093] [nodes] CameraInit: fix quotes --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index e2e3033b5d..3a7660debf 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -123,7 +123,7 @@ def buildIntrinsics(self, node, additionalViews=()): logging.warning('CameraInit: Error on buildIntrinsics of node "{}".'.format(node.name)) # Reload result of aliceVision_cameraInit - cameraInitSfM = localCmdVars['outputValue'] + cameraInitSfM = node.output.value jsonData = open(cameraInitSfM, 'r').read() data = json.loads(jsonData) From 97dc2d36beb43e7e76f819c38598ccf81156d0a1 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 8 Jan 2018 21:50:52 +0100 Subject: [PATCH 0075/1093] [nodes] CameraInit: rebuild cmdVars at the end --- meshroom/aliceVision/CameraInit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 3a7660debf..c0fa9e67ab 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -147,6 +147,7 @@ def buildIntrinsics(self, node, additionalViews=()): raise finally: node._cmdVars = origCmdVars + node._buildCmdVars(localCmdVars) shutil.rmtree(tmpCache) def createViewpointsFile(self, node, additionalViews=()): From c94694dcab9818228d922671afbe50b46e7a3cfd Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Wed, 10 Jan 2018 11:34:19 +0100 Subject: [PATCH 0076/1093] [nodes] fix ImageMatchingMultiSfm node size use MultiDynamicNodeSize with both SfM inputs to get the correct size --- meshroom/aliceVision/ImageMatchingMultiSfM.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 19ae8b74a5..2a7e18fe21 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -6,7 +6,8 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_imageMatching {allParams}' - size = desc.DynamicNodeSize('input') + # use both SfM inputs to define Node's size + size = desc.MultiDynamicNodeSize(['input', 'inputB']) inputs = [ desc.File( From 9dbb5958022cc3ea36520ebda3ed79b19c2a4982 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 15 Jan 2018 21:45:15 +0100 Subject: [PATCH 0077/1093] [ui] display reconstruction status on Images * add the notion of a current SfM node in the Reconstruction * retrieve views and poses from this node when selected or when its status changes * use this information to display a status on Images in ImageGallery --- meshroom/aliceVision/StructureFromMotion.py | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 7daea3b134..aba8a1a452 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,4 +1,6 @@ -import sys +import json +import os + from meshroom.core import desc @@ -132,3 +134,26 @@ class StructureFromMotion(desc.CommandLineNode): uid=[], ), ] + + @staticmethod + def getViewsAndPoses(node): + """ + Parse SfM result and return views and poses as two dict with viewId and poseId as keys. + """ + reportFile = node.outputViewsAndPoses.value + if not os.path.exists(reportFile): + return {}, {} + + with open(reportFile) as jsonFile: + report = json.load(jsonFile) + + views = dict() + poses = dict() + + for view in report['views']: + views[view['viewId']] = view + + for pose in report['poses']: + poses[pose['poseId']] = pose['pose'] + + return views, poses From 52509fc8a3da02ee3b5185370fe26652748e20e2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 22 Jan 2018 12:25:02 +0100 Subject: [PATCH 0078/1093] [nodes] SfM: add minNumberOfObservationsForTriangulation param --- meshroom/aliceVision/StructureFromMotion.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index aba8a1a452..85acae4ed0 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -76,6 +76,17 @@ class StructureFromMotion(desc.CommandLineNode): range=(2, 10, 1), uid=[0], ), + desc.IntParam( + name='minNumberOfObservationsForTriangulation', + label='Min Observation For Triangulation', + description='Minimum number of observations to triangulate a point.\n' + 'Set it to 3 (or more) reduces drastically the noise in the point cloud,\n' + 'but the number of final poses is a little bit reduced\n' + '(from 1.5% to 11% on the tested datasets).', + value=2, + range=(2, 10, 1), + uid=[0], + ), desc.IntParam( name='maxNumberOfMatches', label='Maximum Number of Matches', From 4356a9ee3e2a83c13a430d80c83f3e615588d723 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 22 Jan 2018 12:25:33 +0100 Subject: [PATCH 0079/1093] [nodes] SfM: rename outputViewsAndPoses filename --- meshroom/aliceVision/StructureFromMotion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 85acae4ed0..55fc09e7ec 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -132,9 +132,9 @@ class StructureFromMotion(desc.CommandLineNode): ), desc.File( name='outputViewsAndPoses', - label='Output SfM Views and Poses', - description='''Path to the output SfMData file (with only views and poses).''', - value='{cache}/{nodeType}/{uid0}/viewsAndPoses.sfm', + label='Output SfM data file', + description='''Path to the output sfmdata file with cameras (views and poses).''', + value='{cache}/{nodeType}/{uid0}/cameras.sfm', uid=[], ), desc.File( From 7a7c8cb111c543c95158f2ad593c8e551b071805 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Thu, 25 Jan 2018 17:03:16 +0100 Subject: [PATCH 0080/1093] [nodes] `StructureFromMotion` : add `localizerEstimator` param --- meshroom/aliceVision/StructureFromMotion.py | 32 +++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 55fc09e7ec..f067f43361 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -13,29 +13,28 @@ class StructureFromMotion(desc.CommandLineNode): desc.File( name='input', label='Input', - description='''SfMData file.''', + description='SfMData file.', value='', uid=[0], ), - desc.File( name='featuresFolder', label='Features Folder', - description='''Path to a folder containing the extracted features.''', + description='Path to a folder containing the extracted features.', value='', uid=[0], ), desc.File( name='matchesFolder', label='Matches Folder', - description='''Path to a folder in which computed matches are stored.''', + description='Path to a folder in which computed matches are stored.', value='', uid=[0], ), desc.ChoiceParam( name='describerTypes', label='Describer Types', - description='''Describer types used to describe an image.''', + description='Describer types used to describe an image.', value=['SIFT'], values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], @@ -46,7 +45,7 @@ class StructureFromMotion(desc.CommandLineNode): desc.ChoiceParam( name='interFileExtension', label='Inter File Extension', - description='''Extension of the intermediate file export.''', + description='Extension of the intermediate file export.', value='.abc', values=('.abc', '.ply'), exclusive=True, @@ -68,10 +67,19 @@ class StructureFromMotion(desc.CommandLineNode): range=(2, 10, 1), uid=[0], ), + desc.ChoiceParam( + name='localizerEstimator', + label='Localizer Estimator', + description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', + value='acransac', + values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], + exclusive=True, + uid=[0], + ), desc.IntParam( name='minInputTrackLength', label='Min Input Track Length', - description='''Minimum track length in input of SfM''', + description='Minimum track length in input of SfM', value=2, range=(2, 10, 1), uid=[0], @@ -100,21 +108,21 @@ class StructureFromMotion(desc.CommandLineNode): desc.File( name='initialPairA', label='Initial Pair A', - description='''Filename of the first image (without path).''', + description='Filename of the first image (without path).', value='', uid=[0], ), desc.File( name='initialPairB', label='Initial Pair B', - description='''Filename of the second image (without path).''', + description='Filename of the second image (without path).', value='', uid=[0], ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''Verbosity level (fatal, error, warning, info, debug, trace).''', + description='Verbosity level (fatal, error, warning, info, debug, trace).', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, @@ -126,7 +134,7 @@ class StructureFromMotion(desc.CommandLineNode): desc.File( name='output', label='Output SfM data file', - description='''Path to the output sfmdata file''', + description='Path to the output sfmdata file', value='{cache}/{nodeType}/{uid0}/sfm.abc', uid=[], ), @@ -140,7 +148,7 @@ class StructureFromMotion(desc.CommandLineNode): desc.File( name='extraInfoFolder', label='Output', - description='''Folder for intermediate reconstruction files and additional reconstruction information files.''', + description='Folder for intermediate reconstruction files and additional reconstruction information files.', value='{cache}/{nodeType}/{uid0}/', uid=[], ), From 7401263c9698394dd065177ef0117a53a98cd4b8 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Thu, 25 Jan 2018 17:04:00 +0100 Subject: [PATCH 0081/1093] [nodes] `FeatureExtraction` : add `forceCpuExtraction` param --- meshroom/aliceVision/FeatureExtraction.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 900be30e6f..b166bdaa16 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -43,6 +43,13 @@ class FeatureExtraction(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='forceCpuExtraction', + label='Force CPU Extraction', + description='''Use only CPU feature extraction.''', + value=False, + uid=[], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 8a999f7e401b10b5c25d20c0c78ba28f230e0010 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Thu, 25 Jan 2018 17:06:23 +0100 Subject: [PATCH 0082/1093] [nodes] `CameraInit` : Add hidden flags `allowSingleView` and `allowIncompleteOutput` --- meshroom/aliceVision/CameraInit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index c0fa9e67ab..f65a7f890f 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -44,7 +44,7 @@ class CameraInit(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' - commandLine = 'aliceVision_cameraInit {allParams}' + commandLine = 'aliceVision_cameraInit {allParams} --allowSingleView 1' # don't throw an error if there is only one image size = desc.DynamicNodeSize('viewpoints') @@ -115,6 +115,7 @@ def buildIntrinsics(self, node, additionalViews=()): os.makedirs(os.path.join(tmpCache, node.internalFolder)) self.createViewpointsFile(node, additionalViews) cmd = self.buildCommandLine(node.chunks[0]) + cmd += " --allowIncompleteOutput 1" # don't throw an error if the image intrinsic is undefined # logging.debug(' - commandLine:', cmd) subprocess = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) stdout, stderr = subprocess.communicate() From 13e01e746d03b6c61f210410c32f69049310784e Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Thu, 25 Jan 2018 17:09:20 +0100 Subject: [PATCH 0083/1093] [nodes] new node `SfMAlignment` --- meshroom/aliceVision/SfMAlignment.py | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 meshroom/aliceVision/SfMAlignment.py diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py new file mode 100644 index 0000000000..bbf583002a --- /dev/null +++ b/meshroom/aliceVision/SfMAlignment.py @@ -0,0 +1,45 @@ +import sys +import os +from meshroom.core import desc + + +class SfMAlignment(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_utils_sfmAlignment {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file .''', + value='', + uid=[0], + ), + desc.File( + name='reference', + label='Reference', + description='''Path to the scene used as the reference coordinate system.''', + 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', + description='''Aligned SfMData file .''', + value='{cache}/{nodeType}/{uid0}/alignedSfM.abc', + uid=[], + ), + ] From 33307d01683116491e4c6188ea3a4f31ac8fcd7b Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Thu, 25 Jan 2018 17:09:46 +0100 Subject: [PATCH 0084/1093] [nodes] new node `SfMTransform` --- meshroom/aliceVision/SfMTransform.py | 72 ++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 meshroom/aliceVision/SfMTransform.py diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py new file mode 100644 index 0000000000..dcbade8aa7 --- /dev/null +++ b/meshroom/aliceVision/SfMTransform.py @@ -0,0 +1,72 @@ +import sys +import os +from meshroom.core import desc + + +class SfMTransform(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_utils_sfmTransform {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file .''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='method', + label='Transformation Method', + description='''Transformation method (transformation, auto_from_cameras, auto_from_landmarks).''', + value='auto_from_landmarks', + values=['transformation', 'auto_from_cameras', 'auto_from_landmarks'], + exclusive=True, + uid=[0], + ), + desc.StringParam( + name='transformation', + label='Transformation', + description='''Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S. (required only for 'transformation' method)''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='landmarksDescriberTypes', + label='Landmarks Describer Types', + description='''Image describer types used to compute the mean of the point cloud. (only for 'landmarks' method)''', + value=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.FloatParam( + name='scale', + label='Additional Scale', + description='Additional scale to apply.', + value=10.0, + range=(1, 100.0, 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 = [ + desc.File( + name='output', + label='Output', + description='''Aligned SfMData file .''', + value='{cache}/{nodeType}/{uid0}/transformedSfM.abc', + uid=[], + ), + ] From e940039166b78f6a5ad1f82a55e59094f940842f Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 30 Jan 2018 17:26:07 +0100 Subject: [PATCH 0085/1093] [nodes] `StructureFromMotion` : `Local Bundle Adjustment` true by default --- meshroom/aliceVision/StructureFromMotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index f067f43361..8fdbf292eb 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -56,7 +56,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Local Bundle Adjustment', description='It reduces the reconstruction time, especially for large datasets (500+ images),\n' 'by avoiding computation of the Bundle Adjustment on areas that are not changing.', - value=False, + value=True, uid=[0], ), desc.IntParam( From 35dfdc51943352bb97b2a94d4670f351aff4a7d1 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 30 Jan 2018 17:26:54 +0100 Subject: [PATCH 0086/1093] [nodes] `FeatureExtraction` : `forceCpuExtraction` true by default --- meshroom/aliceVision/FeatureExtraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index b166bdaa16..7f5b68b1c8 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -47,7 +47,7 @@ class FeatureExtraction(desc.CommandLineNode): name='forceCpuExtraction', label='Force CPU Extraction', description='''Use only CPU feature extraction.''', - value=False, + value=True, uid=[], ), desc.ChoiceParam( From 045e59e474a8b985a133abfdb4ff07a92c28f08d Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 1 Feb 2018 11:53:53 +0100 Subject: [PATCH 0087/1093] [nodes] MeshResampling: expose flipNormals param --- meshroom/aliceVision/MeshResampling.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index cb03d870f0..67d7bf187e 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -55,6 +55,13 @@ class MeshResampling(desc.CommandLineNode): range=(0, 100, 1), uid=[0], ), + desc.BoolParam( + name='flipNormals', + label='Flip Normals', + description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + value=False, + uid=[0], + ), ] outputs = [ From 3388db168d859864f8aa533ebf34726a003b53c2 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 2 Feb 2018 17:50:56 +0100 Subject: [PATCH 0088/1093] [nodes] fix savePutativeMatch default value --- meshroom/aliceVision/FeatureMatching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index e02477de1d..6f9f4e24f2 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -73,7 +73,7 @@ class FeatureMatching(desc.CommandLineNode): name='savePutativeMatches', label='Save Putative Matches', description='''putative matches.''', - value='', + value=False, uid=[0], ), desc.BoolParam( From 479b3638f8bea3ae0f5cf8992896db945003798f Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 5 Feb 2018 19:18:12 +0100 Subject: [PATCH 0089/1093] [nodes] FeatureMatching: improve description layout --- meshroom/aliceVision/FeatureMatching.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 6f9f4e24f2..8906ea2b65 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -54,7 +54,13 @@ class FeatureMatching(desc.CommandLineNode): desc.ChoiceParam( name='photometricMatchingMethod', label='Photometric Matching Method', - description='''For Scalar based regions descriptor: * BRUTE_FORCE_L2: L2 BruteForce matching * ANN_L2: L2 Approximate Nearest Neighbor matching * CASCADE_HASHING_L2: L2 Cascade Hashing matching * FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory) For Binary based descriptor: * BRUTE_FORCE_HAMMING: BruteForce Hamming matching''', + description='For Scalar based regions descriptor\n' + ' * BRUTE_FORCE_L2: L2 BruteForce matching\n' + ' * ANN_L2: L2 Approximate Nearest Neighbor matching\n' + ' * CASCADE_HASHING_L2: L2 Cascade Hashing matching\n' + ' * FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory) \n' + 'For Binary based descriptor\n' + ' * BRUTE_FORCE_HAMMING: BruteForce Hamming matching', value='ANN_L2', values=('BRUTE_FORCE_L2', 'ANN_L2', 'CASCADE_HASHING_L2', 'FAST_CASCADE_HASHING_L2', 'BRUTE_FORCE_HAMMING'), exclusive=True, From 4b96d79380f880285bb4a99dd84ca9760e510ac5 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 6 Feb 2018 17:23:22 +0100 Subject: [PATCH 0090/1093] [nodes] `cameraInit`: add `defaultFieldOfView` option --- meshroom/aliceVision/CameraInit.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index f65a7f890f..bf15e0ebce 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -62,6 +62,14 @@ class CameraInit(desc.CommandLineNode): label="Intrinsics", description="Camera Intrinsics", group="", + ), + desc.FloatParam( + name='defaultFieldOfView', + label='Default Field Of View', + description='Empirical value for the field of view in degree.', + value=45.0, + range=(0, 180.0, 1), + uid=[0], ), desc.File( name='sensorDatabase', From e5441abe95808b08ab92c7d94a56c6687bcdd4a8 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 6 Feb 2018 17:24:05 +0100 Subject: [PATCH 0091/1093] [nodes] `featureMatching` : remove `fileExtension` option --- meshroom/aliceVision/FeatureMatching.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index e02477de1d..94f0e755ed 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -106,15 +106,6 @@ class FeatureMatching(desc.CommandLineNode): value=False, uid=[], ), - desc.ChoiceParam( - name='fileExtension', - label='File Extension', - description='''File extension to store matches (bin or txt).''', - value='txt', - values=('txt', 'bin'), - exclusive=True, - uid=[], - ), desc.IntParam( name='maxMatches', label='Max Matches', From 653e90e28a4f1ed6a2f39413196f680ddc504150 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 6 Feb 2018 17:25:07 +0100 Subject: [PATCH 0092/1093] [nodes] `featureExtraction` : change parallelization blockSize (10 to 40) --- meshroom/aliceVision/FeatureExtraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 7f5b68b1c8..a5a4a16257 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -6,7 +6,7 @@ class FeatureExtraction(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureExtraction {allParams}' size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=10) + parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ From 3bb4e2d1f775de474c256bd56fea4d4ae16eae0f Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 22 Feb 2018 12:46:21 +0100 Subject: [PATCH 0093/1093] [nodes] new meshFiltering node --- meshroom/aliceVision/MeshFiltering.py | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meshroom/aliceVision/MeshFiltering.py diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py new file mode 100644 index 0000000000..4bf732c822 --- /dev/null +++ b/meshroom/aliceVision/MeshFiltering.py @@ -0,0 +1,43 @@ +import sys +from meshroom.core import desc + + +class MeshFiltering(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_meshFiltering {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''Input Mesh (OBJ file format).''', + value='', + uid=[0], + ), + desc.IntParam( + name='iterations', + label='Nb Iterations', + description='', + value=10, + range=(0, 50, 1), + uid=[0], + ), + desc.FloatParam( + name='lambda', + label='Lambda', + description='', + value=1.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='''Output mesh (OBJ file format).''', + value='{cache}/{nodeType}/{uid0}/mesh.obj', + uid=[], + ), + ] From a2049616afe4b3508be678772087e34830f95f9a Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 22 Feb 2018 12:46:52 +0100 Subject: [PATCH 0094/1093] [nodes] Meshing: new filtering parameters --- meshroom/aliceVision/Meshing.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index e92bb9c999..80507a5a74 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -40,6 +40,22 @@ class Meshing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.IntParam( + name='smoothingIteration', + label='Smoothing Iteration', + description='Number of Smoothing Iterations', + value=10, + range=(0, 50, 1), + uid=[0], + ), + desc.FloatParam( + name='smoothingWeight', + label='Smoothing Weight', + description='Smoothing Weight', + value=1.0, + range=(0, 2, 1), + uid=[0], + ), desc.File( name="depthMapFolder", label='Depth Maps Folder', From d662886a3541e9f6853d11efd2215a3e8503a65a Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Wed, 28 Feb 2018 17:56:15 +0100 Subject: [PATCH 0095/1093] [nodes] Add nodes MeshDenoising and MeshDecimate --- meshroom/aliceVision/MeshDecimate.py | 67 +++++++++++++++++++++ meshroom/aliceVision/MeshDenoising.py | 84 +++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 meshroom/aliceVision/MeshDecimate.py create mode 100644 meshroom/aliceVision/MeshDenoising.py diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py new file mode 100644 index 0000000000..2bee62112b --- /dev/null +++ b/meshroom/aliceVision/MeshDecimate.py @@ -0,0 +1,67 @@ +from meshroom.core import desc + +class MeshDecimate(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_meshDecimate {allParams}' + + cpu = desc.Level.NORMAL + ram = desc.Level.NORMAL + + inputs = [ + desc.File( + name="input", + label='Input Mesh (OBJ file format).', + description='', + value='', + uid=[0], + ), + desc.FloatParam( + name='simplificationFactor', + label='Simplification factor', + description='Simplification factor', + value=0.5, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.IntParam( + name='nbVertices', + label='Fixed Number of Vertices', + description='Fixed number of output vertices.', + value=0, + range=(0, 1000000, 1), + uid=[0], + ), + desc.IntParam( + name='minVertices', + label='Min Vertices', + description='Min number of output vertices.', + value=0, + range=(0, 1000000, 1), + uid=[0], + ), + desc.IntParam( + name='maxVertices', + label='Max Vertices', + description='Max number of output vertices.', + value=0, + range=(0, 1000000, 1), + uid=[0], + ), + desc.BoolParam( + name='flipNormals', + label='Flip Normals', + description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + value=False, + uid=[0], + ), + ] + + outputs = [ + desc.File( + name="output", + label="Output mesh", + description="Output mesh (OBJ file format).", + value='{cache}/{nodeType}/{uid0}/mesh.obj', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py new file mode 100644 index 0000000000..4dc14f00f5 --- /dev/null +++ b/meshroom/aliceVision/MeshDenoising.py @@ -0,0 +1,84 @@ +import sys +from meshroom.core import desc + + +class MeshDenoising(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_meshDenoising {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''Input Mesh (OBJ file format).''', + value='', + uid=[0], + ), + desc.IntParam( + name='denoisingIterations', + label='Denoising Iterations', + description='''Number of denoising iterations.''', + value=5, + range=(0, 30, 1), + uid=[0], + ), + desc.FloatParam( + name='meshUpdateClosenessWeight', + label='Mesh Update Closeness Weight', + description='''Closeness weight for mesh update, must be positive.''', + value=0.001, + range=(0.0, 0.1, 0.001), + uid=[0], + ), + desc.FloatParam( + name='lambda', + label='Lambda', + description='''Regularization weight.''', + value=2.0, + range=(0.0, 10.0, 1.0), + uid=[0], + ), + desc.FloatParam( + name='eta', + label='Eta', + description='''Gaussian standard deviation for spatial weight, scaled by the average distance between adjacent face cetroids. Must be positive.''', + value=1.5, + range=(0.0, 20.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='mu', + label='Mu', + description='''Gaussian standard deviation for guidance weight.''', + value=1.5, + range=(0.0, 10.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='nu', + label='Nu', + description='''Gaussian standard deviation for signal weight.''', + value=0.3, + range=(0.0, 5.0, 0.01), + uid=[0], + ), + desc.ChoiceParam( + name='meshUpdateMethod', + label='Mesh Update Method', + description='Mesh Update Method: * ITERATIVE_UPDATE(SDFilter::MeshFilter Parameters::ITERATIVE_UPDATE) (default): ShapeUp styled iterative solver * POISSON_UPDATE(SDFilter::MeshFilterPa rameters::POISSON_UPDATE): Poisson-based update from [Want et al. 2015]', + value=0, + values=(0, 1), + exclusive=True, + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='''Output mesh (OBJ file format).''', + value='{cache}/{nodeType}/{uid0}/mesh.obj', + uid=[], + ), + ] From 75956e6f69bb2aa3da4bb8c9c579fb1a930e277b Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Thu, 1 Mar 2018 14:29:30 +0100 Subject: [PATCH 0096/1093] [nodes] format MeshDecimate/Denoising documentation --- meshroom/aliceVision/MeshDecimate.py | 4 +++- meshroom/aliceVision/MeshDenoising.py | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 2bee62112b..2c7e1ef720 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -50,7 +50,9 @@ class MeshDecimate(desc.CommandLineNode): desc.BoolParam( name='flipNormals', label='Flip Normals', - description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + description='Option to flip face normals.\n' + 'It can be needed as it depends on the vertices order in triangles\n' + 'and the convention change from one software to another.', value=False, uid=[0], ), diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 4dc14f00f5..8da0417452 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -41,7 +41,9 @@ class MeshDenoising(desc.CommandLineNode): desc.FloatParam( name='eta', label='Eta', - description='''Gaussian standard deviation for spatial weight, scaled by the average distance between adjacent face cetroids. Must be positive.''', + description='Gaussian standard deviation for spatial weight, ' + 'scaled by the average distance between adjacent face centroids.\n' + 'Must be positive.', value=1.5, range=(0.0, 20.0, 0.01), uid=[0], @@ -65,7 +67,9 @@ class MeshDenoising(desc.CommandLineNode): desc.ChoiceParam( name='meshUpdateMethod', label='Mesh Update Method', - description='Mesh Update Method: * ITERATIVE_UPDATE(SDFilter::MeshFilter Parameters::ITERATIVE_UPDATE) (default): ShapeUp styled iterative solver * POISSON_UPDATE(SDFilter::MeshFilterPa rameters::POISSON_UPDATE): Poisson-based update from [Want et al. 2015]', + description='Mesh Update Method\n' + ' * ITERATIVE_UPDATE (default): ShapeUp styled iterative solver \n' + ' * POISSON_UPDATE: Poisson-based update from [Want et al. 2015]', value=0, values=(0, 1), exclusive=True, From 4d1e764ab090e7b14b2957e04478833d1b69873d Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 6 Mar 2018 15:34:41 +0100 Subject: [PATCH 0097/1093] [nodes] formatting: fix tab instead of spaces --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index bf15e0ebce..ceb9efaada 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -63,7 +63,7 @@ class CameraInit(desc.CommandLineNode): description="Camera Intrinsics", group="", ), - desc.FloatParam( + desc.FloatParam( name='defaultFieldOfView', label='Default Field Of View', description='Empirical value for the field of view in degree.', From ef9b29e6cb082151bed0250041e7f7c9c31502b8 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 13 Mar 2018 16:59:00 +0100 Subject: [PATCH 0098/1093] [nodes] `PrepareDenseScene` remove parameters `scale` and `outputFileType` - no more downscale in `PrepareDenseScene` - `outputFileType` is now always `.exr` --- meshroom/aliceVision/PrepareDenseScene.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 1c1f425b7a..1cdfe8e2d9 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -15,24 +15,6 @@ class PrepareDenseScene(desc.CommandLineNode): value='', uid=[0], ), - desc.ChoiceParam( - name='scale', - label='Scale', - description='''Image downscale factor.''', - value=2, - values=[1, 2, 4, 8, 16], - exclusive=True, - uid=[0], - ), - desc.ChoiceParam( - name='outputFileType', - label='Image File Type', - description='Output Image File Type', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], - exclusive=True, - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 02e04a48ee91c8a711e8f4071b7834c8686d5ce9 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 13 Mar 2018 16:59:46 +0100 Subject: [PATCH 0099/1093] [nodes] `DepthMap` Add parameter `Downscale` --- meshroom/aliceVision/DepthMap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 5a25b8c6f9..f4fb95ac47 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -16,6 +16,15 @@ class DepthMap(desc.CommandLineNode): value='', uid=[0], ), + desc.ChoiceParam( + name='downscale', + label='Downscale', + description='Image downscale factor.', + value=2, + values=[1, 2, 4, 8, 16], + exclusive=True, + uid=[0], + ), desc.IntParam( name='sgmMaxTCams', label='SGM: Nb Neighbour Cameras', From 36b1c565ddb0e746d36d9e0743d20d32d0868cb1 Mon Sep 17 00:00:00 2001 From: Gregoire De Lillo <gregoire.delillo@me.com> Date: Tue, 13 Mar 2018 17:01:01 +0100 Subject: [PATCH 0100/1093] [nodes] Add `verboseLevel` parameter in some MVS nodes --- meshroom/aliceVision/CameraConnection.py | 11 ++++++++++- meshroom/aliceVision/DepthMap.py | 9 +++++++++ meshroom/aliceVision/DepthMapFilter.py | 9 +++++++++ meshroom/aliceVision/Meshing.py | 13 +++++++++++-- meshroom/aliceVision/Texturing.py | 11 ++++++++++- 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py index d3259d857d..4fc18fb72e 100644 --- a/meshroom/aliceVision/CameraConnection.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -13,6 +13,15 @@ class CameraConnection(desc.CommandLineNode): description='', 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=[], + ), ] diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index f4fb95ac47..e67aa4aaa6 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -128,6 +128,15 @@ class DepthMap(desc.CommandLineNode): value=False, 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 = [ diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 8b8c5049af..3d0a92e362 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -63,6 +63,15 @@ class DepthMapFilter(desc.CommandLineNode): range=(0, 10, 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 = [ diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 80507a5a74..d10333b3b5 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -62,14 +62,23 @@ class Meshing(desc.CommandLineNode): description='Input depth maps folder', value='', uid=[0], - ), + ), desc.File( name="depthMapFilterFolder", label='Filtered Depth Maps Folder', description='Input filtered depth maps folder', 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 = [ diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index ad7f99dbb4..a0284d1b7f 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -70,7 +70,16 @@ class Texturing(desc.CommandLineNode): description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', value=False, 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 = [ From 838f270d8034064bef8cb46a18d86f1758a5a730 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Tue, 20 Mar 2018 17:51:48 +0100 Subject: [PATCH 0101/1093] [nodes] meshing: add multi-resolution option --- meshroom/aliceVision/Meshing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index d10333b3b5..cee28da4e1 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -40,6 +40,15 @@ class Meshing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='repartition', + label='Repartition', + description='', + value='multiResolution', + values=('multiResolution', 'regularGrid'), + exclusive=True, + uid=[0], + ), desc.IntParam( name='smoothingIteration', label='Smoothing Iteration', From 833ca1322a9d6ce014f7b256c20ccfcc4c50efd3 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Thu, 22 Mar 2018 17:34:38 +0100 Subject: [PATCH 0102/1093] [nodes] verbose param on more Mesh processing nodes --- meshroom/aliceVision/MeshDecimate.py | 9 +++++++++ meshroom/aliceVision/MeshDenoising.py | 9 +++++++++ meshroom/aliceVision/MeshFiltering.py | 9 +++++++++ meshroom/aliceVision/MeshResampling.py | 9 +++++++++ 4 files changed, 36 insertions(+) diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 2c7e1ef720..d9f7a9bfe9 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -56,6 +56,15 @@ class MeshDecimate(desc.CommandLineNode): value=False, 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 = [ diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 8da0417452..8c261d0f4f 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -75,6 +75,15 @@ class MeshDenoising(desc.CommandLineNode): exclusive=True, 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 = [ diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 4bf732c822..4ea3504895 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -30,6 +30,15 @@ class MeshFiltering(desc.CommandLineNode): range=(0.0, 10.0, 0.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 = [ diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 67d7bf187e..8927bdad90 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -62,6 +62,15 @@ class MeshResampling(desc.CommandLineNode): value=False, 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 = [ From 8bf583f8dc9ffc020bc4019b23f5dc0ef3e26dea Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 25 Mar 2018 20:20:11 +0200 Subject: [PATCH 0103/1093] [nodes] MeshDenoising: change lambda step value --- meshroom/aliceVision/MeshDenoising.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 8da0417452..c7d6912a01 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -35,7 +35,7 @@ class MeshDenoising(desc.CommandLineNode): label='Lambda', description='''Regularization weight.''', value=2.0, - range=(0.0, 10.0, 1.0), + range=(0.0, 10.0, 0.01), uid=[0], ), desc.FloatParam( From b4ec388fb1bbb0d4f10bec2d5e36c499238e7ced Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Fri, 30 Mar 2018 21:59:55 +0200 Subject: [PATCH 0104/1093] [nodes] Meshing: expose all new fuse parameters And remove smoothing params --- meshroom/aliceVision/Meshing.py | 136 +++++++++++++++++++++++++------- 1 file changed, 109 insertions(+), 27 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index cee28da4e1..b8118e80dc 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,5 +1,6 @@ from meshroom.core import desc + class Meshing(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_meshing {allParams}' @@ -15,22 +16,54 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name="depthMapFolder", + label='Depth Maps Folder', + description='Input depth maps folder', + value='', + uid=[0], + ), + desc.File( + name="depthMapFilterFolder", + label='Filtered Depth Maps Folder', + description='Input filtered depth maps folder', + value='', + uid=[0], + ), desc.IntParam( - name='maxPts', - label='maxPts', - description='Max points', - value=6000000, - range=(500000, 30000000, 1000), + name='maxInputPoints', + label='Max Input Points', + description='Max input points loaded from depth map images.', + value=50000000, + range=(500000, 500000000, 1000), uid=[0], ), desc.IntParam( - name='maxPtsPerVoxel', - label='maxPtsPerVoxel', + name='maxPoints', + label='Max Points', + description='Max points at the end of the depth maps fusion.', + value=5000000, + range=(100000, 10000000, 1000), + uid=[0], + ), + desc.IntParam( + name='maxPointsPerVoxel', + label='Max Points Per Voxel', description='Max points per voxel', value=1000000, range=(500000, 30000000, 1000), uid=[0], ), + desc.IntParam( + name='minStep', + label='Min Step', + description='The step used to load depth values from depth maps is computed from maxInputPts. ' + 'Here we define the minimal value for this step, so on small datasets we will not spend ' + 'too much time at the beginning loading all depth values.', + value=2, + range=(1, 20, 1), + uid=[0], + ), desc.ChoiceParam( name='partitioning', label='Partitioning', @@ -49,34 +82,83 @@ class Meshing(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.IntParam( - name='smoothingIteration', - label='Smoothing Iteration', - description='Number of Smoothing Iterations', - value=10, - range=(0, 50, 1), + desc.FloatParam( + name='angleFactor', + label='angleFactor', + description='angleFactor', + value=15.0, + range=(0.0, 200.0, 1.0), + uid=[0], + ), + desc.FloatParam( + name='simFactor', + label='simFactor', + description='simFactor', + value=15.0, + range=(0.0, 200.0, 1.0), uid=[0], ), desc.FloatParam( - name='smoothingWeight', - label='Smoothing Weight', - description='Smoothing Weight', + name='pixSizeMarginInitCoef', + label='pixSizeMarginInitCoef', + description='pixSizeMarginInitCoef', + value=2.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='pixSizeMarginFinalCoef', + label='pixSizeMarginFinalCoef', + description='pixSizeMarginFinalCoef', value=1.0, - range=(0, 2, 1), + range=(0.0, 10.0, 0.1), uid=[0], ), - desc.File( - name="depthMapFolder", - label='Depth Maps Folder', - description='Input depth maps folder', - value='', + desc.FloatParam( + name='voteMarginFactor', + label='voteMarginFactor', + description='voteMarginFactor', + value=4.0, + range=(0.1, 10.0, 0.1), uid=[0], ), - desc.File( - name="depthMapFilterFolder", - label='Filtered Depth Maps Folder', - description='Input filtered depth maps folder', - value='', + desc.FloatParam( + name='contributeMarginFactor', + label='contributeMarginFactor', + description='contributeMarginFactor', + value=2.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='simGaussianSizeInit', + label='simGaussianSizeInit', + description='simGaussianSizeInit', + value=10.0, + range=(0.0, 50.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='simGaussianSize', + label='simGaussianSize', + description='simGaussianSize', + value=10.0, + range=(0.0, 50.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='minAngleThreshold', + label='minAngleThreshold', + description='minAngleThreshold', + value=1.0, + range=(0.0, 10.0, 0.01), + uid=[0], + ), + desc.BoolParam( + name='refineFuse', + label='Refine Fuse', + description='Refine depth map fusion with the new pixels size defined by angle and similarity scores.', + value=True, uid=[0], ), desc.ChoiceParam( From 07b31a4c2e50b0073e922ff6eec272c375f35794 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Fri, 30 Mar 2018 22:02:07 +0200 Subject: [PATCH 0105/1093] [nodes] MeshFiltering: add options to remove triangles - add option to remove large triangles - add option to keep only the largest group of connected triangles --- meshroom/aliceVision/MeshFiltering.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 4ea3504895..5535d15e83 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -14,6 +14,21 @@ class MeshFiltering(desc.CommandLineNode): value='', uid=[0], ), + desc.FloatParam( + name='removeLargeTrianglesFactor', + label='Filter Large Triangles Factor', + description='Remove all large triangles. We consider a triangle as large if one edge is bigger than N times the average edge length. Put zero to disable it.', + value=60.0, + range=(1.0, 100.0, 0.1), + uid=[0], + ), + desc.BoolParam( + name='keepLargestMeshOnly', + label='Keep Only the Largest Mesh', + description='Keep only the largest connected triangles group.', + value=True, + uid=[0], + ), desc.IntParam( name='iterations', label='Nb Iterations', From 163d39977db4f748686fda32ea536af0c83824ee Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Fri, 30 Mar 2018 22:02:36 +0200 Subject: [PATCH 0106/1093] [nodes] MeshFiltering: reduce the default number of iterations --- meshroom/aliceVision/MeshFiltering.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 5535d15e83..812a1f52ee 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -33,7 +33,7 @@ class MeshFiltering(desc.CommandLineNode): name='iterations', label='Nb Iterations', description='', - value=10, + value=2, range=(0, 50, 1), uid=[0], ), From 2037c423cb99db73f1790ed1020cd9010d8b699c Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 3 Apr 2018 17:16:44 +0200 Subject: [PATCH 0107/1093] [nodes] Texturing: add 'unwrapMethod' and 'fillHoles' parameters --- meshroom/aliceVision/Texturing.py | 39 +++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index a0284d1b7f..00ba34c68b 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -6,7 +6,6 @@ class Texturing(desc.CommandLineNode): commandLine = 'aliceVision_texturing {allParams}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE - inputs = [ desc.File( name='ini', @@ -38,17 +37,9 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.IntParam( - name='padding', - label='Padding', - description='''Texture edge padding size in pixel''', - value=15, - range=(0, 100, 1), - uid=[0], - ), desc.ChoiceParam( name='downscale', - label='Downscale', + label='Texture Downscale', description='''Texture downscale factor''', value=2, values=(1, 2, 4, 8), @@ -64,6 +55,33 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='unwrapMethod', + label='Unwrap Method', + description='Method to unwrap input mesh if it does not have UV coordinates.\n' + ' * Basic (> 600k faces) fast and simple. Can generate multiple atlases.\n' + ' * LSCM (<= 600k faces): optimize space. Generates one atlas.\n' + ' * ABF (<= 300k faces): optimize space and stretch. Generates one atlas.', + value="Basic", + values=("Basic", "LSCM", "ABF"), + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name='fillHoles', + label='Fill Holes', + description='Fill Texture holes with plausible values', + value=False, + uid=[0], + ), + desc.IntParam( + name='padding', + label='Padding', + description='''Texture edge padding size in pixel''', + value=15, + range=(0, 100, 1), + uid=[0], + ), desc.BoolParam( name='flipNormals', label='Flip Normals', @@ -82,6 +100,7 @@ class Texturing(desc.CommandLineNode): ), ] + outputs = [ desc.File( name='output', From ca136c24542d1ee8f0a4ecd5e533dc5e4c545855 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 13 Apr 2018 22:43:00 +0200 Subject: [PATCH 0108/1093] [nodes] aliceVision: remove '__version__' used by rez --- meshroom/aliceVision/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/meshroom/aliceVision/__init__.py b/meshroom/aliceVision/__init__.py index d879df156c..e69de29bb2 100644 --- a/meshroom/aliceVision/__init__.py +++ b/meshroom/aliceVision/__init__.py @@ -1,2 +0,0 @@ -__version__ = 'develop' - From bef5e9c96e81ecfb8a6b7012f14dc887ab85c39b Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Thu, 19 Apr 2018 20:53:38 +0200 Subject: [PATCH 0109/1093] [nodes] AliceVision: update default values for MVS steps --- meshroom/aliceVision/MeshFiltering.py | 2 +- meshroom/aliceVision/Meshing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 812a1f52ee..15f0cae73f 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -33,7 +33,7 @@ class MeshFiltering(desc.CommandLineNode): name='iterations', label='Nb Iterations', description='', - value=2, + value=5, range=(0, 50, 1), uid=[0], ), diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index b8118e80dc..650a1977f5 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -110,7 +110,7 @@ class Meshing(desc.CommandLineNode): name='pixSizeMarginFinalCoef', label='pixSizeMarginFinalCoef', description='pixSizeMarginFinalCoef', - value=1.0, + value=4.0, range=(0.0, 10.0, 0.1), uid=[0], ), From 72e856b1ed37c44125a89c89f2fec6136f10922d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 15 Jun 2018 19:25:32 +0200 Subject: [PATCH 0110/1093] [nodes] FeatureMatching: add H Growing --- meshroom/aliceVision/FeatureMatching.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 76b7de351d..974f1d4b09 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -20,9 +20,14 @@ class FeatureMatching(desc.CommandLineNode): desc.ChoiceParam( name='geometricModel', label='Geometric Model', - description='''Pairwise correspondences filtering thanks to robust model estimation: * f: fundamental matrix * e: essential matrix * h: homography matrix''', + description='Geometric validation method to filter features matches:\n' + ' * f: fundamental matrix\n' + ' * e: essential matrix\n' + ' * h: homography matrix\n' + ' * hg: homography growing\n' + ' * none: no geometric filtering', value='f', - values=['f', 'e', 'h'], + values=['f', 'e', 'h', 'hg', 'none'], exclusive=True, uid=[0], ), From 7eec89b48cf15eca977ad5bcb79726ac2331ccb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 11:55:20 +0200 Subject: [PATCH 0111/1093] =?UTF-8?q?[nodes]=C2=A0Add=20support=20for=20mu?= =?UTF-8?q?ltiple=20features=20&=20matches=20folders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meshroom/aliceVision/FeatureMatching.py | 109 +++++++++--------- meshroom/aliceVision/ImageMatching.py | 47 ++++---- meshroom/aliceVision/ImageMatchingMultiSfM.py | 67 ++++++----- meshroom/aliceVision/StructureFromMotion.py | 86 ++++++++------ 4 files changed, 167 insertions(+), 142 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 974f1d4b09..505c0edc44 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -13,22 +13,27 @@ class FeatureMatching(desc.CommandLineNode): desc.File( name='input', label='Input', - description='''SfMData file.''', + description='SfMData file.', value='', uid=[0], ), - desc.ChoiceParam( - name='geometricModel', - label='Geometric Model', - description='Geometric validation method to filter features matches:\n' - ' * f: fundamental matrix\n' - ' * e: essential matrix\n' - ' * h: homography matrix\n' - ' * hg: homography growing\n' - ' * none: no geometric filtering', - value='f', - values=['f', 'e', 'h', 'hg', 'none'], - exclusive=True, + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.File( + name='imagePairsList', + label='Image Pairs List', + description='Path to a file which contains the list of image pairs to match.', + value='', uid=[0], ), desc.ChoiceParam( @@ -42,20 +47,6 @@ class FeatureMatching(desc.CommandLineNode): uid=[0], joinChar=',', ), - desc.File( - name='featuresFolder', - label='Features Folder', - description='''Path to a folder containing the extracted features.''', - value='', - uid=[0], - ), - desc.File( - name='imagePairsList', - label='Image Pairs List', - description='''Path to a file which contains the list of image pairs to match.''', - value='', - uid=[0], - ), desc.ChoiceParam( name='photometricMatchingMethod', label='Photometric Matching Method', @@ -80,19 +71,18 @@ class FeatureMatching(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.BoolParam( - name='savePutativeMatches', - label='Save Putative Matches', - description='''putative matches.''', - value=False, - uid=[0], - ), - desc.BoolParam( - name='guidedMatching', - label='Guided Matching', - description='''the found model to improve the pairwise correspondences.''', - value=False, - uid=[0], + desc.ChoiceParam( + name='geometricModel', + label='Geometric Model', + description='Geometric validation method to filter features matches: \n' + ' * fundamental_matrix\n' + ' * essential_matrix\n' + ' * homography_matrix\n' + ' * homography_growing', + value=['fundamental_matrix'], + values=['fundamental_matrix', 'essential_matrix', 'homography_matrix', 'homography_growing'], + exclusive=False, + uid=[0] ), desc.FloatParam( name='distanceRatio', @@ -105,42 +95,55 @@ class FeatureMatching(desc.CommandLineNode): desc.IntParam( name='maxIteration', label='Max Iteration', - description='''Maximum number of iterations allowed in ransac step.''', + description='Maximum number of iterations allowed in ransac step.', value=2048, range=(1, 20000, 1), uid=[0], ), - desc.BoolParam( - name='exportDebugFiles', - label='Export Debug Files', - description='''debug files (svg, dot).''', - value=False, - uid=[], - ), desc.IntParam( name='maxMatches', label='Max Matches', - description='''Maximum number pf matches to keep.''', + description='Maximum number of matches to keep.', value=0, range=(0, 10000, 1), uid=[0], ), + desc.BoolParam( + name='savePutativeMatches', + label='Save Putative Matches', + description='putative matches.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='guidedMatching', + label='Guided Matching', + description='the found model to improve the pairwise correspondences.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='exportDebugFiles', + label='Export Debug Files', + description='debug files (svg, dot).', + value=False, + uid=[], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''verbosity level (fatal, error, warning, info, debug, trace).''', + 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', - description='''Path to a folder in which computed matches will be stored.''', + label='Output Folder', + description='Path to a folder in which computed matches will be stored.', value='{cache}/{nodeType}/{uid0}/', uid=[], ), diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 37059a7fec..92b680205c 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -12,28 +12,40 @@ class ImageMatching(desc.CommandLineNode): desc.File( name='input', label='Input', - description='''SfMData file .''', + description='SfMData file .', value='', uid=[0], ), - desc.File( - name='featuresFolder', - label='Features Folder', - description='''Folder containing the extracted features and descriptors. By default, it is the folder containing the SfMData.''', - value='', - uid=[0], + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." ), desc.File( name='tree', label='Tree', - description='''Input name for the vocabulary tree file.''', + description='Input name for the vocabulary tree file.', value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[0], ), + desc.File( + name='weights', + label='Weights', + description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', + value='', + uid=[0], + ), desc.IntParam( name='minNbImages', label='Minimal Number of Images', - description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''', + description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', value=200, range=(0, 500, 1), uid=[0], @@ -41,7 +53,7 @@ class ImageMatching(desc.CommandLineNode): desc.IntParam( name='maxDescriptors', label='Max Descriptors', - description='''Limit the number of descriptors you load per image. Zero means no limit.''', + description='Limit the number of descriptors you load per image. Zero means no limit.', value=500, range=(0, 100000, 1), uid=[0], @@ -49,22 +61,15 @@ class ImageMatching(desc.CommandLineNode): desc.IntParam( name='nbMatches', label='Nb Matches', - description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', + description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', value=50, range=(0, 1000, 1), uid=[0], ), - desc.File( - name='weights', - label='Weights', - description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''', - value='', - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''verbosity level (fatal, error, warning, info, debug, trace).''', + description='verbosity level (fatal, error, warning, info, debug, trace).', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, @@ -75,8 +80,8 @@ class ImageMatching(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', - description='''Filepath to the output file with the list of selected image pairs.''', + label='Output List File', + description='Filepath to the output file with the list of selected image pairs.', value='{cache}/{nodeType}/{uid0}/imageMatches.txt', uid=[], ), diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 2a7e18fe21..0af06962c0 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -13,44 +13,56 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): desc.File( name='input', label='Input A', - description='''SfMData file .''', + description='SfMData file .', value='', uid=[0], ), desc.File( name='inputB', label='Input B', - description='''SfMData file .''', + description='SfMData file .', value='', uid=[0], ), - desc.ChoiceParam( - name='modeMultiSfM', - label='Multiple SfM mode', - description='''Image matching multiple SfM mode. "a_ab" for images in input SfMData A plus between A and B. "a_b" for images between input SfMData A and B''', - value='a_ab', - values=['a_ab', 'a_b'], - exclusive=True, + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.File( + name='tree', + label='Tree', + description='Input name for the vocabulary tree file.', + value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[0], ), desc.File( - name='featuresFolder', - label='Features Folder', - description='''Folder containing the extracted features and descriptors. By default, it is the folder containing the SfMData.''', + name='weights', + label='Weights', + description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', value='', uid=[0], ), - desc.File( - name='tree', - label='Tree', - description='''Input name for the vocabulary tree file.''', - value=os.environ.get('ALICEVISION_VOCTREE', ''), + desc.ChoiceParam( + name='modeMultiSfM', + label='Multiple SfM mode', + description='Image matching multiple SfM mode.\n"a_ab" for images in input SfMData A plus between A and B.\n"a_b" for images between input SfMData A and B.', + value='a_ab', + values=['a_ab', 'a_b'], + exclusive=True, uid=[0], ), desc.IntParam( name='minNbImages', label='Minimal Number of Images', - description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''', + description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', value=200, range=(0, 500, 1), uid=[0], @@ -58,7 +70,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): desc.IntParam( name='maxDescriptors', label='Max Descriptors', - description='''Limit the number of descriptors you load per image. Zero means no limit.''', + description='Limit the number of descriptors you load per image. Zero means no limit.', value=500, range=(0, 100000, 1), uid=[0], @@ -66,22 +78,15 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): desc.IntParam( name='nbMatches', label='Nb Matches', - description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', + description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', value=50, range=(0, 1000, 1), uid=[0], ), - desc.File( - name='weights', - label='Weights', - description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''', - value='', - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''verbosity level (fatal, error, warning, info, debug, trace).''', + description='verbosity level (fatal, error, warning, info, debug, trace).', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, @@ -92,15 +97,15 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', - description='''Filepath to the output file with the list of selected image pairs.''', + label='Output List File', + description='Filepath to the output file with the list of selected image pairs.', value='{cache}/{nodeType}/{uid0}/imageMatches.txt', uid=[], ), desc.File( name='outputCombinedSfM', label='Output Combined SfM', - description='''Path for the combined SfMData file''', + description='Path for the combined SfMData file', value='{cache}/{nodeType}/{uid0}/combineSfM.sfm', uid=[], ), diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 8fdbf292eb..f4dcbf3bfa 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -17,19 +17,29 @@ class StructureFromMotion(desc.CommandLineNode): value='', uid=[0], ), - desc.File( - name='featuresFolder', - label='Features Folder', - description='Path to a folder containing the extracted features.', - value='', - uid=[0], - ), - desc.File( - name='matchesFolder', - label='Matches Folder', - description='Path to a folder in which computed matches are stored.', - value='', - uid=[0], + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.ListAttribute( + elementDesc=desc.File( + name="matchesFolder", + label="Matches Folder", + description="", + value="", + uid=[0], + ), + name="matchesFolders", + label="Matches Folders", + description="Folder(s) in which computed matches are stored." ), desc.ChoiceParam( name='describerTypes', @@ -43,13 +53,13 @@ class StructureFromMotion(desc.CommandLineNode): joinChar=',', ), desc.ChoiceParam( - name='interFileExtension', - label='Inter File Extension', - description='Extension of the intermediate file export.', - value='.abc', - values=('.abc', '.ply'), + name='localizerEstimator', + label='Localizer Estimator', + description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', + value='acransac', + values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], exclusive=True, - uid=[], + uid=[0], ), desc.BoolParam( name='useLocalBA', @@ -67,13 +77,14 @@ class StructureFromMotion(desc.CommandLineNode): range=(2, 10, 1), uid=[0], ), - desc.ChoiceParam( - name='localizerEstimator', - label='Localizer Estimator', - description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', - value='acransac', - values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], - exclusive=True, + desc.IntParam( + name='maxNumberOfMatches', + label='Maximum Number of Matches', + description='Maximum number of matches per image pair (and per feature type). \n' + 'This can be useful to have a quick reconstruction overview. \n' + '0 means no limit.', + value=0, + range=(0, 50000, 1), uid=[0], ), desc.IntParam( @@ -95,14 +106,6 @@ class StructureFromMotion(desc.CommandLineNode): range=(2, 10, 1), uid=[0], ), - desc.IntParam( - name='maxNumberOfMatches', - label='Maximum Number of Matches', - description='Maximum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a quick reconstruction overview. \n' - '0 means no limit.', - value=0, - range=(0, 50000, 1), uid=[0], ), desc.File( @@ -119,6 +122,15 @@ class StructureFromMotion(desc.CommandLineNode): value='', uid=[0], ), + desc.ChoiceParam( + name='interFileExtension', + label='Inter File Extension', + description='Extension of the intermediate file export.', + value='.abc', + values=('.abc', '.ply'), + exclusive=True, + uid=[], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -133,21 +145,21 @@ class StructureFromMotion(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output SfM data file', + label='Output SfMData File', description='Path to the output sfmdata file', value='{cache}/{nodeType}/{uid0}/sfm.abc', uid=[], ), desc.File( name='outputViewsAndPoses', - label='Output SfM data file', + label='Output SfMData File', description='''Path to the output sfmdata file with cameras (views and poses).''', value='{cache}/{nodeType}/{uid0}/cameras.sfm', uid=[], ), desc.File( name='extraInfoFolder', - label='Output', + label='Output Folder', description='Folder for intermediate reconstruction files and additional reconstruction information files.', value='{cache}/{nodeType}/{uid0}/', uid=[], From 42284a8e5d34d0b26fb10d34f457fd4ed3e67262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 11:59:23 +0200 Subject: [PATCH 0112/1093] [nodes] Use lower case for imageDescriber type and preset --- meshroom/aliceVision/CameraLocalization.py | 10 +++++----- meshroom/aliceVision/CameraRigCalibration.py | 11 +++++------ meshroom/aliceVision/CameraRigLocalization.py | 11 +++++------ meshroom/aliceVision/FeatureExtraction.py | 12 ++++++------ meshroom/aliceVision/FeatureMatching.py | 7 +++---- meshroom/aliceVision/SfMTransform.py | 6 +++--- meshroom/aliceVision/StructureFromMotion.py | 5 ++--- 7 files changed, 29 insertions(+), 33 deletions(-) diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index eb02d3d8eb..b03b44584c 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -39,8 +39,8 @@ class CameraLocalization(desc.CommandLineNode): name='matchDescTypes', label='Match Desc Types', description='''Describer types to use for the matching.''', - value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', @@ -48,9 +48,9 @@ class CameraLocalization(desc.CommandLineNode): desc.ChoiceParam( name='preset', label='Preset', - description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', - value='NORMAL', - values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], + description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', + value='normal', + values=['low', 'medium', 'normal', 'high', 'ultra'], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index bcdc21ee87..540fcdeaac 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -46,9 +46,8 @@ class CameraRigCalibration(desc.CommandLineNode): name='matchDescTypes', label='Match Describer Types', description='''The describer types to use for the matching''', - value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', - 'AKAZE_OCV'], + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', @@ -56,9 +55,9 @@ class CameraRigCalibration(desc.CommandLineNode): desc.ChoiceParam( name='preset', label='Preset', - description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', - value='NORMAL', - values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], + description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', + value='normal', + values=['low', 'medium', 'normal', 'high', 'ultra'], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 8369c9a891..19c53b0f75 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -46,9 +46,8 @@ class CameraRigLocalization(desc.CommandLineNode): name='matchDescTypes', label='Match Describer Types', description='''The describer types to use for the matching''', - value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', - 'AKAZE_OCV'], + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', @@ -56,9 +55,9 @@ class CameraRigLocalization(desc.CommandLineNode): desc.ChoiceParam( name='preset', label='Preset', - description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', - value='NORMAL', - values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], + description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', + value='normal', + values=['low', 'medium', 'normal', 'high', 'ultra'], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index a5a4a16257..8d8d3aaa5d 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -20,9 +20,9 @@ class FeatureExtraction(desc.CommandLineNode): desc.ChoiceParam( name='describerTypes', label='Describer Types', - description='''Describer types used to describe an image.''', - value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + description='Describer types used to describe an image.', + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', @@ -30,9 +30,9 @@ class FeatureExtraction(desc.CommandLineNode): desc.ChoiceParam( name='describerPreset', label='Describer Preset', - description='''Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration 'ultra' can take long time !''', - value='NORMAL', - values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], + description='Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration "ultra" can take long time !', + value='normal', + values=['low', 'medium', 'normal', 'high', 'ultra'], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 505c0edc44..dc985a3973 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -39,10 +39,9 @@ class FeatureMatching(desc.CommandLineNode): desc.ChoiceParam( name='describerTypes', label='Describer Types', - description='''Describer types used to describe an image.''', - value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', - 'AKAZE_OCV'], + description='Describer types used to describe an image.', + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index dcbade8aa7..9016883b95 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -35,9 +35,9 @@ class SfMTransform(desc.CommandLineNode): desc.ChoiceParam( name='landmarksDescriberTypes', label='Landmarks Describer Types', - description='''Image describer types used to compute the mean of the point cloud. (only for 'landmarks' method)''', - value=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], + description='Image describer types used to compute the mean of the point cloud. (only for "landmarks" method).', + value=['sift', 'akaze'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index f4dcbf3bfa..ad3a85c506 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -45,9 +45,8 @@ class StructureFromMotion(desc.CommandLineNode): name='describerTypes', label='Describer Types', description='Describer types used to describe an image.', - value=['SIFT'], - values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', - 'AKAZE_OCV'], + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', From 694d254365d88b294e688d8ca3f30bbd3de100a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 12:00:00 +0200 Subject: [PATCH 0113/1093] [nodes] `StructureFromMotion` Add options --- meshroom/aliceVision/StructureFromMotion.py | 46 +++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index ad3a85c506..fad5215b31 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -105,8 +105,54 @@ class StructureFromMotion(desc.CommandLineNode): range=(2, 10, 1), uid=[0], ), + desc.FloatParam( + name='minAngleForTriangulation', + label='Min Angle For Triangulation', + description='Minimum angle for triangulation.', + value=3.0, + range=(0.1, 10, 0.1), uid=[0], ), + desc.FloatParam( + name='minAngleForLandmark', + label='Min Angle For Landmark', + description='Minimum angle for landmark.', + value=2.0, + range=(0.1, 10, 0.1), + uid=[0], + ), + desc.FloatParam( + name='maxReprojectionError', + label='Max Reprojection Error', + description='Maximum reprojection error.', + value=4.0, + range=(0.1, 10, 0.1), + uid=[0], + ), + desc.FloatParam( + name='minAngleInitialPair', + label='Min Angle Initial Pair', + description='Minimum angle for the initial pair.', + value=5.0, + range=(0.1, 10, 0.1), + uid=[0], + ), + desc.FloatParam( + name='maxAngleInitialPair', + label='Max Angle Initial Pair', + description='Maximum angle for the initial pair.', + value=40.0, + range=(0.1, 60, 0.1), + uid=[0], + ), + desc.BoolParam( + name='useOnlyMatchesFromInputFolder', + label='Use Only Matches From Input Folder', + description='Use only matches from the input matchesFolder parameter.\n' + 'Matches folders previously added to the SfMData file will be ignored.', + value=False, + uid=[], + ), desc.File( name='initialPairA', label='Initial Pair A', From 578fe1677331a3469a5a9db801620d61e0342caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 12:01:02 +0200 Subject: [PATCH 0114/1093] [nodes] `FeatureExtraction` Remove `upright` option --- meshroom/aliceVision/FeatureExtraction.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 8d8d3aaa5d..b1bc1e0f98 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -36,13 +36,6 @@ class FeatureExtraction(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.BoolParam( - name='upright', - label='Upright', - description='''Upright feature.''', - value=False, - uid=[0], - ), desc.BoolParam( name='forceCpuExtraction', label='Force CPU Extraction', From 4b8c238cbdd3697acf1937f4b2fe4ba805e4c8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 12:02:53 +0200 Subject: [PATCH 0115/1093] [nodes] `CameraInit` decode Json in UTF8 --- meshroom/aliceVision/CameraInit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index ceb9efaada..4fad6506f9 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -134,6 +134,7 @@ def buildIntrinsics(self, node, additionalViews=()): # Reload result of aliceVision_cameraInit cameraInitSfM = node.output.value jsonData = open(cameraInitSfM, 'r').read() + jsonData = jsonData.decode('utf8', errors='ignore') data = json.loads(jsonData) intrinsicsKeys = [i.name for i in Intrinsic] From 3d9c95346f52b1028334b3c7cb73030b9e97320e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 12:04:10 +0200 Subject: [PATCH 0116/1093] [nodes] Formatting and small fixes --- meshroom/aliceVision/CameraInit.py | 16 ++++----- meshroom/aliceVision/CameraLocalization.py | 8 ++--- meshroom/aliceVision/ConvertAnimatedCamera.py | 4 +-- meshroom/aliceVision/ConvertSfMFormat.py | 36 +++++++++---------- meshroom/aliceVision/FeatureExtraction.py | 10 +++--- meshroom/aliceVision/FeatureMatching.py | 7 ++-- meshroom/aliceVision/Publish.py | 4 +-- 7 files changed, 43 insertions(+), 42 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 4fad6506f9..2455d45a43 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -63,6 +63,13 @@ class CameraInit(desc.CommandLineNode): description="Camera Intrinsics", group="", ), + desc.File( + name='sensorDatabase', + label='Sensor Database', + description='''Camera sensor width database path.''', + value=os.environ.get('ALICEVISION_SENSOR_DB', ''), + uid=[], + ), desc.FloatParam( name='defaultFieldOfView', label='Default Field Of View', @@ -71,13 +78,6 @@ class CameraInit(desc.CommandLineNode): range=(0, 180.0, 1), uid=[0], ), - desc.File( - name='sensorDatabase', - label='Sensor Database', - description='''Camera sensor width database path.''', - value=os.environ.get('ALICEVISION_SENSOR_DB', ''), - uid=[], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -92,7 +92,7 @@ class CameraInit(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', + label='Output SfMData File', description='''Output SfMData.''', value='{cache}/{nodeType}/{uid0}/cameraInit.sfm', uid=[], diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index b03b44584c..bb94d63a36 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -212,10 +212,10 @@ class CameraLocalization(desc.CommandLineNode): uid=[], ), desc.File( - name='outputBinary', - label='Output Binary', - description='''Filename for the localization results (raw data) as .bin''', - value='{cache}/{nodeType}/{uid0}/trackedCameras.bin', + name='outputJSON', + label='Output JSON', + description='''Filename for the localization results as .json''', + value='{cache}/{nodeType}/{uid0}/trackedCameras.json', uid=[], ), ] diff --git a/meshroom/aliceVision/ConvertAnimatedCamera.py b/meshroom/aliceVision/ConvertAnimatedCamera.py index 1c9e749ffe..0a15fc105e 100644 --- a/meshroom/aliceVision/ConvertAnimatedCamera.py +++ b/meshroom/aliceVision/ConvertAnimatedCamera.py @@ -13,14 +13,14 @@ class ConvertAnimatedCamera(desc.CommandLineNode): description='''SfMData file.''', value='', uid=[0], - ), + ), ] outputs = [ desc.File( name='output', label='Output', - description='''Path to the output Alembic file.''', + description='Path to the output Alembic file.', value='{cache}/{nodeType}/{uid0}/animatedCamera.abc', uid=[], ), diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 593833e13f..4577f2a5a1 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -10,71 +10,71 @@ class ConvertSfMFormat(desc.CommandLineNode): desc.File( name='input', label='Input', - description='''SfMData file.''', + description='SfMData file.', value='', uid=[0], - ), + ), desc.ChoiceParam( name='fileExt', label='SfM File Format', - description='''SfM File Format''', + description='SfM File Format', value='abc', - values=['abc', 'sfm', 'ply', 'bin', 'json'], + values=['abc', 'sfm', 'json', 'ply', 'baf'], exclusive=True, uid=[0], group='', # exclude from command line - ), + ), desc.BoolParam( name='views', label='Views', - description='''Export views.''', + description='Export views.', value=True, uid=[0], - ), + ), desc.BoolParam( name='intrinsics', label='Intrinsics', - description='''Export intrinsics.''', + description='Export intrinsics.', value=True, uid=[0], - ), + ), desc.BoolParam( name='extrinsics', label='Extrinsics', - description='''Export extrinsics.''', + description='Export extrinsics.', value=True, uid=[0], - ), + ), desc.BoolParam( name='structure', label='Structure', - description='''Export structure.''', + description='Export structure.', value=True, uid=[0], - ), + ), desc.BoolParam( name='observations', label='Observations', - description='''Export observations.''', + description='Export observations.', value=True, uid=[0], - ), + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''verbosity level (fatal, error, warning, info, debug, trace).''', + description='verbosity level (fatal, error, warning, info, debug, trace).', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[0], - ), + ), ] outputs = [ desc.File( name='output', label='Output', - description='''Path to the output SfM Data file.''', + description='Path to the output SfM Data file.', value='{cache}/{nodeType}/{uid0}/sfm.{fileExtValue}', uid=[], ), diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index b1bc1e0f98..5666ed2742 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -13,7 +13,7 @@ class FeatureExtraction(desc.CommandLineNode): desc.File( name='input', label='Input', - description='''SfMData file.''', + description='SfMData file.', value='', uid=[0], ), @@ -39,14 +39,14 @@ class FeatureExtraction(desc.CommandLineNode): desc.BoolParam( name='forceCpuExtraction', label='Force CPU Extraction', - description='''Use only CPU feature extraction.''', + description='Use only CPU feature extraction.', value=True, uid=[], ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''verbosity level (fatal, error, warning, info, debug, trace).''', + description='verbosity level (fatal, error, warning, info, debug, trace).', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, @@ -57,8 +57,8 @@ class FeatureExtraction(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', - description='''Output path for the features and descriptors files (*.feat, *.desc).''', + label='Output Folder', + description='Output path for the features and descriptors files (*.feat, *.desc).', value='{cache}/{nodeType}/{uid0}/', uid=[], ), diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index dc985a3973..e04f11a174 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -64,7 +64,7 @@ class FeatureMatching(desc.CommandLineNode): desc.ChoiceParam( name='geometricEstimator', label='Geometric Estimator', - description='''Geometric estimator: * acransac: A-Contrario Ransac * loransac: LO-Ransac (only available for fundamental matrix)''', + description='Geometric estimator: (acransac: A-Contrario Ransac, loransac: LO-Ransac (only available for "fundamental_matrix" model)', value='acransac', values=['acransac', 'loransac'], exclusive=True, @@ -81,12 +81,13 @@ class FeatureMatching(desc.CommandLineNode): value=['fundamental_matrix'], values=['fundamental_matrix', 'essential_matrix', 'homography_matrix', 'homography_growing'], exclusive=False, - uid=[0] + uid=[0], + joinChar=',', ), desc.FloatParam( name='distanceRatio', label='Distance Ratio', - description='''Distance ratio to discard non meaningful matches.''', + description='Distance ratio to discard non meaningful matches.', value=0.8, range=(0.0, 1.0, 0.01), uid=[0], diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 10127a0cf6..6cd147c52f 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -15,12 +15,12 @@ class Publish(desc.Node): description="", value="", uid=[0], - ), + ), name="inputFiles", label="Input Files", description="Input Files to publish.", group="", - ), + ), desc.File( name="output", label="Output Folder", From 667771a756f53b5beb2f02810517c1eb577f89f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 12:04:54 +0200 Subject: [PATCH 0117/1093] [nodes] Add node `ExportAbimatedCamera` --- meshroom/aliceVision/ExportAnimatedCamera.py | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 meshroom/aliceVision/ExportAnimatedCamera.py diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py new file mode 100644 index 0000000000..dc7497bf63 --- /dev/null +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -0,0 +1,42 @@ +from meshroom.core import desc + + +class ExportAnimatedCamera(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_exportAnimatedCamera {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description='SfMData file containing a complete SfM.', + value='', + uid=[0], + ), + desc.File( + name='filter', + label='SfMData Filter', + description='A SfMData file use as filter.', + 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 filename', + description='Output filename for the alembic animated camera.', + value='{cache}/{nodeType}/{uid0}/camera.abc', + uid=[], + ), + ] From fc2890725ac17c4a8b36dc2c0d554c72f9daaa0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 6 Jun 2018 12:05:35 +0200 Subject: [PATCH 0118/1093] [nodes] Add node `ExportUndistortedImages` --- .../aliceVision/ExportUndistortedImages.py | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meshroom/aliceVision/ExportUndistortedImages.py diff --git a/meshroom/aliceVision/ExportUndistortedImages.py b/meshroom/aliceVision/ExportUndistortedImages.py new file mode 100644 index 0000000000..3c15bff34f --- /dev/null +++ b/meshroom/aliceVision/ExportUndistortedImages.py @@ -0,0 +1,43 @@ +from meshroom.core import desc + +class ExportUndistortedImages(desc.CommandLineNode): + internalFolder = '{cache}/{nodeType}/{uid0}/' + commandLine = 'aliceVision_exportUndistortedImages {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description='SfMData file containing a complete SfM.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='outputFileType', + label='Output File Type', + description='Output file type for the undistorted images.', + value='exr', + values=['jpg', 'png', 'tif', 'exr'], + exclusive=True, + 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 Folder', + description='Output folder for the undistorted images.', + value='{cache}/{nodeType}/{uid0}/', + uid=[], + ), + ] From 32887d10a41e3087a5f2c8e6725a79a621854492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Fri, 22 Jun 2018 18:23:45 +0200 Subject: [PATCH 0119/1093] [nodes] Rename `geometricModel` in `geometricFilterType` --- meshroom/aliceVision/FeatureMatching.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index e04f11a174..7612ec8a10 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -71,18 +71,18 @@ class FeatureMatching(desc.CommandLineNode): uid=[0], ), desc.ChoiceParam( - name='geometricModel', - label='Geometric Model', + name='geometricFilterType', + label='Geometric Filter Type', description='Geometric validation method to filter features matches: \n' ' * fundamental_matrix\n' ' * essential_matrix\n' ' * homography_matrix\n' - ' * homography_growing', - value=['fundamental_matrix'], - values=['fundamental_matrix', 'essential_matrix', 'homography_matrix', 'homography_growing'], - exclusive=False, + ' * homography_growing\n' + ' * no_filtering', + value='fundamental_matrix', + values=['fundamental_matrix', 'essential_matrix', 'homography_matrix', 'homography_growing', 'no_filtering'], + exclusive=True, uid=[0], - joinChar=',', ), desc.FloatParam( name='distanceRatio', From 317c5d9dd0182e4fd4d77038220e7ecb85ce8e94 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 26 Jun 2018 12:47:44 +0200 Subject: [PATCH 0120/1093] [cameraInit] improve error reporting when build intrinsics fails * immediately raise if subprocess returns with an error code (avoid misleading error trying to open non-existing '.sfm' file) * include error code and command line in the exception's message in such case * avoid duplicate log message --- meshroom/aliceVision/CameraInit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index ceb9efaada..f22614b955 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -129,7 +129,9 @@ def buildIntrinsics(self, node, additionalViews=()): stdout, stderr = subprocess.communicate() subprocess.wait() if subprocess.returncode != 0: - logging.warning('CameraInit: Error on buildIntrinsics of node "{}".'.format(node.name)) + raise RuntimeError('CameraInit failed with error code {}. Command was: "{}"'.format( + subprocess.returncode, cmd) + ) # Reload result of aliceVision_cameraInit cameraInitSfM = node.output.value @@ -152,7 +154,6 @@ def buildIntrinsics(self, node, additionalViews=()): return views, intrinsics except Exception: - logging.warning('CameraInit: Error on buildIntrinsics of node "{}".'.format(node.name)) raise finally: node._cmdVars = origCmdVars From fb724a3290df2e6da5271bc52d950d35caa3178e Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 6 Jul 2018 10:43:39 +0200 Subject: [PATCH 0121/1093] [nodes] CameraInit: fix broken py3 compatibility + simplify json IO * read: str.decode not available in py3; use io.open (available in py2/3) to specify encoding + errors handling * write: direclty use json.dump to write viewpoints file --- meshroom/aliceVision/CameraInit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index c593f72b8a..cc8cf7f348 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -135,9 +135,10 @@ def buildIntrinsics(self, node, additionalViews=()): # Reload result of aliceVision_cameraInit cameraInitSfM = node.output.value - jsonData = open(cameraInitSfM, 'r').read() - jsonData = jsonData.decode('utf8', errors='ignore') - data = json.loads(jsonData) + import io # use io.open for Python2/3 compatibility (allow to specify encoding + errors handling) + # skip decoding errors to avoid potential exceptions due to non utf-8 characters in images metadata + with io.open(cameraInitSfM, 'r', encoding='utf-8', errors='ignore') as f: + data = json.load(f) intrinsicsKeys = [i.name for i in Intrinsic] intrinsics = [{k: v for k, v in item.items() if k in intrinsicsKeys} for item in data.get("intrinsics", [])] @@ -186,8 +187,7 @@ def createViewpointsFile(self, node, additionalViews=()): } node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.sfm'.format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: - f.write(json.dumps(sfmData, indent=4)) - # python3: json.dumps(node.viewpoints, f, indent=4) + json.dump(sfmData, f, indent=4) def buildCommandLine(self, chunk): cmd = desc.CommandLineNode.buildCommandLine(self, chunk) From e7b253a648b6170c3af55456bb32cda0354304f9 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 6 Jul 2018 12:08:26 +0200 Subject: [PATCH 0122/1093] [nodes][aliceVision] remove voctree path from uid 0 computation Avoid invalidating ImageMatching nodes when voctree path changes (i.e: Meshroom prebuilt binaries coming with an embedded voctree) --- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/ImageMatchingMultiSfM.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 92b680205c..b72bff0aab 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -33,7 +33,7 @@ class ImageMatching(desc.CommandLineNode): label='Tree', description='Input name for the vocabulary tree file.', value=os.environ.get('ALICEVISION_VOCTREE', ''), - uid=[0], + uid=[], ), desc.File( name='weights', diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 0af06962c0..a06166a4ff 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -41,7 +41,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): label='Tree', description='Input name for the vocabulary tree file.', value=os.environ.get('ALICEVISION_VOCTREE', ''), - uid=[0], + uid=[], ), desc.File( name='weights', From 270db8fcc4e14dc2eca9b9c53d98d4a83056cc55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 10 Jul 2018 11:59:01 +0200 Subject: [PATCH 0123/1093] [nodes] `StructureFromMotion` add `lockScenePreviouslyReconstructed` option --- meshroom/aliceVision/StructureFromMotion.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index fad5215b31..c4b8995f81 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -60,6 +60,13 @@ class StructureFromMotion(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.BoolParam( + name='lockScenePreviouslyReconstructed', + label='Lock Scene Previously Reconstructed', + description='This option is useful for SfM augmentation. Lock previously reconstructed poses and intrinsics.', + value=False, + uid=[0], + ), desc.BoolParam( name='useLocalBA', label='Local Bundle Adjustment', From 5b617b3689e39904e6a101b25e05aece9a1515f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 10 Jul 2018 12:07:44 +0200 Subject: [PATCH 0124/1093] [nodes] `ExportMayaMVG` rename `ExportMaya` --- meshroom/aliceVision/{ExportMayaMVG.py => ExportMaya.py} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename meshroom/aliceVision/{ExportMayaMVG.py => ExportMaya.py} (78%) diff --git a/meshroom/aliceVision/ExportMayaMVG.py b/meshroom/aliceVision/ExportMaya.py similarity index 78% rename from meshroom/aliceVision/ExportMayaMVG.py rename to meshroom/aliceVision/ExportMaya.py index a951a0c45f..a47bf748c5 100644 --- a/meshroom/aliceVision/ExportMayaMVG.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -1,7 +1,7 @@ from meshroom.core import desc -class ExportMayaMVG(desc.CommandLineNode): +class ExportMaya(desc.CommandLineNode): internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_exportMayaMVG {allParams}' @@ -14,12 +14,12 @@ class ExportMayaMVG(desc.CommandLineNode): uid=[0], ), ] - + outputs = [ desc.File( name='output', label='Output Folder', - description='Folder for MayaMVG outputs: undistorted images and thumbnails.', + description='Folder for MeshroomMaya outputs: undistorted images and thumbnails.', value='{cache}/{nodeType}/{uid0}/', uid=[], ), From a7b4930333adb81c0b7e586f970eca4b58b17e49 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 9 Jul 2018 17:32:34 +0200 Subject: [PATCH 0125/1093] [nodes] use 'desc.Node.internalFolder' in outputs values * avoid duplicating the same string everywhere * don't override 'internalFolder' with the same value default value in subclasses --- meshroom/aliceVision/CameraCalibration.py | 3 +-- meshroom/aliceVision/CameraConnection.py | 2 +- meshroom/aliceVision/CameraInit.py | 5 ++--- meshroom/aliceVision/CameraLocalization.py | 5 ++--- meshroom/aliceVision/CameraRigCalibration.py | 3 +-- meshroom/aliceVision/CameraRigLocalization.py | 3 +-- meshroom/aliceVision/ConvertAnimatedCamera.py | 3 +-- meshroom/aliceVision/ConvertSfMFormat.py | 3 +-- meshroom/aliceVision/DepthMap.py | 3 +-- meshroom/aliceVision/DepthMapFilter.py | 3 +-- meshroom/aliceVision/ExportAnimatedCamera.py | 3 +-- meshroom/aliceVision/ExportMaya.py | 3 +-- meshroom/aliceVision/ExportUndistortedImages.py | 3 +-- meshroom/aliceVision/FeatureExtraction.py | 3 +-- meshroom/aliceVision/FeatureMatching.py | 3 +-- meshroom/aliceVision/ImageMatching.py | 3 +-- meshroom/aliceVision/ImageMatchingMultiSfM.py | 5 ++--- meshroom/aliceVision/KeyframeSelection.py | 3 +-- meshroom/aliceVision/MeshDecimate.py | 3 +-- meshroom/aliceVision/MeshDenoising.py | 3 +-- meshroom/aliceVision/MeshFiltering.py | 3 +-- meshroom/aliceVision/MeshResampling.py | 4 ++-- meshroom/aliceVision/Meshing.py | 1 - meshroom/aliceVision/PrepareDenseScene.py | 5 ++--- meshroom/aliceVision/SfMAlignment.py | 3 +-- meshroom/aliceVision/SfMTransform.py | 3 +-- meshroom/aliceVision/StructureFromMotion.py | 7 +++---- meshroom/aliceVision/Texturing.py | 9 ++++----- meshroom/test/appendFiles.py | 2 +- meshroom/test/appendText.py | 2 +- meshroom/test/ls.py | 2 +- 31 files changed, 40 insertions(+), 66 deletions(-) diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 3b5b542954..3aa44361fc 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -3,7 +3,6 @@ class CameraCalibration(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_cameraCalibration {allParams}' inputs = [ @@ -121,7 +120,7 @@ class CameraCalibration(desc.CommandLineNode): name='output', label='Output', description='''Output filename for intrinsic [and extrinsic] parameters.''', - value='{cache}/{nodeType}/{uid0}/cameraCalibration.cal', + value=desc.Node.internalFolder + '/cameraCalibration.cal', uid=[], ), ] diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py index 4fc18fb72e..90b1b7b651 100644 --- a/meshroom/aliceVision/CameraConnection.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -2,7 +2,7 @@ class CameraConnection(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' + internalFolder = desc.Node.internalFolder commandLine = 'aliceVision_cameraConnection {allParams}' size = desc.DynamicNodeSize('ini') diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index cc8cf7f348..42111101e2 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -43,7 +43,6 @@ class CameraInit(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_cameraInit {allParams} --allowSingleView 1' # don't throw an error if there is only one image size = desc.DynamicNodeSize('viewpoints') @@ -94,7 +93,7 @@ class CameraInit(desc.CommandLineNode): name='output', label='Output SfMData File', description='''Output SfMData.''', - value='{cache}/{nodeType}/{uid0}/cameraInit.sfm', + value=desc.Node.internalFolder + 'cameraInit.sfm', uid=[], ), ] @@ -185,7 +184,7 @@ def createViewpointsFile(self, node, additionalViews=()): "featureFolder": "", "matchingFolder": "", } - node.viewpointsFile = '{cache}/{nodeType}/{uid0}/viewpoints.sfm'.format(**node._cmdVars) + node.viewpointsFile = (node.nodeDesc.internalFolder + '/viewpoints.sfm').format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: json.dump(sfmData, f, indent=4) diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index bb94d63a36..05fdb8b408 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -3,7 +3,6 @@ class CameraLocalization(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_cameraLocalization {allParams}' inputs = [ @@ -208,14 +207,14 @@ class CameraLocalization(desc.CommandLineNode): name='outputAlembic', label='Output Alembic', description='''Filename for the SfMData export file (where camera poses will be stored)''', - value='{cache}/{nodeType}/{uid0}/trackedCameras.abc', + value=desc.Node.internalFolder + 'trackedCameras.abc', uid=[], ), desc.File( name='outputJSON', label='Output JSON', description='''Filename for the localization results as .json''', - value='{cache}/{nodeType}/{uid0}/trackedCameras.json', + value=desc.Node.internalFolder + 'trackedCameras.json', uid=[], ), ] diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 540fcdeaac..ffdcb99554 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -3,7 +3,6 @@ class CameraRigCalibration(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_rigCalibration {allParams}' inputs = [ @@ -164,7 +163,7 @@ class CameraRigCalibration(desc.CommandLineNode): name='outfile', label='Output File', description='''The name of the file where to store the calibration data''', - value='{cache}/{nodeType}/{uid0}/cameraRigCalibration.rigCal', + value=desc.Node.internalFolder + 'cameraRigCalibration.rigCal', uid=[], ), ] diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 19c53b0f75..3f46676322 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -3,7 +3,6 @@ class CameraRigLocalization(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_rigLocalization {allParams}' inputs = [ @@ -171,7 +170,7 @@ class CameraRigLocalization(desc.CommandLineNode): name='outputAlembic', label='Output Alembic', description='''Filename for the SfMData export file (where camera poses will be stored).''', - value='{cache}/{nodeType}/{uid0}/trackedcameras.abc', + value=desc.Node.internalFolder + 'trackedcameras.abc', uid=[], ), ] diff --git a/meshroom/aliceVision/ConvertAnimatedCamera.py b/meshroom/aliceVision/ConvertAnimatedCamera.py index 0a15fc105e..db6aaf3799 100644 --- a/meshroom/aliceVision/ConvertAnimatedCamera.py +++ b/meshroom/aliceVision/ConvertAnimatedCamera.py @@ -3,7 +3,6 @@ class ConvertAnimatedCamera(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_convertAnimatedCamera {allParams}' inputs = [ @@ -21,7 +20,7 @@ class ConvertAnimatedCamera(desc.CommandLineNode): name='output', label='Output', description='Path to the output Alembic file.', - value='{cache}/{nodeType}/{uid0}/animatedCamera.abc', + value=desc.Node.internalFolder + 'animatedCamera.abc', uid=[], ), ] diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 4577f2a5a1..b1df84a754 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -3,7 +3,6 @@ class ConvertSfMFormat(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_convertSfMFormat {allParams}' inputs = [ @@ -75,7 +74,7 @@ class ConvertSfMFormat(desc.CommandLineNode): name='output', label='Output', description='Path to the output SfM Data file.', - value='{cache}/{nodeType}/{uid0}/sfm.{fileExtValue}', + value=desc.Node.internalFolder + 'sfm.{fileExtValue}', uid=[], ), ] diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index e67aa4aaa6..36f10e2ce6 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -1,7 +1,6 @@ from meshroom.core import desc class DepthMap(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE size = desc.DynamicNodeSize('ini') @@ -144,7 +143,7 @@ class DepthMap(desc.CommandLineNode): name='output', label='Output', description='Output folder for generated depth maps.', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 3d0a92e362..6ed248f544 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -1,7 +1,6 @@ from meshroom.core import desc class DepthMapFilter(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL size = desc.DynamicNodeSize('ini') @@ -79,7 +78,7 @@ class DepthMapFilter(desc.CommandLineNode): name='output', label='Output', description='Output folder for generated depth maps.', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index dc7497bf63..68ffa29890 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -2,7 +2,6 @@ class ExportAnimatedCamera(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_exportAnimatedCamera {allParams}' inputs = [ @@ -36,7 +35,7 @@ class ExportAnimatedCamera(desc.CommandLineNode): name='output', label='Output filename', description='Output filename for the alembic animated camera.', - value='{cache}/{nodeType}/{uid0}/camera.abc', + value=desc.Node.internalFolder + 'camera.abc', uid=[], ), ] diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index a47bf748c5..c7cb0d76e8 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -2,7 +2,6 @@ class ExportMaya(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_exportMayaMVG {allParams}' inputs = [ @@ -20,7 +19,7 @@ class ExportMaya(desc.CommandLineNode): name='output', label='Output Folder', description='Folder for MeshroomMaya outputs: undistorted images and thumbnails.', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/ExportUndistortedImages.py b/meshroom/aliceVision/ExportUndistortedImages.py index 3c15bff34f..e3b146efc5 100644 --- a/meshroom/aliceVision/ExportUndistortedImages.py +++ b/meshroom/aliceVision/ExportUndistortedImages.py @@ -1,7 +1,6 @@ from meshroom.core import desc class ExportUndistortedImages(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_exportUndistortedImages {allParams}' inputs = [ @@ -37,7 +36,7 @@ class ExportUndistortedImages(desc.CommandLineNode): name='output', label='Output Folder', description='Output folder for the undistorted images.', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 5666ed2742..b545b04dac 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -3,7 +3,6 @@ class FeatureExtraction(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureExtraction {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=40) @@ -59,7 +58,7 @@ class FeatureExtraction(desc.CommandLineNode): name='output', label='Output Folder', description='Output path for the features and descriptors files (*.feat, *.desc).', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 7612ec8a10..a381becf94 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -3,7 +3,6 @@ class FeatureMatching(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_featureMatching {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=20) @@ -144,7 +143,7 @@ class FeatureMatching(desc.CommandLineNode): name='output', label='Output Folder', description='Path to a folder in which computed matches will be stored.', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index b72bff0aab..34b6764f6d 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -4,7 +4,6 @@ class ImageMatching(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_imageMatching {allParams}' size = desc.DynamicNodeSize('input') @@ -82,7 +81,7 @@ class ImageMatching(desc.CommandLineNode): name='output', label='Output List File', description='Filepath to the output file with the list of selected image pairs.', - value='{cache}/{nodeType}/{uid0}/imageMatches.txt', + value=desc.Node.internalFolder + 'imageMatches.txt', uid=[], ), ] diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index a06166a4ff..abe55957ab 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -4,7 +4,6 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_imageMatching {allParams}' # use both SfM inputs to define Node's size size = desc.MultiDynamicNodeSize(['input', 'inputB']) @@ -99,14 +98,14 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): name='output', label='Output List File', description='Filepath to the output file with the list of selected image pairs.', - value='{cache}/{nodeType}/{uid0}/imageMatches.txt', + value=desc.Node.internalFolder + 'imageMatches.txt', uid=[], ), desc.File( name='outputCombinedSfM', label='Output Combined SfM', description='Path for the combined SfMData file', - value='{cache}/{nodeType}/{uid0}/combineSfM.sfm', + value=desc.Node.internalFolder + 'combineSfM.sfm', uid=[], ), ] diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 0e08cacb3f..f06f971cde 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -3,7 +3,6 @@ class KeyframeSelection(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_utils_keyframeSelection {allParams}' inputs = [ @@ -106,7 +105,7 @@ class KeyframeSelection(desc.CommandLineNode): name='outputFolder', label='Output Folder', description='''Output keyframes folder for extracted frames.''', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index d9f7a9bfe9..9dc2e2cd05 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -1,7 +1,6 @@ from meshroom.core import desc class MeshDecimate(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_meshDecimate {allParams}' cpu = desc.Level.NORMAL @@ -72,7 +71,7 @@ class MeshDecimate(desc.CommandLineNode): name="output", label="Output mesh", description="Output mesh (OBJ file format).", - value='{cache}/{nodeType}/{uid0}/mesh.obj', + value=desc.Node.internalFolder + 'mesh.obj', uid=[], ), ] diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 63711215f5..1b77486dc4 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -3,7 +3,6 @@ class MeshDenoising(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_meshDenoising {allParams}' inputs = [ @@ -91,7 +90,7 @@ class MeshDenoising(desc.CommandLineNode): name='output', label='Output', description='''Output mesh (OBJ file format).''', - value='{cache}/{nodeType}/{uid0}/mesh.obj', + value=desc.Node.internalFolder + 'mesh.obj', uid=[], ), ] diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 15f0cae73f..c84affa5b4 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -3,7 +3,6 @@ class MeshFiltering(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_meshFiltering {allParams}' inputs = [ @@ -61,7 +60,7 @@ class MeshFiltering(desc.CommandLineNode): name='output', label='Output', description='''Output mesh (OBJ file format).''', - value='{cache}/{nodeType}/{uid0}/mesh.obj', + value=desc.Node.internalFolder + 'mesh.obj', uid=[], ), ] diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 8927bdad90..09fb656bbe 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -1,7 +1,7 @@ from meshroom.core import desc + class MeshResampling(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_meshResampling {allParams}' cpu = desc.Level.NORMAL @@ -78,7 +78,7 @@ class MeshResampling(desc.CommandLineNode): name="output", label="Output mesh", description="Output mesh (OBJ file format).", - value='{cache}/{nodeType}/{uid0}/mesh.obj', + value=desc.Node.internalFolder + 'mesh.obj', uid=[], ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 650a1977f5..85b6c06ec6 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -2,7 +2,6 @@ class Meshing(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_meshing {allParams}' cpu = desc.Level.INTENSIVE diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 1cdfe8e2d9..1f9831e1e5 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -3,7 +3,6 @@ class PrepareDenseScene(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_prepareDenseScene {allParams}' size = desc.DynamicNodeSize('input') @@ -31,7 +30,7 @@ class PrepareDenseScene(desc.CommandLineNode): name='ini', label='MVS Configuration file', description='', - value='{cache}/{nodeType}/{uid0}/mvs.ini', + value=desc.Node.internalFolder + 'mvs.ini', uid=[], group='', # not a command line arg ), @@ -40,7 +39,7 @@ class PrepareDenseScene(desc.CommandLineNode): name='output', label='Output', description='''Output folder.''', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ) ] diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index bbf583002a..d30347c4bd 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -4,7 +4,6 @@ class SfMAlignment(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_utils_sfmAlignment {allParams}' size = desc.DynamicNodeSize('input') @@ -39,7 +38,7 @@ class SfMAlignment(desc.CommandLineNode): name='output', label='Output', description='''Aligned SfMData file .''', - value='{cache}/{nodeType}/{uid0}/alignedSfM.abc', + value=desc.Node.internalFolder + 'alignedSfM.abc', uid=[], ), ] diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 9016883b95..05824934f2 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -4,7 +4,6 @@ class SfMTransform(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_utils_sfmTransform {allParams}' size = desc.DynamicNodeSize('input') @@ -66,7 +65,7 @@ class SfMTransform(desc.CommandLineNode): name='output', label='Output', description='''Aligned SfMData file .''', - value='{cache}/{nodeType}/{uid0}/transformedSfM.abc', + value=desc.Node.internalFolder + 'transformedSfM.abc', uid=[], ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index c4b8995f81..a9f5184360 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -5,7 +5,6 @@ class StructureFromMotion(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_incrementalSfM {allParams}' size = desc.DynamicNodeSize('input') @@ -199,21 +198,21 @@ class StructureFromMotion(desc.CommandLineNode): name='output', label='Output SfMData File', description='Path to the output sfmdata file', - value='{cache}/{nodeType}/{uid0}/sfm.abc', + value=desc.Node.internalFolder + 'sfm.abc', uid=[], ), desc.File( name='outputViewsAndPoses', label='Output SfMData File', description='''Path to the output sfmdata file with cameras (views and poses).''', - value='{cache}/{nodeType}/{uid0}/cameras.sfm', + value=desc.Node.internalFolder + 'cameras.sfm', uid=[], ), desc.File( name='extraInfoFolder', label='Output Folder', description='Folder for intermediate reconstruction files and additional reconstruction information files.', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 00ba34c68b..54a1f2f2e3 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -2,7 +2,6 @@ class Texturing(desc.CommandLineNode): - internalFolder = '{cache}/{nodeType}/{uid0}/' commandLine = 'aliceVision_texturing {allParams}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE @@ -106,14 +105,14 @@ class Texturing(desc.CommandLineNode): name='output', label='Output Folder', description='Folder for output mesh: OBJ, material and texture files.', - value='{cache}/{nodeType}/{uid0}/', + value=desc.Node.internalFolder, uid=[], ), desc.File( name='outputMesh', label='Output Mesh', description='Folder for output mesh: OBJ, material and texture files.', - value='{cache}/{nodeType}/{uid0}/texturedMesh.obj', + value=desc.Node.internalFolder + 'texturedMesh.obj', uid=[], group='', ), @@ -121,7 +120,7 @@ class Texturing(desc.CommandLineNode): name='outputMaterial', label='Output Material', description='Folder for output mesh: OBJ, material and texture files.', - value='{cache}/{nodeType}/{uid0}/texturedMesh.mtl', + value=desc.Node.internalFolder + 'texturedMesh.mtl', uid=[], group='', ), @@ -129,7 +128,7 @@ class Texturing(desc.CommandLineNode): name='outputTextures', label='Output Textures', description='Folder for output mesh: OBJ, material and texture files.', - value='{cache}/{nodeType}/{uid0}/texture_*.png', + value=desc.Node.internalFolder + 'texture_*.png', uid=[], group='', ), diff --git a/meshroom/test/appendFiles.py b/meshroom/test/appendFiles.py index a60eed18f0..be40e61c82 100644 --- a/meshroom/test/appendFiles.py +++ b/meshroom/test/appendFiles.py @@ -40,7 +40,7 @@ class AppendFiles(desc.CommandLineNode): name='output', label='Output', description='''''', - value='{cache}/{nodeType}/{uid0}/appendText.txt', + value=desc.Node.internalFolder + 'appendText.txt', uid=[], ) ] diff --git a/meshroom/test/appendText.py b/meshroom/test/appendText.py index 0b88938a30..b6e55af398 100644 --- a/meshroom/test/appendText.py +++ b/meshroom/test/appendText.py @@ -26,7 +26,7 @@ class AppendText(desc.CommandLineNode): name='output', label='Output', description='''''', - value='{cache}/{nodeType}/{uid0}/appendText.txt', + value=desc.Node.internalFolder + 'appendText.txt', uid=[], ), ] diff --git a/meshroom/test/ls.py b/meshroom/test/ls.py index c22df5662c..ecb0c99efb 100644 --- a/meshroom/test/ls.py +++ b/meshroom/test/ls.py @@ -18,7 +18,7 @@ class Ls(desc.CommandLineNode): name='output', label='Output', description='''''', - value='{cache}/{nodeType}/{uid0}/ls.txt', + value=desc.Node.internalFolder + 'ls.txt', uid=[], ) ] From 931646bb9da24d81fb61946ee592e5cd875da43f Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 6 Jul 2018 18:59:28 +0200 Subject: [PATCH 0126/1093] [nodes][aliceVision] add initial version on nodes --- meshroom/aliceVision/CameraCalibration.py | 3 ++- meshroom/aliceVision/CameraConnection.py | 2 ++ meshroom/aliceVision/CameraInit.py | 3 ++- meshroom/aliceVision/CameraLocalization.py | 4 +++- meshroom/aliceVision/CameraRigCalibration.py | 4 +++- meshroom/aliceVision/CameraRigLocalization.py | 4 +++- meshroom/aliceVision/ConvertAnimatedCamera.py | 3 ++- meshroom/aliceVision/ConvertSfMFormat.py | 3 ++- meshroom/aliceVision/DepthMap.py | 3 +++ meshroom/aliceVision/DepthMapFilter.py | 3 +++ meshroom/aliceVision/ExportAnimatedCamera.py | 2 ++ meshroom/aliceVision/ExportMaya.py | 2 ++ meshroom/aliceVision/ExportUndistortedImages.py | 2 ++ meshroom/aliceVision/FeatureExtraction.py | 3 ++- meshroom/aliceVision/FeatureMatching.py | 3 ++- meshroom/aliceVision/ImageMatching.py | 3 ++- meshroom/aliceVision/ImageMatchingMultiSfM.py | 3 ++- meshroom/aliceVision/KeyframeSelection.py | 4 +++- meshroom/aliceVision/MeshDecimate.py | 3 +++ meshroom/aliceVision/MeshDenoising.py | 3 ++- meshroom/aliceVision/MeshFiltering.py | 3 ++- meshroom/aliceVision/MeshResampling.py | 2 ++ meshroom/aliceVision/Meshing.py | 2 ++ meshroom/aliceVision/PrepareDenseScene.py | 3 ++- meshroom/aliceVision/Publish.py | 3 +++ meshroom/aliceVision/SfMAlignment.py | 4 ++-- meshroom/aliceVision/SfMTransform.py | 4 ++-- meshroom/aliceVision/StructureFromMotion.py | 2 ++ meshroom/aliceVision/Texturing.py | 2 ++ 29 files changed, 66 insertions(+), 19 deletions(-) diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 3aa44361fc..3609387c16 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py index 90b1b7b651..e0c2d21796 100644 --- a/meshroom/aliceVision/CameraConnection.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 42111101e2..3c931f4342 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,9 +1,10 @@ +__version__ = "1.0" + import os import json import psutil import shutil import tempfile -import logging from meshroom.core import desc diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 05fdb8b408..0900282747 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -1,4 +1,6 @@ -import sys, os +__version__ = "1.0" + +import os from meshroom.core import desc diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index ffdcb99554..67ea8730f5 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -1,4 +1,6 @@ -import sys, os +__version__ = "1.0" + +import os from meshroom.core import desc diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 3f46676322..527a6ed603 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -1,4 +1,6 @@ -import sys, os +__version__ = "1.0" + +import os from meshroom.core import desc diff --git a/meshroom/aliceVision/ConvertAnimatedCamera.py b/meshroom/aliceVision/ConvertAnimatedCamera.py index db6aaf3799..3d834ed444 100644 --- a/meshroom/aliceVision/ConvertAnimatedCamera.py +++ b/meshroom/aliceVision/ConvertAnimatedCamera.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index b1df84a754..4e762405ac 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 36f10e2ce6..d49e8046b9 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -1,5 +1,8 @@ +__version__ = "1.0" + from meshroom.core import desc + class DepthMap(desc.CommandLineNode): commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 6ed248f544..d960617c09 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -1,5 +1,8 @@ +__version__ = "1.0" + from meshroom.core import desc + class DepthMapFilter(desc.CommandLineNode): commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 68ffa29890..5a1e2b5e77 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index c7cb0d76e8..8d23ef9630 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/ExportUndistortedImages.py b/meshroom/aliceVision/ExportUndistortedImages.py index e3b146efc5..af69c67d3e 100644 --- a/meshroom/aliceVision/ExportUndistortedImages.py +++ b/meshroom/aliceVision/ExportUndistortedImages.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + from meshroom.core import desc class ExportUndistortedImages(desc.CommandLineNode): diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index b545b04dac..1881719d20 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index a381becf94..6fef1648fc 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 34b6764f6d..a774fc3ab8 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + import os from meshroom.core import desc diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index abe55957ab..c4b20a86cc 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + import os from meshroom.core import desc diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index f06f971cde..c41c3c8f5a 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,4 +1,6 @@ -import sys, os +__version__ = "1.0" + +import os from meshroom.core import desc diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 9dc2e2cd05..6c066a1461 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -1,5 +1,8 @@ +__version__ = "1.0" + from meshroom.core import desc + class MeshDecimate(desc.CommandLineNode): commandLine = 'aliceVision_meshDecimate {allParams}' diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 1b77486dc4..438e611ca7 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index c84affa5b4..460f618680 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 09fb656bbe..e6966366a3 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 85b6c06ec6..5f4c3cb0ad 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 1f9831e1e5..529e7b867a 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -1,4 +1,5 @@ -import sys +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 6cd147c52f..3d7c8b71a2 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -1,4 +1,7 @@ from __future__ import print_function + +__version__ = "1.0" + from meshroom.core import desc import shutil import glob diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index d30347c4bd..ab8614e634 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -1,5 +1,5 @@ -import sys -import os +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 05824934f2..1d44cc4c0c 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -1,5 +1,5 @@ -import sys -import os +__version__ = "1.0" + from meshroom.core import desc diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index a9f5184360..4ceb1b8850 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + import json import os diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 54a1f2f2e3..d28d184f38 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,3 +1,5 @@ +__version__ = "1.0" + from meshroom.core import desc From 0e48efb75e312ec4d21061f878651d3c266dd115 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 6 Jul 2018 18:29:58 +0200 Subject: [PATCH 0127/1093] [tests] move test nodes to tests package avoid releasing test-related nodes --- meshroom/test/__init__.py | 2 -- meshroom/test/appendFiles.py | 47 ------------------------------------ meshroom/test/appendText.py | 32 ------------------------ meshroom/test/ls.py | 24 ------------------ 4 files changed, 105 deletions(-) delete mode 100644 meshroom/test/__init__.py delete mode 100644 meshroom/test/appendFiles.py delete mode 100644 meshroom/test/appendText.py delete mode 100644 meshroom/test/ls.py diff --git a/meshroom/test/__init__.py b/meshroom/test/__init__.py deleted file mode 100644 index d879df156c..0000000000 --- a/meshroom/test/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -__version__ = 'develop' - diff --git a/meshroom/test/appendFiles.py b/meshroom/test/appendFiles.py deleted file mode 100644 index be40e61c82..0000000000 --- a/meshroom/test/appendFiles.py +++ /dev/null @@ -1,47 +0,0 @@ -from meshroom.core import desc - - -class AppendFiles(desc.CommandLineNode): - commandLine = 'cat {inputValue} {input2Value} {input3Value} {input4Value} > {outputValue}' - - inputs = [ - desc.File( - name='input', - label='Input File', - description='''''', - value='', - uid=[0], - ), - desc.File( - name='input2', - label='Input File 2', - description='''''', - value='', - uid=[0], - ), - desc.File( - name='input3', - label='Input File 3', - description='''''', - value='', - uid=[0], - ), - desc.File( - name='input4', - label='Input File 4', - description='''''', - value='', - uid=[0], - ), - ] - - outputs = [ - desc.File( - name='output', - label='Output', - description='''''', - value=desc.Node.internalFolder + 'appendText.txt', - uid=[], - ) - ] - diff --git a/meshroom/test/appendText.py b/meshroom/test/appendText.py deleted file mode 100644 index b6e55af398..0000000000 --- a/meshroom/test/appendText.py +++ /dev/null @@ -1,32 +0,0 @@ -from meshroom.core import desc - - -class AppendText(desc.CommandLineNode): - commandLine = 'cat {inputValue} > {outputValue} && echo {inputTextValue} >> {outputValue}' - - inputs = [ - desc.File( - name='input', - label='Input File', - description='''''', - value='', - uid=[0], - ), - desc.File( - name='inputText', - label='Input Text', - description='''''', - value='', - uid=[0], - ) - ] - - outputs = [ - desc.File( - name='output', - label='Output', - description='''''', - value=desc.Node.internalFolder + 'appendText.txt', - uid=[], - ), - ] diff --git a/meshroom/test/ls.py b/meshroom/test/ls.py deleted file mode 100644 index ecb0c99efb..0000000000 --- a/meshroom/test/ls.py +++ /dev/null @@ -1,24 +0,0 @@ -from meshroom.core import desc - - -class Ls(desc.CommandLineNode): - commandLine = 'ls {inputValue} > {outputValue}' - inputs = [ - desc.File( - name='input', - label='Input', - description='''''', - value='', - uid=[0], - ) - ] - - outputs = [ - desc.File( - name='output', - label='Output', - description='''''', - value=desc.Node.internalFolder + 'ls.txt', - uid=[], - ) - ] From 4e09899bc6d0e3053b3dcd94551e005faff2cee7 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Sun, 15 Jul 2018 12:35:33 +0200 Subject: [PATCH 0128/1093] [core] split uids computation + cache override in updateInternals * add _computeUids internal method + store computed uids in a dedicated dict * cache override: * add optional cacheDir parameter on updateInternal method to override graph cache directory * _buildCmdVars always update member variable '_cmdVars' * CameraInit: ensure node does not belong to a graph and use updateInternals with temp cache directory --- meshroom/aliceVision/CameraInit.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 3c931f4342..0bcedaab9e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -110,15 +110,11 @@ def buildIntrinsics(self, node, additionalViews=()): The updated views and intrinsics as two separate lists """ assert isinstance(node.nodeDesc, CameraInit) - origCmdVars = node._cmdVars.copy() - # Python3: with tempfile.TemporaryDirectory(prefix="Meshroom_CameraInit") as tmpCache + assert node.graph is None + tmpCache = tempfile.mkdtemp() - localCmdVars = { - 'cache': tmpCache, - 'nodeType': node.nodeType, - } - node._buildCmdVars(localCmdVars) - node._cmdVars = localCmdVars + node.updateInternals(tmpCache) + try: os.makedirs(os.path.join(tmpCache, node.internalFolder)) self.createViewpointsFile(node, additionalViews) @@ -158,8 +154,6 @@ def buildIntrinsics(self, node, additionalViews=()): except Exception: raise finally: - node._cmdVars = origCmdVars - node._buildCmdVars(localCmdVars) shutil.rmtree(tmpCache) def createViewpointsFile(self, node, additionalViews=()): From 9d41782929a8574ef00dff38e5eeb26be1097734 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Sun, 15 Jul 2018 11:19:36 +0200 Subject: [PATCH 0129/1093] [nodes] CameraInit: fix uid list on 'path' sub-attribute only impacts uid 0 --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 0bcedaab9e..9d77de3dd1 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -12,7 +12,7 @@ Viewpoint = [ desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=(0, 200, 1)), desc.IntParam(name="poseId", label="Pose Id", description="Pose Id", value=-1, uid=[0], range=(0, 200, 1)), - desc.File(name="path", label="Image Path", description="Image Filepath", value="", uid=[0, 1]), + desc.File(name="path", label="Image Path", description="Image Filepath", value="", uid=[0]), desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=(0, 200, 1)), desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=(0, 200, 1)), desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=(0, 200, 1)), From 0f4e5fb2ebcb29915e41ab746c2a169dc61759e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Fri, 20 Jul 2018 12:29:22 +0200 Subject: [PATCH 0130/1093] [nodes] Update node `ImageMatchingMultiSfM` --- meshroom/aliceVision/ImageMatchingMultiSfM.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index a06166a4ff..6b95ee92dd 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -51,11 +51,11 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): uid=[0], ), desc.ChoiceParam( - name='modeMultiSfM', + name='matchingMode', label='Multiple SfM mode', - description='Image matching multiple SfM mode.\n"a_ab" for images in input SfMData A plus between A and B.\n"a_b" for images between input SfMData A and B.', - value='a_ab', - values=['a_ab', 'a_b'], + description='Image matching multiple SfM mode.\n"a+ab" for image matching of images in SfMData A plus image matching between images of A and B.\n"aab" for image matching of images in SfMData A and between images of A and B.\n"ab" for image matching images of SfMData A and B.', + value='a+ab', + values=['a+ab','aab', 'ab'], exclusive=True, uid=[0], ), From 401aa81e13be65c241f7997db2661ff1405507c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 23 Jul 2018 15:10:20 +0200 Subject: [PATCH 0131/1093] [nodes] `ImageMatchingMultiSfM` Update `matchingMode` options --- meshroom/aliceVision/ImageMatchingMultiSfM.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 6b95ee92dd..912088e92d 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -52,10 +52,10 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): ), desc.ChoiceParam( name='matchingMode', - label='Multiple SfM mode', - description='Image matching multiple SfM mode.\n"a+ab" for image matching of images in SfMData A plus image matching between images of A and B.\n"aab" for image matching of images in SfMData A and between images of A and B.\n"ab" for image matching images of SfMData A and B.', - value='a+ab', - values=['a+ab','aab', 'ab'], + label='Matching Mode', + description='The mode to combine image matching between the input SfMData A and B:\n"a/a+a/b" for A with A + A with B.\n"a/ab" for A with A and B.\n"a/b" for A with B.', + value='a/a+a/b', + values=['a/a+a/b','a/ab', 'a/b'], exclusive=True, uid=[0], ), From 429160725fc22543b88fce36514d1642db3a3125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 26 Jul 2018 17:18:30 +0200 Subject: [PATCH 0132/1093] [nodes] `CameraInit` fix: convert empty string distortionParams --- meshroom/aliceVision/CameraInit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 9d77de3dd1..78313b4721 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -143,6 +143,9 @@ def buildIntrinsics(self, node, additionalViews=()): intrinsic['principalPoint'] = {} intrinsic['principalPoint']['x'] = pp[0] intrinsic['principalPoint']['y'] = pp[1] + # convert empty string distortionParams (i.e: Pinhole model) to empty list + if intrinsic['distortionParams'] == '': + intrinsic['distortionParams'] = list() # print('intrinsics:', intrinsics) viewsKeys = [v.name for v in Viewpoint] views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] From bad920bc11a458ee795b5d02726bc47551ea808e Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Wed, 1 Aug 2018 15:26:56 +0200 Subject: [PATCH 0133/1093] [nodes] fix Publish node: ListAttribute is not iterable use ListAttribute's value to iterate over list elements --- meshroom/aliceVision/Publish.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 3d7c8b71a2..966566e69c 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -1,6 +1,6 @@ from __future__ import print_function -__version__ = "1.0" +__version__ = "1.1" from meshroom.core import desc import shutil @@ -48,10 +48,11 @@ def processChunk(self, chunk): if not chunk.node.output.value: return - outFiles = self.resolvedPaths(chunk.node.inputFiles, chunk.node.output.value) + outFiles = self.resolvedPaths(chunk.node.inputFiles.value, chunk.node.output.value) if not outFiles: - raise RuntimeError("Publish: input files listed, but nothing to publish. Listed input files: {}".format(chunk.node.inputFiles)) + raise RuntimeError("Publish: input files listed, but nothing to publish. " + "Listed input files: {}".format(chunk.node.inputFiles.value)) if not os.path.exists(chunk.node.output.value): os.mkdir(chunk.node.output.value) From 34a2a6c68744872bdef1c35855ce660c3a9a2f55 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 29 Jul 2018 20:04:41 +0200 Subject: [PATCH 0134/1093] [nodes] texturing: new parameters --- meshroom/aliceVision/Texturing.py | 42 ++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index d28d184f38..896b2df787 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc @@ -83,6 +83,37 @@ class Texturing(desc.CommandLineNode): range=(0, 100, 1), uid=[0], ), + desc.IntParam( + name='maxNbImagesForFusion', + label='Max Nb of Images For Fusion', + description='''Max number of images to combine to create the final texture''', + value=3, + range=(0, 10, 1), + uid=[0], + ), + desc.FloatParam( + name='bestScoreThreshold', + label='Best Score Threshold', + description='''(0.0 to disable filtering based on threshold to relative best score)''', + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='angleHardThreshold', + label='Angle Hard Threshold', + description='''(0.0 to disable angle hard threshold filtering)''', + value=90.0, + range=(0.0, 180.0, 0.01), + uid=[0], + ), + desc.BoolParam( + name='forceVisibleByAllVertices', + label='Force Visible By All Vertices', + description='''Triangle visibility is based on the union of vertices visiblity.''', + value=False, + uid=[0], + ), desc.BoolParam( name='flipNormals', label='Flip Normals', @@ -90,6 +121,15 @@ class Texturing(desc.CommandLineNode): value=False, uid=[0], ), + desc.ChoiceParam( + name='visibilityRemappingMethod', + label='Visibility Remapping Method', + description='''Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush).''', + value='PullPush', + values=['Pull', 'Push', 'PullPush'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 5b77713d51b16f4ddd40381ea047a80b60cf26d6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Jul 2018 17:28:00 +0200 Subject: [PATCH 0135/1093] [nodes] CameraInit bug fix: export view's metadata field If we don't export it, we loose metadata when we add new images to a previous scene. --- meshroom/aliceVision/CameraInit.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 78313b4721..3df7fc8428 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -170,10 +170,14 @@ def createViewpointsFile(self, node, additionalViews=()): intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] views = node.viewpoints.getPrimitiveValue(exportDefault=False) + # convert metadata string into a map for view in views: # filter out unnecessary attributes if 'metadata' in view: - del view['metadata'] + try: + view['metadata'] = eval(view['metadata']) + except: + del view['metadata'] sfmData = { "version": [1, 0, 0], From bc663946fca4919936c874743a7356cc85ae589d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Jul 2018 18:08:36 +0200 Subject: [PATCH 0136/1093] [nodes] CameraInit: use json to load the metadata string --- meshroom/aliceVision/CameraInit.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 3df7fc8428..1b87ef72c7 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -170,14 +170,10 @@ def createViewpointsFile(self, node, additionalViews=()): intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] views = node.viewpoints.getPrimitiveValue(exportDefault=False) - # convert metadata string into a map + # convert the metadata string into a map for view in views: - # filter out unnecessary attributes if 'metadata' in view: - try: - view['metadata'] = eval(view['metadata']) - except: - del view['metadata'] + view['metadata'] = json.loads(view['metadata']) sfmData = { "version": [1, 0, 0], From db30f11059abe415880a0a8e6106e3f3f4867ebb Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 6 Aug 2018 10:16:28 +0200 Subject: [PATCH 0137/1093] [nodes] ExportAnimatedCamera: add new parameters --- meshroom/aliceVision/ExportAnimatedCamera.py | 32 +++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 5a1e2b5e77..b8d97557aa 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc @@ -15,12 +15,28 @@ class ExportAnimatedCamera(desc.CommandLineNode): uid=[0], ), desc.File( - name='filter', + name='viewFilter', label='SfMData Filter', description='A SfMData file use as filter.', value='', uid=[0], ), + desc.BoolParam( + name='exportUndistortedImages', + label='Export Undistorted Images', + description='Export Undistorted Images.', + value=True, + uid=[0], + ), + desc.ChoiceParam( + name='undistortedImageType', + label='Undistort Image Format', + description='Image file format to use for undistorted images ("jpg", "png", "tif", "exr (half)").', + value='jpg', + values=['jpg', 'png', 'tif', 'exr'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -29,15 +45,23 @@ class ExportAnimatedCamera(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ) + ), ] outputs = [ desc.File( name='output', - label='Output filename', + label='Output filepath', + description='Output filepath for the alembic animated camera.', + value=desc.Node.internalFolder, + uid=[], + ), + desc.File( + name='outputCamera', + label='Output Camera Filepath', description='Output filename for the alembic animated camera.', value=desc.Node.internalFolder + 'camera.abc', + group='', # exclude from command line uid=[], ), ] From 87f3c616d3ec6f6a60f46165634a1387055c7a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 7 Aug 2018 17:35:50 +0200 Subject: [PATCH 0138/1093] [nodes] `ExportMaya` use `aliceVision_exportMeshroomMaya` --- meshroom/aliceVision/ExportMaya.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 8d23ef9630..41568f5df1 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -4,7 +4,7 @@ class ExportMaya(desc.CommandLineNode): - commandLine = 'aliceVision_exportMayaMVG {allParams}' + commandLine = 'aliceVision_exportMeshroomMaya {allParams}' inputs = [ desc.File( From 452ad6315dc55e57e5d2cf441be701c63a9ff2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 8 Aug 2018 18:33:05 +0200 Subject: [PATCH 0139/1093] [multiview] Use SfMData as input in MVS pipeline --- meshroom/aliceVision/CameraConnection.py | 27 ++++++++++++++++++----- meshroom/aliceVision/DepthMap.py | 22 ++++++++++++++---- meshroom/aliceVision/DepthMapFilter.py | 21 ++++++++++++------ meshroom/aliceVision/Meshing.py | 15 +++++++++---- meshroom/aliceVision/PrepareDenseScene.py | 11 ++------- meshroom/aliceVision/Texturing.py | 13 ++++++++--- 6 files changed, 77 insertions(+), 32 deletions(-) diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py index e0c2d21796..1f103c376b 100644 --- a/meshroom/aliceVision/CameraConnection.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -6,20 +6,27 @@ class CameraConnection(desc.CommandLineNode): internalFolder = desc.Node.internalFolder commandLine = 'aliceVision_cameraConnection {allParams}' - size = desc.DynamicNodeSize('ini') + size = desc.DynamicNodeSize('input') inputs = [ desc.File( - name="ini", - label='MVS Configuration file', - description='', + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name='imagesFolder', + label='Images Folder', + description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', value='', uid=[0], ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description='''verbosity level (fatal, error, warning, info, debug, trace).''', + description='verbosity level (fatal, error, warning, info, debug, trace).', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, @@ -27,3 +34,13 @@ class CameraConnection(desc.CommandLineNode): ), ] + outputs = [ + desc.File( + name='output', + label='Output', + description='Output folder for the camera pairs matrix file.', + value=desc.Node.internalFolder, + uid=[], + ) +] + diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index d49e8046b9..039670be5c 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -6,15 +6,29 @@ class DepthMap(desc.CommandLineNode): commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE - size = desc.DynamicNodeSize('ini') + size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=3) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ desc.File( - name="ini", - label='MVS Configuration File', - description='', + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name='cameraPairsMatrixFolder', + label='Camera Pairs Matrix Folder', + description='Camera pairs matrix folder.', + value='', + uid=[0], + ), + desc.File( + name='imagesFolder', + label='Images Folder', + description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', value='', uid=[0], ), diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index d960617c09..f112696f69 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -6,25 +6,32 @@ class DepthMapFilter(desc.CommandLineNode): commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL - size = desc.DynamicNodeSize('ini') + size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=10) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ desc.File( - name="ini", - label="MVS Configuration file", - description="", - value="", + name='input', + label='Input', + description='SfMData file.', + value='', uid=[0], - ), + ), + desc.File( + name='cameraPairsMatrixFolder', + label='Camera Pairs Matrix Folder', + description='Camera pairs matrix folder.', + value='', + uid=[0], + ), desc.File( name="depthMapFolder", label="Depth Map Folder", description="Input depth map folder", value="", uid=[0], - ), + ), desc.IntParam( name="nNearestCams", label="Number of Nearest Cameras", diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 5f4c3cb0ad..412d02e12b 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -11,12 +11,19 @@ class Meshing(desc.CommandLineNode): inputs = [ desc.File( - name="ini", - label='MVS Configuration file', - description='', + name='input', + label='Input', + description='SfMData file.', value='', uid=[0], - ), + ), + desc.File( + name='cameraPairsMatrixFolder', + label='Camera Pairs Matrix Folder', + description='Camera pairs matrix folder.', + value='', + uid=[0], + ), desc.File( name="depthMapFolder", label='Depth Maps Folder', diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 529e7b867a..cf80923a31 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -6,6 +6,8 @@ class PrepareDenseScene(desc.CommandLineNode): commandLine = 'aliceVision_prepareDenseScene {allParams}' size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=40) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' inputs = [ desc.File( @@ -27,15 +29,6 @@ class PrepareDenseScene(desc.CommandLineNode): ] outputs = [ - desc.File( - name='ini', - label='MVS Configuration file', - description='', - value=desc.Node.internalFolder + 'mvs.ini', - uid=[], - group='', # not a command line arg - ), - desc.File( name='output', label='Output', diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 896b2df787..923339cb3d 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -9,9 +9,16 @@ class Texturing(desc.CommandLineNode): ram = desc.Level.INTENSIVE inputs = [ desc.File( - name='ini', - label='MVS Configuration file', - description='', + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name='imagesFolder', + label='Images Folder', + description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', value='', uid=[0], ), From 7bc8ab1d78cb9fd6f5447352d051cc53ce48aef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 1 Oct 2018 15:36:20 +0200 Subject: [PATCH 0140/1093] [nodes] `KeyframeSelection` Add / update options KeyframeSelection node is now 2.0 --- meshroom/aliceVision/KeyframeSelection.py | 161 +++++++++++++++------- 1 file changed, 115 insertions(+), 46 deletions(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index c41c3c8f5a..8d85dff80a 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -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='', - uid=[0], - ), - desc.StringParam( - name='models', - label='Models', - description='''Camera models.''', - 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.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), + ), + desc.BoolParam( + name='useSharpnessSelection', + label='Use Sharpness Selection', + description='Use frame sharpness score for keyframe selection.', + value=True, 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), + 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.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=[], - ), + ), ] From 450222994c5f48d9820698f34a8465b2f87196b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 1 Oct 2018 15:37:21 +0200 Subject: [PATCH 0141/1093] [nodes] `StructureFromMotion` Add `useRigsCalibration` option StructureFromMotion node is now 2.0 --- meshroom/aliceVision/StructureFromMotion.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 4ceb1b8850..283ac7f93c 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" import json import os @@ -161,6 +161,13 @@ class StructureFromMotion(desc.CommandLineNode): value=False, uid=[], ), + desc.BoolParam( + name='useRigsCalibration', + label='Use Rigs Calibration', + description='Enable/Disable rigs calibration.', + value=True, + uid=[0], + ), desc.File( name='initialPairA', label='Initial Pair A', From 6dfee6f7034d4215c089fe168f0ee7121a0765f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 10 Oct 2018 14:41:25 +0200 Subject: [PATCH 0142/1093] [nodes] `CameraConnection` fix `imagesFolder` option description --- meshroom/aliceVision/CameraConnection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py index 1f103c376b..ec3358c346 100644 --- a/meshroom/aliceVision/CameraConnection.py +++ b/meshroom/aliceVision/CameraConnection.py @@ -19,7 +19,7 @@ class CameraConnection(desc.CommandLineNode): desc.File( name='imagesFolder', label='Images Folder', - description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', + description='Use images from a specific folder. Filename should be the image uid.', value='', uid=[0], ), From 94b72fcc564cedf72c205539168e6bec7eb409fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 10 Oct 2018 14:43:08 +0200 Subject: [PATCH 0143/1093] [nodes] `Mashing` add `imagesFolder` option for meshing without depth maps --- meshroom/aliceVision/Meshing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 412d02e12b..554e6e27a9 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -24,6 +24,13 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='imagesFolder', + label='Images Folder', + description='Use images from a specific folder. Filename should be the image uid.', + value='', + uid=[0], + ), desc.File( name="depthMapFolder", label='Depth Maps Folder', From 223adb7f1519671c1a5faab80462356a5419c413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 15 Oct 2018 15:49:40 +0200 Subject: [PATCH 0144/1093] [nodes] Remove node `ExportUndistortedImages` --- .../aliceVision/ExportUndistortedImages.py | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 meshroom/aliceVision/ExportUndistortedImages.py diff --git a/meshroom/aliceVision/ExportUndistortedImages.py b/meshroom/aliceVision/ExportUndistortedImages.py deleted file mode 100644 index af69c67d3e..0000000000 --- a/meshroom/aliceVision/ExportUndistortedImages.py +++ /dev/null @@ -1,44 +0,0 @@ -__version__ = "1.0" - -from meshroom.core import desc - -class ExportUndistortedImages(desc.CommandLineNode): - commandLine = 'aliceVision_exportUndistortedImages {allParams}' - - inputs = [ - desc.File( - name='input', - label='Input SfMData', - description='SfMData file containing a complete SfM.', - value='', - uid=[0], - ), - desc.ChoiceParam( - name='outputFileType', - label='Output File Type', - description='Output file type for the undistorted images.', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], - exclusive=True, - 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 Folder', - description='Output folder for the undistorted images.', - value=desc.Node.internalFolder, - uid=[], - ), - ] From 1b0d1302490757695f7256139c0ae1a1232f0bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 15 Oct 2018 15:50:21 +0200 Subject: [PATCH 0145/1093] [nodes] `PrepareDenseScene` Add options --- meshroom/aliceVision/PrepareDenseScene.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index cf80923a31..f91171866e 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -17,6 +17,29 @@ class PrepareDenseScene(desc.CommandLineNode): value='', uid=[0], ), + desc.ChoiceParam( + name='outputFileType', + label='Output File Type', + description='Output file type for the undistorted images.', + value='exr', + values=['jpg', 'png', 'tif', 'exr'], + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name='saveMetadata', + label='Save Metadata', + description='Save projections and intrinsics informations in images metadata (only for .exr images).', + value=True, + uid=[0], + ), + desc.BoolParam( + name='saveMatricesTxtFiles', + label='Save Matrices Text Files', + description='Save projections and intrinsics informations in text files.', + value=False, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 71d517a289cfb4249496afeeeea4d20edd5f431d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 15 Oct 2018 18:03:00 +0200 Subject: [PATCH 0146/1093] [nodes] Remove `CameraConnection` node --- meshroom/aliceVision/CameraConnection.py | 46 ------------------------ meshroom/aliceVision/DepthMap.py | 7 ---- meshroom/aliceVision/DepthMapFilter.py | 9 +---- meshroom/aliceVision/Meshing.py | 7 ---- 4 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 meshroom/aliceVision/CameraConnection.py diff --git a/meshroom/aliceVision/CameraConnection.py b/meshroom/aliceVision/CameraConnection.py deleted file mode 100644 index ec3358c346..0000000000 --- a/meshroom/aliceVision/CameraConnection.py +++ /dev/null @@ -1,46 +0,0 @@ -__version__ = "1.0" - -from meshroom.core import desc - - -class CameraConnection(desc.CommandLineNode): - internalFolder = desc.Node.internalFolder - commandLine = 'aliceVision_cameraConnection {allParams}' - size = desc.DynamicNodeSize('input') - - inputs = [ - desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', - uid=[0], - ), - desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder. Filename should be the image uid.', - 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', - description='Output folder for the camera pairs matrix file.', - value=desc.Node.internalFolder, - uid=[], - ) -] - diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 039670be5c..b3a578a930 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -17,13 +17,6 @@ class DepthMap(desc.CommandLineNode): description='SfMData file.', value='', uid=[0], - ), - desc.File( - name='cameraPairsMatrixFolder', - label='Camera Pairs Matrix Folder', - description='Camera pairs matrix folder.', - value='', - uid=[0], ), desc.File( name='imagesFolder', diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index f112696f69..e00ce63f0b 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -17,14 +17,7 @@ class DepthMapFilter(desc.CommandLineNode): description='SfMData file.', value='', uid=[0], - ), - desc.File( - name='cameraPairsMatrixFolder', - label='Camera Pairs Matrix Folder', - description='Camera pairs matrix folder.', - value='', - uid=[0], - ), + ), desc.File( name="depthMapFolder", label="Depth Map Folder", diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 554e6e27a9..6014746862 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -17,13 +17,6 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), - desc.File( - name='cameraPairsMatrixFolder', - label='Camera Pairs Matrix Folder', - description='Camera pairs matrix folder.', - value='', - uid=[0], - ), desc.File( name='imagesFolder', label='Images Folder', From df0de88f062da9364595df5833d60006638f9a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 22 Oct 2018 16:39:48 +0200 Subject: [PATCH 0147/1093] [nodes] `ConvertSfMFormat` Add `describerTypes` option --- meshroom/aliceVision/ConvertSfMFormat.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 4e762405ac..ac702acb7d 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -24,6 +24,16 @@ class ConvertSfMFormat(desc.CommandLineNode): uid=[0], group='', # exclude from command line ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types to keep.', + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + exclusive=False, + uid=[0], + joinChar=',', + ), desc.BoolParam( name='views', label='Views', From 838fb4b6d79795453f8e82cc4ad1fa305d60cd46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 30 Oct 2018 11:25:56 +0100 Subject: [PATCH 0148/1093] [nodes] `Meshing` Add option `minObservations` Minimum number of observations for SfM space estimation. --- meshroom/aliceVision/Meshing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 6014746862..badeeb03c8 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -38,6 +38,14 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), + desc.IntParam( + name='minObservations', + label='Min Observations For SfM Space Estimation', + description='Minimum number of observations for SfM space estimation.', + value=3, + range=(0, 100, 1), + uid=[0], + ), desc.IntParam( name='maxInputPoints', label='Max Input Points', From f8f0bdf0542bd0f0079c85a71749f734043bb9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 30 Oct 2018 11:27:16 +0100 Subject: [PATCH 0149/1093] [nodes] `Meshing` Add option `estimateSpaceFromSfM` Estimate the 3d space from the SfM. --- meshroom/aliceVision/Meshing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index badeeb03c8..4b6e6546c1 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -38,6 +38,13 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), + desc.BoolParam( + name='estimateSpaceFromSfM', + label='Estimate Space From SfM', + description='Estimate the 3d space from the SfM', + value=True, + uid=[0], + ), desc.IntParam( name='minObservations', label='Min Observations For SfM Space Estimation', From 6db9932f8f6d3dec830d71c1f9bf06b24e2e04ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 30 Oct 2018 11:42:47 +0100 Subject: [PATCH 0150/1093] [nodes] `PrepareDenseScene` version is now 2.0 --- meshroom/aliceVision/PrepareDenseScene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index f91171866e..e04bebebcd 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc From 8cd5f3117682d2e2d8a4a251d549170cd2e8a083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 30 Oct 2018 11:43:01 +0100 Subject: [PATCH 0151/1093] [nodes] `Meshing` version is now 2.0 --- meshroom/aliceVision/Meshing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 4b6e6546c1..57d786230b 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc From 92d07bef5667472a3a3977e96b5aa738dd0915df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 30 Oct 2018 11:43:21 +0100 Subject: [PATCH 0152/1093] [nodes] `ConvertSfMFormat` version is now 2.0 --- meshroom/aliceVision/ConvertSfMFormat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 4e762405ac..85a670af0c 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc From b426a2eea5772363f63dc0e267f644db8f7b6608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 31 Oct 2018 15:21:36 +0100 Subject: [PATCH 0153/1093] [nodes] `Meshing` Rename option `minObservations` to `estimateSpaceMinObservations` --- meshroom/aliceVision/Meshing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 57d786230b..7ff0e7f0e9 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -46,7 +46,7 @@ class Meshing(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name='minObservations', + name='estimateSpaceMinObservations', label='Min Observations For SfM Space Estimation', description='Minimum number of observations for SfM space estimation.', value=3, From ded1e8504eb5c630a77bc5bafce494f2204ec7e4 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 30 Nov 2018 11:26:31 +0100 Subject: [PATCH 0154/1093] [nodes] FeatureExtraction: don't force CPU extraction by default use GPU features extraction if available by default --- meshroom/aliceVision/FeatureExtraction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 1881719d20..94363dd602 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "1.1" from meshroom.core import desc @@ -40,7 +40,7 @@ class FeatureExtraction(desc.CommandLineNode): name='forceCpuExtraction', label='Force CPU Extraction', description='Use only CPU feature extraction.', - value=True, + value=False, uid=[], ), desc.ChoiceParam( From 3b81a46f01bf103ebfa5f867ec57632bba9ceaac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 6 Dec 2018 16:07:16 +0100 Subject: [PATCH 0155/1093] [nodes] `DepthMap` add `minViewAngle` and `maxViewAngle` options --- meshroom/aliceVision/DepthMap.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index b3a578a930..cf830ec7ed 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -34,6 +34,22 @@ class DepthMap(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.FloatParam( + name='minViewAngle', + label='Min View Angle', + description='Minimum angle between two views.', + value=2.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='maxViewAngle', + label='Max View Angle', + description='Maximum angle between two views.', + value=70.0, + range=(10.0, 120.0, 1), + uid=[0], + ), desc.IntParam( name='sgmMaxTCams', label='SGM: Nb Neighbour Cameras', From 1691efaaa9cd1d5ded099041ad654098b2a044ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 6 Dec 2018 16:08:00 +0100 Subject: [PATCH 0156/1093] [nodes] `DepthMapFilter` add `minViewAngle` and `maxViewAngle` options --- meshroom/aliceVision/DepthMapFilter.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index e00ce63f0b..5dd7b60c02 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -25,6 +25,22 @@ class DepthMapFilter(desc.CommandLineNode): value="", uid=[0], ), + desc.FloatParam( + name='minViewAngle', + label='Min View Angle', + description='Minimum angle between two views.', + value=2.0, + range=(0.0, 10.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='maxViewAngle', + label='Max View Angle', + description='Maximum angle between two views.', + value=70.0, + range=(10.0, 120.0, 1), + uid=[0], + ), desc.IntParam( name="nNearestCams", label="Number of Nearest Cameras", From dccc39f983a89d82b9a1c80135a115364a8b1ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 6 Dec 2018 16:08:45 +0100 Subject: [PATCH 0157/1093] [nodes] `Meshing` add `estimateSpaceMinObservationAngle` option --- meshroom/aliceVision/Meshing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 7ff0e7f0e9..daf5197b3b 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -53,6 +53,14 @@ class Meshing(desc.CommandLineNode): range=(0, 100, 1), uid=[0], ), + desc.FloatParam( + name='estimateSpaceMinObservationAngle', + label='Min Observations Angle For SfM Space Estimation', + description='Minimum angle between two observations for SfM space estimation.', + value=0.2, + range=(0, 10, 0.1), + uid=[0], + ), desc.IntParam( name='maxInputPoints', label='Max Input Points', From b61772a71b36061d8f866ea87aa634cce11e1a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Fri, 7 Dec 2018 11:28:17 +0100 Subject: [PATCH 0158/1093] [node] `CameraInit` add per intrinsic param `locked` --- meshroom/aliceVision/CameraInit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 1b87ef72c7..63c30c328c 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" import os import json @@ -40,6 +40,7 @@ label="Distortion Params", description="Distortion Parameters", ), + desc.BoolParam(name='locked', label='Locked', description='Whether Intrinsic is locked.', value=False, uid=[0]), ] From d21ada039c89b50da3e920e9bf276d24991c3679 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 10 Dec 2018 12:08:45 +0100 Subject: [PATCH 0159/1093] [node] CameraInit: improve "locked" param description --- meshroom/aliceVision/CameraInit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 63c30c328c..48f59db445 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -40,7 +40,9 @@ label="Distortion Params", description="Distortion Parameters", ), - desc.BoolParam(name='locked', label='Locked', description='Whether Intrinsic is locked.', value=False, uid=[0]), + desc.BoolParam(name='locked', label='Locked', + description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', + value=False, uid=[0]), ] From 80c4af5dfbc5e1fa9748235a0f86d82e75f94a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 11:43:59 +0100 Subject: [PATCH 0160/1093] [nodes] `Meshing` Remove unused param `imagesFolder` --- meshroom/aliceVision/Meshing.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index daf5197b3b..d45dbee284 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -17,13 +17,6 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), - desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder. Filename should be the image uid.', - value='', - uid=[0], - ), desc.File( name="depthMapFolder", label='Depth Maps Folder', From bf26a3f346f7310d2eb6528058a397c40e0d8d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 11:44:55 +0100 Subject: [PATCH 0161/1093] [nodes] `StructureFromMotion` Rename param `useRigsCalibration` to `useRigConstraint` --- meshroom/aliceVision/StructureFromMotion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 283ac7f93c..a9c3cd56d1 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -162,9 +162,9 @@ class StructureFromMotion(desc.CommandLineNode): uid=[], ), desc.BoolParam( - name='useRigsCalibration', - label='Use Rigs Calibration', - description='Enable/Disable rigs calibration.', + name='useRigConstraint', + label='Use Rig Constraint', + description='Enable/Disable rig constraint.', value=True, uid=[0], ), From 751f545c621fb30ec5c79002532878b3602ce7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 15:42:46 +0100 Subject: [PATCH 0162/1093] [nodes] `PrepareDenseScene` Add option `imagesFolder` --- meshroom/aliceVision/PrepareDenseScene.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index e04bebebcd..439e8c9b8b 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -17,6 +17,13 @@ class PrepareDenseScene(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='imagesFolder', + label='Images Folder', + description='Use images from a specific folder. Filename should be the same or the image uid.', + value='', + uid=[0], + ), desc.ChoiceParam( name='outputFileType', label='Output File Type', From a2f89f32fb638200b1d40c8bd2f2cfbb89742b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 16:40:04 +0100 Subject: [PATCH 0163/1093] [nodes] `PrepareDenseScene` option `imagesFolder` is now a list `imagesFolders` --- meshroom/aliceVision/PrepareDenseScene.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 439e8c9b8b..c264fc9618 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -17,12 +17,17 @@ class PrepareDenseScene(desc.CommandLineNode): value='', uid=[0], ), - desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder. Filename should be the same or the image uid.', - value='', - uid=[0], + desc.ListAttribute( + elementDesc=desc.File( + name="imagesFolder", + label="Images Folder", + description="", + value="", + uid=[0], + ), + name="imagesFolders", + label="Images Folders", + description='Use images from specific folder(s). Filename should be the same or the image uid.', ), desc.ChoiceParam( name='outputFileType', From 737f612b7a05a2dea69c2862f8c7f58000440c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 17:35:05 +0100 Subject: [PATCH 0164/1093] [nodes] `PrepareDenseScene` Spelling correction --- meshroom/aliceVision/PrepareDenseScene.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index e04bebebcd..7a3bb5a6b1 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -29,14 +29,14 @@ class PrepareDenseScene(desc.CommandLineNode): desc.BoolParam( name='saveMetadata', label='Save Metadata', - description='Save projections and intrinsics informations in images metadata (only for .exr images).', + description='Save projections and intrinsics information in images metadata (only for .exr images).', value=True, uid=[0], ), desc.BoolParam( name='saveMatricesTxtFiles', label='Save Matrices Text Files', - description='Save projections and intrinsics informations in text files.', + description='Save projections and intrinsics information in text files.', value=False, uid=[0], ), From 802d827494c60a4b858b42a4f627486c786f44ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 17:36:43 +0100 Subject: [PATCH 0165/1093] [nodes] `MeshFiltering` option `keepLargestMeshOnly` to `False` --- meshroom/aliceVision/MeshFiltering.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 460f618680..3734b45b80 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -26,13 +26,13 @@ class MeshFiltering(desc.CommandLineNode): name='keepLargestMeshOnly', label='Keep Only the Largest Mesh', description='Keep only the largest connected triangles group.', - value=True, + value=False, uid=[0], ), desc.IntParam( name='iterations', - label='Nb Iterations', - description='', + label='Smoothing Iterations', + description='Number of smoothing iterations', value=5, range=(0, 50, 1), uid=[0], From ab1d2edfd8be6e4aa61f5c18fb1352c0cce99ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 17:37:28 +0100 Subject: [PATCH 0166/1093] [nodes] `Meshing` option `estimateSpaceMinObservationAngle` to 10 --- meshroom/aliceVision/Meshing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index d45dbee284..2b0bc0b86f 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -50,8 +50,8 @@ class Meshing(desc.CommandLineNode): name='estimateSpaceMinObservationAngle', label='Min Observations Angle For SfM Space Estimation', description='Minimum angle between two observations for SfM space estimation.', - value=0.2, - range=(0, 10, 0.1), + value=10, + range=(0, 120, 1), uid=[0], ), desc.IntParam( From bf9077dec987632709160d9d3747797a244fd394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 17:38:38 +0100 Subject: [PATCH 0167/1093] [nodes] `DepthMapFilter` Spelling correction --- meshroom/aliceVision/DepthMapFilter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 5dd7b60c02..1dddcc5014 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -50,7 +50,7 @@ class DepthMapFilter(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name="minNumOfConsistensCams", + name="minNumOfConsistentCams", label="Min Consistent Cameras", description="Min Number of Consistent Cameras", value=3, @@ -58,7 +58,7 @@ class DepthMapFilter(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name="minNumOfConsistensCamsWithLowSimilarity", + name="minNumOfConsistentCamsWithLowSimilarity", label="Min Consistent Cameras Bad Similarity", description="Min Number of Consistent Cameras for pixels with weak similarity value", value=4, From e44b564c6040bdc3778282d3facb7edab856302c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Dec 2018 17:40:31 +0100 Subject: [PATCH 0168/1093] [nodes] `DepthMapFilter` & `Meshing` rename option `depthMapFolder` to `depthMapsFolder` --- meshroom/aliceVision/DepthMapFilter.py | 6 +++--- meshroom/aliceVision/Meshing.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 1dddcc5014..94bfbe93cf 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -19,9 +19,9 @@ class DepthMapFilter(desc.CommandLineNode): uid=[0], ), desc.File( - name="depthMapFolder", - label="Depth Map Folder", - description="Input depth map folder", + name="depthMapsFolder", + label="Depth Maps Folder", + description="Input depth maps folder", value="", uid=[0], ), diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 2b0bc0b86f..decda83360 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -18,14 +18,14 @@ class Meshing(desc.CommandLineNode): uid=[0], ), desc.File( - name="depthMapFolder", + name="depthMapsFolder", label='Depth Maps Folder', description='Input depth maps folder', value='', uid=[0], ), desc.File( - name="depthMapFilterFolder", + name="depthMapsFilterFolder", label='Filtered Depth Maps Folder', description='Input filtered depth maps folder', value='', From 5b927aa3bcdb27e18aac73624f1d6928c9b14056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 17 Dec 2018 11:46:34 +0100 Subject: [PATCH 0169/1093] [nodes] `DepthMap` & `DepthMapFilter` Fix: node version is `2.0` --- meshroom/aliceVision/DepthMap.py | 2 +- meshroom/aliceVision/DepthMapFilter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index cf830ec7ed..97f0ce0867 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 94bfbe93cf..458ac29cf6 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc From c712bec2274d4e6a0b01b36ae5e421355a3273df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 17 Dec 2018 11:48:01 +0100 Subject: [PATCH 0170/1093] [nodes] Remove `ConvertAnimatedCamera` The corresponding software no longer exists --- meshroom/aliceVision/ConvertAnimatedCamera.py | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 meshroom/aliceVision/ConvertAnimatedCamera.py diff --git a/meshroom/aliceVision/ConvertAnimatedCamera.py b/meshroom/aliceVision/ConvertAnimatedCamera.py deleted file mode 100644 index 3d834ed444..0000000000 --- a/meshroom/aliceVision/ConvertAnimatedCamera.py +++ /dev/null @@ -1,27 +0,0 @@ -__version__ = "1.0" - -from meshroom.core import desc - - -class ConvertAnimatedCamera(desc.CommandLineNode): - commandLine = 'aliceVision_convertAnimatedCamera {allParams}' - - inputs = [ - desc.File( - name='input', - label='Input', - description='''SfMData file.''', - value='', - uid=[0], - ), - ] - - outputs = [ - desc.File( - name='output', - label='Output', - description='Path to the output Alembic file.', - value=desc.Node.internalFolder + 'animatedCamera.abc', - uid=[], - ), - ] From dd08f2e68e14aef6441c835e80ffc067b4a5fe69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 17 Dec 2018 11:53:34 +0100 Subject: [PATCH 0171/1093] [nodes] `Texturing` Fix: node bersion is `3.0` --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 923339cb3d..f56543ac59 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc From 10f0116f42f7f0df730f08d89580f66cc28db3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 19 Dec 2018 15:25:11 +0100 Subject: [PATCH 0172/1093] [nodes] `convertSfMFormat` users can now specify a view white list to filter views --- meshroom/aliceVision/ConvertSfMFormat.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index b4cc4c7e9f..4d009da209 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -5,7 +5,8 @@ class ConvertSfMFormat(desc.CommandLineNode): commandLine = 'aliceVision_convertSfMFormat {allParams}' - + size = desc.DynamicNodeSize('input') + inputs = [ desc.File( name='input', @@ -34,6 +35,18 @@ class ConvertSfMFormat(desc.CommandLineNode): uid=[0], joinChar=',', ), + desc.ListAttribute( + elementDesc=desc.File( + name="imageId", + label="Image id", + description="", + value="", + uid=[0], + ), + name="imageWhiteList", + label="Image White List", + description='image white list (uids or image paths).', + ), desc.BoolParam( name='views', label='Views', From 67ba594ba6268cf1dcea08cd044e1f2864bc6f06 Mon Sep 17 00:00:00 2001 From: Fabien Danieau <fabien.danieau@technicolor.com> Date: Wed, 19 Dec 2018 17:34:45 +0100 Subject: [PATCH 0173/1093] Enable SfMTransform with selection of one view as reference for the coordinate system. --- meshroom/aliceVision/SfMTransform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 1d44cc4c0c..49ed61117e 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -20,7 +20,7 @@ class SfMTransform(desc.CommandLineNode): label='Transformation Method', description='''Transformation method (transformation, auto_from_cameras, auto_from_landmarks).''', value='auto_from_landmarks', - values=['transformation', 'auto_from_cameras', 'auto_from_landmarks'], + values=['transformation', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera'], exclusive=True, uid=[0], ), From 46d114f353480d78873978ae0a18ac1e2e416116 Mon Sep 17 00:00:00 2001 From: Simone Gasparini <simone.gasparini@gmail.com> Date: Wed, 19 Dec 2018 17:56:11 +0100 Subject: [PATCH 0174/1093] [nodes] exposed refineIntrinsics param to lock the camera intrinsics for all cameras --- meshroom/aliceVision/StructureFromMotion.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index a9c3cd56d1..8e426dd371 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -168,6 +168,16 @@ class StructureFromMotion(desc.CommandLineNode): value=True, uid=[0], ), + desc.BoolParam( + name='refineIntrinsics', + label='Refine intrinsic parameters.', + description='The intrinsics parameters of the cameras (focal length, \n' + 'principal point, distortion if any) are kept constant ' + 'during the reconstruction.\n' + 'This may be helpful if the input cameras are already fully calibrated.', + value=True, + uid=[0], + ), desc.File( name='initialPairA', label='Initial Pair A', From c966b1ed15a4868cfda7e2050b6c7a512ff7dbfa Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Wed, 12 Dec 2018 12:29:19 +0100 Subject: [PATCH 0175/1093] [nodes][aliceVision] mark advanced parameters --- meshroom/aliceVision/DepthMap.py | 29 ++++++++++++++----- meshroom/aliceVision/DepthMapFilter.py | 5 ++++ meshroom/aliceVision/FeatureExtraction.py | 1 + meshroom/aliceVision/FeatureMatching.py | 8 +++++ meshroom/aliceVision/ImageMatching.py | 4 +++ meshroom/aliceVision/ImageMatchingMultiSfM.py | 4 +++ meshroom/aliceVision/MeshDecimate.py | 1 + meshroom/aliceVision/MeshFiltering.py | 1 + meshroom/aliceVision/Meshing.py | 16 ++++++++++ meshroom/aliceVision/PrepareDenseScene.py | 3 ++ meshroom/aliceVision/StructureFromMotion.py | 11 +++++++ meshroom/aliceVision/Texturing.py | 4 +++ 12 files changed, 79 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 97f0ce0867..6ba1f32ad3 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -41,6 +41,7 @@ class DepthMap(desc.CommandLineNode): value=2.0, range=(0.0, 10.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='maxViewAngle', @@ -49,6 +50,7 @@ class DepthMap(desc.CommandLineNode): value=70.0, range=(10.0, 120.0, 1), uid=[0], + advanced=True, ), desc.IntParam( name='sgmMaxTCams', @@ -65,6 +67,7 @@ class DepthMap(desc.CommandLineNode): value=4, range=(1, 20, 1), uid=[0], + advanced=True, ), desc.FloatParam( name='sgmGammaC', @@ -73,6 +76,7 @@ class DepthMap(desc.CommandLineNode): value=5.5, range=(0.0, 30.0, 0.5), uid=[0], + advanced=True, ), desc.FloatParam( name='sgmGammaP', @@ -81,6 +85,7 @@ class DepthMap(desc.CommandLineNode): value=8.0, range=(0.0, 30.0, 0.5), uid=[0], + advanced=True, ), desc.IntParam( name='refineNSamplesHalf', @@ -89,6 +94,7 @@ class DepthMap(desc.CommandLineNode): value=150, range=(1, 500, 10), uid=[0], + advanced=True, ), desc.IntParam( name='refineNDepthsToRefine', @@ -97,6 +103,7 @@ class DepthMap(desc.CommandLineNode): value=31, range=(1, 100, 1), uid=[0], + advanced=True, ), desc.IntParam( name='refineNiters', @@ -105,14 +112,7 @@ class DepthMap(desc.CommandLineNode): value=100, range=(1, 500, 10), uid=[0], - ), - desc.IntParam( - name='refineWSH', - label='Refine: WSH', - description='Refine: Half-size of the patch used to compute the similarity.', - value=3, - range=(1, 20, 1), - uid=[0], + advanced=True, ), desc.IntParam( name='refineMaxTCams', @@ -122,6 +122,15 @@ class DepthMap(desc.CommandLineNode): range=(1, 20, 1), uid=[0], ), + desc.IntParam( + name='refineWSH', + label='Refine: WSH', + description='Refine: Half-size of the patch used to compute the similarity.', + value=3, + range=(1, 20, 1), + uid=[0], + advanced=True, + ), desc.FloatParam( name='refineSigma', label='Refine: Sigma', @@ -129,6 +138,7 @@ class DepthMap(desc.CommandLineNode): value=15, range=(0.0, 30.0, 0.5), uid=[0], + advanced=True, ), desc.FloatParam( name='refineGammaC', @@ -137,6 +147,7 @@ class DepthMap(desc.CommandLineNode): value=15.5, range=(0.0, 30.0, 0.5), uid=[0], + advanced=True, ), desc.FloatParam( name='refineGammaP', @@ -145,6 +156,7 @@ class DepthMap(desc.CommandLineNode): value=8.0, range=(0.0, 30.0, 0.5), uid=[0], + advanced=True, ), desc.BoolParam( name='refineUseTcOrRcPixSize', @@ -152,6 +164,7 @@ class DepthMap(desc.CommandLineNode): description='Refine: Use minimum pixel size of neighbour cameras (Tc) or current camera pixel size (Rc)', value=False, uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 458ac29cf6..73c33fd0d9 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -32,6 +32,7 @@ class DepthMapFilter(desc.CommandLineNode): value=2.0, range=(0.0, 10.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='maxViewAngle', @@ -40,6 +41,7 @@ class DepthMapFilter(desc.CommandLineNode): value=70.0, range=(10.0, 120.0, 1), uid=[0], + advanced=True, ), desc.IntParam( name="nNearestCams", @@ -48,6 +50,7 @@ class DepthMapFilter(desc.CommandLineNode): value=10, range=(0, 20, 1), uid=[0], + advanced=True, ), desc.IntParam( name="minNumOfConsistentCams", @@ -72,6 +75,7 @@ class DepthMapFilter(desc.CommandLineNode): value=0, range=(0, 10, 1), uid=[0], + advanced=True, ), desc.IntParam( name="pixSizeBallWithLowSimilarity", @@ -80,6 +84,7 @@ class DepthMapFilter(desc.CommandLineNode): value=0, range=(0, 10, 1), uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 94363dd602..9165add99b 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -42,6 +42,7 @@ class FeatureExtraction(desc.CommandLineNode): description='Use only CPU feature extraction.', value=False, uid=[], + advanced=True ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 6fef1648fc..0c487150d6 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -60,6 +60,7 @@ class FeatureMatching(desc.CommandLineNode): values=('BRUTE_FORCE_L2', 'ANN_L2', 'CASCADE_HASHING_L2', 'FAST_CASCADE_HASHING_L2', 'BRUTE_FORCE_HAMMING'), exclusive=True, uid=[0], + advanced=True, ), desc.ChoiceParam( name='geometricEstimator', @@ -69,6 +70,7 @@ class FeatureMatching(desc.CommandLineNode): values=['acransac', 'loransac'], exclusive=True, uid=[0], + advanced=True, ), desc.ChoiceParam( name='geometricFilterType', @@ -83,6 +85,7 @@ class FeatureMatching(desc.CommandLineNode): values=['fundamental_matrix', 'essential_matrix', 'homography_matrix', 'homography_growing', 'no_filtering'], exclusive=True, uid=[0], + advanced=True, ), desc.FloatParam( name='distanceRatio', @@ -91,6 +94,7 @@ class FeatureMatching(desc.CommandLineNode): value=0.8, range=(0.0, 1.0, 0.01), uid=[0], + advanced=True, ), desc.IntParam( name='maxIteration', @@ -99,6 +103,7 @@ class FeatureMatching(desc.CommandLineNode): value=2048, range=(1, 20000, 1), uid=[0], + advanced=True, ), desc.IntParam( name='maxMatches', @@ -107,6 +112,7 @@ class FeatureMatching(desc.CommandLineNode): value=0, range=(0, 10000, 1), uid=[0], + advanced=True, ), desc.BoolParam( name='savePutativeMatches', @@ -114,6 +120,7 @@ class FeatureMatching(desc.CommandLineNode): description='putative matches.', value=False, uid=[0], + advanced=True, ), desc.BoolParam( name='guidedMatching', @@ -128,6 +135,7 @@ class FeatureMatching(desc.CommandLineNode): description='debug files (svg, dot).', value=False, uid=[], + advanced=True ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index a774fc3ab8..8d4ec51536 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -41,6 +41,7 @@ class ImageMatching(desc.CommandLineNode): description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', value='', uid=[0], + advanced=True, ), desc.IntParam( name='minNbImages', @@ -49,6 +50,7 @@ class ImageMatching(desc.CommandLineNode): value=200, range=(0, 500, 1), uid=[0], + advanced=True, ), desc.IntParam( name='maxDescriptors', @@ -57,6 +59,7 @@ class ImageMatching(desc.CommandLineNode): value=500, range=(0, 100000, 1), uid=[0], + advanced=True, ), desc.IntParam( name='nbMatches', @@ -65,6 +68,7 @@ class ImageMatching(desc.CommandLineNode): value=50, range=(0, 1000, 1), uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 09dca195b6..2a0b56a1e6 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -49,6 +49,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', value='', uid=[0], + advanced=True, ), desc.ChoiceParam( name='matchingMode', @@ -66,6 +67,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): value=200, range=(0, 500, 1), uid=[0], + advanced=True, ), desc.IntParam( name='maxDescriptors', @@ -74,6 +76,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): value=500, range=(0, 100000, 1), uid=[0], + advanced=True, ), desc.IntParam( name='nbMatches', @@ -82,6 +85,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): value=50, range=(0, 1000, 1), uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 6c066a1461..280e9319a4 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -57,6 +57,7 @@ class MeshDecimate(desc.CommandLineNode): 'and the convention change from one software to another.', value=False, uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 3734b45b80..a413327742 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -44,6 +44,7 @@ class MeshFiltering(desc.CommandLineNode): value=1.0, range=(0.0, 10.0, 0.1), uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index decda83360..238cfd0901 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -37,6 +37,7 @@ class Meshing(desc.CommandLineNode): description='Estimate the 3d space from the SfM', value=True, uid=[0], + advanced=True, ), desc.IntParam( name='estimateSpaceMinObservations', @@ -45,6 +46,7 @@ class Meshing(desc.CommandLineNode): value=3, range=(0, 100, 1), uid=[0], + advanced=True, ), desc.FloatParam( name='estimateSpaceMinObservationAngle', @@ -77,6 +79,7 @@ class Meshing(desc.CommandLineNode): value=1000000, range=(500000, 30000000, 1000), uid=[0], + advanced=True, ), desc.IntParam( name='minStep', @@ -87,6 +90,7 @@ class Meshing(desc.CommandLineNode): value=2, range=(1, 20, 1), uid=[0], + advanced=True, ), desc.ChoiceParam( name='partitioning', @@ -96,6 +100,7 @@ class Meshing(desc.CommandLineNode): values=('singleBlock', 'auto'), exclusive=True, uid=[0], + advanced=True, ), desc.ChoiceParam( name='repartition', @@ -105,6 +110,7 @@ class Meshing(desc.CommandLineNode): values=('multiResolution', 'regularGrid'), exclusive=True, uid=[0], + advanced=True, ), desc.FloatParam( name='angleFactor', @@ -113,6 +119,7 @@ class Meshing(desc.CommandLineNode): value=15.0, range=(0.0, 200.0, 1.0), uid=[0], + advanced=True, ), desc.FloatParam( name='simFactor', @@ -121,6 +128,7 @@ class Meshing(desc.CommandLineNode): value=15.0, range=(0.0, 200.0, 1.0), uid=[0], + advanced=True, ), desc.FloatParam( name='pixSizeMarginInitCoef', @@ -129,6 +137,7 @@ class Meshing(desc.CommandLineNode): value=2.0, range=(0.0, 10.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='pixSizeMarginFinalCoef', @@ -137,6 +146,7 @@ class Meshing(desc.CommandLineNode): value=4.0, range=(0.0, 10.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='voteMarginFactor', @@ -145,6 +155,7 @@ class Meshing(desc.CommandLineNode): value=4.0, range=(0.1, 10.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='contributeMarginFactor', @@ -153,6 +164,7 @@ class Meshing(desc.CommandLineNode): value=2.0, range=(0.0, 10.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='simGaussianSizeInit', @@ -161,6 +173,7 @@ class Meshing(desc.CommandLineNode): value=10.0, range=(0.0, 50.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='simGaussianSize', @@ -169,6 +182,7 @@ class Meshing(desc.CommandLineNode): value=10.0, range=(0.0, 50.0, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='minAngleThreshold', @@ -177,6 +191,7 @@ class Meshing(desc.CommandLineNode): value=1.0, range=(0.0, 10.0, 0.01), uid=[0], + advanced=True, ), desc.BoolParam( name='refineFuse', @@ -184,6 +199,7 @@ class Meshing(desc.CommandLineNode): description='Refine depth map fusion with the new pixels size defined by angle and similarity scores.', value=True, uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index d68a6c840c..75f92a4a7e 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -37,6 +37,7 @@ class PrepareDenseScene(desc.CommandLineNode): values=['jpg', 'png', 'tif', 'exr'], exclusive=True, uid=[0], + advanced=True ), desc.BoolParam( name='saveMetadata', @@ -44,6 +45,7 @@ class PrepareDenseScene(desc.CommandLineNode): description='Save projections and intrinsics information in images metadata (only for .exr images).', value=True, uid=[0], + advanced=True ), desc.BoolParam( name='saveMatricesTxtFiles', @@ -51,6 +53,7 @@ class PrepareDenseScene(desc.CommandLineNode): description='Save projections and intrinsics information in text files.', value=False, uid=[0], + advanced=True ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index a9c3cd56d1..387732e41c 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -60,6 +60,7 @@ class StructureFromMotion(desc.CommandLineNode): values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], exclusive=True, uid=[0], + advanced=True, ), desc.BoolParam( name='lockScenePreviouslyReconstructed', @@ -83,6 +84,7 @@ class StructureFromMotion(desc.CommandLineNode): value=1, range=(2, 10, 1), uid=[0], + advanced=True, ), desc.IntParam( name='maxNumberOfMatches', @@ -112,6 +114,7 @@ class StructureFromMotion(desc.CommandLineNode): value=2, range=(2, 10, 1), uid=[0], + advanced=True, ), desc.FloatParam( name='minAngleForTriangulation', @@ -120,6 +123,7 @@ class StructureFromMotion(desc.CommandLineNode): value=3.0, range=(0.1, 10, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='minAngleForLandmark', @@ -128,6 +132,7 @@ class StructureFromMotion(desc.CommandLineNode): value=2.0, range=(0.1, 10, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='maxReprojectionError', @@ -136,6 +141,7 @@ class StructureFromMotion(desc.CommandLineNode): value=4.0, range=(0.1, 10, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='minAngleInitialPair', @@ -144,6 +150,7 @@ class StructureFromMotion(desc.CommandLineNode): value=5.0, range=(0.1, 10, 0.1), uid=[0], + advanced=True, ), desc.FloatParam( name='maxAngleInitialPair', @@ -152,6 +159,7 @@ class StructureFromMotion(desc.CommandLineNode): value=40.0, range=(0.1, 60, 0.1), uid=[0], + advanced=True, ), desc.BoolParam( name='useOnlyMatchesFromInputFolder', @@ -160,6 +168,7 @@ class StructureFromMotion(desc.CommandLineNode): 'Matches folders previously added to the SfMData file will be ignored.', value=False, uid=[], + advanced=True, ), desc.BoolParam( name='useRigConstraint', @@ -167,6 +176,7 @@ class StructureFromMotion(desc.CommandLineNode): description='Enable/Disable rig constraint.', value=True, uid=[0], + advanced=True, ), desc.File( name='initialPairA', @@ -190,6 +200,7 @@ class StructureFromMotion(desc.CommandLineNode): values=('.abc', '.ply'), exclusive=True, uid=[], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index f56543ac59..fcc5fce57e 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -105,6 +105,7 @@ class Texturing(desc.CommandLineNode): value=0.0, range=(0.0, 1.0, 0.01), uid=[0], + advanced=True, ), desc.FloatParam( name='angleHardThreshold', @@ -113,6 +114,7 @@ class Texturing(desc.CommandLineNode): value=90.0, range=(0.0, 180.0, 0.01), uid=[0], + advanced=True, ), desc.BoolParam( name='forceVisibleByAllVertices', @@ -127,6 +129,7 @@ class Texturing(desc.CommandLineNode): description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', value=False, uid=[0], + advanced=True, ), desc.ChoiceParam( name='visibilityRemappingMethod', @@ -136,6 +139,7 @@ class Texturing(desc.CommandLineNode): values=['Pull', 'Push', 'PullPush'], exclusive=True, uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', From 1b6ea1f97bba18b5e160035b066634c30d26aad3 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Wed, 2 Jan 2019 16:12:59 +0100 Subject: [PATCH 0176/1093] [nodes][aliceVision] remove range sliders where unnecessary --- meshroom/aliceVision/CameraInit.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 48f59db445..dec785297a 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -10,19 +10,19 @@ Viewpoint = [ - desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=(0, 200, 1)), - desc.IntParam(name="poseId", label="Pose Id", description="Pose Id", value=-1, uid=[0], range=(0, 200, 1)), + desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=None), + desc.IntParam(name="poseId", label="Pose Id", description="Pose Id", value=-1, uid=[0], range=None), desc.File(name="path", label="Image Path", description="Image Filepath", value="", uid=[0]), - desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=(0, 200, 1)), - desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=(0, 200, 1)), - desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=(0, 200, 1)), - desc.StringParam(name="metadata", label="Image Metadata", description="", value="", uid=[]), + desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=None), + desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=None), + desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=None), + desc.StringParam(name="metadata", label="Image Metadata", description="", value="", uid=[], advanced=True), ] Intrinsic = [ - desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=(0, 200, 1)), - desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1.0, uid=[0], range=(0.0, 200.0, 1.0)), - desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1.0, uid=[0], range=(0.0, 200.0, 1.0)), + desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=None), + desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1.0, uid=[0], range=None), + desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1.0, uid=[0], range=None), desc.ChoiceParam(name="type", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], exclusive=True, uid=[0]), # desc.StringParam(name="deviceMake", label="Make", description="Camera Make", value="", uid=[]), # desc.StringParam(name="deviceModel", label="Model", description="Camera Model", value="", uid=[]), From 56f9ffb31038b73f6225646fbd17256cc1d62300 Mon Sep 17 00:00:00 2001 From: Fabien Castan <faca@mikrosimage.eu> Date: Mon, 7 Jan 2019 11:53:50 +0100 Subject: [PATCH 0177/1093] [nodes] Texturing: minor change of label and advanced status --- meshroom/aliceVision/Texturing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index fcc5fce57e..e13cc449b5 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -92,7 +92,7 @@ class Texturing(desc.CommandLineNode): ), desc.IntParam( name='maxNbImagesForFusion', - label='Max Nb of Images For Fusion', + label='Max Number of Images For Fusion', description='''Max number of images to combine to create the final texture''', value=3, range=(0, 10, 1), @@ -122,6 +122,7 @@ class Texturing(desc.CommandLineNode): description='''Triangle visibility is based on the union of vertices visiblity.''', value=False, uid=[0], + advanced=True, ), desc.BoolParam( name='flipNormals', From 0c9ad41ef4e8a97b0c11201ca2cf879605fb66b3 Mon Sep 17 00:00:00 2001 From: Simone Gasparini <simone.gasparini@gmail.com> Date: Mon, 14 Jan 2019 18:24:49 +0100 Subject: [PATCH 0178/1093] refactoring: function readSfMData() to read sfm files --- meshroom/aliceVision/CameraInit.py | 56 ++++++++++++++++++------------ 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 48f59db445..55e34d7c50 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -45,6 +45,38 @@ value=False, uid=[0]), ] +def readSfMData(sfmFile): + """ Read views and intrinsics from a .sfm file + + Args: + sfmFile: the .sfm file containing views and intrinsics + + Returns: + The views and intrinsics of the .sfm as two separate lists + """ + import io # use io.open for Python2/3 compatibility (allow to specify encoding + errors handling) + # skip decoding errors to avoid potential exceptions due to non utf-8 characters in images metadata + with io.open(sfmFile, 'r', encoding='utf-8', errors='ignore') as f: + data = json.load(f) + + intrinsicsKeys = [i.name for i in Intrinsic] + + intrinsics = [{k: v for k, v in item.items() if k in intrinsicsKeys} for item in data.get("intrinsics", [])] + for intrinsic in intrinsics: + pp = intrinsic['principalPoint'] + intrinsic['principalPoint'] = {} + intrinsic['principalPoint']['x'] = pp[0] + intrinsic['principalPoint']['y'] = pp[1] + # convert empty string distortionParams (i.e: Pinhole model) to empty list + if intrinsic['distortionParams'] == '': + intrinsic['distortionParams'] = list() + print('intrinsics:', intrinsics) + viewsKeys = [v.name for v in Viewpoint] + views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] + for view in views: + view['metadata'] = json.dumps(view['metadata']) # convert metadata to string + print('views:', views) + return views, intrinsics class CameraInit(desc.CommandLineNode): commandLine = 'aliceVision_cameraInit {allParams} --allowSingleView 1' # don't throw an error if there is only one image @@ -134,28 +166,7 @@ def buildIntrinsics(self, node, additionalViews=()): # Reload result of aliceVision_cameraInit cameraInitSfM = node.output.value - import io # use io.open for Python2/3 compatibility (allow to specify encoding + errors handling) - # skip decoding errors to avoid potential exceptions due to non utf-8 characters in images metadata - with io.open(cameraInitSfM, 'r', encoding='utf-8', errors='ignore') as f: - data = json.load(f) - - intrinsicsKeys = [i.name for i in Intrinsic] - intrinsics = [{k: v for k, v in item.items() if k in intrinsicsKeys} for item in data.get("intrinsics", [])] - for intrinsic in intrinsics: - pp = intrinsic['principalPoint'] - intrinsic['principalPoint'] = {} - intrinsic['principalPoint']['x'] = pp[0] - intrinsic['principalPoint']['y'] = pp[1] - # convert empty string distortionParams (i.e: Pinhole model) to empty list - if intrinsic['distortionParams'] == '': - intrinsic['distortionParams'] = list() - # print('intrinsics:', intrinsics) - viewsKeys = [v.name for v in Viewpoint] - views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] - for view in views: - view['metadata'] = json.dumps(view['metadata']) # convert metadata to string - # print('views:', views) - return views, intrinsics + return readSfMData(cameraInitSfM) except Exception: raise @@ -198,4 +209,3 @@ def buildCommandLine(self, chunk): def processChunk(self, chunk): self.createViewpointsFile(chunk.node) desc.CommandLineNode.processChunk(self, chunk) - From 2eef1bff29ab79332c9e06b2c2693cb0f7dfb4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 16 Jan 2019 15:08:15 +0100 Subject: [PATCH 0179/1093] [nodes] `Meshing` Add option `addLandmarksToTheDensePointCloud` --- meshroom/aliceVision/Meshing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 238cfd0901..fcf1060386 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -201,6 +201,14 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='addLandmarksToTheDensePointCloud', + label='Add Landmarks To The Dense Point Cloud', + description='Add SfM Landmarks to the dense point cloud.', + value=True, + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From d894117990f0774435ca3394dbb29ea08b6eaf61 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 18 Jan 2019 10:09:27 +0100 Subject: [PATCH 0180/1093] [nodes] SfmTransform: update parameters doc --- meshroom/aliceVision/SfMTransform.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 49ed61117e..3dc4435eec 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -18,7 +18,11 @@ class SfMTransform(desc.CommandLineNode): desc.ChoiceParam( name='method', label='Transformation Method', - description='''Transformation method (transformation, auto_from_cameras, auto_from_landmarks).''', + description="Transformation method:\n" + " * transformation: Apply a given transformation\n" + " * auto_from_cameras: Use cameras\n" + " * auto_from_landmarks: Use landmarks\n" + " * from_single_camera: Use a specific camera as the origin of the coordinate system", value='auto_from_landmarks', values=['transformation', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera'], exclusive=True, @@ -27,7 +31,9 @@ class SfMTransform(desc.CommandLineNode): desc.StringParam( name='transformation', label='Transformation', - description='''Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S. (required only for 'transformation' method)''', + description="Required only for 'transformation' and 'from_single_camera' methods:\n" + " * transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" + " * from_single_camera: Camera UID or image filename", value='', uid=[0], ), From 4aa0e6b3c48467bdae0311067b26767f6802990d Mon Sep 17 00:00:00 2001 From: Simone Gasparini <simone.gasparini@gmail.com> Date: Fri, 18 Jan 2019 13:52:51 +0100 Subject: [PATCH 0181/1093] [nodes] forgot to remove print debug --- meshroom/aliceVision/CameraInit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 55e34d7c50..f8cc5aa29f 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -70,12 +70,12 @@ def readSfMData(sfmFile): # convert empty string distortionParams (i.e: Pinhole model) to empty list if intrinsic['distortionParams'] == '': intrinsic['distortionParams'] = list() - print('intrinsics:', intrinsics) + viewsKeys = [v.name for v in Viewpoint] views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] for view in views: view['metadata'] = json.dumps(view['metadata']) # convert metadata to string - print('views:', views) + return views, intrinsics class CameraInit(desc.CommandLineNode): From 87a5d2c9fae1d348a808fa77dcb4300487481a0c Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Mon, 21 Jan 2019 10:28:05 +0100 Subject: [PATCH 0182/1093] [nodes][av] CameraInit: add initializationMode and groupCameraFallback * --allowIncompleteOutput option has been removed * clean up commented lines --- meshroom/aliceVision/CameraInit.py | 33 ++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index dec785297a..96837879d2 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -24,9 +24,6 @@ desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1.0, uid=[0], range=None), desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1.0, uid=[0], range=None), desc.ChoiceParam(name="type", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], exclusive=True, uid=[0]), - # desc.StringParam(name="deviceMake", label="Make", description="Camera Make", value="", uid=[]), - # desc.StringParam(name="deviceModel", label="Model", description="Camera Model", value="", uid=[]), - # desc.StringParam(name="sensorWidth", label="Sensor Width", description="Camera Sensor Width", value="", uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (camera and lens combined)", value="", uid=[]), @@ -34,6 +31,20 @@ desc.FloatParam(name="x", label="x", description="", value=0, uid=[], range=(0, 10000, 1)), desc.FloatParam(name="y", label="y", description="", value=0, uid=[], range=(0, 10000, 1)), ]), + + desc.ChoiceParam(name="initializationMode", label="Initialization Mode", + description="Defines how this Intrinsic was initialized:\n" + " * calibrated: calibrated externally.\n" + " * estimated: estimated from metadata and/or sensor width. \n" + " * unknown: unknown camera parameters (can still have default value guess)\n" + " * none: not set", + values=("calibrated", "estimated", "unknown", "none"), + value="none", + exclusive=True, + uid=[], + advanced=True + ), + desc.ListAttribute( name="distortionParams", elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), @@ -81,6 +92,21 @@ class CameraInit(desc.CommandLineNode): range=(0, 180.0, 1), uid=[0], ), + desc.ChoiceParam( + name='groupCameraFallback', + label='Group Camera Fallback', + description="If there is no serial number in image metadata, devices cannot be accurately identified.\n" + "Therefore, internal camera parameters cannot be shared among images reliably.\n" + "A fallback grouping strategy must be chosen:\n" + " * global: group images from comparable devices (same make/model/focal) globally.\n" + " * folder: group images from comparable devices only within the same folder.\n" + " * image: never group images from comparable devices", + values=['global', 'folder', 'image'], + value='folder', + exclusive=True, + uid=[0], + advanced=True + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -122,7 +148,6 @@ def buildIntrinsics(self, node, additionalViews=()): os.makedirs(os.path.join(tmpCache, node.internalFolder)) self.createViewpointsFile(node, additionalViews) cmd = self.buildCommandLine(node.chunks[0]) - cmd += " --allowIncompleteOutput 1" # don't throw an error if the image intrinsic is undefined # logging.debug(' - commandLine:', cmd) subprocess = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) stdout, stderr = subprocess.communicate() From 1dc4ad944a6a0a8d58cbc77483c0cb0249ef2b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 7 Jan 2019 12:15:30 +0100 Subject: [PATCH 0183/1093] [nodes] `DepthMap` Add option `exportIntermediateResults` --- meshroom/aliceVision/DepthMap.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 6ba1f32ad3..b4753fbac0 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -87,6 +87,14 @@ class DepthMap(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='refineMaxTCams', + label='Refine: Nb Neighbour Cameras', + description='Refine: Number of neighbour cameras.', + value=6, + range=(1, 20, 1), + uid=[0], + ), desc.IntParam( name='refineNSamplesHalf', label='Refine: Number of Samples', @@ -114,14 +122,6 @@ class DepthMap(desc.CommandLineNode): uid=[0], advanced=True, ), - desc.IntParam( - name='refineMaxTCams', - label='Refine: Nb Neighbour Cameras', - description='Refine: Number of neighbour cameras.', - value=6, - range=(1, 20, 1), - uid=[0], - ), desc.IntParam( name='refineWSH', label='Refine: WSH', @@ -166,6 +166,14 @@ class DepthMap(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='exportIntermediateResults', + label='Export Intermediate Results', + description='Export intermediate results from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From d197529a84c2a5833589a2facea258d7b2f731c4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 22 Jan 2019 19:38:34 +0100 Subject: [PATCH 0184/1093] [nodes] DepthMap: add nbGPUs param --- meshroom/aliceVision/DepthMap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index b4753fbac0..24fa430009 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -174,6 +174,15 @@ class DepthMap(desc.CommandLineNode): uid=[], advanced=True, ), + desc.IntParam( + name='nbGPUs', + label='Number of GPUs', + description='Number of GPUs to use (0 means use all available GPUs).', + value=0, + range=(0, 5, 1), + uid=[], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 5662497e1279abcefcc4c7246bb9873f3c425624 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 22 Jan 2019 19:40:01 +0100 Subject: [PATCH 0185/1093] [nodes] Meshing: addLandmarksToTheDensePointCloud is false by default To align with https://github.com/alicevision/AliceVision/pull/585 --- meshroom/aliceVision/Meshing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index fcf1060386..11b2365fa8 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -205,7 +205,7 @@ class Meshing(desc.CommandLineNode): name='addLandmarksToTheDensePointCloud', label='Add Landmarks To The Dense Point Cloud', description='Add SfM Landmarks to the dense point cloud.', - value=True, + value=False, uid=[0], advanced=True, ), From 7e5b7f9b9928e21651cb6f2f323570cfa9ae29ae Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 22 Jan 2019 19:46:16 +0100 Subject: [PATCH 0186/1093] [nodes] FeatureExtraction: keep force CPU by default for now To avoid conflicts of popsift with the vocabulary tree, we continue to use vlfeat by default for now. --- meshroom/aliceVision/FeatureExtraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 9165add99b..92a97c816c 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -40,7 +40,7 @@ class FeatureExtraction(desc.CommandLineNode): name='forceCpuExtraction', label='Force CPU Extraction', description='Use only CPU feature extraction.', - value=False, + value=True, uid=[], advanced=True ), From 21b4e2e1c4f605a69889e139b7b242edf668ce7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 24 Jan 2019 10:37:01 +0100 Subject: [PATCH 0187/1093] [nodes] `Meshing` add option `saveRawDensePointCloud` --- meshroom/aliceVision/Meshing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index fcf1060386..0032cd1932 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -209,6 +209,14 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='saveRawDensePointCloud', + label='Save Raw Dense Point Cloud', + description='Save dense point cloud before cut and filtering.', + value=False, + uid=[], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From e96c916f2533bce45555a78d24fac6f063299f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 24 Jan 2019 10:38:59 +0100 Subject: [PATCH 0188/1093] [nodes] `Meshing` change output `outputDenseReconstruction` to `outputDensePointCloud` --- meshroom/aliceVision/Meshing.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 0032cd1932..3295b9804c 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc @@ -231,17 +231,16 @@ class Meshing(desc.CommandLineNode): outputs = [ desc.File( name="output", - label="Output mesh", + label="Output Dense Point Cloud", + description="Output dense point cloud with visibilities (SfMData file format).", + value="{cache}/{nodeType}/{uid0}/densePointCloud.abc", + uid=[], + ), + desc.File( + name="outputMesh", + label="Output Mesh", description="Output mesh (OBJ file format).", value="{cache}/{nodeType}/{uid0}/mesh.obj", uid=[], - ), - desc.File( - name="outputDenseReconstruction", - label="Output reconstruction", - description="Output dense reconstruction (BIN file format).", - value="{cache}/{nodeType}/{uid0}/denseReconstruction.bin", - uid=[], - group="", - ), + ), ] From cf9f1a72fbd760d7078cb5afc4a5de56d47b93b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 24 Jan 2019 10:40:23 +0100 Subject: [PATCH 0189/1093] [nodes] `MeshFiltering` Rename option `input` to `inputMesh` - Rename option `output` to `outputMesh` --- meshroom/aliceVision/MeshFiltering.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index a413327742..4a1ae7ea41 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc @@ -8,8 +8,8 @@ class MeshFiltering(desc.CommandLineNode): inputs = [ desc.File( - name='input', - label='Input', + name='inputMesh', + label='Input Mesh', description='''Input Mesh (OBJ file format).''', value='', uid=[0], @@ -59,8 +59,8 @@ class MeshFiltering(desc.CommandLineNode): outputs = [ desc.File( - name='output', - label='Output', + name='outputMesh', + label='Output Mesh', description='''Output mesh (OBJ file format).''', value=desc.Node.internalFolder + 'mesh.obj', uid=[], From 744cb6b0e0dcd80c8ead91f29c07830b5a82feaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 24 Jan 2019 10:42:23 +0100 Subject: [PATCH 0190/1093] [nodes] `Texturing` Remove option `inputDenseReconstruction` --- meshroom/aliceVision/Texturing.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index e13cc449b5..92f18d837b 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" from meshroom.core import desc @@ -22,13 +22,6 @@ class Texturing(desc.CommandLineNode): value='', uid=[0], ), - desc.File( - name='inputDenseReconstruction', - label='Input Dense Reconstruction', - description='Path to the dense reconstruction result (mesh with per vertex visibility).', - value='', - uid=[0], - ), desc.File( name='inputMesh', label='Other Input Mesh', From b39313df92050b85280a5cbfc847adacf2d0199f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Fri, 25 Jan 2019 16:27:06 +0100 Subject: [PATCH 0191/1093] [nodes] Add new node `ExportColoredPointCloud` --- .../aliceVision/ExportColoredPointCloud.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 meshroom/aliceVision/ExportColoredPointCloud.py diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py new file mode 100644 index 0000000000..ced880b46e --- /dev/null +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -0,0 +1,36 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class ExportColoredPointCloud(desc.CommandLineNode): + commandLine = 'aliceVision_exportColoredPointCloud {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description='SfMData file containing a complete SfM.', + 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 Point Cloud Filepath', + description='Output point cloud with visibilities as SfMData file.', + value="{cache}/{nodeType}/{uid0}/pointCloud.abc", + uid=[], + ), + ] From e9c295b6fbed8ce6e611a252a45f03f9412bacee Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 28 Jan 2019 10:46:19 +0100 Subject: [PATCH 0192/1093] [nodes] sfm: rename param refineIntrinsics into lockAllIntrinsics --- meshroom/aliceVision/StructureFromMotion.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 8e426dd371..613bb5a7f7 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -169,13 +169,12 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], ), desc.BoolParam( - name='refineIntrinsics', - label='Refine intrinsic parameters.', - description='The intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) are kept constant ' - 'during the reconstruction.\n' + name='lockAllIntrinsics', + label='Force Lock of All Intrinsic Camera Parameters.', + description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' + 'principal point, distortion if any) during the reconstruction.\n' 'This may be helpful if the input cameras are already fully calibrated.', - value=True, + value=False, uid=[0], ), desc.File( From af6bc035f6e69bfd7443f9680d941f87d564de4e Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 28 Jan 2019 10:22:25 +0100 Subject: [PATCH 0193/1093] [nodes] expose estimator parameters on sfm and features matching --- meshroom/aliceVision/FeatureMatching.py | 11 +++++++++++ meshroom/aliceVision/StructureFromMotion.py | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 0c487150d6..d032f876cc 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -105,6 +105,17 @@ class FeatureMatching(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='geometricError', + label='Geometric Validation Error', + description='Maximum error (in pixels) allowed for features matching during geometric verification.\n' + 'If set to 0, it will select a threshold according to the localizer estimator used\n' + '(if ACRansac, it will analyze the input data to select the optimal value).', + value=0.0, + range=(0.0, 10.0, 0.1), + uid=[0], + advanced=True, + ), desc.IntParam( name='maxMatches', label='Max Matches', diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 387732e41c..1761e6d613 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -62,6 +62,26 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='localizerEstimatorMaxIterations', + label='Localizer Max Ransac Iterations', + description='Maximum number of iterations allowed in ransac step.', + value=4096, + range=(1, 20000, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='localizerEstimatorError', + label='Localizer Max Ransac Error', + description='Maximum error (in pixels) allowed for camera localization (resectioning).\n' + 'If set to 0, it will select a threshold according to the localizer estimator used\n' + '(if ACRansac, it will analyze the input data to select the optimal value).', + value=0.0, + range=(0.0, 100.0, 0.1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='lockScenePreviouslyReconstructed', label='Lock Scene Previously Reconstructed', From 79096b34f3064daa35f3885af0c0bc8aa9d872ba Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 29 Jan 2019 14:56:24 +0100 Subject: [PATCH 0194/1093] [nodes] CameraInit.buildInstrincs: copy node outside graph if necessary Instead of assuming that the CameraInit instance does not belong to a graph, handle this by making a temporary copy of it to work with. --- meshroom/aliceVision/CameraInit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 45ec15d881..733f716764 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -171,7 +171,10 @@ def buildIntrinsics(self, node, additionalViews=()): The updated views and intrinsics as two separate lists """ assert isinstance(node.nodeDesc, CameraInit) - assert node.graph is None + if node.graph: + # make a copy of the node outside the graph + # to change its cache folder without modifying the original node + node = node.graph.copyNode(node)[0] tmpCache = tempfile.mkdtemp() node.updateInternals(tmpCache) From 4b29ea8edda53716954fd482d60b00a70729eb96 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Thu, 31 Jan 2019 09:52:52 +0100 Subject: [PATCH 0195/1093] [nodes][aliceVision] bump FeatureMatching version attributes have been changed since last release, without version being increased --- meshroom/aliceVision/FeatureMatching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index d032f876cc..43f1e21608 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc From e8871ff3dc957f325dec1d1d3b6bf164a069f242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 31 Jan 2019 18:48:55 +0100 Subject: [PATCH 0196/1093] [nodes] `DepthMapFilter` Add option `computeNormalMaps` --- meshroom/aliceVision/DepthMapFilter.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 73c33fd0d9..a4f2ed5d14 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc @@ -86,6 +86,14 @@ class DepthMapFilter(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='computeNormalMaps', + label='Compute Normal Maps', + description='Compute normal maps per depth map.', + value=False, + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From acd150cc73e61cb2bc4f74e53a9856626cf10c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 31 Jan 2019 10:44:51 +0100 Subject: [PATCH 0197/1093] [nodes] `Texturing` Add option `useUDIM` --- meshroom/aliceVision/Texturing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 92f18d837b..7921af2ead 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -68,6 +68,13 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.BoolParam( + name='useUDIM', + label='Use UDIM', + description='Use UDIM UV mapping.', + value=True, + uid=[0], + ), desc.BoolParam( name='fillHoles', label='Fill Holes', From bc6eb530e3b2006dee29bcc9706d3f626bb2b808 Mon Sep 17 00:00:00 2001 From: Simone Gasparini <simone.gasparini@gmail.com> Date: Thu, 21 Mar 2019 13:41:33 +0100 Subject: [PATCH 0198/1093] [nodes] PrepareDenseScene enables to export list of undistorted images --- meshroom/aliceVision/PrepareDenseScene.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 75f92a4a7e..d70232b8c7 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -73,5 +73,14 @@ class PrepareDenseScene(desc.CommandLineNode): description='''Output folder.''', value=desc.Node.internalFolder, uid=[], - ) + ), + desc.File( + name='outputUndistorted', + label='Undistorted images', + description='List of undistorted images.', + value=desc.Node.internalFolder + '*.{outputFileTypeValue}', + uid=[], + group='', + advanced=True + ), ] From c56b83e2fa85a4d247d2a66fb5b7d0ee9924948a Mon Sep 17 00:00:00 2001 From: Unknown <clara.vere@ymail.com> Date: Fri, 22 Mar 2019 17:32:42 +0100 Subject: [PATCH 0199/1093] [nodes] texturing: add support for multi-band blending --- meshroom/aliceVision/Texturing.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 7921af2ead..53fcee2e25 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -90,12 +90,19 @@ class Texturing(desc.CommandLineNode): range=(0, 100, 1), uid=[0], ), - desc.IntParam( - name='maxNbImagesForFusion', - label='Max Number of Images For Fusion', - description='''Max number of images to combine to create the final texture''', - value=3, - range=(0, 10, 1), + #desc.ListAttribute( + # name='multiBandNbContrib', + # elementDesc=desc.IntParam(name='levelContrib', label='', description='', value=1, uid=[0], range=(0, 50, 1)), + # label='Nb Contribution per Band', + # value=[1, 5, 10], # TODO: need support for default values on ListAttribute + # description='Number of images to combine per band of frequencies to create the final texture.', + #), + desc.FloatParam( + name='multiBandKernelSize', + label='MultiBand Blending Kernel Size', + description='''Kernel size for the lowest band of frequencies''', + value=40.0, + range=(0.0, 100.0, 1.0), uid=[0], ), desc.FloatParam( From 873756d9e75faabf9e69044a371855f728ce8601 Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Tue, 7 May 2019 10:48:01 +0200 Subject: [PATCH 0200/1093] [mesh] Texturing: set parameters for multi-band blending Use only 3 parameters : useScore, multiBandDownscale, multiBandNbContrib --- meshroom/aliceVision/Texturing.py | 43 +++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 53fcee2e25..ef34e12b78 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -86,24 +86,39 @@ class Texturing(desc.CommandLineNode): name='padding', label='Padding', description='''Texture edge padding size in pixel''', - value=15, + value=5, range=(0, 100, 1), uid=[0], + advanced=True, ), - #desc.ListAttribute( - # name='multiBandNbContrib', - # elementDesc=desc.IntParam(name='levelContrib', label='', description='', value=1, uid=[0], range=(0, 50, 1)), - # label='Nb Contribution per Band', - # value=[1, 5, 10], # TODO: need support for default values on ListAttribute - # description='Number of images to combine per band of frequencies to create the final texture.', - #), - desc.FloatParam( - name='multiBandKernelSize', - label='MultiBand Blending Kernel Size', - description='''Kernel size for the lowest band of frequencies''', - value=40.0, - range=(0.0, 100.0, 1.0), + desc.BoolParam( + name='useScore', + label='Use Score', + description='Use triangles scores for multiband blending.', + value=True, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='multiBandDownscale', + label='Multi Band Downscale', + description='''Width of frequency bands for multiband blending''', + value=2, + range=(1, 10, 1), uid=[0], + advanced=True, + ), + desc.GroupAttribute( + name="multiBandNbContrib", + label="MultiBand contributions", + groupDesc=[ + desc.IntParam(name="high", label="High Freq", description="High Frequency Band", value=1, uid=[0], range=None), + desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-High Frequency Band", value=5, uid=[0], range=None), + desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-Low Frequency Band", value=10, uid=[0], range=None), + desc.IntParam(name="low", label="Low Freq", description="Low Frequency Band", value=0, uid=[0], range=None), + ], + description='''Number of contributions per frequency band for multiband blending''', + advanced=True, ), desc.FloatParam( name='bestScoreThreshold', From a352267bca1be00b888a494d59ae0630bedd14ad Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 11 Apr 2019 11:38:01 +0200 Subject: [PATCH 0201/1093] [depthMap] new SGM parameters --- meshroom/aliceVision/DepthMap.py | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 24fa430009..84d47d9885 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -52,6 +52,38 @@ class DepthMap(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='sgmScale', + label='SGM: Downscale factor', + description='Semi Global Matching: Downscale factor used to compute the similarity volume.', + value=-1, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name='sgmStepXY', + label='SGM: Step', + description='Semi Global Matching: Step used to compute the similarity volume on X and Y axis.', + value=-1, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name='sgmStepZ', + label='SGM: Step', + description='Semi Global Matching: Step used to compute the similarity volume on Z axis.', + value=-1, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name='sgmMaxSide', + label='SGM: Max Side', + description='Semi Global Matching: Max side in pixels used to automatically decide for sgmScale/sgmStep if not defined.', + value=200, + range=(-1, 1000, 1), + uid=[0], + ), desc.IntParam( name='sgmMaxTCams', label='SGM: Nb Neighbour Cameras', @@ -87,6 +119,33 @@ class DepthMap(desc.CommandLineNode): uid=[0], advanced=True, ), + + desc.IntParam( + name='sgmMaxDepths', + label='SGM: Max Depths', + description='Semi Global Matching: Max number of depths in the overall similarity volume.', + value=3000, + range=(1, 5000, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='sgmMaxDepthsPerTc', + label='SGM: Max Depths Per Camera Pairs', + description='Semi Global Matching: Max number of depths to sweep in the similarity volume per Rc/Tc cameras.', + value=1500, + range=(1, 5000, 1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='sgmUseSfmSeeds', + label='SGM: Use SfM Landmarks', + description='Semi Global Matching: Use landmarks from SfM to define the ranges for the plane sweeping.', + value=True, + uid=[], + advanced=True, + ), desc.IntParam( name='refineMaxTCams', label='Refine: Nb Neighbour Cameras', From 9141f3517ed3fb3c9e84481bb59ba0dc2f67a7a6 Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Wed, 12 Jun 2019 17:26:24 +0200 Subject: [PATCH 0202/1093] [Texturing] change some default parameters --- meshroom/aliceVision/Texturing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index ef34e12b78..da3f411fd7 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -87,7 +87,7 @@ class Texturing(desc.CommandLineNode): label='Padding', description='''Texture edge padding size in pixel''', value=5, - range=(0, 100, 1), + range=(0, 20, 1), uid=[0], advanced=True, ), @@ -103,8 +103,8 @@ class Texturing(desc.CommandLineNode): name='multiBandDownscale', label='Multi Band Downscale', description='''Width of frequency bands for multiband blending''', - value=2, - range=(1, 10, 1), + value=4, + range=(0, 8, 2), uid=[0], advanced=True, ), @@ -117,7 +117,7 @@ class Texturing(desc.CommandLineNode): desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-Low Frequency Band", value=10, uid=[0], range=None), desc.IntParam(name="low", label="Low Freq", description="Low Frequency Band", value=0, uid=[0], range=None), ], - description='''Number of contributions per frequency band for multiband blending''', + description='''Number of contributions per frequency band for multiband blending (each frequency band also contributes to lower bands)''', advanced=True, ), desc.FloatParam( From c456dd8dd49b49d3b4f1d23d0d5990cd032f82d0 Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Thu, 13 Jun 2019 15:55:35 +0200 Subject: [PATCH 0203/1093] [Texturing] set bestScoreThreshold default value to 0.1 keep only triangles with sufficient reprojection area --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index da3f411fd7..7b2a1e21a9 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -124,7 +124,7 @@ class Texturing(desc.CommandLineNode): name='bestScoreThreshold', label='Best Score Threshold', description='''(0.0 to disable filtering based on threshold to relative best score)''', - value=0.0, + value=0.1, range=(0.0, 1.0, 0.01), uid=[0], advanced=True, From 10e73debfb1c4ba9a43d71e5897fe3dfd594b0c9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 14 Jun 2019 15:47:43 +0200 Subject: [PATCH 0204/1093] [depthMap] new SGM parameters: P1, P2, filteringAxes --- meshroom/aliceVision/DepthMap.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 84d47d9885..f83d40132d 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -120,6 +120,24 @@ class DepthMap(desc.CommandLineNode): advanced=True, ), + desc.FloatParam( + name='sgmP1', + label='SGM: P1', + description='Semi Global Matching: P1.', + value=10.0, + range=(0.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='sgmP2', + label='SGM: P2', + description='Semi Global Matching: P2 weight.', + value=20.0, + range=(-255.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), desc.IntParam( name='sgmMaxDepths', label='SGM: Max Depths', @@ -143,7 +161,15 @@ class DepthMap(desc.CommandLineNode): label='SGM: Use SfM Landmarks', description='Semi Global Matching: Use landmarks from SfM to define the ranges for the plane sweeping.', value=True, - uid=[], + uid=[0], + advanced=True, + ), + desc.StringParam( + name='sgmFilteringAxes', + label='SGM: Filtering Axes', + description="Semi Global Matching: Define axes for the filtering of the similarity volume.", + value='YX', + uid=[0], advanced=True, ), desc.IntParam( From 9cd88104d5db018867386b6d0bf5a15e0a0a1b1b Mon Sep 17 00:00:00 2001 From: Unknown <anouk.liberge@orange.fr> Date: Fri, 14 Jun 2019 17:55:05 +0200 Subject: [PATCH 0205/1093] [nodes][aliceVision] add LDRToHDR node --- meshroom/aliceVision/LDRToHDR.py | 106 +++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 meshroom/aliceVision/LDRToHDR.py diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py new file mode 100644 index 0000000000..5952986546 --- /dev/null +++ b/meshroom/aliceVision/LDRToHDR.py @@ -0,0 +1,106 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class LDRToHDR(desc.CommandLineNode): + commandLine = 'aliceVision_convertLDRToHDR {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input', + description="List of LDR images or a folder containing them ", + value='', + uid=[0], + ), + desc.ChoiceParam( + name='calibrationMethod', + label='Calibration Method', + description="Method used for camera calibration \n" + " * linear \n" + " * robertson \n" + " * debevec \n" + " * beta: grossberg", + values=['linear', 'robertson', 'debevec', 'grossberg'], + value='linear', + exclusive=True, + uid=[0], + ), + desc.File( + name='inputResponse', + label='Input Response', + description="external camera response file path to fuse all LDR images together.", + value='', + uid=[0], + ), + desc.StringParam( + name='targetExposureImage', + label='Target Exposure Image', + description="LDR image at the target exposure for the output HDR image to be centered.", + value='', + uid=[0], + ), + desc.ChoiceParam( + name='calibrationWeight', + label='Calibration Weight', + description="Weight function type (default, gaussian, triangle, plateau).", + value='default', + values=['default', 'gaussian', 'triangle', 'plateau'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='fusionWeight', + label='Fusion Weight', + description="Weight function used to fuse all LDR images together (gaussian, triangle, plateau).", + value='gaussian', + values=['gaussian', 'triangle', 'plateau'], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name='oversaturatedCorrection', + label='Oversaturated Correction', + description="Oversaturated correction for pixels oversaturated in all images: \n" + " - use 0 for no correction \n" + " - use 0.5 for interior lighting \n" + " - use 1 for outdoor lighting", + value=1, + range=(0, 1, 0.1), + uid=[0], + ), + desc.File( + name='recoverPath', + label='Recover Path', + description="Path to write recovered LDR image at the target exposure by applying inverse response on HDR image.", + 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', + description="Output HDR image path.", + value=desc.Node.internalFolder + 'hdr.exr', + uid=[], + ), + desc.File( + name='outputResponse', + label='Output Response', + description="Output response function path.", + value=desc.Node.internalFolder + 'response.ods', + uid=[], + ), + ] From 5fe029433dd0bdd03b62d973cde7c4a9d595f7c5 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 17 Jun 2019 20:03:05 +0200 Subject: [PATCH 0206/1093] [nodes][aliceVision] Texturing: fix outputTextures files extension --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 7921af2ead..7256495cf8 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -182,7 +182,7 @@ class Texturing(desc.CommandLineNode): name='outputTextures', label='Output Textures', description='Folder for output mesh: OBJ, material and texture files.', - value=desc.Node.internalFolder + 'texture_*.png', + value=desc.Node.internalFolder + 'texture_*.{outputTextureFileTypeValue}', uid=[], group='', ), From 45934cd38c7e5a09f67bc747b4a202f346bdcdde Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Wed, 19 Jun 2019 11:58:11 +0200 Subject: [PATCH 0207/1093] [PrepareDenseScene] option to correct images exposure value --- meshroom/aliceVision/PrepareDenseScene.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index d70232b8c7..0bb4976352 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -55,6 +55,14 @@ class PrepareDenseScene(desc.CommandLineNode): uid=[0], advanced=True ), + desc.BoolParam( + name='evCorrection', + label='Correct images exposure', + description='Apply a correction on images Exposure Value', + value=False, + uid=[0], + advanced=True + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 16e180d517076b53dd7e50b8d37f5a6c433dde83 Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Tue, 25 Jun 2019 12:22:42 +0200 Subject: [PATCH 0208/1093] [Texturing] option to choose process colorspace Colorspace for the texturing internal computation (does not impact the output file colorspace). Choose between sRGB (default), LAB and XYZ --- meshroom/aliceVision/Texturing.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 4bc94fcc8c..2066135eb9 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -99,6 +99,16 @@ class Texturing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.ChoiceParam( + name='processColorspace', + label='Process Colorspace', + description="Colorspace for the texturing internal computation (does not impact the output file colorspace).", + value='sRGB', + values=('sRGB', 'LAB', 'XYZ'), + exclusive=True, + uid=[0], + advanced=True, + ), desc.IntParam( name='multiBandDownscale', label='Multi Band Downscale', From 3467c4b0d5e362599dd68a27fc1eb29a70151633 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 1 Jul 2019 16:52:20 +0200 Subject: [PATCH 0209/1093] [node][alicevision] SfMTransform: update version to 1.1 A new "method" called "from_single_camera" has been added since the last release --- meshroom/aliceVision/SfMTransform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 3dc4435eec..af1725055a 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "1.1" from meshroom.core import desc From fe08109361da3d2e121c985b224c6843817d9749 Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Thu, 4 Jul 2019 11:03:49 +0200 Subject: [PATCH 0210/1093] [Texturing] add option to correct exposure values during Texturing --- meshroom/aliceVision/Texturing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 4bc94fcc8c..d9dfcb2a6e 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -91,6 +91,14 @@ class Texturing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='correctEV', + label='Correct Exposure', + description='Uniformize images exposure values.', + value=False, + uid=[0], + advanced=True, + ), desc.BoolParam( name='useScore', label='Use Score', From af81680241a89c13a6c03ab2d0f01c8989b219c9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 5 Jul 2019 23:08:36 +0200 Subject: [PATCH 0211/1093] [nodes][alicevision] PrepareDenseScene: Update version with new option "evCorrection" --- meshroom/aliceVision/PrepareDenseScene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 0bb4976352..5467d576ab 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc From 31b1a6842b3b9dac5ee495d8e1acc675e86be99f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 5 Jul 2019 23:10:10 +0200 Subject: [PATCH 0212/1093] [nodes][alicevision] Texturing: update version with new param processColorspace --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 2066135eb9..ca5aeaf7e8 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,4 +1,4 @@ -__version__ = "4.0" +__version__ = "5.0" from meshroom.core import desc From 72188f16d4b20545209f3c389d2f327c6e914e23 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Wed, 10 Jul 2019 18:26:08 +0200 Subject: [PATCH 0213/1093] [nodes][aliceVision] Meshing: make outputMesh first output parameter ensures that the mesh is loaded in the 3D Viewer when double clicking on a Meshing node --- meshroom/aliceVision/Meshing.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index cac485e35e..b20f386f95 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -230,17 +230,17 @@ class Meshing(desc.CommandLineNode): outputs = [ desc.File( - name="output", - label="Output Dense Point Cloud", - description="Output dense point cloud with visibilities (SfMData file format).", - value="{cache}/{nodeType}/{uid0}/densePointCloud.abc", - uid=[], - ), - desc.File( name="outputMesh", label="Output Mesh", description="Output mesh (OBJ file format).", value="{cache}/{nodeType}/{uid0}/mesh.obj", uid=[], ), + desc.File( + name="output", + label="Output Dense Point Cloud", + description="Output dense point cloud with visibilities (SfMData file format).", + value="{cache}/{nodeType}/{uid0}/densePointCloud.abc", + uid=[], + ), ] From 7dda8272d7ebb1d38497ad362f1c74ffebc3bf7f Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Thu, 11 Jul 2019 12:45:11 +0200 Subject: [PATCH 0214/1093] [nodes][aliceVision] Meshing: add "colorizeOutput" option --- meshroom/aliceVision/Meshing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index b20f386f95..449ef008aa 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -209,6 +209,13 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='colorizeOutput', + label='Colorize Output', + description='Whether to colorize output dense point cloud and mesh.', + value=False, + uid=[0], + ), desc.BoolParam( name='saveRawDensePointCloud', label='Save Raw Dense Point Cloud', From 8784e35bcfbb78f4abc0edc615b72583c1fee9f9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 16 Jul 2019 21:21:00 +0200 Subject: [PATCH 0215/1093] [nodes][aliceVision] DepthMap: fix default value of sgmMaxSideXY --- meshroom/aliceVision/DepthMap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index f83d40132d..ba14361d51 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -77,10 +77,10 @@ class DepthMap(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name='sgmMaxSide', + name='sgmMaxSideXY', label='SGM: Max Side', description='Semi Global Matching: Max side in pixels used to automatically decide for sgmScale/sgmStep if not defined.', - value=200, + value=700, range=(-1, 1000, 1), uid=[0], ), From 694946affbaa65ca0a19aded52cb7fe820c9eb68 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 16 Jul 2019 21:28:16 +0200 Subject: [PATCH 0216/1093] [nodes][aliceVision] DepthMapFilter: add new pixToleranceFactor param --- meshroom/aliceVision/DepthMapFilter.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index a4f2ed5d14..af78f8058d 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -68,6 +68,15 @@ class DepthMapFilter(desc.CommandLineNode): range=(0, 10, 1), uid=[0], ), + desc.FloatParam( + name='pixToleranceFactor', + label='Tolerance Size', + description='Filtering tolerance size factor (in px).', + value=2.0, + range=(0.001, 10.0, 0.1), + uid=[0], + advanced=True, + ), desc.IntParam( name="pixSizeBall", label="Filtering Size in Pixels", From 254a11cdfaee3d9361cac1cab163f7a6388c04bd Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Wed, 24 Jul 2019 15:15:07 +0200 Subject: [PATCH 0217/1093] [Texturing] set texturing downscale default value to 1 --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 6cb3d580de..5996f76a4f 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -42,7 +42,7 @@ class Texturing(desc.CommandLineNode): name='downscale', label='Texture Downscale', description='''Texture downscale factor''', - value=2, + value=1, values=(1, 2, 4, 8), exclusive=True, uid=[0], From ea47556d3ce19c2ecdd2523737006a48ed9c9337 Mon Sep 17 00:00:00 2001 From: Anouk Liberge <anouk.liberge@orange.fr> Date: Wed, 7 Aug 2019 15:15:22 +0200 Subject: [PATCH 0218/1093] [nodes][aliceVision] hdr: change input to accept list of folders --- meshroom/aliceVision/LDRToHDR.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 5952986546..6fff763357 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -7,13 +7,18 @@ class LDRToHDR(desc.CommandLineNode): commandLine = 'aliceVision_convertLDRToHDR {allParams}' inputs = [ - desc.File( - name='input', - label='Input', - description="List of LDR images or a folder containing them ", + desc.ListAttribute( + elementDesc=desc.File( + name='inputFolder', + label='Input File/Folder', + description="Folder containing LDR images", value='', uid=[0], ), + name="input", + label="Input Files or Folders", + description='Folders containing LDR images.', + ), desc.ChoiceParam( name='calibrationMethod', label='Calibration Method', From 424e193f9bf7d40224cc7953f51347f5486b807b Mon Sep 17 00:00:00 2001 From: Anouk Liberge <anouk.liberge@orange.fr> Date: Wed, 7 Aug 2019 15:17:04 +0200 Subject: [PATCH 0219/1093] [nodes][aliceVision] hdr: add bool parameter for fisheye lenses --- meshroom/aliceVision/LDRToHDR.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 6fff763357..f1c0f07fe0 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -19,6 +19,13 @@ class LDRToHDR(desc.CommandLineNode): label="Input Files or Folders", description='Folders containing LDR images.', ), + desc.BoolParam( + name='fisheyeLens', + label='Fisheye Lens', + description="Check if fisheye lens", + value=True, + uid=[0], + ), desc.ChoiceParam( name='calibrationMethod', label='Calibration Method', From e23353958cfad27dc2e410ea2d88ec06dd231574 Mon Sep 17 00:00:00 2001 From: Anouk Liberge <anouk.liberge@orange.fr> Date: Wed, 7 Aug 2019 15:19:43 +0200 Subject: [PATCH 0220/1093] [nodes][aliceVision] hdr: change descriptions and label parameters --- meshroom/aliceVision/LDRToHDR.py | 62 ++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index f1c0f07fe0..2dc1e51fa3 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -12,9 +12,9 @@ class LDRToHDR(desc.CommandLineNode): name='inputFolder', label='Input File/Folder', description="Folder containing LDR images", - value='', - uid=[0], - ), + value='', + uid=[0], + ), name="input", label="Input Files or Folders", description='Folders containing LDR images.', @@ -33,62 +33,62 @@ class LDRToHDR(desc.CommandLineNode): " * linear \n" " * robertson \n" " * debevec \n" - " * beta: grossberg", + " * grossberg", values=['linear', 'robertson', 'debevec', 'grossberg'], value='linear', exclusive=True, uid=[0], - ), + ), desc.File( name='inputResponse', label='Input Response', description="external camera response file path to fuse all LDR images together.", value='', uid=[0], - ), + ), desc.StringParam( name='targetExposureImage', label='Target Exposure Image', - description="LDR image at the target exposure for the output HDR image to be centered.", + description="LDR image(s) name(s) at the target exposure for the output HDR image(s) to be centered.", value='', uid=[0], - ), + ), desc.ChoiceParam( name='calibrationWeight', label='Calibration Weight', - description="Weight function type (default, gaussian, triangle, plateau).", + description="Weight function used to calibrate camera response \n" + " * default \n" + " * gaussian \n" + " * triangle \n"" + " * plateau", value='default', values=['default', 'gaussian', 'triangle', 'plateau'], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( name='fusionWeight', label='Fusion Weight', - description="Weight function used to fuse all LDR images together (gaussian, triangle, plateau).", + description="Weight function used to fuse all LDR images together \n"" + " * gaussian \n" + " * triangle \n" + " * plateau", value='gaussian', values=['gaussian', 'triangle', 'plateau'], exclusive=True, uid=[0], - ), + ), desc.FloatParam( - name='oversaturatedCorrection', - label='Oversaturated Correction', - description="Oversaturated correction for pixels oversaturated in all images: \n" + name='expandDynamicRange', + label='Expand Dynamic Range', + description="Correction of clamped high values in dynamic range: \n" " - use 0 for no correction \n" " - use 0.5 for interior lighting \n" " - use 1 for outdoor lighting", value=1, range=(0, 1, 0.1), uid=[0], - ), - desc.File( - name='recoverPath', - label='Recover Path', - description="Path to write recovered LDR image at the target exposure by applying inverse response on HDR image.", - value='', - uid=[0], - ), + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -97,7 +97,15 @@ class LDRToHDR(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ), + ), + desc.File( + name='recoverPath', + label='Output Recovered Files', + description="(debug) Folder for recovered LDR images at target exposures.", + advanced=True, + value='', + uid=[], + ), ] outputs = [ @@ -107,12 +115,12 @@ class LDRToHDR(desc.CommandLineNode): description="Output HDR image path.", value=desc.Node.internalFolder + 'hdr.exr', uid=[], - ), + ), desc.File( name='outputResponse', label='Output Response', description="Output response function path.", - value=desc.Node.internalFolder + 'response.ods', + value=desc.Node.internalFolder + 'response.csv', uid=[], - ), + ), ] From e735b65e23ccb3848ca8a0130a6cd86f76a5613f Mon Sep 17 00:00:00 2001 From: Anouk Liberge <anouk.liberge@orange.fr> Date: Wed, 7 Aug 2019 15:21:57 +0200 Subject: [PATCH 0221/1093] [nodes][aliceVision] hdr: change output parameter from path to folder --- meshroom/aliceVision/LDRToHDR.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 2dc1e51fa3..2ea303eda2 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -111,9 +111,9 @@ class LDRToHDR(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', - description="Output HDR image path.", - value=desc.Node.internalFolder + 'hdr.exr', + label='Output Folder', + description="Output folder for HDR images", + value=desc.Node.internalFolder, uid=[], ), desc.File( From a1add3bcd76e0e82f36a3472a38c91718913a08c Mon Sep 17 00:00:00 2001 From: Anouk Liberge <anouk.liberge@orange.fr> Date: Wed, 7 Aug 2019 15:27:41 +0200 Subject: [PATCH 0222/1093] [nodes][aliceVision] hdr: delete forgotten quotes --- meshroom/aliceVision/LDRToHDR.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 2ea303eda2..f859e30d02 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -59,7 +59,7 @@ class LDRToHDR(desc.CommandLineNode): description="Weight function used to calibrate camera response \n" " * default \n" " * gaussian \n" - " * triangle \n"" + " * triangle \n" " * plateau", value='default', values=['default', 'gaussian', 'triangle', 'plateau'], @@ -69,7 +69,7 @@ class LDRToHDR(desc.CommandLineNode): desc.ChoiceParam( name='fusionWeight', label='Fusion Weight', - description="Weight function used to fuse all LDR images together \n"" + description="Weight function used to fuse all LDR images together \n" " * gaussian \n" " * triangle \n" " * plateau", From b4427a97118c4089cd10453481261e33471adbf1 Mon Sep 17 00:00:00 2001 From: Anouk Liberge <anouk.liberge@orange.fr> Date: Thu, 8 Aug 2019 11:23:34 +0200 Subject: [PATCH 0223/1093] [nodes][aliceVision] hdr: clarify descriptions --- meshroom/aliceVision/LDRToHDR.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index f859e30d02..ad36c17d85 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -22,7 +22,9 @@ class LDRToHDR(desc.CommandLineNode): desc.BoolParam( name='fisheyeLens', label='Fisheye Lens', - description="Check if fisheye lens", + description="Enable if a fisheye lens has been used.\n " + "This will improve the estimation of the Camera's Response Function by considering only the pixels in the center of the image\n" + "and thus ignore undefined/noisy pixels outside the circle defined by the fisheye lens.", value=True, uid=[0], ), @@ -57,7 +59,7 @@ class LDRToHDR(desc.CommandLineNode): name='calibrationWeight', label='Calibration Weight', description="Weight function used to calibrate camera response \n" - " * default \n" + " * default (automatically selected according to the calibrationMethod) \n" " * gaussian \n" " * triangle \n" " * plateau", @@ -70,7 +72,7 @@ class LDRToHDR(desc.CommandLineNode): name='fusionWeight', label='Fusion Weight', description="Weight function used to fuse all LDR images together \n" - " * gaussian \n" + " * gaussian \n" " * triangle \n" " * plateau", value='gaussian', From 8dabbe19cbfa38cc777cbba462eb433b4b231400 Mon Sep 17 00:00:00 2001 From: Pramukta Kumar <pramukta.kumar@gmail.com> Date: Sun, 11 Aug 2019 09:01:34 -0500 Subject: [PATCH 0224/1093] add option to include 'unknown' feature types in order to support the conversion of dense point clouds via ConvertSfMFormat --- meshroom/aliceVision/ConvertSfMFormat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 4d009da209..5260a59b79 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -30,7 +30,7 @@ class ConvertSfMFormat(desc.CommandLineNode): label='Describer Types', description='Describer types to keep.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'unknown'], exclusive=False, uid=[0], joinChar=',', From 6df51a2f2a4545a07ac0d6f2ce68a4777469def3 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Tue, 10 Sep 2019 18:23:35 +0200 Subject: [PATCH 0225/1093] [reconstruction] retrieve and expose solved intrinsics * [nodes] SfM: make more generic method to get SfM results and return solved intrinsics in addition to views and poses * [reconstruction] store and expose solved intrinsics by viewpoints --- meshroom/aliceVision/StructureFromMotion.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 92f7c4adeb..e592df5501 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -267,19 +267,20 @@ class StructureFromMotion(desc.CommandLineNode): ] @staticmethod - def getViewsAndPoses(node): + def getResults(node): """ - Parse SfM result and return views and poses as two dict with viewId and poseId as keys. + Parse SfM result and return views, poses and intrinsics as three dicts with viewId, poseId and intrinsicId as keys. """ reportFile = node.outputViewsAndPoses.value if not os.path.exists(reportFile): - return {}, {} + return {}, {}, {} with open(reportFile) as jsonFile: report = json.load(jsonFile) views = dict() poses = dict() + intrinsics = dict() for view in report['views']: views[view['viewId']] = view @@ -287,4 +288,7 @@ def getViewsAndPoses(node): for pose in report['poses']: poses[pose['poseId']] = pose['pose'] - return views, poses + for intrinsic in report['intrinsics']: + intrinsics[intrinsic['intrinsicId']] = intrinsic + + return views, poses, intrinsics From f4497302101464baba48b92537aac42f174f573b Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Wed, 11 Sep 2019 20:22:30 +0100 Subject: [PATCH 0226/1093] intergrate python logging into publish node also fix error not returning proper information (chunk.node.inputFiles.value - > [i.value for i in chunk.node.inputFiles.value]) --- meshroom/aliceVision/Publish.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 966566e69c..21f93c1221 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -41,9 +41,8 @@ def resolvedPaths(self, inputFiles, outDir): return paths def processChunk(self, chunk): - print("Publish") if not chunk.node.inputFiles: - print("Nothing to publish") + chunk.log.add('Nothing to publish', 'warning') return if not chunk.node.output.value: return @@ -51,13 +50,15 @@ def processChunk(self, chunk): outFiles = self.resolvedPaths(chunk.node.inputFiles.value, chunk.node.output.value) if not outFiles: - raise RuntimeError("Publish: input files listed, but nothing to publish. " - "Listed input files: {}".format(chunk.node.inputFiles.value)) + error = 'Publish: input files listed, but nothing to publish' + chunk.log.add(error, 'error') + chunk.log.add('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) + raise RuntimeError(error) if not os.path.exists(chunk.node.output.value): os.mkdir(chunk.node.output.value) for iFile, oFile in outFiles.items(): - print('Publish file', iFile, 'into', oFile) + chunk.log.add('Publish file {} into {}'.format(iFile, oFile)) shutil.copyfile(iFile, oFile) - print('Publish end') + chunk.log.add('Publish end') From 5c26f288ae4d89e1b9ce17fb211acfd0aa3bd8ed Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Thu, 12 Sep 2019 16:52:58 +0100 Subject: [PATCH 0227/1093] [nodes] Publish: update version to 1.2 --- meshroom/aliceVision/Publish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 21f93c1221..9497caeba7 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -1,6 +1,6 @@ from __future__ import print_function -__version__ = "1.1" +__version__ = "1.2" from meshroom.core import desc import shutil From 8f5065effd1f23ee96f86a46619600f435312e66 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Sat, 14 Sep 2019 12:02:31 +0100 Subject: [PATCH 0228/1093] rely on standard logging object --- meshroom/aliceVision/Publish.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 9497caeba7..8a2432a82e 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -6,6 +6,7 @@ import shutil import glob import os +import logging class Publish(desc.Node): @@ -42,7 +43,7 @@ def resolvedPaths(self, inputFiles, outDir): def processChunk(self, chunk): if not chunk.node.inputFiles: - chunk.log.add('Nothing to publish', 'warning') + chunk.log.add('Nothing to publish', logging.WARNING) return if not chunk.node.output.value: return @@ -51,7 +52,7 @@ def processChunk(self, chunk): if not outFiles: error = 'Publish: input files listed, but nothing to publish' - chunk.log.add(error, 'error') + chunk.log.add(error, logging.ERROR) chunk.log.add('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) raise RuntimeError(error) From 69b5133d073d5ea316f03a6b26b3a25ce294e5a7 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Sat, 14 Sep 2019 12:31:15 +0100 Subject: [PATCH 0229/1093] expose verbose level on Publish node --- meshroom/aliceVision/Publish.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 8a2432a82e..917e576953 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -31,6 +31,15 @@ class Publish(desc.Node): description="", value="", uid=[0], + ), + desc.ChoiceParam( + name='verboseLevel', + label='Verbose Level', + description='''verbosity level (critical, error, warning, info, debug).''', + value='info', + values=['critical', 'error', 'warning', 'info', 'debug'], + exclusive=True, + uid=[], ), ] @@ -42,6 +51,8 @@ def resolvedPaths(self, inputFiles, outDir): return paths def processChunk(self, chunk): + chunk.log.logger.setLevel(chunk.log.textToLevel(chunk.node.verboseLevel.value)) + if not chunk.node.inputFiles: chunk.log.add('Nothing to publish', logging.WARNING) return From f8a99e7b85e2167c73e5949ac082fdae8c732fe9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 14 Sep 2019 16:05:36 +0200 Subject: [PATCH 0230/1093] [nodes] CameraInit: minor variable rename --- meshroom/aliceVision/CameraInit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 733f716764..0c01b41c99 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -184,12 +184,12 @@ def buildIntrinsics(self, node, additionalViews=()): self.createViewpointsFile(node, additionalViews) cmd = self.buildCommandLine(node.chunks[0]) # logging.debug(' - commandLine:', cmd) - subprocess = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) - stdout, stderr = subprocess.communicate() - subprocess.wait() - if subprocess.returncode != 0: - raise RuntimeError('CameraInit failed with error code {}. Command was: "{}"'.format( - subprocess.returncode, cmd) + proc = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) + stdout, stderr = proc.communicate() + proc.wait() + if proc.returncode != 0: + raise RuntimeError('CameraInit failed with error code {}.\nCommand was: "{}".\n'.format( + proc.returncode, cmd) ) # Reload result of aliceVision_cameraInit From 1110a4a61721f46976fe55440052d23ca364794a Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Sun, 15 Sep 2019 15:28:59 +0100 Subject: [PATCH 0231/1093] use logger object directly also allow progress bar to be used even while messages are added --- meshroom/aliceVision/Publish.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 917e576953..ebe2b9b832 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -6,7 +6,6 @@ import shutil import glob import os -import logging class Publish(desc.Node): @@ -51,10 +50,11 @@ def resolvedPaths(self, inputFiles, outDir): return paths def processChunk(self, chunk): - chunk.log.logger.setLevel(chunk.log.textToLevel(chunk.node.verboseLevel.value)) + chunk.logManager.waitUntilCleared() + chunk.logger.setLevel(chunk.logManager.textToLevel(chunk.node.verboseLevel.value)) if not chunk.node.inputFiles: - chunk.log.add('Nothing to publish', logging.WARNING) + chunk.logger.warning('Nothing to publish') return if not chunk.node.output.value: return @@ -63,14 +63,14 @@ def processChunk(self, chunk): if not outFiles: error = 'Publish: input files listed, but nothing to publish' - chunk.log.add(error, logging.ERROR) - chunk.log.add('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) + chunk.logger.error(error) + chunk.logger.info('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) raise RuntimeError(error) if not os.path.exists(chunk.node.output.value): os.mkdir(chunk.node.output.value) for iFile, oFile in outFiles.items(): - chunk.log.add('Publish file {} into {}'.format(iFile, oFile)) + chunk.logger.info('Publish file {} into {}'.format(iFile, oFile)) shutil.copyfile(iFile, oFile) - chunk.log.add('Publish end') + chunk.logger.info('Publish end') From 3476fd8af22c698e2d49fc69e64c7a4063798431 Mon Sep 17 00:00:00 2001 From: Anouk Liberge <anouk.liberge@orange.fr> Date: Thu, 8 Aug 2019 18:29:06 +0200 Subject: [PATCH 0232/1093] [nodes][aliceVision] New node for hdri panorama stitching --- meshroom/aliceVision/HDRIstitching.py | 89 +++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 meshroom/aliceVision/HDRIstitching.py diff --git a/meshroom/aliceVision/HDRIstitching.py b/meshroom/aliceVision/HDRIstitching.py new file mode 100644 index 0000000000..af81410eec --- /dev/null +++ b/meshroom/aliceVision/HDRIstitching.py @@ -0,0 +1,89 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class HDRIstitching(desc.CommandLineNode): + commandLine = 'aliceVision_utils_fisheyeProjection {allParams}' + + inputs = [ + desc.ListAttribute( + elementDesc=desc.File( + name='inputFile', + label='Input File/Folder', + description="", + value='', + uid=[0], + ), + name='input', + label='Input Folder', + description="List of fisheye images or folder containing them." + ), + desc.FloatParam( + name='blurWidth', + label='Blur Width', + description="Blur width of alpha channel for all fisheye (between 0 and 1). \n" + "Determine the transitions sharpness.", + value=0.2, + range=(0, 1, 0.1), + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.FloatParam( + name='imageXRotation', + label='Image X Rotation', + description="", + value=0, + range=(-20, 20, 1), + uid=[0], + ), + name='xRotation', + label='X Rotations', + description="Rotations in degree on axis X (horizontal axis) for each image.", + ), + desc.ListAttribute( + elementDesc=desc.FloatParam( + name='imageYRotation', + label='Image Y Rotation', + description="", + value=0, + range=(-30, 30, 5), + uid=[0], + ), + name='yRotation', + label='Y Rotations', + description="Rotations in degree on axis Y (vertical axis) for each image.", + ), + desc.ListAttribute( + elementDesc=desc.FloatParam( + name='imageZRotation', + label='Image Z Rotation', + description="", + value=0, + range=(-10, 10, 1), + uid=[0], + ), + name='zRotation', + label='Z Rotations', + description="Rotations in degree on axis Z (depth axis) for each image.", + ), + 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 Panorama', + description="Output folder for panorama", + value=desc.Node.internalFolder, + uid=[], + ), + ] \ No newline at end of file From 36b156e08e4ecdd7e7267c9ad2d99386167b60f6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 16 Sep 2019 16:46:50 +0200 Subject: [PATCH 0233/1093] [nodes] New GlobalSfM node --- meshroom/aliceVision/GlobalSfM.py | 114 ++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 meshroom/aliceVision/GlobalSfM.py diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py new file mode 100644 index 0000000000..a60b7a7895 --- /dev/null +++ b/meshroom/aliceVision/GlobalSfM.py @@ -0,0 +1,114 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class GlobalSfM(desc.CommandLineNode): + commandLine = 'aliceVision_globalSfM {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name='featuresFolder', + label='Features Folder', + description="", + value='', + uid=[0], + ), + name='featuresFolders', + label='Features Folders', + description="Folder(s) containing the extracted features." + ), + desc.ListAttribute( + elementDesc=desc.File( + name='matchesFolder', + label='Matches Folder', + description="", + value='', + uid=[0], + ), + name='matchesFolders', + label='Matches Folders', + description="Folder(s) in which computed matches are stored." + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', + 'sift_ocv', 'akaze_ocv'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ChoiceParam( + name='rotationAveraging', + label='Rotation Averaging Method', + description="Method for rotation averaging :\n" + " * L1 minimization\n" + " * L2 minimization\n", + values=['L1_minimization', 'L2_minimization'], + value='L2_minimization', + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='translationAveraging', + label='Translation Averaging Method', + description="Method for translation averaging :\n" + " * L1 minimization\n" + " * L2 minimization of sum of squared Chordal distances\n" + " * L1 soft minimization", + values=['L1_minimization', 'L2_minimization', 'L1_soft_minimization'], + value='L1_soft_minimization', + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name='lockAllIntrinsics', + label='Force Lock of All Intrinsic Camera Parameters.', + description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' + 'principal point, distortion if any) during the reconstruction.\n' + 'This may be helpful if the input cameras are already fully calibrated.', + value=False, + 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 Folder', + description='', + value=desc.Node.internalFolder, + uid=[], + ), + desc.File( + name='outSfMDataFilename', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'SfmData.abc', + uid=[], + ), + ] From af00b721dd3cbb47da2f297d69e6da5dec444939 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 16 Sep 2019 16:47:12 +0200 Subject: [PATCH 0234/1093] [nodes] New Panorama estimation node --- meshroom/aliceVision/Panorama.py | 113 +++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 meshroom/aliceVision/Panorama.py diff --git a/meshroom/aliceVision/Panorama.py b/meshroom/aliceVision/Panorama.py new file mode 100644 index 0000000000..18fb36c10c --- /dev/null +++ b/meshroom/aliceVision/Panorama.py @@ -0,0 +1,113 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class Panorama(desc.CommandLineNode): + commandLine = 'aliceVision_panorama {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name='featuresFolder', + label='Features Folder', + description="", + value='', + uid=[0], + ), + name='featuresFolders', + label='Features Folders', + description="Folder(s) containing the extracted features." + ), + desc.ListAttribute( + elementDesc=desc.File( + name='matchesFolder', + label='Matches Folder', + description="", + value='', + uid=[0], + ), + name='matchesFolders', + label='Matches Folders', + description="Folder(s) in which computed matches are stored." + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', + 'sift_ocv', 'akaze_ocv'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ChoiceParam( + name='rotationAveraging', + label='Rotation Averaging Method', + description="Method for rotation averaging :\n" + " * L1 minimization\n" + " * L2 minimization\n", + values=['L1_minimization', 'L2_minimization'], + value='L2_minimization', + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='relativeRotation', + label='Relative Rotation Method', + description="Method for relative rotation :\n" + " * from essential matrix\n" + " * from homography matrix", + values=['essential_matrix', 'homography_matrix'], + value='essential_matrix', + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name='lockAllIntrinsics', + label='Force Lock of All Intrinsic Camera Parameters.', + description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' + 'principal point, distortion if any) during the reconstruction.\n' + 'This may be helpful if the input cameras are already fully calibrated.', + value=False, + 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 Folder', + description='', + value=desc.Node.internalFolder, + uid=[], + ), + desc.File( + name='outSfMDataFilename', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'SfmData.abc', + uid=[], + ), + ] \ No newline at end of file From 0aa15973372aab3e4e003e01f92e806bfc84c21c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Sep 2019 12:40:23 +0200 Subject: [PATCH 0235/1093] [nodes] split Panorama into PanoramaEstimation and PanoramaStitching --- .../{Panorama.py => PanoramaEstimation.py} | 21 +++-- meshroom/aliceVision/PanoramaStitching.py | 81 +++++++++++++++++++ 2 files changed, 97 insertions(+), 5 deletions(-) rename meshroom/aliceVision/{Panorama.py => PanoramaEstimation.py} (88%) create mode 100644 meshroom/aliceVision/PanoramaStitching.py diff --git a/meshroom/aliceVision/Panorama.py b/meshroom/aliceVision/PanoramaEstimation.py similarity index 88% rename from meshroom/aliceVision/Panorama.py rename to meshroom/aliceVision/PanoramaEstimation.py index 18fb36c10c..0ab5f6fe75 100644 --- a/meshroom/aliceVision/Panorama.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -6,8 +6,8 @@ from meshroom.core import desc -class Panorama(desc.CommandLineNode): - commandLine = 'aliceVision_panorama {allParams}' +class PanoramaEstimation(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaEstimation {allParams}' size = desc.DynamicNodeSize('input') inputs = [ @@ -53,6 +53,14 @@ class Panorama(desc.CommandLineNode): uid=[0], joinChar=',', ), + desc.IntParam( + name='orientation', + label='Orientation', + description='Orientation', + value=0, + range=(0, 6, 1), + uid=[0], + ), desc.ChoiceParam( name='rotationAveraging', label='Rotation Averaging Method', @@ -63,6 +71,7 @@ class Panorama(desc.CommandLineNode): value='L2_minimization', exclusive=True, uid=[0], + advanced=True, ), desc.ChoiceParam( name='relativeRotation', @@ -74,6 +83,7 @@ class Panorama(desc.CommandLineNode): value='essential_matrix', exclusive=True, uid=[0], + advanced=True, ), desc.BoolParam( name='lockAllIntrinsics', @@ -83,6 +93,7 @@ class Panorama(desc.CommandLineNode): 'This may be helpful if the input cameras are already fully calibrated.', value=False, uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', @@ -92,7 +103,7 @@ class Panorama(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -107,7 +118,7 @@ class Panorama(desc.CommandLineNode): name='outSfMDataFilename', label='Output SfMData File', description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'SfmData.abc', + value=desc.Node.internalFolder + 'sfmData.abc', uid=[], ), - ] \ No newline at end of file + ] diff --git a/meshroom/aliceVision/PanoramaStitching.py b/meshroom/aliceVision/PanoramaStitching.py new file mode 100644 index 0000000000..7b353d7218 --- /dev/null +++ b/meshroom/aliceVision/PanoramaStitching.py @@ -0,0 +1,81 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class PanoramaStitching(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaStitching {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + uid=[0], + ), + desc.ChoiceParam( + name='outputFileType', + label='Output File Type', + description='Output file type for the undistorted images.', + value='exr', + values=['jpg', 'png', 'tif', 'exr'], + exclusive=True, + uid=[0], + group='', # not part of allParams, as this is not a parameter for the command line + ), + desc.FloatParam( + name='scaleFactor', + label='Scale Factor', + description='Scale factor to resize the output resolution (e.g. 0.5 for downscaling to half resolution).', + value=0.2, + range=(0.0, 2.0, 0.1), + uid=[0], + ), + desc.BoolParam( + name='fisheyeMasking', + label='Enable Fisheye Masking', + description='For fisheye images, skip the invalid pixels on the borders.', + value=False, + uid=[0], + ), + desc.FloatParam( + name='fisheyeMaskingMargin', + label='Fisheye Masking Margin', + description='Margin for fisheye images.', + value=0.05, + range=(0.0, 0.5, 0.01), + uid=[0], + ), + desc.FloatParam( + name='transitionSize', + label='Transition Size', + description='Size of the transition between images (in pixels).', + value=10.0, + range=(0.0, 100.0, 1.0), + 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 Panorama', + description='', + value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', + uid=[], + ), + ] From c0d0ad034d509f3611e1c03c4e31305845c5c68b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Sep 2019 15:35:26 +0200 Subject: [PATCH 0236/1093] [nodes] PanoramaStitching: add a new debug param --- meshroom/aliceVision/PanoramaStitching.py | 27 +++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/PanoramaStitching.py b/meshroom/aliceVision/PanoramaStitching.py index 7b353d7218..602b54084c 100644 --- a/meshroom/aliceVision/PanoramaStitching.py +++ b/meshroom/aliceVision/PanoramaStitching.py @@ -59,15 +59,24 @@ class PanoramaStitching(desc.CommandLineNode): range=(0.0, 100.0, 1.0), 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=[], - ) + desc.IntParam( + name='maxNbImages', + label='Max Nb Images', + description='Max number of images to merge.', + value=0, + range=(0, 80, 1), + uid=[0], + advanced=True, + ), + 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 = [ From d84a9c021e09a155c83a95f73082dd66c6103ad7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Sep 2019 15:50:26 +0200 Subject: [PATCH 0237/1093] [nodes] PanoramaEstimation: declare a param as "advanced" --- meshroom/aliceVision/PanoramaEstimation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 0ab5f6fe75..e8947d84d9 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -60,6 +60,7 @@ class PanoramaEstimation(desc.CommandLineNode): value=0, range=(0, 6, 1), uid=[0], + advanced=True, ), desc.ChoiceParam( name='rotationAveraging', From 156605bf5e3161b49a7b3b5c6ca04303f2d8060e Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Sep 2019 17:24:40 +0200 Subject: [PATCH 0238/1093] [nodes] PanoramaStitching: add a new debug option --- meshroom/aliceVision/PanoramaStitching.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/PanoramaStitching.py b/meshroom/aliceVision/PanoramaStitching.py index 602b54084c..9369b7a59e 100644 --- a/meshroom/aliceVision/PanoramaStitching.py +++ b/meshroom/aliceVision/PanoramaStitching.py @@ -60,9 +60,18 @@ class PanoramaStitching(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name='maxNbImages', - label='Max Nb Images', - description='Max number of images to merge.', + name='debugSubsetStart', + label='Debug: Start Index of SubSet', + description='Start index of subset images to merge.', + value=0, + range=(0, 80, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='debugSubsetSize', + label='Debug: Nb Images in SubSet', + description='Number of images in subset to merge.', value=0, range=(0, 80, 1), uid=[0], From 51c529bd6d10d5000840853c3e40739c562e23ac Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Sep 2019 20:31:40 +0200 Subject: [PATCH 0239/1093] [nodes] Panorama: new param "refine" --- meshroom/aliceVision/PanoramaEstimation.py | 8 +++++++- meshroom/aliceVision/PanoramaStitching.py | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index e8947d84d9..bb5a904e77 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -86,6 +86,13 @@ class PanoramaEstimation(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='refine', + label='Refine', + description='Refine camera relative poses, points and optionally internal camera parameter', + value=False, + uid=[0], + ), desc.BoolParam( name='lockAllIntrinsics', label='Force Lock of All Intrinsic Camera Parameters.', @@ -94,7 +101,6 @@ class PanoramaEstimation(desc.CommandLineNode): 'This may be helpful if the input cameras are already fully calibrated.', value=False, uid=[0], - advanced=True, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/PanoramaStitching.py b/meshroom/aliceVision/PanoramaStitching.py index 9369b7a59e..d3123fb09f 100644 --- a/meshroom/aliceVision/PanoramaStitching.py +++ b/meshroom/aliceVision/PanoramaStitching.py @@ -55,8 +55,8 @@ class PanoramaStitching(desc.CommandLineNode): name='transitionSize', label='Transition Size', description='Size of the transition between images (in pixels).', - value=10.0, - range=(0.0, 100.0, 1.0), + value=100.0, + range=(0.0, 500.0, 1.0), uid=[0], ), desc.IntParam( From b4d8a735c33eda2e85b590b007ab9060cf456625 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Sep 2019 20:31:58 +0200 Subject: [PATCH 0240/1093] [nodes] new debug node: ExportMatches --- meshroom/aliceVision/ExportMatches.py | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 meshroom/aliceVision/ExportMatches.py diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py new file mode 100644 index 0000000000..8df3b39181 --- /dev/null +++ b/meshroom/aliceVision/ExportMatches.py @@ -0,0 +1,71 @@ +__version__ = "1.1" + +from meshroom.core import desc + + +class ExportMatches(desc.CommandLineNode): + commandLine = 'aliceVision_exportMatches {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.ListAttribute( + elementDesc=desc.File( + name="matchesFolder", + label="Matches Folder", + description="", + value="", + uid=[0], + ), + name="matchesFolders", + label="Matches Folders", + description="Folder(s) in which computed matches are stored." + ), + 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 Folder', + description='Output path for the features and descriptors files (*.feat, *.desc).', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 049e9b3b05f140b181eadb6193a0c0e8d7b04b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 7 May 2019 15:08:40 +0200 Subject: [PATCH 0241/1093] [nodes] `FeatureMatching` Add `fundamental_with_distortion` option --- meshroom/aliceVision/FeatureMatching.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 43f1e21608..d214f29537 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -77,12 +77,13 @@ class FeatureMatching(desc.CommandLineNode): label='Geometric Filter Type', description='Geometric validation method to filter features matches: \n' ' * fundamental_matrix\n' + ' * fundamental_with_distortion\n' ' * essential_matrix\n' ' * homography_matrix\n' ' * homography_growing\n' ' * no_filtering', value='fundamental_matrix', - values=['fundamental_matrix', 'essential_matrix', 'homography_matrix', 'homography_growing', 'no_filtering'], + values=['fundamental_matrix', 'fundamental_with_distortion', 'essential_matrix', 'homography_matrix', 'homography_growing', 'no_filtering'], exclusive=True, uid=[0], advanced=True, From 1b682632a56939ba063d8bc4f673310b9076bd92 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 21 Sep 2019 16:47:22 +0200 Subject: [PATCH 0242/1093] [nodes] FeatureExtraction: add maxThreads argument --- meshroom/aliceVision/FeatureExtraction.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 92a97c816c..643a56df74 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -44,6 +44,14 @@ class FeatureExtraction(desc.CommandLineNode): uid=[], advanced=True ), + desc.IntParam( + name='maxThreads', + label='Max Nb Threads', + description='Specifies the maximum number of threads to run simultaneously (0 for automatic mode).', + value=0, + range=(0, 24, 1), + uid=[] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 5ed7a305b0978b44e7c9e1066134912842a42ba3 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Sep 2019 12:19:21 +0200 Subject: [PATCH 0243/1093] [nodes] FeatureExtraction: define "maxThreads" as an advanced param --- meshroom/aliceVision/FeatureExtraction.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 643a56df74..e5c1cfd4cf 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -42,7 +42,7 @@ class FeatureExtraction(desc.CommandLineNode): description='Use only CPU feature extraction.', value=True, uid=[], - advanced=True + advanced=True, ), desc.IntParam( name='maxThreads', @@ -50,7 +50,8 @@ class FeatureExtraction(desc.CommandLineNode): description='Specifies the maximum number of threads to run simultaneously (0 for automatic mode).', value=0, range=(0, 24, 1), - uid=[] + uid=[], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', From 01ea317650c45135962d728302b72a8492401f0d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Sep 2019 10:43:33 +0200 Subject: [PATCH 0244/1093] [nodes] SfMTransform: new option to align on markers --- meshroom/aliceVision/SfMTransform.py | 43 +++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index af1725055a..6a9a975a84 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -22,9 +22,10 @@ class SfMTransform(desc.CommandLineNode): " * transformation: Apply a given transformation\n" " * auto_from_cameras: Use cameras\n" " * auto_from_landmarks: Use landmarks\n" - " * from_single_camera: Use a specific camera as the origin of the coordinate system", + " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" + " * from_markers: Align specific markers to custom coordinates", value='auto_from_landmarks', - values=['transformation', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera'], + values=['transformation', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_markers'], exclusive=True, uid=[0], ), @@ -51,10 +52,44 @@ class SfMTransform(desc.CommandLineNode): name='scale', label='Additional Scale', description='Additional scale to apply.', - value=10.0, - range=(1, 100.0, 1), + value=1.0, + range=(0.0, 100.0, 0.1), uid=[0], ), + desc.ListAttribute( + name="markers", + elementDesc=desc.GroupAttribute(name="markerAlign", label="Marker Align", description="", joinChar=":", groupDesc=[ + desc.IntParam(name="markerId", label="Marker", description="Marker Id", value=0, uid=[0], range=(0, 32, 1)), + desc.GroupAttribute(name="markerCoord", label="Coord", description="", joinChar=",", groupDesc=[ + desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.FloatParam(name="z", label="z", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + ]) + ]), + label="Markers", + description="Markers alignment points", + ), + desc.BoolParam( + name='applyScale', + label='Scale', + description='Apply scale transformation.', + value=True, + uid=[0] + ), + desc.BoolParam( + name='applyRotation', + label='Rotation', + description='Apply rotation transformation.', + value=True, + uid=[0] + ), + desc.BoolParam( + name='applyTranslation', + label='Translation', + description='Apply translation transformation.', + value=True, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From e37015b069d84f6411c9512b0ec0316968b59359 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Sep 2019 10:44:51 +0200 Subject: [PATCH 0245/1093] [nodes] SfMAlignment: support multiple methods: views ids, pose ids, filepath pattern, specific metadata, markers ids --- meshroom/aliceVision/SfMAlignment.py | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index ab8614e634..798ce1c59c 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -22,6 +22,65 @@ class SfMAlignment(desc.CommandLineNode): value='', uid=[0], ), + desc.ChoiceParam( + name='method', + label='Alignment Method', + description="Alignment Method:\n" + " * from_cameras_viewid: Align cameras with same view Id\n" + " * from_cameras_poseid: Align cameras with same pose Id\n" + " * from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n" + " * from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n" + " * from_markers: Align from markers with the same Id\n", + value='from_cameras_viewid', + values=['from_cameras_viewid', 'from_cameras_poseid', 'from_cameras_filepath', 'from_cameras_metadata', 'from_markers'], + exclusive=True, + uid=[0], + ), + desc.StringParam( + name='fileMatchingPattern', + label='File Matching Pattern', + description='Matching regular expression for the "from_cameras_filepath" method. ' + 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' + 'Some examples of patterns:\n' + ' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"\n' + ' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"\n' + ' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"\n', + value='.*\/(.*?)\.\w{3}', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="metadataMatching", + label="Metadata", + description="", + value="", + uid=[0], + ), + name="metadataMatchingList", + label="Metadata Matching List", + description='List of metadata that should match to create the correspondences. If the list is empty, the default value will be used: ["Make", "Model", "Exif:BodySerialNumber", "Exif:LensSerialNumber"].', + ), + desc.BoolParam( + name='applyScale', + label='Scale', + description='Apply scale transformation.', + value=True, + uid=[0] + ), + desc.BoolParam( + name='applyRotation', + label='Rotation', + description='Apply rotation transformation.', + value=True, + uid=[0] + ), + desc.BoolParam( + name='applyTranslation', + label='Translation', + description='Apply translation transformation.', + value=True, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From d116db2a6ab9ad192bc6048124e017de585550d3 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Sep 2019 23:45:08 +0200 Subject: [PATCH 0246/1093] [nodes] new SfMTransfer node to retrieve poses and intrinsics from another reconstruction with matching views --- meshroom/aliceVision/SfMTransfer.py | 94 +++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 meshroom/aliceVision/SfMTransfer.py diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py new file mode 100644 index 0000000000..a30695ca26 --- /dev/null +++ b/meshroom/aliceVision/SfMTransfer.py @@ -0,0 +1,94 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class SfMTransfer(desc.CommandLineNode): + commandLine = 'aliceVision_utils_sfmTransfer {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file .''', + value='', + uid=[0], + ), + desc.File( + name='reference', + label='Reference', + description='''Path to the scene used as the reference to retrieve resolved poses and intrinsics.''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='method', + label='Matching Method', + description="Matching Method:\n" + " * from_viewid: Align cameras with same view Id\n" + " * from_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n" + " * from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n", + value='from_viewid', + values=['from_viewid', 'from_filepath', 'from_metadata'], + exclusive=True, + uid=[0], + ), + desc.StringParam( + name='fileMatchingPattern', + label='File Matching Pattern', + description='Matching regular expression for the "from_cameras_filepath" method. ' + 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' + 'Some examples of patterns:\n' + ' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"\n' + ' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"\n' + ' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"\n', + value='.*\/(.*?)\.\w{3}', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="metadataMatching", + label="Metadata", + description="", + value="", + uid=[0], + ), + name="metadataMatchingList", + label="Metadata Matching List", + description='List of metadata that should match to create the correspondences. If the list is empty, the default value will be used: ["Make", "Model", "Exif:BodySerialNumber", "Exif:LensSerialNumber"].', + ), + desc.BoolParam( + name='transferPoses', + label='Poses', + description='Transfer poses.', + value=True, + uid=[0] + ), + desc.BoolParam( + name='transferIntrinsics', + label='Intrinsics', + description='Transfer cameras intrinsics.', + value=True, + 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', + description='SfMData file.', + value=desc.Node.internalFolder + 'sfmData.abc', + uid=[], + ), + ] From 2489ccee66b5f25c9a37e6a5a9fcb0866606f0fa Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 1 Oct 2019 14:00:55 +0200 Subject: [PATCH 0247/1093] adding a node for rotating head xml --- meshroom/aliceVision/PanoramaExternalInfo.py | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meshroom/aliceVision/PanoramaExternalInfo.py diff --git a/meshroom/aliceVision/PanoramaExternalInfo.py b/meshroom/aliceVision/PanoramaExternalInfo.py new file mode 100644 index 0000000000..69e8e50bab --- /dev/null +++ b/meshroom/aliceVision/PanoramaExternalInfo.py @@ -0,0 +1,47 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class PanoramaExternalInfo(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaExternalInfo {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + uid=[0], + ), + desc.File( + name='config', + label='Xml Config', + description="XML 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='outSfMDataFilename', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfmData.abc', + uid=[], + ) + ] From 2ba39985a064619f37bec9090a9c0c27ccba94c2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 1 Oct 2019 16:08:03 +0200 Subject: [PATCH 0248/1093] [nodes] DepthMap: fix labels of the 2 "step" params --- meshroom/aliceVision/DepthMap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index ba14361d51..2da0cfcf21 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -62,7 +62,7 @@ class DepthMap(desc.CommandLineNode): ), desc.IntParam( name='sgmStepXY', - label='SGM: Step', + label='SGM: Step XY', description='Semi Global Matching: Step used to compute the similarity volume on X and Y axis.', value=-1, range=(-1, 10, 1), @@ -70,7 +70,7 @@ class DepthMap(desc.CommandLineNode): ), desc.IntParam( name='sgmStepZ', - label='SGM: Step', + label='SGM: Step Z', description='Semi Global Matching: Step used to compute the similarity volume on Z axis.', value=-1, range=(-1, 10, 1), From aabcfa9546733cb8a23c8df880a739855395a667 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 15 Oct 2019 15:18:16 +0200 Subject: [PATCH 0249/1093] restart stitching --- meshroom/aliceVision/PanoramaStitching.py | 65 +++-------------------- 1 file changed, 8 insertions(+), 57 deletions(-) diff --git a/meshroom/aliceVision/PanoramaStitching.py b/meshroom/aliceVision/PanoramaStitching.py index d3123fb09f..5158d9911e 100644 --- a/meshroom/aliceVision/PanoramaStitching.py +++ b/meshroom/aliceVision/PanoramaStitching.py @@ -28,64 +28,15 @@ class PanoramaStitching(desc.CommandLineNode): uid=[0], group='', # not part of allParams, as this is not a parameter for the command line ), - desc.FloatParam( - name='scaleFactor', - label='Scale Factor', - description='Scale factor to resize the output resolution (e.g. 0.5 for downscaling to half resolution).', - value=0.2, - range=(0.0, 2.0, 0.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=[], ), - desc.BoolParam( - name='fisheyeMasking', - label='Enable Fisheye Masking', - description='For fisheye images, skip the invalid pixels on the borders.', - value=False, - uid=[0], - ), - desc.FloatParam( - name='fisheyeMaskingMargin', - label='Fisheye Masking Margin', - description='Margin for fisheye images.', - value=0.05, - range=(0.0, 0.5, 0.01), - uid=[0], - ), - desc.FloatParam( - name='transitionSize', - label='Transition Size', - description='Size of the transition between images (in pixels).', - value=100.0, - range=(0.0, 500.0, 1.0), - uid=[0], - ), - desc.IntParam( - name='debugSubsetStart', - label='Debug: Start Index of SubSet', - description='Start index of subset images to merge.', - value=0, - range=(0, 80, 1), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='debugSubsetSize', - label='Debug: Nb Images in SubSet', - description='Number of images in subset to merge.', - value=0, - range=(0, 80, 1), - uid=[0], - advanced=True, - ), - 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 = [ From 855278c9883e841ebe5aca60d378bdc1d61416c0 Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Thu, 24 Oct 2019 09:42:15 +0200 Subject: [PATCH 0250/1093] Control panorama width --- meshroom/aliceVision/PanoramaStitching.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/PanoramaStitching.py b/meshroom/aliceVision/PanoramaStitching.py index 5158d9911e..8621fe3b41 100644 --- a/meshroom/aliceVision/PanoramaStitching.py +++ b/meshroom/aliceVision/PanoramaStitching.py @@ -28,6 +28,14 @@ class PanoramaStitching(desc.CommandLineNode): uid=[0], group='', # not part of allParams, as this is not a parameter for the command line ), + desc.IntParam( + name='panoramaWidth', + label='Panorama Width', + description='Panorama width (pixels). 0 For automatic size', + value=1000, + range=(0, 50000, 1000), + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 65bc80968dfd9772f81f24369dc446ff47c2314f Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Thu, 24 Oct 2019 16:01:01 +0200 Subject: [PATCH 0251/1093] Make a compatible LDRToHDR node --- meshroom/aliceVision/LDRToHDR.py | 128 +++++++------------------------ 1 file changed, 28 insertions(+), 100 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index ad36c17d85..2b214be746 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -1,128 +1,56 @@ __version__ = "1.0" +import json +import os + from meshroom.core import desc class LDRToHDR(desc.CommandLineNode): commandLine = 'aliceVision_convertLDRToHDR {allParams}' + size = desc.DynamicNodeSize('input') inputs = [ - desc.ListAttribute( - elementDesc=desc.File( - name='inputFolder', - label='Input File/Folder', - description="Folder containing LDR images", - value='', - uid=[0], - ), - name="input", - label="Input Files or Folders", - description='Folders containing LDR images.', - ), - desc.BoolParam( - name='fisheyeLens', - label='Fisheye Lens', - description="Enable if a fisheye lens has been used.\n " - "This will improve the estimation of the Camera's Response Function by considering only the pixels in the center of the image\n" - "and thus ignore undefined/noisy pixels outside the circle defined by the fisheye lens.", - value=True, - uid=[0], - ), - desc.ChoiceParam( - name='calibrationMethod', - label='Calibration Method', - description="Method used for camera calibration \n" - " * linear \n" - " * robertson \n" - " * debevec \n" - " * grossberg", - values=['linear', 'robertson', 'debevec', 'grossberg'], - value='linear', - exclusive=True, - uid=[0], - ), desc.File( - name='inputResponse', - label='Input Response', - description="external camera response file path to fuse all LDR images together.", - value='', - uid=[0], - ), - desc.StringParam( - name='targetExposureImage', - label='Target Exposure Image', - description="LDR image(s) name(s) at the target exposure for the output HDR image(s) to be centered.", + name='input', + label='Input', + description="SfM Data File", value='', uid=[0], ), - desc.ChoiceParam( - name='calibrationWeight', - label='Calibration Weight', - description="Weight function used to calibrate camera response \n" - " * default (automatically selected according to the calibrationMethod) \n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='default', - values=['default', 'gaussian', 'triangle', 'plateau'], - exclusive=True, - uid=[0], - ), - desc.ChoiceParam( - name='fusionWeight', - label='Fusion Weight', - description="Weight function used to fuse all LDR images together \n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='gaussian', - values=['gaussian', 'triangle', 'plateau'], - exclusive=True, - uid=[0], - ), - desc.FloatParam( - name='expandDynamicRange', - label='Expand Dynamic Range', - description="Correction of clamped high values in dynamic range: \n" - " - use 0 for no correction \n" - " - use 0.5 for interior lighting \n" - " - use 1 for outdoor lighting", - value=1, - range=(0, 1, 0.1), - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', - description="Verbosity level (fatal, error, warning, info, debug, trace).", + description='Verbosity level (fatal, error, warning, info, debug, trace).', value='info', values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], ), - desc.File( - name='recoverPath', - label='Output Recovered Files', - description="(debug) Folder for recovered LDR images at target exposures.", - advanced=True, - value='', - uid=[], + desc.IntParam( + name='groupSize', + label='Exposure bracket count', + description='Number of exposure brackets used per HDR image', + value=3, + range=(0, 10, 1), + uid=[0] + ), + desc.FloatParam( + name='expandDynamicRange', + label='Expand Dynamic Range', + description='float value between 0 and 1 to correct clamped high values in dynamic range: use 0 for no correction, 0.5 for interior lighting and 1 for outdoor lighting.', + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0], ), ] outputs = [ desc.File( - name='output', - label='Output Folder', - description="Output folder for HDR images", - value=desc.Node.internalFolder, + name='outSfMDataFilename', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfmData.abc', uid=[], - ), - desc.File( - name='outputResponse', - label='Output Response', - description="Output response function path.", - value=desc.Node.internalFolder + 'response.csv', - uid=[], - ), + ) ] From bf871d7d1a7220ed490c6841e4acc1ff60775f6b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 25 Oct 2019 11:55:39 +0200 Subject: [PATCH 0252/1093] [nodes] LDR2HDR: resize dynamic node size based on groupSize param --- meshroom/aliceVision/LDRToHDR.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 2b214be746..4b301573b9 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -6,9 +6,23 @@ from meshroom.core import desc +class DividedInputNodeSize(desc.DynamicNodeSize): + """ + The LDR2HDR will reduce the amount of views in the SfMData. + This class converts the number of LDR input views into the number of HDR output views. + """ + def __init__(self, param, divParam): + super(DividedInputNodeSize, self).__init__(param) + self._divParam = divParam + def computeSize(self, node): + s = super(DividedInputNodeSize, self).computeSize(node) + divParam = node.attribute(self._divParam) + return s / divParam.value + + class LDRToHDR(desc.CommandLineNode): commandLine = 'aliceVision_convertLDRToHDR {allParams}' - size = desc.DynamicNodeSize('input') + size = DividedInputNodeSize('input', 'groupSize') inputs = [ desc.File( From 481c9834f74a60d011c882d55dc191bcd4bf2e73 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 23 Oct 2019 16:03:26 +0200 Subject: [PATCH 0253/1093] [nodes] StructureFromMotion: expose new parameters minNbCamerasToRefinePrincipalPoint and rigMinNbCamerasForCalibration --- meshroom/aliceVision/StructureFromMotion.py | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index e592df5501..6dd269b8af 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -198,15 +198,36 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='rigMinNbCamerasForCalibration', + label='Min Nb Cameras For Rig Calibration', + description='Minimal number of cameras to start the calibration of the rig', + value=20, + range=(1, 50, 1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters.', + label='Force Lock of All Intrinsic Camera Parameters', description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' 'principal point, distortion if any) during the reconstruction.\n' 'This may be helpful if the input cameras are already fully calibrated.', value=False, uid=[0], ), + desc.IntParam( + name='minNbCamerasToRefinePrincipalPoint', + label='Min Nb Cameras To Refine Principal Point', + description='Minimal number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera). ' + 'If we do not have enough cameras, the principal point in consider is considered in the center of the image. ' + 'If minNbCamerasToRefinePrincipalPoint<=0, the principal point is never refined. ' + 'If minNbCamerasToRefinePrincipalPoint==1, the principal point is always refined.', + value=3, + range=(0, 20, 1), + uid=[0], + advanced=True, + ), desc.File( name='initialPairA', label='Initial Pair A', From 92eca61f3d5269ee1e124dc6f6cb62119045d3ed Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 5 Nov 2019 11:58:18 +0100 Subject: [PATCH 0254/1093] [nodes] add new node SfMDistances --- meshroom/aliceVision/SfMDistances.py | 67 ++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 meshroom/aliceVision/SfMDistances.py diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py new file mode 100644 index 0000000000..24ab23542d --- /dev/null +++ b/meshroom/aliceVision/SfMDistances.py @@ -0,0 +1,67 @@ +__version__ = "3.0" + +from meshroom.core import desc + + +class SfMDistances(desc.CommandLineNode): + commandLine = 'aliceVision_utils_sfmDistances {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='objectType', + label='Type', + description='', + value='landmarks', + values=['landmarks', 'cameras'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='landmarksDescriberTypes', + label='Describer Types', + description='Describer types used to describe an image (only used when using "landmarks").', + value=['cctag3'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.StringParam( + name='A', + label='A IDs', + description='It will display the distances between A and B elements.\n' + 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' + 'It will list all elements if empty.', + value='', + uid=[0], + ), + desc.StringParam( + name='B', + label='B IDs', + description='It will display the distances between A and B elements.\n' + 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' + 'It will list all elements if empty.', + 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 = [ + ] From e3f1a35d8ef710365d2bef5af4953240f1277d2c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 5 Nov 2019 11:58:59 +0100 Subject: [PATCH 0255/1093] [nodes] SfMTransform: update param tooltip --- meshroom/aliceVision/SfMTransform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 6a9a975a84..96592aa09b 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -34,7 +34,7 @@ class SfMTransform(desc.CommandLineNode): label='Transformation', description="Required only for 'transformation' and 'from_single_camera' methods:\n" " * transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" - " * from_single_camera: Camera UID or image filename", + " * from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg')", value='', uid=[0], ), From f7a8b7a711773ce829e2a88d38a45a2958b3be5f Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Fri, 8 Nov 2019 09:36:00 +0100 Subject: [PATCH 0256/1093] Adding node for camera downscale --- meshroom/aliceVision/CameraDownscale.py | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 meshroom/aliceVision/CameraDownscale.py diff --git a/meshroom/aliceVision/CameraDownscale.py b/meshroom/aliceVision/CameraDownscale.py new file mode 100644 index 0000000000..894c3cc3c6 --- /dev/null +++ b/meshroom/aliceVision/CameraDownscale.py @@ -0,0 +1,49 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class CameraDownscale(desc.CommandLineNode): + commandLine = 'aliceVision_cameraDownscale {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + uid=[0], + ), + desc.FloatParam( + name='rescalefactor', + label='RescaleFactor', + description='Newsize = rescalefactor * oldsize', + value=0.5, + range=(0.0, 1.0, 0.1), + uid=[0], + advanced=True, + ), + 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='outSfMDataFilename', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfmData.abc', + uid=[], + ) + ] From 7837025cbe6bf9d6a9675962fe28ad2ba4e8754a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 12 Nov 2019 12:57:41 +0100 Subject: [PATCH 0257/1093] [nodes] LDRToHDR: expose more options --- meshroom/aliceVision/LDRToHDR.py | 83 ++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 4b301573b9..22616e5b46 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -32,15 +32,6 @@ class LDRToHDR(desc.CommandLineNode): 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=[], - ), desc.IntParam( name='groupSize', label='Exposure bracket count', @@ -57,6 +48,80 @@ class LDRToHDR(desc.CommandLineNode): range=(0.0, 1.0, 0.01), uid=[0], ), + desc.BoolParam( + name='fisheyeLens', + label='Fisheye Lens', + description="Enable if a fisheye lens has been used.\n " + "This will improve the estimation of the Camera's Response Function by considering only the pixels in the center of the image\n" + "and thus ignore undefined/noisy pixels outside the circle defined by the fisheye lens.", + value=False, + uid=[0], + ), + desc.ChoiceParam( + name='calibrationMethod', + label='Calibration Method', + description="Method used for camera calibration \n" + " * linear \n" + " * robertson \n" + " * debevec \n" + " * grossberg", + values=['linear', 'robertson', 'debevec', 'grossberg'], + value='linear', + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='calibrationWeight', + label='Calibration Weight', + description="Weight function used to calibrate camera response \n" + " * default (automatically selected according to the calibrationMethod) \n" + " * gaussian \n" + " * triangle \n" + " * plateau", + value='default', + values=['default', 'gaussian', 'triangle', 'plateau'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='fusionWeight', + label='Fusion Weight', + description="Weight function used to fuse all LDR images together \n" + " * gaussian \n" + " * triangle \n" + " * plateau", + value='gaussian', + values=['gaussian', 'triangle', 'plateau'], + exclusive=True, + uid=[0], + ), + desc.IntParam( + name='calibrationNbPoints', + label='Calibration Nb Points', + description='Internal number of points used for calibration.', + value=0, + range=(0, 10000000, 1000), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='channelQuantizationPower', + label='Channel Quantization Power', + description='Quantization level like 8 bits or 10 bits.', + value=10, + range=(8, 14, 1), + uid=[0], + advanced=True, + ), + 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 = [ From c50e2e32d4fc4741267c3e27e7804c770fcc8b14 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 13 Nov 2019 17:42:53 +0100 Subject: [PATCH 0258/1093] Splitting compositing and warping --- ...amaStitching.py => PanoramaCompositing.py} | 14 ++---- meshroom/aliceVision/PanoramaWarping.py | 48 +++++++++++++++++++ 2 files changed, 51 insertions(+), 11 deletions(-) rename meshroom/aliceVision/{PanoramaStitching.py => PanoramaCompositing.py} (75%) create mode 100644 meshroom/aliceVision/PanoramaWarping.py diff --git a/meshroom/aliceVision/PanoramaStitching.py b/meshroom/aliceVision/PanoramaCompositing.py similarity index 75% rename from meshroom/aliceVision/PanoramaStitching.py rename to meshroom/aliceVision/PanoramaCompositing.py index 8621fe3b41..538215b16d 100644 --- a/meshroom/aliceVision/PanoramaStitching.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -6,15 +6,15 @@ from meshroom.core import desc -class PanoramaStitching(desc.CommandLineNode): - commandLine = 'aliceVision_panoramaStitching {allParams}' +class PanoramaCompositing(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaCompositing {allParams}' size = desc.DynamicNodeSize('input') inputs = [ desc.File( name='input', label='Input', - description="SfM Data File", + description="Panorama Warping result", value='', uid=[0], ), @@ -28,14 +28,6 @@ class PanoramaStitching(desc.CommandLineNode): uid=[0], group='', # not part of allParams, as this is not a parameter for the command line ), - desc.IntParam( - name='panoramaWidth', - label='Panorama Width', - description='Panorama width (pixels). 0 For automatic size', - value=1000, - range=(0, 50000, 1000), - uid=[0] - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py new file mode 100644 index 0000000000..0034630fa1 --- /dev/null +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -0,0 +1,48 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class PanoramaWarping(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaWarping {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + uid=[0], + ), + desc.IntParam( + name='panoramaWidth', + label='Panorama Width', + description='Panorama width (pixels). 0 For automatic size', + value=1000, + range=(0, 50000, 1000), + 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 directory', + description='', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 7ecb112b269a7b27b113a4948585b93fcbdf462e Mon Sep 17 00:00:00 2001 From: Guillaume Buisson <contact@guillaume.io> Date: Mon, 21 Oct 2019 15:58:36 +0200 Subject: [PATCH 0259/1093] [nodes] new ImageMasking node --- meshroom/aliceVision/ImageMasking.py | 73 ++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 meshroom/aliceVision/ImageMasking.py diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py new file mode 100644 index 0000000000..bdd2891ccc --- /dev/null +++ b/meshroom/aliceVision/ImageMasking.py @@ -0,0 +1,73 @@ +__version__ = "3.0" + +from meshroom.core import desc + + +class ImageMasking(desc.CommandLineNode): + commandLine = 'aliceVision_imageMasking {allParams}' + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=40) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + ), + #desc.GroupAttribute( + # name="colour", + # label="Keyed Colour", + # description="", + # groupDesc=[ + # desc.FloatParam(name="r", label="r", description="", value=0, uid=[0], range=(0, 1, 0.01)), + # desc.FloatParam(name="g", label="g", description="", value=0, uid=[0], range=(0, 1, 0.01)), + # desc.FloatParam(name="b", label="b", description="", value=0, uid=[0], range=(0, 1, 0.01)), + # ]), + desc.ChoiceParam( + name='algorithm', + label='Algorithm', + description='', + value='hsv', + values=['hsv'], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name='hue', + label='Hue', + description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', + value=0.33, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='hueRange', + label='Tolerance', + description='Tolerance around the hue value to isolate.', + value=0.1, + range=(0, 1, 0.01), + 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', + description='''Output folder.''', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 01cef46ace9138fb9c382cf08cf3fb2bbf68f51b Mon Sep 17 00:00:00 2001 From: Guillaume Buisson <contact@guillaume.io> Date: Fri, 15 Nov 2019 16:37:54 +0100 Subject: [PATCH 0260/1093] [nodes] update imageMasking featureExtraction and prepareDenseScene --- meshroom/aliceVision/FeatureExtraction.py | 7 ++ meshroom/aliceVision/ImageMasking.py | 96 ++++++++++++++++++----- meshroom/aliceVision/PrepareDenseScene.py | 12 +++ 3 files changed, 94 insertions(+), 21 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index e5c1cfd4cf..03bc07a3c2 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -17,6 +17,13 @@ class FeatureExtraction(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='masksFolder', + label='Masks Folder', + description='Use masks to filter features. Filename should be the same or the image uid.', + value='', + uid=[0], + ), desc.ChoiceParam( name='describerTypes', label='Describer Types', diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index bdd2891ccc..457016e955 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -17,15 +17,6 @@ class ImageMasking(desc.CommandLineNode): value='', uid=[0], ), - #desc.GroupAttribute( - # name="colour", - # label="Keyed Colour", - # description="", - # groupDesc=[ - # desc.FloatParam(name="r", label="r", description="", value=0, uid=[0], range=(0, 1, 0.01)), - # desc.FloatParam(name="g", label="g", description="", value=0, uid=[0], range=(0, 1, 0.01)), - # desc.FloatParam(name="b", label="b", description="", value=0, uid=[0], range=(0, 1, 0.01)), - # ]), desc.ChoiceParam( name='algorithm', label='Algorithm', @@ -35,20 +26,83 @@ class ImageMasking(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.FloatParam( - name='hue', - label='Hue', - description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', - value=0.33, - range=(0, 1, 0.01), + desc.GroupAttribute( + name="hsv", + label="HSV Parameters", + description="", + formatter=desc.GroupAttribute.prefixFormatter, + joinChar='-', + groupDesc=[ + desc.FloatParam( + name='hue', + label='Hue', + description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', + value=0.33, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='hueRange', + label='Tolerance', + description='Tolerance around the hue value to isolate.', + value=0.1, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='minSaturation', + label='Min Saturation', + description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', + value=0.3, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='maxSaturation', + label='Max Saturation', + description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', + value=1, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='minValue', + label='Min Value', + description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', + value=0.3, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='maxValue', + label='Max Value', + description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', + value=1, + range=(0, 1, 0.01), + uid=[0] + ), + ]), + desc.BoolParam( + name='invert', + label='Invert', + description='Invert the selected area.', + value=False, uid=[0] ), - desc.FloatParam( - name='hueRange', - label='Tolerance', - description='Tolerance around the hue value to isolate.', - value=0.1, - range=(0, 1, 0.01), + desc.IntParam( + name='growRadius', + label='Grow Radius', + description='Grow the selected area. It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.', + value=0, + range=(0, 50, 1), + uid=[0] + ), + desc.IntParam( + name='shrinkRadius', + label='Shrink Radius', + description='Shrink the selected area.', + value=0, + range=(0, 50, 1), uid=[0] ), desc.ChoiceParam( diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 5467d576ab..816305d62c 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -29,6 +29,18 @@ class PrepareDenseScene(desc.CommandLineNode): label="Images Folders", description='Use images from specific folder(s). Filename should be the same or the image uid.', ), + desc.ListAttribute( + elementDesc=desc.File( + name="masksFolder", + label="Masks Folder", + description="", + value="", + uid=[0], + ), + name="masksFolders", + label="Masks Folders", + description='Use masks from specific folder(s). Filename should be the same or the image uid.', + ), desc.ChoiceParam( name='outputFileType', label='Output File Type', From 8eb790086ddcf354f0db7f373071c19c06820937 Mon Sep 17 00:00:00 2001 From: Guillaume Buisson <contact@guillaume.io> Date: Fri, 15 Nov 2019 17:19:03 +0100 Subject: [PATCH 0261/1093] [nodes] add semantic to customize attibute UI --- meshroom/aliceVision/ImageMasking.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 457016e955..4d441e9261 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -37,6 +37,7 @@ class ImageMasking(desc.CommandLineNode): name='hue', label='Hue', description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', + semantic='color/hue', value=0.33, range=(0, 1, 0.01), uid=[0] From 00f2bef50dfdef6688da6221fc717468636f9e3b Mon Sep 17 00:00:00 2001 From: Guillaume Buisson <contact@guillaume.io> Date: Thu, 21 Nov 2019 08:56:37 +0100 Subject: [PATCH 0262/1093] [nodes] add image masking description --- meshroom/aliceVision/ImageMasking.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 4d441e9261..05c8ddea79 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -29,7 +29,11 @@ class ImageMasking(desc.CommandLineNode): desc.GroupAttribute( name="hsv", label="HSV Parameters", - description="", + description="""Values to select: + - Green: default values + - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1 + - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 + """, formatter=desc.GroupAttribute.prefixFormatter, joinChar='-', groupDesc=[ @@ -86,8 +90,9 @@ class ImageMasking(desc.CommandLineNode): desc.BoolParam( name='invert', label='Invert', - description='Invert the selected area.', - value=False, + description='''If ticked, the selected area is ignored. + If not, only the selected area is considered.''', + value=True, uid=[0] ), desc.IntParam( From d5846b720b1ac3de0732ac58da65a0b82144e28b Mon Sep 17 00:00:00 2001 From: natowi <natowi@users.noreply.github.com> Date: Sun, 24 Nov 2019 14:42:32 +0100 Subject: [PATCH 0263/1093] Fix typo, add reference add title of citation to comments to better find the publication https://dl.acm.org/citation.cfm?id=2818068 --- meshroom/aliceVision/MeshDenoising.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 438e611ca7..6293316689 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -69,7 +69,8 @@ class MeshDenoising(desc.CommandLineNode): label='Mesh Update Method', description='Mesh Update Method\n' ' * ITERATIVE_UPDATE (default): ShapeUp styled iterative solver \n' - ' * POISSON_UPDATE: Poisson-based update from [Want et al. 2015]', + ' * POISSON_UPDATE: Poisson-based update from [Wang et al. 2015]', + # [Wang et al. 2015] Rolling guidance normal filter for geometric processing value=0, values=(0, 1), exclusive=True, From b6ecc3d03f6d6cf8c2ca48dc3f56aee2faa3b172 Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Mon, 25 Nov 2019 08:49:52 +0100 Subject: [PATCH 0264/1093] add option for multiband --- meshroom/aliceVision/PanoramaCompositing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 538215b16d..3b587c5a52 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -28,6 +28,13 @@ class PanoramaCompositing(desc.CommandLineNode): uid=[0], group='', # not part of allParams, as this is not a parameter for the command line ), + desc.BoolParam( + name='multiband', + label='Use Multiband', + description='Use multi band algorithm for compositing', + value=False, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From ba0cc2cd237c9a370b10105eeaac700a62ee558f Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Mon, 25 Nov 2019 20:01:41 +0000 Subject: [PATCH 0265/1093] add SketchfabUpload node --- meshroom/aliceVision/SketchfabUpload.py | 200 ++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 meshroom/aliceVision/SketchfabUpload.py diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py new file mode 100644 index 0000000000..e0444d2e80 --- /dev/null +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -0,0 +1,200 @@ +__version__ = "1.0" + +from meshroom.core import desc +import glob +import os +import json +import zipfile +import requests +import io + + +class BufferReader(io.BytesIO): # object to call the callback while the file is being uploaded + def __init__(self, buf=b'', + callback=None, + cb_args=(), + cb_kwargs={}): + self._callback = callback + self._cb_args = cb_args + self._cb_kwargs = cb_kwargs + self._progress = 0 + self._len = len(buf) + io.BytesIO.__init__(self, buf) + + def __len__(self): + return self._len + + def read(self, n=-1): + chunk = io.BytesIO.read(self, n) + self._progress += int(len(chunk)) + self._cb_kwargs.update({ + 'size' : self._len, + 'progress': self._progress + }) + if self._callback: + try: + self._callback(*self._cb_args, **self._cb_kwargs) + except Exception as e: # catches exception from the callback + self._cb_kwargs['logManager'].logger.warning('Error at callback: {}'.format(e)) + return chunk + +def progressUpdate(size=None, progress=None, logManager=None): + if not logManager.progressBar: + logManager.makeProgressBar(size, 'Upload progress:') + + logManager.updateProgressBar(progress) + +class SketchfabUpload(desc.Node): + size = desc.DynamicNodeSize('inputFiles') + inputs = [ + desc.ListAttribute( + elementDesc=desc.File( + name="input", + label="Input", + description="", + value="", + uid=[0], + ), + name="inputFiles", + label="Input Files", + description="Input Files to export.", + group="", + ), + desc.ChoiceParam( + name='maxSize', + label='Maximum Upload Size', + description='The maximum upload size in MB.', + value=50, + values=(50, 200, 500), + exclusive=True, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='limitSize', + label='Limit Upload Size', + description='Change maximum download size in advanced attributes.', + value=True, + uid=[0], + ), + desc.StringParam( + name='apiToken', + label='API Token', + description='Get your token from https://sketchfab.com/settings/password', + value='', + uid=[0], + ), + desc.StringParam( + name='title', + label='Title', + description='Title cannot be longer than 48 characters.', + value='', + uid=[0], + ), + desc.StringParam( + name='description', + label='Description', + description='Description cannot be longer than 1024 characters.', + value='', + uid=[0], + ), + desc.StringParam( + name='license', + label='License', + description='License label.', + value='CC Attribution', + uid=[0], + ), + desc.BoolParam( + name='isPublished', + label='Publish', + description='If the model is not published it will be saved as a draft.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='isInspectable', + label='Inspectable', + description='Allow 2D view in model inspector.', + value=True, + uid=[0], + ), + desc.ChoiceParam( + name='verboseLevel', + label='Verbose Level', + description='''verbosity level (critical, error, warning, info, debug).''', + value='info', + values=['critical', 'error', 'warning', 'info', 'debug'], + exclusive=True, + uid=[], + ), + ] + + def resolvedPaths(self, inputFiles): + paths = [] + for inputFile in inputFiles: + for f in glob.glob(inputFile.value): + paths.append(f) + return paths + + def upload(self, apiToken, modelFile, data, chunk): + modelEndpoint = 'https://api.sketchfab.com/v3/models' + f = open(modelFile, 'rb') + file = {'modelFile': (os.path.basename(modelFile), f.read()), **data} + (files, contentType) = requests.packages.urllib3.filepost.encode_multipart_formdata(file) + headers = {'Authorization': 'Token {}'.format(apiToken), 'Content-Type': contentType} + body = BufferReader(files, progressUpdate, cb_kwargs={'logManager': chunk.logManager}) + chunk.logger.info('Uploading...') + try: + r = requests.post( + modelEndpoint, **{'data': body, 'headers': headers}) + f.close() + chunk.logManager.completeProgressBar() + except requests.exceptions.RequestException as e: + f.close() + chunk.logger.error(u'An error occured: {}'.format(e)) + raise RuntimeError() + if r.status_code != requests.codes.created: + chunk.logger.error(u'Upload failed with error: {}'.format(r.json())) + raise RuntimeError() + + def processChunk(self, chunk): + chunk.logManager.waitUntilCleared() + chunk.logger.setLevel(chunk.logManager.textToLevel(chunk.node.verboseLevel.value)) + + if not chunk.node.inputFiles: + chunk.logger.warning('Nothing to upload') + return + if len(chunk.node.title.value) > 48: + chunk.logger.error('Title cannot be longer than 48 characters.') + raise RuntimeError() + if len(chunk.node.description.value) > 1024: + chunk.logger.error('Description cannot be longer than 1024 characters.') + raise RuntimeError() + if chunk.node.apiToken.value == '': + chunk.logger.error('Need API token.') + raise RuntimeError() + data = { + 'name': chunk.node.title.value, + 'description': chunk.node.description.value, + 'license': chunk.node.license.value, + 'isPublished': chunk.node.isPublished.value, + 'isInspectable': chunk.node.isInspectable.value + } + # pack files into .zip to reduce file size and simplify process + uploadFile = os.path.join(chunk.node.internalFolder, 'temp.zip') + files = self.resolvedPaths(chunk.node.inputFiles.value) + zf = zipfile.ZipFile(uploadFile, 'w') + for file in files: + zf.write(file, os.path.basename(file)) + zf.close() + chunk.logger.info('Successfully created {}'.format(uploadFile)) + + fileSize = os.path.getsize(uploadFile)/1000000 + chunk.logger.info('File size: {}MB'.format(fileSize)) + if chunk.node.limitSize.value and fileSize > chunk.node.maxSize.value: + chunk.logger.error('File too big.') + raise RuntimeError() + + self.upload(chunk.node.apiToken.value, uploadFile, data, chunk) + chunk.logger.info('Upload successful. Your model is being processed on Sketchfab. It may take some time to show up on your "models" page.') From 8208ede6b56167007bda89691733959231a28f88 Mon Sep 17 00:00:00 2001 From: natowi <natowi@users.noreply.github.com> Date: Tue, 26 Nov 2019 12:52:24 +0100 Subject: [PATCH 0266/1093] Update MeshDenoising.py --- meshroom/aliceVision/MeshDenoising.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 6293316689..807dc7dfa7 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -69,8 +69,7 @@ class MeshDenoising(desc.CommandLineNode): label='Mesh Update Method', description='Mesh Update Method\n' ' * ITERATIVE_UPDATE (default): ShapeUp styled iterative solver \n' - ' * POISSON_UPDATE: Poisson-based update from [Wang et al. 2015]', - # [Wang et al. 2015] Rolling guidance normal filter for geometric processing + ' * POISSON_UPDATE: Poisson-based update from [Wang et al. 2015] "Rolling guidance normal filter for geometric processing"', value=0, values=(0, 1), exclusive=True, From 829955d811f01ca05c97e844fe4db1f105533af3 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Tue, 26 Nov 2019 17:41:10 +0000 Subject: [PATCH 0267/1093] fix files not added to zip when connected to Texture.output --- meshroom/aliceVision/SketchfabUpload.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index e0444d2e80..a919f56c46 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -133,8 +133,13 @@ class SketchfabUpload(desc.Node): def resolvedPaths(self, inputFiles): paths = [] for inputFile in inputFiles: - for f in glob.glob(inputFile.value): - paths.append(f) + if os.path.isdir(inputFile.value): + for path, subdirs, files in os.walk(inputFile.value): + for name in files: + paths.append(os.path.join(path, name)) + else: + for f in glob.glob(inputFile.value): + paths.append(f) return paths def upload(self, apiToken, modelFile, data, chunk): @@ -188,6 +193,7 @@ def processChunk(self, chunk): for file in files: zf.write(file, os.path.basename(file)) zf.close() + chunk.logger.debug('Files added to zip: {}'.format(str(files))) chunk.logger.info('Successfully created {}'.format(uploadFile)) fileSize = os.path.getsize(uploadFile)/1000000 From 7e889f798f2dca720199e93b645bb06111d5f034 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 26 Nov 2019 20:53:24 +0100 Subject: [PATCH 0268/1093] [hdri] update default hdri pipeline --- meshroom/aliceVision/PanoramaEstimation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index bb5a904e77..b785b87223 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -81,7 +81,7 @@ class PanoramaEstimation(desc.CommandLineNode): " * from essential matrix\n" " * from homography matrix", values=['essential_matrix', 'homography_matrix'], - value='essential_matrix', + value='homography_matrix', exclusive=True, uid=[0], advanced=True, @@ -90,7 +90,7 @@ class PanoramaEstimation(desc.CommandLineNode): name='refine', label='Refine', description='Refine camera relative poses, points and optionally internal camera parameter', - value=False, + value=True, uid=[0], ), desc.BoolParam( From 293fe3389cb441e9cd52a5256bc27d520aea97e9 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Thu, 28 Nov 2019 21:33:22 +0000 Subject: [PATCH 0269/1093] update SketchfabUpload node options * changed license to a ChoiceParam * added private and password options --- meshroom/aliceVision/SketchfabUpload.py | 30 +++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index a919f56c46..3ace83fef9 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -98,11 +98,18 @@ class SketchfabUpload(desc.Node): value='', uid=[0], ), - desc.StringParam( + desc.ChoiceParam( name='license', label='License', description='License label.', value='CC Attribution', + values=['CC Attribution', + 'CC Attribution-ShareAlike', + 'CC Attribution-NoDerivs', + 'CC Attribution-NonCommercial', + 'CC Attribution-NonCommercial-ShareAlike', + 'CC Attribution-NonCommercial-NoDerivs'], + exclusive=True, uid=[0], ), desc.BoolParam( @@ -119,6 +126,20 @@ class SketchfabUpload(desc.Node): value=True, uid=[0], ), + desc.BoolParam( + name='isPrivate', + label='Private', + description='Requires a pro account.', + value=False, + uid=[0], + ), + desc.StringParam( + name='password', + label='Password', + description='Requires a pro account.', + value='', + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -179,13 +200,18 @@ def processChunk(self, chunk): if chunk.node.apiToken.value == '': chunk.logger.error('Need API token.') raise RuntimeError() + data = { 'name': chunk.node.title.value, 'description': chunk.node.description.value, 'license': chunk.node.license.value, 'isPublished': chunk.node.isPublished.value, - 'isInspectable': chunk.node.isInspectable.value + 'isInspectable': chunk.node.isInspectable.value, + 'private': chunk.node.isPrivate.value, + 'password': chunk.node.password.value } + chunk.logger.debug('Data to be sent: {}'.format(str(data))) + # pack files into .zip to reduce file size and simplify process uploadFile = os.path.join(chunk.node.internalFolder, 'temp.zip') files = self.resolvedPaths(chunk.node.inputFiles.value) From cd2e9b1b15755d596607cda09ce0b8f738401959 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Fri, 29 Nov 2019 20:04:31 +0000 Subject: [PATCH 0270/1093] implement stopProcess on SketchfabUpload node also delete temporary zip file when node terminates --- meshroom/aliceVision/SketchfabUpload.py | 97 ++++++++++++------------- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 3ace83fef9..c38f26127d 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -13,10 +13,12 @@ class BufferReader(io.BytesIO): # object to call the callback while the file is def __init__(self, buf=b'', callback=None, cb_args=(), - cb_kwargs={}): + cb_kwargs={}, + stopped=None): self._callback = callback self._cb_args = cb_args self._cb_kwargs = cb_kwargs + self._stopped = stopped self._progress = 0 self._len = len(buf) io.BytesIO.__init__(self, buf) @@ -36,6 +38,9 @@ def read(self, n=-1): self._callback(*self._cb_args, **self._cb_kwargs) except Exception as e: # catches exception from the callback self._cb_kwargs['logManager'].logger.warning('Error at callback: {}'.format(e)) + + if self._stopped(): + raise RuntimeError('Node stopped by user') return chunk def progressUpdate(size=None, progress=None, logManager=None): @@ -60,23 +65,6 @@ class SketchfabUpload(desc.Node): description="Input Files to export.", group="", ), - desc.ChoiceParam( - name='maxSize', - label='Maximum Upload Size', - description='The maximum upload size in MB.', - value=50, - values=(50, 200, 500), - exclusive=True, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='limitSize', - label='Limit Upload Size', - description='Change maximum download size in advanced attributes.', - value=True, - uid=[0], - ), desc.StringParam( name='apiToken', label='API Token', @@ -167,24 +155,27 @@ def upload(self, apiToken, modelFile, data, chunk): modelEndpoint = 'https://api.sketchfab.com/v3/models' f = open(modelFile, 'rb') file = {'modelFile': (os.path.basename(modelFile), f.read()), **data} + f.close() (files, contentType) = requests.packages.urllib3.filepost.encode_multipart_formdata(file) headers = {'Authorization': 'Token {}'.format(apiToken), 'Content-Type': contentType} - body = BufferReader(files, progressUpdate, cb_kwargs={'logManager': chunk.logManager}) + body = BufferReader(files, progressUpdate, cb_kwargs={'logManager': chunk.logManager}, stopped=self.stopped) chunk.logger.info('Uploading...') try: r = requests.post( modelEndpoint, **{'data': body, 'headers': headers}) - f.close() chunk.logManager.completeProgressBar() except requests.exceptions.RequestException as e: - f.close() chunk.logger.error(u'An error occured: {}'.format(e)) raise RuntimeError() if r.status_code != requests.codes.created: chunk.logger.error(u'Upload failed with error: {}'.format(r.json())) raise RuntimeError() + def stopped(self): + return self._stopped + def processChunk(self, chunk): + self._stopped = False chunk.logManager.waitUntilCleared() chunk.logger.setLevel(chunk.logManager.textToLevel(chunk.node.verboseLevel.value)) @@ -201,32 +192,40 @@ def processChunk(self, chunk): chunk.logger.error('Need API token.') raise RuntimeError() - data = { - 'name': chunk.node.title.value, - 'description': chunk.node.description.value, - 'license': chunk.node.license.value, - 'isPublished': chunk.node.isPublished.value, - 'isInspectable': chunk.node.isInspectable.value, - 'private': chunk.node.isPrivate.value, - 'password': chunk.node.password.value - } - chunk.logger.debug('Data to be sent: {}'.format(str(data))) - - # pack files into .zip to reduce file size and simplify process - uploadFile = os.path.join(chunk.node.internalFolder, 'temp.zip') - files = self.resolvedPaths(chunk.node.inputFiles.value) - zf = zipfile.ZipFile(uploadFile, 'w') - for file in files: - zf.write(file, os.path.basename(file)) - zf.close() - chunk.logger.debug('Files added to zip: {}'.format(str(files))) - chunk.logger.info('Successfully created {}'.format(uploadFile)) - - fileSize = os.path.getsize(uploadFile)/1000000 - chunk.logger.info('File size: {}MB'.format(fileSize)) - if chunk.node.limitSize.value and fileSize > chunk.node.maxSize.value: - chunk.logger.error('File too big.') + try: + data = { + 'name': chunk.node.title.value, + 'description': chunk.node.description.value, + 'license': chunk.node.license.value, + 'isPublished': chunk.node.isPublished.value, + 'isInspectable': chunk.node.isInspectable.value, + 'private': chunk.node.isPrivate.value, + 'password': chunk.node.password.value + } + chunk.logger.debug('Data to be sent: {}'.format(str(data))) + + # pack files into .zip to reduce file size and simplify process + uploadFile = os.path.join(chunk.node.internalFolder, 'temp.zip') + files = self.resolvedPaths(chunk.node.inputFiles.value) + zf = zipfile.ZipFile(uploadFile, 'w') + for file in files: + zf.write(file, os.path.basename(file)) + zf.close() + chunk.logger.debug('Files added to zip: {}'.format(str(files))) + chunk.logger.debug('Created {}'.format(uploadFile)) + + fileSize = os.path.getsize(uploadFile)/1000000 + chunk.logger.info('File size: {}MB'.format(fileSize)) + + self.upload(chunk.node.apiToken.value, uploadFile, data, chunk) + chunk.logger.info('Upload successful. Your model is being processed on Sketchfab. It may take some time to show up on your "models" page.') + except Exception as e: + chunk.logger.error(e) raise RuntimeError() - - self.upload(chunk.node.apiToken.value, uploadFile, data, chunk) - chunk.logger.info('Upload successful. Your model is being processed on Sketchfab. It may take some time to show up on your "models" page.') + finally: + if os.path.isfile(uploadFile): + os.remove(uploadFile) + chunk.logger.debug('Deleted {}'.format(uploadFile)) + + def stopProcess(self, chunk): + self._stopped = True From b4a47fe9e627b3b8781ef11875488652b29155f7 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Wed, 4 Dec 2019 17:25:36 +0000 Subject: [PATCH 0271/1093] fix compatibility for python < 3.5 --- meshroom/aliceVision/SketchfabUpload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index c38f26127d..5281618d3e 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -154,7 +154,8 @@ def resolvedPaths(self, inputFiles): def upload(self, apiToken, modelFile, data, chunk): modelEndpoint = 'https://api.sketchfab.com/v3/models' f = open(modelFile, 'rb') - file = {'modelFile': (os.path.basename(modelFile), f.read()), **data} + file = {'modelFile': (os.path.basename(modelFile), f.read())} + file.update(data) f.close() (files, contentType) = requests.packages.urllib3.filepost.encode_multipart_formdata(file) headers = {'Authorization': 'Token {}'.format(apiToken), 'Content-Type': contentType} From 5ac2cd2c567c0d8daa9abd56d7a8ac418f62aee6 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Thu, 5 Dec 2019 20:55:05 +0000 Subject: [PATCH 0272/1093] add 'Tags' and 'Category' options to SketchfabUpload node --- meshroom/aliceVision/SketchfabUpload.py | 78 ++++++++++++++++++++----- 1 file changed, 64 insertions(+), 14 deletions(-) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 5281618d3e..c5df59b3c5 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -100,6 +100,46 @@ class SketchfabUpload(desc.Node): exclusive=True, uid=[0], ), + desc.ListAttribute( + elementDesc=desc.StringParam( + name='tag', + label='Tag', + description='Tag cannot be longer than 48 characters.', + value='', + uid=[0], + ), + name="tags", + label="Tags", + description="Maximum of 42 separate tags.", + group="", + ), + desc.ChoiceParam( + name='category', + label='Category', + description='Maximum of 2 categories.', + value='none', + values=['none', + 'animals-pets', + 'architecture', + 'art-abstract', + 'cars-vehicles', + 'characters-creatures', + 'cultural-heritage-history', + 'electronics-gadgets', + 'fashion-style', + 'food-drink', + 'furniture-home', + 'music', + 'nature-plants', + 'news-politics', + 'people', + 'places-travel', + 'science-technology', + 'sports-fitness', + 'weapons-military'], + exclusive=True, + uid=[0], + ), desc.BoolParam( name='isPublished', label='Publish', @@ -138,18 +178,6 @@ class SketchfabUpload(desc.Node): uid=[], ), ] - - def resolvedPaths(self, inputFiles): - paths = [] - for inputFile in inputFiles: - if os.path.isdir(inputFile.value): - for path, subdirs, files in os.walk(inputFile.value): - for name in files: - paths.append(os.path.join(path, name)) - else: - for f in glob.glob(inputFile.value): - paths.append(f) - return paths def upload(self, apiToken, modelFile, data, chunk): modelEndpoint = 'https://api.sketchfab.com/v3/models' @@ -172,6 +200,18 @@ def upload(self, apiToken, modelFile, data, chunk): chunk.logger.error(u'Upload failed with error: {}'.format(r.json())) raise RuntimeError() + def resolvedPaths(self, inputFiles): + paths = [] + for inputFile in inputFiles: + if os.path.isdir(inputFile.value): + for path, subdirs, files in os.walk(inputFile.value): + for name in files: + paths.append(os.path.join(path, name)) + else: + for f in glob.glob(inputFile.value): + paths.append(f) + return paths + def stopped(self): return self._stopped @@ -183,14 +223,21 @@ def processChunk(self, chunk): if not chunk.node.inputFiles: chunk.logger.warning('Nothing to upload') return + if chunk.node.apiToken.value == '': + chunk.logger.error('Need API token.') + raise RuntimeError() if len(chunk.node.title.value) > 48: chunk.logger.error('Title cannot be longer than 48 characters.') raise RuntimeError() if len(chunk.node.description.value) > 1024: chunk.logger.error('Description cannot be longer than 1024 characters.') raise RuntimeError() - if chunk.node.apiToken.value == '': - chunk.logger.error('Need API token.') + tags = [ i.value for i in chunk.node.tags.value.values() ] + if all(len(i) > 48 for i in tags) and len(tags) > 0: + chunk.logger.error('Tags cannot be longer than 48 characters.') + raise RuntimeError() + if len(tags) > 42: + chunk.logger.error('Maximum of 42 separate tags.') raise RuntimeError() try: @@ -198,11 +245,14 @@ def processChunk(self, chunk): 'name': chunk.node.title.value, 'description': chunk.node.description.value, 'license': chunk.node.license.value, + 'tags': str(tags), 'isPublished': chunk.node.isPublished.value, 'isInspectable': chunk.node.isInspectable.value, 'private': chunk.node.isPrivate.value, 'password': chunk.node.password.value } + if chunk.node.category.value != 'none': + data.update({'categories': chunk.node.category.value}) chunk.logger.debug('Data to be sent: {}'.format(str(data))) # pack files into .zip to reduce file size and simplify process From a3710bc5e5a2b91296bfb8799a9f58b3c831a24a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 9 Dec 2019 21:57:23 +0100 Subject: [PATCH 0273/1093] [nodes] ldr2hdr: add laguerre, refine exposures and calibration downscale --- meshroom/aliceVision/LDRToHDR.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 22616e5b46..1ccb452598 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -57,6 +57,13 @@ class LDRToHDR(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='calibrationRefineExposures', + label='Refine Exposures', + description="Refine exposures provided by metadata (shutter speed, f-number, iso). Only available for 'laguerre' calibration method.", + value=False, + uid=[0], + ), desc.ChoiceParam( name='calibrationMethod', label='Calibration Method', @@ -64,8 +71,9 @@ class LDRToHDR(desc.CommandLineNode): " * linear \n" " * robertson \n" " * debevec \n" - " * grossberg", - values=['linear', 'robertson', 'debevec', 'grossberg'], + " * grossberg \n" + " * laguerre", + values=['linear', 'robertson', 'debevec', 'grossberg', 'laguerre'], value='linear', exclusive=True, uid=[0], @@ -104,6 +112,15 @@ class LDRToHDR(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='calibrationDownscale', + label='Calibration Downscale', + description='Scaling factor applied to images before calibration of the response function to reduce the impact of misalignment.', + value=4, + range=(1, 16, 1), + uid=[0], + advanced=True, + ), desc.IntParam( name='channelQuantizationPower', label='Channel Quantization Power', From 41cf23b21976110093197bebc6450e0e2b903d32 Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Wed, 11 Dec 2019 09:48:17 +0100 Subject: [PATCH 0274/1093] add option to bypass HDR --- meshroom/aliceVision/LDRToHDR.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 1ccb452598..7bba4f2bb7 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -64,6 +64,13 @@ class LDRToHDR(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='byPass', + label='bypass convert', + description="Bypass HDR creation and use the medium bracket as the source for the next steps", + value=False, + uid=[0], + ), desc.ChoiceParam( name='calibrationMethod', label='Calibration Method', From 6bf11cb7b60c3602a81506f60cf7c73341290ac2 Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Wed, 11 Dec 2019 09:48:32 +0100 Subject: [PATCH 0275/1093] add rotation offsets --- meshroom/aliceVision/PanoramaEstimation.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index b785b87223..6aaff58f36 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -62,6 +62,24 @@ class PanoramaEstimation(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='offsetLongitude', + label='Longitude offset (deg.)', + description='''Offset to the panorama longitude''', + value=0.0, + range=(-180.0, 180.0, 1.0), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='offsetLatitude', + label='Latitude offset (deg.)', + description='''Offset to the panorama latitude''', + value=0.0, + range=(-90.0, 90.0, 1.0), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='rotationAveraging', label='Rotation Averaging Method', From 9a10a2e4c99d56941602975da4ac2bf565812c3e Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 11 Dec 2019 15:56:05 +0100 Subject: [PATCH 0276/1093] [hdri] update default values for hdri pipeline --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- meshroom/aliceVision/PanoramaWarping.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 3b587c5a52..4b5a3792b1 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -32,7 +32,7 @@ class PanoramaCompositing(desc.CommandLineNode): name='multiband', label='Use Multiband', description='Use multi band algorithm for compositing', - value=False, + value=True, uid=[0], ), desc.ChoiceParam( diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 0034630fa1..a127fe3524 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -22,7 +22,7 @@ class PanoramaWarping(desc.CommandLineNode): name='panoramaWidth', label='Panorama Width', description='Panorama width (pixels). 0 For automatic size', - value=1000, + value=10000, range=(0, 50000, 1000), uid=[0] ), From 206704369380ecf4cb419c53fe24cac3716c84d2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 12 Dec 2019 20:42:03 +0100 Subject: [PATCH 0277/1093] [nodes] LDRToHDR: add highlight params --- meshroom/aliceVision/LDRToHDR.py | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 7bba4f2bb7..46cb5d16dc 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -41,13 +41,39 @@ class LDRToHDR(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='expandDynamicRange', - label='Expand Dynamic Range', - description='float value between 0 and 1 to correct clamped high values in dynamic range: use 0 for no correction, 0.5 for interior lighting and 1 for outdoor lighting.', + name='highlightCorrectionFactor', + label='Highlights correction', + description='Pixels saturated in all input images have a partial information about their real luminance.\n' + 'We only know that the value should be >= to the standard hdr fusion.\n' + 'This parameters allows to perform a post-processing step to put saturated pixels to a constant ' + 'value defined by the `highlightsMaxLuminance` parameter.\n' + 'This parameter is float to enable to weight this correction.', value=1.0, range=(0.0, 1.0, 0.01), uid=[0], ), + desc.FloatParam( + name='highlightTargetLux', + label='Highlight Target Luminance (Lux)', + description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n' + '\n' + 'Some Outdoor Reference Light Levels:\n' + ' * 120,000 lux : Brightest sunlight\n' + ' * 110,000 lux : Bright sunlight\n' + ' * 20,000 lux : Shade illuminated by entire clear blue sky, midday\n' + ' * 1,000 lux : Typical overcast day, midday\n' + ' * 400 lux : Sunrise or sunset on a clear day\n' + ' * 40 lux : Fully overcast, sunset/sunrise\n' + '\n' + 'Some Indoor Reference Light Levels:\n' + ' * 20000 lux : Max Usually Used Indoor\n' + ' * 750 lux : Supermarkets\n' + ' * 500 lux : Office Work\n' + ' * 150 lux : Home\n', + value=120000.0, + range=(1000.0, 150000.0, 1.0), + uid=[0], + ), desc.BoolParam( name='fisheyeLens', label='Fisheye Lens', From e2acc390acabb5001feb8806adba5978b560b2ab Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 13 Dec 2019 19:36:22 +0100 Subject: [PATCH 0278/1093] [hdri] workaround for HDRI pipeline on tractor --- meshroom/aliceVision/PanoramaExternalInfo.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/meshroom/aliceVision/PanoramaExternalInfo.py b/meshroom/aliceVision/PanoramaExternalInfo.py index 69e8e50bab..4fca9880ad 100644 --- a/meshroom/aliceVision/PanoramaExternalInfo.py +++ b/meshroom/aliceVision/PanoramaExternalInfo.py @@ -25,6 +25,19 @@ class PanoramaExternalInfo(desc.CommandLineNode): value='', uid=[0], ), + desc.ListAttribute( + elementDesc=desc.File( + name='matchesFolder', + label='Matches Folder', + description="", + value='', + uid=[0], + ), + name='matchesFolders', + label='Matches Folders', + description="Folder(s) in which computed matches are stored. (WORKAROUND for valid Tractor graph submission)", + group='forDependencyOnly', + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From f4b058e02910802d5ee222a9c6709f4bbdfea1d2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 13 Dec 2019 19:37:29 +0100 Subject: [PATCH 0279/1093] [hdri] update default values for FeatureExtraction and LDRToHDR --- meshroom/aliceVision/LDRToHDR.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 46cb5d16dc..25b74ed540 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -107,7 +107,7 @@ class LDRToHDR(desc.CommandLineNode): " * grossberg \n" " * laguerre", values=['linear', 'robertson', 'debevec', 'grossberg', 'laguerre'], - value='linear', + value='debevec', exclusive=True, uid=[0], ), From f77d9af23c71541dfa7c308eba0bde71d6e7132e Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 13 Dec 2019 20:56:51 +0100 Subject: [PATCH 0280/1093] [nodes] LDRToHDR: rename param to nbBrackets --- meshroom/aliceVision/LDRToHDR.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 25b74ed540..ecf6352c31 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -22,7 +22,7 @@ def computeSize(self, node): class LDRToHDR(desc.CommandLineNode): commandLine = 'aliceVision_convertLDRToHDR {allParams}' - size = DividedInputNodeSize('input', 'groupSize') + size = DividedInputNodeSize('input', 'nbBrackets') inputs = [ desc.File( @@ -33,19 +33,19 @@ class LDRToHDR(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name='groupSize', - label='Exposure bracket count', - description='Number of exposure brackets used per HDR image', - value=3, - range=(0, 10, 1), + name='nbBrackets', + label='Number of Brackets', + description='Number of exposure brackets per HDR image.', + value=0, + range=(0, 15, 1), uid=[0] ), desc.FloatParam( name='highlightCorrectionFactor', - label='Highlights correction', + label='Highlights Correction', description='Pixels saturated in all input images have a partial information about their real luminance.\n' 'We only know that the value should be >= to the standard hdr fusion.\n' - 'This parameters allows to perform a post-processing step to put saturated pixels to a constant ' + 'This parameter allows to perform a post-processing step to put saturated pixels to a constant ' 'value defined by the `highlightsMaxLuminance` parameter.\n' 'This parameter is float to enable to weight this correction.', value=1.0, From ffd4287d7a066a03d6488c56c8291f279986ba3e Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 13 Dec 2019 20:58:36 +0100 Subject: [PATCH 0281/1093] [nodes] LDRToHDR: particular case for nbBrackets=0 --- meshroom/aliceVision/LDRToHDR.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index ecf6352c31..c21c227a90 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -17,6 +17,8 @@ def __init__(self, param, divParam): def computeSize(self, node): s = super(DividedInputNodeSize, self).computeSize(node) divParam = node.attribute(self._divParam) + if divParam.value == 0: + return s return s / divParam.value From fc18d168dde5d097f6032d220b45da87ce0fcc0a Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 16 Dec 2019 09:40:19 +0100 Subject: [PATCH 0282/1093] Add a selector for compositer type --- meshroom/aliceVision/PanoramaCompositing.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 4b5a3792b1..441d62b933 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -28,12 +28,14 @@ class PanoramaCompositing(desc.CommandLineNode): uid=[0], group='', # not part of allParams, as this is not a parameter for the command line ), - desc.BoolParam( - name='multiband', - label='Use Multiband', - description='Use multi band algorithm for compositing', - value=True, - uid=[0], + desc.ChoiceParam( + name='compositerType', + label='Compositer Type', + description='Which compositer should be used to blend images', + value=['multiband'], + values=['replace', 'alpha', 'multiband'], + exclusive=True, + uid=[0] ), desc.ChoiceParam( name='verboseLevel', From 233094fe3594832ebb458d09c7bd2bbf8c66b906 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 16 Dec 2019 12:38:06 +0100 Subject: [PATCH 0283/1093] [nodes] LDRToHDR: add automatic detection of the number of brackets --- meshroom/aliceVision/LDRToHDR.py | 77 ++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index c21c227a90..5eff20da4e 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" import json import os @@ -35,12 +35,22 @@ class LDRToHDR(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name='nbBrackets', + name='userNbBrackets', label='Number of Brackets', - description='Number of exposure brackets per HDR image.', + description='Number of exposure brackets per HDR image (0 for automatic).', value=0, range=(0, 15, 1), - uid=[0] + uid=[0], + group='user', # not used directly on the command line + ), + desc.IntParam( + name='nbBrackets', + label='Automatic Nb Brackets', + description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + value=0, + range=(0, 10, 1), + uid=[], + advanced=True, ), desc.FloatParam( name='highlightCorrectionFactor', @@ -185,3 +195,62 @@ class LDRToHDR(desc.CommandLineNode): uid=[], ) ] + + @classmethod + def update(cls, node): + if not isinstance(node.nodeDesc, cls): + raise ValueError("Node {} is not an instance of type {}".format(node, cls)) + # TODO: use Node version for this test + if 'userNbBrackets' not in node.getAttributes().keys(): + # Old version of the node + return + if node.userNbBrackets.value != 0: + node.nbBrackets.value = node.userNbBrackets.value + return + # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) + cameraInitOutput = node.input.getLinkParam() + if not cameraInitOutput: + node.nbBrackets.value = 0 + return + viewpoints = cameraInitOutput.node.viewpoints.value + + # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) + inputs = [] + for viewpoint in viewpoints: + jsonMetadata = viewpoint.metadata.value + if not jsonMetadata: + # no metadata, we cannot found the number of brackets + node.nbBrackets.value = 0 + return + d = json.loads(jsonMetadata) + fnumber = d.get("FNumber", d.get("Exif:ApertureValue", "")) + shutterSpeed = d.get("Exif:ShutterSpeedValue", "") # also "ExposureTime"? + iso = d.get("Exif:ISOSpeedRatings", "") + if not fnumber and not shutterSpeed: + # if one image without shutter or fnumber, we cannot found the number of brackets + node.nbBrackets.value = 0 + return + inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) + inputs.sort() + + exposureGroups = [] + exposures = [] + for path, exp in inputs: + if exposures and exp != exposures[-1] and exp == exposures[0]: + exposureGroups.append(exposures) + exposures = [exp] + else: + exposures.append(exp) + exposureGroups.append(exposures) + exposures = None + bracketSizes = set() + for expGroup in exposureGroups: + bracketSizes.add(len(expGroup)) + if len(bracketSizes) == 1: + node.nbBrackets.value = bracketSizes.pop() + # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) + else: + node.nbBrackets.value = 0 + # logging.info("[LDRToHDR] Update end") + + From d1a3d86a58b73df39fe99f2720b5aec9e003762d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 16 Dec 2019 13:49:20 +0100 Subject: [PATCH 0284/1093] [nodes] Panorama: minor fix to compositerType default value --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 441d62b933..34af53ad70 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -32,7 +32,7 @@ class PanoramaCompositing(desc.CommandLineNode): name='compositerType', label='Compositer Type', description='Which compositer should be used to blend images', - value=['multiband'], + value='multiband', values=['replace', 'alpha', 'multiband'], exclusive=True, uid=[0] From a8f0815d51eb36145f8f60ef953eb35c4c1fccbc Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 16 Dec 2019 20:10:04 +0100 Subject: [PATCH 0285/1093] [nodes] CameraInit: remove subprocess wait (communicate is enough) --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 0c01b41c99..22c0ccab99 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -186,7 +186,7 @@ def buildIntrinsics(self, node, additionalViews=()): # logging.debug(' - commandLine:', cmd) proc = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) stdout, stderr = proc.communicate() - proc.wait() + # proc.wait() if proc.returncode != 0: raise RuntimeError('CameraInit failed with error code {}.\nCommand was: "{}".\n'.format( proc.returncode, cmd) From 2b34e47d151802b37f593960e581b23e38daa2c6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 17 Dec 2019 22:35:58 +0100 Subject: [PATCH 0286/1093] [nodes] ImageMasking: add AutoGrayscaleThreshold algorithm and depthMap inputs --- meshroom/aliceVision/ImageMasking.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 05c8ddea79..95de19f4bc 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -21,8 +21,8 @@ class ImageMasking(desc.CommandLineNode): name='algorithm', label='Algorithm', description='', - value='hsv', - values=['hsv'], + value='HSV', + values=['HSV', 'AutoGrayscaleThreshold'], exclusive=True, uid=[0], ), @@ -111,6 +111,20 @@ class ImageMasking(desc.CommandLineNode): range=(0, 50, 1), uid=[0] ), + desc.File( + name='depthMapFolder', + label='Depth Mask Folder', + description='''Depth Mask Folder''', + value='', + uid=[0], + ), + desc.File( + name='depthMapExp', + label='Depth Mask Expression', + description='''Depth Mask Expression, like "{inputFolder}/{stem}-depth.{ext}".''', + value='', + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From dd93c82436cdb3ddfeff90c12771ef217940df44 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Dec 2019 09:33:23 +0100 Subject: [PATCH 0287/1093] [nodes] ImageMasking: use StringParam instead of FileParam for depthMapExp --- meshroom/aliceVision/ImageMasking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 95de19f4bc..41504dd3bf 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -118,7 +118,7 @@ class ImageMasking(desc.CommandLineNode): value='', uid=[0], ), - desc.File( + desc.StringParam( name='depthMapExp', label='Depth Mask Expression', description='''Depth Mask Expression, like "{inputFolder}/{stem}-depth.{ext}".''', From edeefac8f31a4771bb3c5441378382b0265e81ee Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Dec 2019 19:05:09 +0100 Subject: [PATCH 0288/1093] [nodes] LDRToHDR: declare cpu/ram usages --- meshroom/aliceVision/LDRToHDR.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 5eff20da4e..9da8f57f32 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -26,6 +26,9 @@ class LDRToHDR(desc.CommandLineNode): commandLine = 'aliceVision_convertLDRToHDR {allParams}' size = DividedInputNodeSize('input', 'nbBrackets') + cpu = desc.Level.INTENSIVE + ram = desc.Level.NORMAL + inputs = [ desc.File( name='input', From ea3c9e3cc7c90eb801773e2c851981d4e2a5822b Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Sat, 4 Jan 2020 11:07:30 +0000 Subject: [PATCH 0289/1093] change category description on SketchfabUpload node --- meshroom/aliceVision/SketchfabUpload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index c5df59b3c5..743b0f3beb 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -116,7 +116,7 @@ class SketchfabUpload(desc.Node): desc.ChoiceParam( name='category', label='Category', - description='Maximum of 2 categories.', + description='Adding categories helps improve the discoverability of your model.', value='none', values=['none', 'animals-pets', From 63bac203339d0513d85b17ac19c9191b89200418 Mon Sep 17 00:00:00 2001 From: Clara <clara.vere@ymail.com> Date: Fri, 2 Aug 2019 18:02:52 +0200 Subject: [PATCH 0290/1093] [Texturing] add options for retopoMesh & reorganise options --- meshroom/aliceVision/Texturing.py | 75 ++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 5996f76a4f..ce1444639b 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -91,32 +91,6 @@ class Texturing(desc.CommandLineNode): uid=[0], advanced=True, ), - desc.BoolParam( - name='correctEV', - label='Correct Exposure', - description='Uniformize images exposure values.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='useScore', - label='Use Score', - description='Use triangles scores for multiband blending.', - value=True, - uid=[0], - advanced=True, - ), - desc.ChoiceParam( - name='processColorspace', - label='Process Colorspace', - description="Colorspace for the texturing internal computation (does not impact the output file colorspace).", - value='sRGB', - values=('sRGB', 'LAB', 'XYZ'), - exclusive=True, - uid=[0], - advanced=True, - ), desc.IntParam( name='multiBandDownscale', label='Multi Band Downscale', @@ -138,6 +112,14 @@ class Texturing(desc.CommandLineNode): description='''Number of contributions per frequency band for multiband blending (each frequency band also contributes to lower bands)''', advanced=True, ), + desc.BoolParam( + name='useScore', + label='Use Score', + description='Use triangles scores (ie. reprojection area) for multiband blending.', + value=True, + uid=[0], + advanced=True, + ), desc.FloatParam( name='bestScoreThreshold', label='Best Score Threshold', @@ -156,6 +138,24 @@ class Texturing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.ChoiceParam( + name='processColorspace', + label='Process Colorspace', + description="Colorspace for the texturing internal computation (does not impact the output file colorspace).", + value='sRGB', + values=('sRGB', 'LAB', 'XYZ'), + exclusive=True, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='correctEV', + label='Correct Exposure', + description='Uniformize images exposure values.', + value=False, + uid=[0], + advanced=True, + ), desc.BoolParam( name='forceVisibleByAllVertices', label='Force Visible By All Vertices', @@ -182,6 +182,29 @@ class Texturing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='retopoMesh', + label='Retopo Mesh', + description='''Check if the mesh has been simplified - it will be subdivide to recover texture precision.''', + value=False, + uid=[0], + ), + desc.FloatParam( + name='edgeLengthSubdivisionFactor', + label='Edge Length Subdivision Factor', + description='''Edge length subdivision factor, needed if the mesh has been simplified and must be subdivide for texturing efficiency.''', + value=0.5, + range=(0.0, 1.0, 0.001), + uid=[0], + ), + desc.IntParam( + name='nbPtsSubdivisionFactor', + label='Nb Points Subdivision Factor', + description='''Number of points multiplication factor, needed if the mesh has been simplified and must be subdivide for texturing efficiency.''', + value = 500, + range=(10, 1000, 10), + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 9783a6e64dad07740d30f97a2aff979151241f72 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 6 Jan 2020 15:12:50 +0100 Subject: [PATCH 0291/1093] [nodes] Texturing: rename subdivision parameters --- meshroom/aliceVision/Texturing.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index ce1444639b..88eef0dd8c 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -183,28 +183,20 @@ class Texturing(desc.CommandLineNode): advanced=True, ), desc.BoolParam( - name='retopoMesh', - label='Retopo Mesh', - description='''Check if the mesh has been simplified - it will be subdivide to recover texture precision.''', + name='allowSubdivision', + label='Allow Subdivision', + description='''If the mesh is simplified, it will be subdivide for more fine grain decision on the best visibilities to use per triangle to create the final texture.''', value=False, uid=[0], ), desc.FloatParam( - name='edgeLengthSubdivisionFactor', - label='Edge Length Subdivision Factor', - description='''Edge length subdivision factor, needed if the mesh has been simplified and must be subdivide for texturing efficiency.''', + name='subdivisionFactor', + label='Subdivision Factor', + description='''Ratio to choose the density between input mesh and reconstruction (0: keep input mesh density, 1: use the full density of the reconstruction).''', value=0.5, range=(0.0, 1.0, 0.001), uid=[0], ), - desc.IntParam( - name='nbPtsSubdivisionFactor', - label='Nb Points Subdivision Factor', - description='''Number of points multiplication factor, needed if the mesh has been simplified and must be subdivide for texturing efficiency.''', - value = 500, - range=(10, 1000, 10), - uid=[0], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 7f87098621e21f7bccd8fad80f96c9e2ed887c76 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 15 Jan 2020 10:53:18 +0100 Subject: [PATCH 0292/1093] [nodes] Texturing: simplify subdivision parameters --- meshroom/aliceVision/Texturing.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 88eef0dd8c..84df7a489c 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -182,20 +182,14 @@ class Texturing(desc.CommandLineNode): uid=[0], advanced=True, ), - desc.BoolParam( - name='allowSubdivision', - label='Allow Subdivision', - description='''If the mesh is simplified, it will be subdivide for more fine grain decision on the best visibilities to use per triangle to create the final texture.''', - value=False, - uid=[0], - ), desc.FloatParam( - name='subdivisionFactor', - label='Subdivision Factor', - description='''Ratio to choose the density between input mesh and reconstruction (0: keep input mesh density, 1: use the full density of the reconstruction).''', - value=0.5, + name='subdivisionTargetRatio', + label='Subdivision Target Ratio', + description='''Percentage of the density of the reconstruction as the target for the subdivision (0: disable subdivision, 0.5: half density of the reconstruction, 1: full density of the reconstruction).''', + value=0.8, range=(0.0, 1.0, 0.001), uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', From cf1e2659eecc833d7d29c775314dd6796f781eda Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 15 Jan 2020 11:52:55 +0100 Subject: [PATCH 0293/1093] [nodes] Texturing: correctEV param is now visible --- meshroom/aliceVision/Texturing.py | 1 - 1 file changed, 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 84df7a489c..117201a82f 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -154,7 +154,6 @@ class Texturing(desc.CommandLineNode): description='Uniformize images exposure values.', value=False, uid=[0], - advanced=True, ), desc.BoolParam( name='forceVisibleByAllVertices', From 1633ca04ea699fa0cc1ff465a4462cbebd497118 Mon Sep 17 00:00:00 2001 From: Yann Lanthony <yann.lanthony@gmail.com> Date: Fri, 24 Jan 2020 11:59:46 +0100 Subject: [PATCH 0294/1093] [nodes][aliceVision] use user-friendly atribute labels --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/DepthMap.py | 2 +- meshroom/aliceVision/DepthMapFilter.py | 6 +++--- meshroom/aliceVision/FeatureExtraction.py | 4 ++-- meshroom/aliceVision/FeatureMatching.py | 6 +++--- meshroom/aliceVision/ImageMatching.py | 4 ++-- meshroom/aliceVision/MeshFiltering.py | 4 ++-- meshroom/aliceVision/Meshing.py | 8 ++++---- meshroom/aliceVision/PrepareDenseScene.py | 6 +++--- meshroom/aliceVision/StructureFromMotion.py | 6 +++--- meshroom/aliceVision/Texturing.py | 18 +++++++++--------- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 0c01b41c99..b819663845 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -153,7 +153,7 @@ class CameraInit(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output SfMData File', + label='SfMData', description='''Output SfMData.''', value=desc.Node.internalFolder + 'cameraInit.sfm', uid=[], diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 24fa430009..9e9288d8d3 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -13,7 +13,7 @@ class DepthMap(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfMData', description='SfMData file.', value='', uid=[0], diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index a4f2ed5d14..933c1fef43 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -13,14 +13,14 @@ class DepthMapFilter(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfMData', description='SfMData file.', value='', uid=[0], ), desc.File( name="depthMapsFolder", - label="Depth Maps Folder", + label="DepthMaps Folder", description="Input depth maps folder", value="", uid=[0], @@ -108,7 +108,7 @@ class DepthMapFilter(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', + label='Filtered DepthMaps Folder', description='Output folder for generated depth maps.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index e5c1cfd4cf..0ac423a19d 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -12,7 +12,7 @@ class FeatureExtraction(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfMData', description='SfMData file.', value='', uid=[0], @@ -67,7 +67,7 @@ class FeatureExtraction(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Features Folder', description='Output path for the features and descriptors files (*.feat, *.desc).', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 43f1e21608..8c6c0a4752 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -12,7 +12,7 @@ class FeatureMatching(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfMData', description='SfMData file.', value='', uid=[0], @@ -31,7 +31,7 @@ class FeatureMatching(desc.CommandLineNode): ), desc.File( name='imagePairsList', - label='Image Pairs List', + label='Image Pairs', description='Path to a file which contains the list of image pairs to match.', value='', uid=[0], @@ -161,7 +161,7 @@ class FeatureMatching(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Matches Folder', description='Path to a folder in which computed matches will be stored.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 8d4ec51536..14a179fc8d 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -11,7 +11,7 @@ class ImageMatching(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfmData', description='SfMData file .', value='', uid=[0], @@ -84,7 +84,7 @@ class ImageMatching(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output List File', + label='Image Pairs', description='Filepath to the output file with the list of selected image pairs.', value=desc.Node.internalFolder + 'imageMatches.txt', uid=[], diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 4a1ae7ea41..9ae7842724 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -9,7 +9,7 @@ class MeshFiltering(desc.CommandLineNode): inputs = [ desc.File( name='inputMesh', - label='Input Mesh', + label='Mesh', description='''Input Mesh (OBJ file format).''', value='', uid=[0], @@ -60,7 +60,7 @@ class MeshFiltering(desc.CommandLineNode): outputs = [ desc.File( name='outputMesh', - label='Output Mesh', + label='Mesh', description='''Output mesh (OBJ file format).''', value=desc.Node.internalFolder + 'mesh.obj', uid=[], diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 449ef008aa..bec3c4214c 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -12,14 +12,14 @@ class Meshing(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfmData', description='SfMData file.', value='', uid=[0], ), desc.File( name="depthMapsFolder", - label='Depth Maps Folder', + label='DepthMaps Folder', description='Input depth maps folder', value='', uid=[0], @@ -238,14 +238,14 @@ class Meshing(desc.CommandLineNode): outputs = [ desc.File( name="outputMesh", - label="Output Mesh", + label="Mesh", description="Output mesh (OBJ file format).", value="{cache}/{nodeType}/{uid0}/mesh.obj", uid=[], ), desc.File( name="output", - label="Output Dense Point Cloud", + label="Dense SfMData", description="Output dense point cloud with visibilities (SfMData file format).", value="{cache}/{nodeType}/{uid0}/densePointCloud.abc", uid=[], diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 5467d576ab..8baaf4468e 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -12,7 +12,7 @@ class PrepareDenseScene(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfMData', description='''SfMData file.''', value='', uid=[0], @@ -77,14 +77,14 @@ class PrepareDenseScene(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', + label='Images Folder', description='''Output folder.''', value=desc.Node.internalFolder, uid=[], ), desc.File( name='outputUndistorted', - label='Undistorted images', + label='Undistorted Images', description='List of undistorted images.', value=desc.Node.internalFolder + '*.{outputFileTypeValue}', uid=[], diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index e592df5501..d7bbb85b83 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -13,7 +13,7 @@ class StructureFromMotion(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='SfMData', description='SfMData file.', value='', uid=[0], @@ -245,14 +245,14 @@ class StructureFromMotion(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output SfMData File', + label='SfMData', description='Path to the output sfmdata file', value=desc.Node.internalFolder + 'sfm.abc', uid=[], ), desc.File( name='outputViewsAndPoses', - label='Output SfMData File', + label='Views and Poses', description='''Path to the output sfmdata file with cameras (views and poses).''', value=desc.Node.internalFolder + 'cameras.sfm', uid=[], diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 5996f76a4f..8fdf4b3303 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -10,7 +10,7 @@ class Texturing(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', + label='Dense SfMData', description='SfMData file.', value='', uid=[0], @@ -24,7 +24,7 @@ class Texturing(desc.CommandLineNode): ), desc.File( name='inputMesh', - label='Other Input Mesh', + label='Mesh', description='Optional input mesh to texture. By default, it will texture the result of the reconstruction.', value='', uid=[0], @@ -197,31 +197,31 @@ class Texturing(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='Folder for output mesh: OBJ, material and texture files.', value=desc.Node.internalFolder, uid=[], ), desc.File( name='outputMesh', - label='Output Mesh', - description='Folder for output mesh: OBJ, material and texture files.', + label='Mesh', + description='Output Mesh file.', value=desc.Node.internalFolder + 'texturedMesh.obj', uid=[], group='', ), desc.File( name='outputMaterial', - label='Output Material', - description='Folder for output mesh: OBJ, material and texture files.', + label='Material', + description='Output Material file.', value=desc.Node.internalFolder + 'texturedMesh.mtl', uid=[], group='', ), desc.File( name='outputTextures', - label='Output Textures', - description='Folder for output mesh: OBJ, material and texture files.', + label='Textures', + description='Output Texture files.', value=desc.Node.internalFolder + 'texture_*.{outputTextureFileTypeValue}', uid=[], group='', From 654fcbf5d58769d1ec8d20b8827237e37c598f0e Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Fri, 24 Jan 2020 17:53:04 +0000 Subject: [PATCH 0295/1093] SketchfabUpload: log correct file size and fix spaces in tags --- meshroom/aliceVision/SketchfabUpload.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 743b0f3beb..2a552b879c 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -232,7 +232,7 @@ def processChunk(self, chunk): if len(chunk.node.description.value) > 1024: chunk.logger.error('Description cannot be longer than 1024 characters.') raise RuntimeError() - tags = [ i.value for i in chunk.node.tags.value.values() ] + tags = [ i.value.replace(' ', '-') for i in chunk.node.tags.value.values() ] if all(len(i) > 48 for i in tags) and len(tags) > 0: chunk.logger.error('Tags cannot be longer than 48 characters.') raise RuntimeError() @@ -264,9 +264,7 @@ def processChunk(self, chunk): zf.close() chunk.logger.debug('Files added to zip: {}'.format(str(files))) chunk.logger.debug('Created {}'.format(uploadFile)) - - fileSize = os.path.getsize(uploadFile)/1000000 - chunk.logger.info('File size: {}MB'.format(fileSize)) + chunk.logger.info('File size: {}MB'.format(round(os.path.getsize(uploadFile)/(1024*1024), 3))) self.upload(chunk.node.apiToken.value, uploadFile, data, chunk) chunk.logger.info('Upload successful. Your model is being processed on Sketchfab. It may take some time to show up on your "models" page.') From 351754cb7a653d5bb8fe62554aa0de7b86b7dc5f Mon Sep 17 00:00:00 2001 From: Theo <theo.leplomb@mikrosimage.com> Date: Thu, 23 Jan 2020 12:22:30 +0100 Subject: [PATCH 0296/1093] [nodes] FeatureMatching : Add options knownCameraPoses --- meshroom/aliceVision/FeatureMatching.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 43f1e21608..0b4c00d7f9 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -116,6 +116,16 @@ class FeatureMatching(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='knownPosesGeometricErrorMax', + label='Known Poses Geometric Error Max', + description='Maximum error (in pixels) allowed for features matching guided by geometric information from known camera poses.\n' + 'If set to 0 it lets the ACRansac select an optimal value.', + value=5.0, + range=(0.0, 100.0, 1.0), + uid=[0], + advanced=True, + ), desc.IntParam( name='maxMatches', label='Max Matches', @@ -140,6 +150,14 @@ class FeatureMatching(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='matchFromKnownCameraPoses', + label='Match From Known Camera Poses', + description='Enable the usage of geometric information from known camera poses to guide the feature matching.\n' + 'If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.', + value=False, + uid=[0], + ), desc.BoolParam( name='exportDebugFiles', label='Export Debug Files', From 659313db0911340be0554103a7eafda2a859a55c Mon Sep 17 00:00:00 2001 From: Theo <theo.leplomb@mikrosimage.com> Date: Thu, 23 Jan 2020 12:24:46 +0100 Subject: [PATCH 0297/1093] [nodes] StructureFromMotion: Add option filterTrackForks --- meshroom/aliceVision/StructureFromMotion.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index e592df5501..2cdff69760 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -207,6 +207,14 @@ class StructureFromMotion(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='filterTrackForks', + label='Filter Track Forks', + description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' + 'lead to multiple features in the same image for a single track. \n', + value=True, + uid=[0], + ), desc.File( name='initialPairA', label='Initial Pair A', From 7475c08f1da7cb4d67c027db02ad8892df07790d Mon Sep 17 00:00:00 2001 From: Theo <theo.leplomb@mikrosimage.com> Date: Thu, 23 Jan 2020 12:25:21 +0100 Subject: [PATCH 0298/1093] [nodes] StructureFromMotion: Add option minNumberOfMatches --- meshroom/aliceVision/StructureFromMotion.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 2cdff69760..c0f960abb5 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -116,6 +116,15 @@ class StructureFromMotion(desc.CommandLineNode): range=(0, 50000, 1), uid=[0], ), + desc.IntParam( + name='minNumberOfMatches', + label='Minimum Number of Matches', + description='Minimum number of matches per image pair (and per feature type). \n' + 'This can be useful to have a meaningful reconstruction with accurate keypoints. 0 means no limit.', + value=0, + range=(0, 50000, 1), + uid=[0], + ), desc.IntParam( name='minInputTrackLength', label='Min Input Track Length', From f03b35187b01c445cf1b7ceaa9c6b8a2aacbf205 Mon Sep 17 00:00:00 2001 From: Theo <theo.leplomb@mikrosimage.com> Date: Thu, 23 Jan 2020 12:26:17 +0100 Subject: [PATCH 0299/1093] [nodes] ImageMatching: Add methods and option nbNeighbors --- meshroom/aliceVision/ImageMatching.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 8d4ec51536..54344d6fba 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "1.1" import os from meshroom.core import desc @@ -28,6 +28,15 @@ class ImageMatching(desc.CommandLineNode): label="Features Folders", description="Folder(s) containing the extracted features and descriptors." ), + desc.ChoiceParam( + name='method', + label='Method', + description='Method used to select the image pairs to match.', + value='VocabularyTree', + values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree','Exhaustive','Frustum'], + exclusive=True, + uid=[0], + ), desc.File( name='tree', label='Tree', @@ -70,6 +79,15 @@ class ImageMatching(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='nbNeighbors', + label='Nb Neighbors', + description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', + value=50, + range=(0, 1000, 1), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 7ee6d46ba6cc14774c0d6f5fb900ac38d53f603a Mon Sep 17 00:00:00 2001 From: Theo <theo.leplomb@mikrosimage.com> Date: Fri, 31 Jan 2020 10:59:53 +0100 Subject: [PATCH 0300/1093] [nodes] imageMatching: rename label and add methods to MultiSfM --- meshroom/aliceVision/ImageMatching.py | 12 ++++---- meshroom/aliceVision/ImageMatchingMultiSfM.py | 28 +++++++++++++++---- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 54344d6fba..3e1ffb409c 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -39,14 +39,14 @@ class ImageMatching(desc.CommandLineNode): ), desc.File( name='tree', - label='Tree', + label='Voc Tree: Tree', description='Input name for the vocabulary tree file.', value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[], ), desc.File( name='weights', - label='Weights', + label='Voc Tree: Weights', description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', value='', uid=[0], @@ -54,7 +54,7 @@ class ImageMatching(desc.CommandLineNode): ), desc.IntParam( name='minNbImages', - label='Minimal Number of Images', + label='Voc Tree: Minimal Number of Images', description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', value=200, range=(0, 500, 1), @@ -63,7 +63,7 @@ class ImageMatching(desc.CommandLineNode): ), desc.IntParam( name='maxDescriptors', - label='Max Descriptors', + label='Voc Tree: Max Descriptors', description='Limit the number of descriptors you load per image. Zero means no limit.', value=500, range=(0, 100000, 1), @@ -72,7 +72,7 @@ class ImageMatching(desc.CommandLineNode): ), desc.IntParam( name='nbMatches', - label='Nb Matches', + label='Voc Tree: Nb Matches', description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', value=50, range=(0, 1000, 1), @@ -81,7 +81,7 @@ class ImageMatching(desc.CommandLineNode): ), desc.IntParam( name='nbNeighbors', - label='Nb Neighbors', + label='Sequential: Nb Neighbors', description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', value=50, range=(0, 1000, 1), diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 2a0b56a1e6..b5601c840f 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -36,16 +36,25 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): label="Features Folders", description="Folder(s) containing the extracted features and descriptors." ), + desc.ChoiceParam( + name='method', + label='Method', + description='Method used to select the image pairs to match.', + value='VocabularyTree', + values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree','Exhaustive','Frustum'], + exclusive=True, + uid=[0], + ), desc.File( name='tree', - label='Tree', + label='Voc Tree: Tree', description='Input name for the vocabulary tree file.', value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[], ), desc.File( name='weights', - label='Weights', + label='Voc Tree: Weights', description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', value='', uid=[0], @@ -62,7 +71,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): ), desc.IntParam( name='minNbImages', - label='Minimal Number of Images', + label='Voc Tree: Minimal Number of Images', description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', value=200, range=(0, 500, 1), @@ -71,7 +80,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): ), desc.IntParam( name='maxDescriptors', - label='Max Descriptors', + label='Voc Tree: Max Descriptors', description='Limit the number of descriptors you load per image. Zero means no limit.', value=500, range=(0, 100000, 1), @@ -80,13 +89,22 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): ), desc.IntParam( name='nbMatches', - label='Nb Matches', + label='Voc Tree: Nb Matches', description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', value=50, range=(0, 1000, 1), uid=[0], advanced=True, ), + desc.IntParam( + name='nbNeighbors', + label='Sequential: Nb Neighbors', + description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', + value=50, + range=(0, 1000, 1), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 0def7adcee8c18ce8036d47b3ed2fef246bc25a4 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Fri, 7 Feb 2020 22:47:27 +0000 Subject: [PATCH 0301/1093] fix python nodes being blocked by log ...when ran on command line with meshroom_photogrammetry or meshroom_compute --- meshroom/aliceVision/Publish.py | 42 +++++++++++----------- meshroom/aliceVision/SketchfabUpload.py | 47 +++++++++++++------------ 2 files changed, 46 insertions(+), 43 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index ebe2b9b832..447bd65d53 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -50,27 +50,29 @@ def resolvedPaths(self, inputFiles, outDir): return paths def processChunk(self, chunk): - chunk.logManager.waitUntilCleared() - chunk.logger.setLevel(chunk.logManager.textToLevel(chunk.node.verboseLevel.value)) - - if not chunk.node.inputFiles: - chunk.logger.warning('Nothing to publish') - return - if not chunk.node.output.value: - return + try: + chunk.logManager.start(chunk.node.verboseLevel.value) + + if not chunk.node.inputFiles: + chunk.logger.warning('Nothing to publish') + return + if not chunk.node.output.value: + return - outFiles = self.resolvedPaths(chunk.node.inputFiles.value, chunk.node.output.value) + outFiles = self.resolvedPaths(chunk.node.inputFiles.value, chunk.node.output.value) - if not outFiles: - error = 'Publish: input files listed, but nothing to publish' - chunk.logger.error(error) - chunk.logger.info('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) - raise RuntimeError(error) + if not outFiles: + error = 'Publish: input files listed, but nothing to publish' + chunk.logger.error(error) + chunk.logger.info('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) + raise RuntimeError(error) - if not os.path.exists(chunk.node.output.value): - os.mkdir(chunk.node.output.value) + if not os.path.exists(chunk.node.output.value): + os.mkdir(chunk.node.output.value) - for iFile, oFile in outFiles.items(): - chunk.logger.info('Publish file {} into {}'.format(iFile, oFile)) - shutil.copyfile(iFile, oFile) - chunk.logger.info('Publish end') + for iFile, oFile in outFiles.items(): + chunk.logger.info('Publish file {} into {}'.format(iFile, oFile)) + shutil.copyfile(iFile, oFile) + chunk.logger.info('Publish end') + finally: + chunk.logManager.end() diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 2a552b879c..311ace6fb3 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -216,31 +216,30 @@ def stopped(self): return self._stopped def processChunk(self, chunk): - self._stopped = False - chunk.logManager.waitUntilCleared() - chunk.logger.setLevel(chunk.logManager.textToLevel(chunk.node.verboseLevel.value)) + try: + self._stopped = False + chunk.logManager.start(chunk.node.verboseLevel.value) - if not chunk.node.inputFiles: - chunk.logger.warning('Nothing to upload') - return - if chunk.node.apiToken.value == '': - chunk.logger.error('Need API token.') - raise RuntimeError() - if len(chunk.node.title.value) > 48: - chunk.logger.error('Title cannot be longer than 48 characters.') - raise RuntimeError() - if len(chunk.node.description.value) > 1024: - chunk.logger.error('Description cannot be longer than 1024 characters.') - raise RuntimeError() - tags = [ i.value.replace(' ', '-') for i in chunk.node.tags.value.values() ] - if all(len(i) > 48 for i in tags) and len(tags) > 0: - chunk.logger.error('Tags cannot be longer than 48 characters.') - raise RuntimeError() - if len(tags) > 42: - chunk.logger.error('Maximum of 42 separate tags.') - raise RuntimeError() + if not chunk.node.inputFiles: + chunk.logger.warning('Nothing to upload') + return + if chunk.node.apiToken.value == '': + chunk.logger.error('Need API token.') + raise RuntimeError() + if len(chunk.node.title.value) > 48: + chunk.logger.error('Title cannot be longer than 48 characters.') + raise RuntimeError() + if len(chunk.node.description.value) > 1024: + chunk.logger.error('Description cannot be longer than 1024 characters.') + raise RuntimeError() + tags = [ i.value.replace(' ', '-') for i in chunk.node.tags.value.values() ] + if all(len(i) > 48 for i in tags) and len(tags) > 0: + chunk.logger.error('Tags cannot be longer than 48 characters.') + raise RuntimeError() + if len(tags) > 42: + chunk.logger.error('Maximum of 42 separate tags.') + raise RuntimeError() - try: data = { 'name': chunk.node.title.value, 'description': chunk.node.description.value, @@ -276,5 +275,7 @@ def processChunk(self, chunk): os.remove(uploadFile) chunk.logger.debug('Deleted {}'.format(uploadFile)) + chunk.logManager.end() + def stopProcess(self, chunk): self._stopped = True From 27206cb3dd29e520e50c59555dd0909451b86a4d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 4 Mar 2020 19:09:07 +0100 Subject: [PATCH 0302/1093] [nodes] LDRToHDR: export sfmData as json (.sfm instead of .abc) No need for binary file format, it only contains views with image paths and resolved metadata. --- meshroom/aliceVision/LDRToHDR.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 9da8f57f32..56e2f247fa 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -194,7 +194,7 @@ class LDRToHDR(desc.CommandLineNode): name='outSfMDataFilename', label='Output SfMData File', description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.abc', + value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], ) ] From 9ead24550275c25243cd3aa02b41f14072ad75e5 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 5 Mar 2020 20:50:36 +0100 Subject: [PATCH 0303/1093] [ui] ImageGallery: allow to visualize the list of HDR images created by LDRToHDR Conflicts: meshroom/ui/reconstruction.py --- meshroom/aliceVision/CameraInit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 22c0ccab99..eff321e12a 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -160,6 +160,9 @@ class CameraInit(desc.CommandLineNode): ), ] + def readSfMData(self, sfmFile): + return readSfMData(sfmFile) + def buildIntrinsics(self, node, additionalViews=()): """ Build intrinsics from node current views and optional additional views From ef7fabc49989eb5a2055c1119068b855d89a9240 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 19 Dec 2019 13:45:24 +0100 Subject: [PATCH 0304/1093] Add debug options for visualization of borders and seams --- meshroom/aliceVision/PanoramaCompositing.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 34af53ad70..417d5fd70e 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -37,6 +37,16 @@ class PanoramaCompositing(desc.CommandLineNode): exclusive=True, uid=[0] ), + desc.ChoiceParam( + name='overlayType', + label='Overlay Type', + description='Which overlay to display on top of panorama for debug', + value='none', + values=['none', 'borders', 'seams'], + exclusive=True, + advanced=True, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 1addbb5500b5efd68e77ab67078bc810835970dc Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Fri, 7 Feb 2020 07:58:26 +0100 Subject: [PATCH 0305/1093] add camera type choice for equidistant --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index eff321e12a..7bdc8583df 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -23,7 +23,7 @@ desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=None), desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1.0, uid=[0], range=None), desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1.0, uid=[0], range=None), - desc.ChoiceParam(name="type", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4'], exclusive=True, uid=[0]), + desc.ChoiceParam(name="type", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (camera and lens combined)", value="", uid=[]), From 374796ef4d22aa4bbf03c9d41ee0ae36b0e8217e Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Fri, 7 Feb 2020 07:59:44 +0100 Subject: [PATCH 0306/1093] add rotation matrix evaluation for panorama --- meshroom/aliceVision/PanoramaEstimation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 6aaff58f36..967b4f90d7 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -98,7 +98,7 @@ class PanoramaEstimation(desc.CommandLineNode): description="Method for relative rotation :\n" " * from essential matrix\n" " * from homography matrix", - values=['essential_matrix', 'homography_matrix'], + values=['essential_matrix', 'homography_matrix', 'rotation_matrix'], value='homography_matrix', exclusive=True, uid=[0], From 75fcee5b7b0f13c40ba5c222344f51241ab88ebf Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Fri, 7 Feb 2020 08:21:37 +0100 Subject: [PATCH 0307/1093] add a node to select fisheye circle --- meshroom/aliceVision/FisheyeCircle.py | 64 +++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 meshroom/aliceVision/FisheyeCircle.py diff --git a/meshroom/aliceVision/FisheyeCircle.py b/meshroom/aliceVision/FisheyeCircle.py new file mode 100644 index 0000000000..cea2711192 --- /dev/null +++ b/meshroom/aliceVision/FisheyeCircle.py @@ -0,0 +1,64 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class FisheyeCircle(desc.CommandLineNode): + commandLine = 'aliceVision_fisheyeCircle {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + uid=[0], + ), + desc.FloatParam( + name='offsetx', + label='Center X offset', + description='Fisheye visibillity circle offset in X (pixels).', + value=0.0, + range=(-1000.0, 1000.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='offsety', + label='Center Y offset', + description='Fisheye visibillity circle offset in Y (pixels).', + value=0.0, + range=(-1000.0, 1000.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='radius', + label='Radius', + description='Fisheye visibillity circle radius (pixels).', + value=100.0, + range=(0.0, 100000.0, 0.01), + 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='outSfMDataFilename', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfmData.abc', + uid=[], + ) + ] From 3682c142e18b202c10190a5cf0a0752aa5761f8b Mon Sep 17 00:00:00 2001 From: fabienservant <fabien.servant@interdigital.com> Date: Thu, 13 Feb 2020 11:11:27 +0100 Subject: [PATCH 0308/1093] Add sensor size to camera init --- meshroom/aliceVision/CameraInit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 7bdc8583df..23817b4005 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -26,6 +26,8 @@ desc.ChoiceParam(name="type", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), + desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[], range=(0, 1000, 1)), + desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24, uid=[], range=(0, 1000, 1)), desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (camera and lens combined)", value="", uid=[]), desc.GroupAttribute(name="principalPoint", label="Principal Point", description="", groupDesc=[ desc.FloatParam(name="x", label="x", description="", value=0, uid=[], range=(0, 10000, 1)), From aafeed0675aabd41defd0bfa04cbbc42a924e304 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 25 Feb 2020 14:21:47 +0100 Subject: [PATCH 0309/1093] [nodes] PanoramaEstimation: use rotation matrix by default --- meshroom/aliceVision/PanoramaEstimation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 967b4f90d7..460a6a329b 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -97,9 +97,10 @@ class PanoramaEstimation(desc.CommandLineNode): label='Relative Rotation Method', description="Method for relative rotation :\n" " * from essential matrix\n" - " * from homography matrix", + " * from homography matrix\n" + " * from rotation matrix", values=['essential_matrix', 'homography_matrix', 'rotation_matrix'], - value='homography_matrix', + value='rotation_matrix', exclusive=True, uid=[0], advanced=True, From 2b180cb9071c81181c600c089768775563b3469f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 27 Feb 2020 16:54:10 +0100 Subject: [PATCH 0310/1093] [nodes] rename PanoramaExternalInfo to PanoramaInit * update HDRI pipeline * rename the fake tractor dependency param to make it more explicit that it is only used for dependency (and not as a real input) --- ...PanoramaExternalInfo.py => PanoramaInit.py} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename meshroom/aliceVision/{PanoramaExternalInfo.py => PanoramaInit.py} (73%) diff --git a/meshroom/aliceVision/PanoramaExternalInfo.py b/meshroom/aliceVision/PanoramaInit.py similarity index 73% rename from meshroom/aliceVision/PanoramaExternalInfo.py rename to meshroom/aliceVision/PanoramaInit.py index 4fca9880ad..8629c069a0 100644 --- a/meshroom/aliceVision/PanoramaExternalInfo.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -6,8 +6,8 @@ from meshroom.core import desc -class PanoramaExternalInfo(desc.CommandLineNode): - commandLine = 'aliceVision_panoramaExternalInfo {allParams}' +class PanoramaInit(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaInit {allParams}' size = desc.DynamicNodeSize('input') inputs = [ @@ -27,16 +27,16 @@ class PanoramaExternalInfo(desc.CommandLineNode): ), desc.ListAttribute( elementDesc=desc.File( - name='matchesFolder', - label='Matches Folder', + name='dependency', + label='', description="", value='', - uid=[0], + uid=[], ), - name='matchesFolders', - label='Matches Folders', - description="Folder(s) in which computed matches are stored. (WORKAROUND for valid Tractor graph submission)", - group='forDependencyOnly', + name='dependency', + label='Dependency', + description="Folder(s) in which computed features are stored. (WORKAROUND for valid Tractor graph submission)", + group='forDependencyOnly', # not a command line argument ), desc.ChoiceParam( name='verboseLevel', From 50797a4b96a9de68cefbd68559efbce078abeacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 20 Feb 2020 21:10:39 +0100 Subject: [PATCH 0311/1093] [ui] Viewer2D: Add Fisheye Circle display on PanoramaInit node --- meshroom/aliceVision/FisheyeCircle.py | 64 --------------------------- meshroom/aliceVision/PanoramaInit.py | 34 +++++++++++++- 2 files changed, 33 insertions(+), 65 deletions(-) delete mode 100644 meshroom/aliceVision/FisheyeCircle.py diff --git a/meshroom/aliceVision/FisheyeCircle.py b/meshroom/aliceVision/FisheyeCircle.py deleted file mode 100644 index cea2711192..0000000000 --- a/meshroom/aliceVision/FisheyeCircle.py +++ /dev/null @@ -1,64 +0,0 @@ -__version__ = "1.0" - -import json -import os - -from meshroom.core import desc - - -class FisheyeCircle(desc.CommandLineNode): - commandLine = 'aliceVision_fisheyeCircle {allParams}' - size = desc.DynamicNodeSize('input') - - inputs = [ - desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', - uid=[0], - ), - desc.FloatParam( - name='offsetx', - label='Center X offset', - description='Fisheye visibillity circle offset in X (pixels).', - value=0.0, - range=(-1000.0, 1000.0, 0.01), - uid=[0], - ), - desc.FloatParam( - name='offsety', - label='Center Y offset', - description='Fisheye visibillity circle offset in Y (pixels).', - value=0.0, - range=(-1000.0, 1000.0, 0.01), - uid=[0], - ), - desc.FloatParam( - name='radius', - label='Radius', - description='Fisheye visibillity circle radius (pixels).', - value=100.0, - range=(0.0, 100000.0, 0.01), - 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='outSfMDataFilename', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.abc', - uid=[], - ) - ] diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 8629c069a0..0d24bc9ae0 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -38,6 +38,38 @@ class PanoramaInit(desc.CommandLineNode): description="Folder(s) in which computed features are stored. (WORKAROUND for valid Tractor graph submission)", group='forDependencyOnly', # not a command line argument ), + desc.BoolParam( + name='useFisheye', + label='Full Fisheye', + description='To declare a full fisheye panorama setup', + value=False, + uid=[0], + ), + desc.GroupAttribute( + name="fisheyeCenterOffset", + label="Fisheye Center", + description="Center of the Fisheye circle (XY offset to the center in pixels).", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="", + value=0.0, + uid=[0], + range=(-1000.0, 10000.0, 1.0)), + desc.FloatParam( + name="y", label="y", description="", + value=0.0, + uid=[0], + range=(-1000.0, 10000.0, 1.0)), + ], + ), + desc.FloatParam( + name='fisheyeRadius', + label='Radius', + description='Fisheye visibillity circle radius (% of image shortest side).', + value=96.0, + range=(0.0, 150.0, 0.01), + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -54,7 +86,7 @@ class PanoramaInit(desc.CommandLineNode): name='outSfMDataFilename', label='Output SfMData File', description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.abc', + value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], ) ] From c7657977a720e474b82a9da704edf4d16216b16c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 6 Mar 2020 18:25:00 +0100 Subject: [PATCH 0312/1093] [nodes] PanoramaInit: fisheyeCenterOffset x/y are now 2 parameters on command line Avoid error with negative values on "y" interpreted as a new argument --- meshroom/aliceVision/PanoramaInit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 0d24bc9ae0..d1867dcfb0 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -51,16 +51,17 @@ class PanoramaInit(desc.CommandLineNode): description="Center of the Fisheye circle (XY offset to the center in pixels).", groupDesc=[ desc.FloatParam( - name="x", label="x", description="", + name="fisheyeCenterOffset_x", label="x", description="X Offset in pixels", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), desc.FloatParam( - name="y", label="y", description="", + name="fisheyeCenterOffset_y", label="y", description="Y Offset in pixels", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), ], + group=None, # skip group from command line ), desc.FloatParam( name='fisheyeRadius', From c0a70a1b79d4fba27148da0cf08768a5748c8f7a Mon Sep 17 00:00:00 2001 From: ChemicalXandco <jimjoh41@gmail.com> Date: Mon, 16 Mar 2020 17:38:54 +0000 Subject: [PATCH 0313/1093] make comment clearer --- meshroom/aliceVision/SketchfabUpload.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 311ace6fb3..27bea2fb28 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -219,6 +219,7 @@ def processChunk(self, chunk): try: self._stopped = False chunk.logManager.start(chunk.node.verboseLevel.value) + uploadFile = '' if not chunk.node.inputFiles: chunk.logger.warning('Nothing to upload') From eabdacc4b656c770c0164dd51183c3380a5c3aa6 Mon Sep 17 00:00:00 2001 From: Theo <theo.leplomb@mikrosimage.com> Date: Fri, 6 Mar 2020 18:12:49 +0100 Subject: [PATCH 0314/1093] [nodes] StructureFromMotion: Add new observation constraint mode --- meshroom/aliceVision/StructureFromMotion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index c0f960abb5..91d257f2a5 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -62,6 +62,18 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.ChoiceParam( + name='observationConstraint', + label='Observation Constraint', + description='Observation contraint mode used in the optimization:\n' + ' * Basic: Use standard reprojection error in pixel coordinates\n' + ' * Scale: Use reprojection error in pixel coordinates but relative to the feature scale', + value='Basic', + values=['Basic', 'Scale'], + exclusive=True, + uid=[0], + advanced=True, + ), desc.IntParam( name='localizerEstimatorMaxIterations', label='Localizer Max Ransac Iterations', From af717682160adaaddb753f04c0c29e2a51ea61fd Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Mar 2020 19:25:57 +0100 Subject: [PATCH 0315/1093] [ui] Add visualisation for automatically detected fisheye circle --- meshroom/aliceVision/PanoramaInit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index d1867dcfb0..5d3a4c076c 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -45,6 +45,13 @@ class PanoramaInit(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='estimateFisheyeCircle', + label='Estimate Fisheye Circle', + description='Automatically estimate the Fisheye Circle center and radius instead of using user values.', + value=True, + uid=[0], + ), desc.GroupAttribute( name="fisheyeCenterOffset", label="Fisheye Center", From 8d97e4751ba9b6048c149455f6f1addae054863b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 26 Mar 2020 10:50:09 +0100 Subject: [PATCH 0316/1093] [nodes] PanoramaEstimation: remove unused param "orientation" --- meshroom/aliceVision/PanoramaEstimation.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 460a6a329b..a2117daf5d 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -53,15 +53,6 @@ class PanoramaEstimation(desc.CommandLineNode): uid=[0], joinChar=',', ), - desc.IntParam( - name='orientation', - label='Orientation', - description='Orientation', - value=0, - range=(0, 6, 1), - uid=[0], - advanced=True, - ), desc.FloatParam( name='offsetLongitude', label='Longitude offset (deg.)', From 3b7d0bfa1cc50572bb040edc31dbd7052f5cac94 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 26 Mar 2020 10:50:55 +0100 Subject: [PATCH 0317/1093] [nodes] remove old HDRIStitching node --- meshroom/aliceVision/HDRIstitching.py | 89 --------------------------- 1 file changed, 89 deletions(-) delete mode 100644 meshroom/aliceVision/HDRIstitching.py diff --git a/meshroom/aliceVision/HDRIstitching.py b/meshroom/aliceVision/HDRIstitching.py deleted file mode 100644 index af81410eec..0000000000 --- a/meshroom/aliceVision/HDRIstitching.py +++ /dev/null @@ -1,89 +0,0 @@ -__version__ = "1.0" - -from meshroom.core import desc - - -class HDRIstitching(desc.CommandLineNode): - commandLine = 'aliceVision_utils_fisheyeProjection {allParams}' - - inputs = [ - desc.ListAttribute( - elementDesc=desc.File( - name='inputFile', - label='Input File/Folder', - description="", - value='', - uid=[0], - ), - name='input', - label='Input Folder', - description="List of fisheye images or folder containing them." - ), - desc.FloatParam( - name='blurWidth', - label='Blur Width', - description="Blur width of alpha channel for all fisheye (between 0 and 1). \n" - "Determine the transitions sharpness.", - value=0.2, - range=(0, 1, 0.1), - uid=[0], - ), - desc.ListAttribute( - elementDesc=desc.FloatParam( - name='imageXRotation', - label='Image X Rotation', - description="", - value=0, - range=(-20, 20, 1), - uid=[0], - ), - name='xRotation', - label='X Rotations', - description="Rotations in degree on axis X (horizontal axis) for each image.", - ), - desc.ListAttribute( - elementDesc=desc.FloatParam( - name='imageYRotation', - label='Image Y Rotation', - description="", - value=0, - range=(-30, 30, 5), - uid=[0], - ), - name='yRotation', - label='Y Rotations', - description="Rotations in degree on axis Y (vertical axis) for each image.", - ), - desc.ListAttribute( - elementDesc=desc.FloatParam( - name='imageZRotation', - label='Image Z Rotation', - description="", - value=0, - range=(-10, 10, 1), - uid=[0], - ), - name='zRotation', - label='Z Rotations', - description="Rotations in degree on axis Z (depth axis) for each image.", - ), - 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 Panorama', - description="Output folder for panorama", - value=desc.Node.internalFolder, - uid=[], - ), - ] \ No newline at end of file From 66c12a858a921d9e2fb05547bb1ff18c03d9e4e7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 26 Mar 2020 11:20:44 +0100 Subject: [PATCH 0318/1093] [nodes] add some nodes documentation --- meshroom/aliceVision/CameraInit.py | 46 +++++++++++++--- meshroom/aliceVision/ConvertSfMFormat.py | 7 ++- meshroom/aliceVision/DepthMap.py | 10 ++++ meshroom/aliceVision/DepthMapFilter.py | 5 ++ meshroom/aliceVision/ExportAnimatedCamera.py | 5 ++ meshroom/aliceVision/ExportMaya.py | 7 +++ meshroom/aliceVision/FeatureExtraction.py | 20 +++++++ meshroom/aliceVision/FeatureMatching.py | 22 ++++++++ meshroom/aliceVision/GlobalSfM.py | 5 ++ meshroom/aliceVision/ImageMatching.py | 22 ++++++++ meshroom/aliceVision/ImageMatchingMultiSfM.py | 8 +++ meshroom/aliceVision/KeyframeSelection.py | 7 +++ meshroom/aliceVision/LDRToHDR.py | 28 +++++++--- meshroom/aliceVision/MeshDecimate.py | 4 ++ meshroom/aliceVision/MeshDenoising.py | 5 ++ meshroom/aliceVision/MeshFiltering.py | 5 ++ meshroom/aliceVision/MeshResampling.py | 4 ++ meshroom/aliceVision/Meshing.py | 11 ++++ meshroom/aliceVision/PanoramaCompositing.py | 17 +++++- meshroom/aliceVision/PanoramaEstimation.py | 4 ++ meshroom/aliceVision/PanoramaInit.py | 12 +++++ meshroom/aliceVision/PanoramaWarping.py | 7 ++- meshroom/aliceVision/PrepareDenseScene.py | 4 ++ meshroom/aliceVision/Publish.py | 5 ++ meshroom/aliceVision/SfMAlignment.py | 12 +++++ meshroom/aliceVision/SfMTransfer.py | 4 ++ meshroom/aliceVision/SfMTransform.py | 12 +++++ meshroom/aliceVision/SketchfabUpload.py | 5 ++ meshroom/aliceVision/StructureFromMotion.py | 53 +++++++++++++++++++ meshroom/aliceVision/Texturing.py | 14 +++++ 30 files changed, 352 insertions(+), 18 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 23817b4005..bc2814a613 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -16,20 +16,39 @@ desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=None), desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=None), desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=None), - desc.StringParam(name="metadata", label="Image Metadata", description="", value="", uid=[], advanced=True), + desc.StringParam(name="metadata", label="Image Metadata", + description="The configuration of the Viewpoints is based on the images metadata.\n" + "The important ones are:\n" + " * Focal Length: the focal length in mm.\n" + " * Make and Model: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database.\n" + " * Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately.", + value="", uid=[], advanced=True), ] Intrinsic = [ desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=None), - desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length", value=-1.0, uid=[0], range=None), - desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length", value=-1.0, uid=[0], range=None), - desc.ChoiceParam(name="type", label="Camera Type", description="Camera Type", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3'], exclusive=True, uid=[0]), + desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", + description="Initial Guess on the Focal Length (in pixels). \n" + "When we have an initial value from EXIF, this value is not accurate but cannot be wrong. \n" + "So this value is used to limit the range of possible values in the optimization. \n" + "If you put -1, this value will not be used and the focal length will not be bounded.", + value=-1.0, uid=[0], range=None), + desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length (in pixels)", value=-1.0, uid=[0], range=None), + desc.ChoiceParam(name="type", label="Camera Type", + description="Mathematical Model used to represent a camera:\n" + " * pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" + " * radial1: Pinhole camera with one radial distortion parameter\n" + " * radial3: Pinhole camera with 3 radial distortion parameters\n" + " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" + " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120° FoV)\n" + " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180° FoV)\n", + value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[], range=(0, 1000, 1)), desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24, uid=[], range=(0, 1000, 1)), - desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (camera and lens combined)", value="", uid=[]), - desc.GroupAttribute(name="principalPoint", label="Principal Point", description="", groupDesc=[ + desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[]), + desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ desc.FloatParam(name="x", label="x", description="", value=0, uid=[], range=(0, 10000, 1)), desc.FloatParam(name="y", label="y", description="", value=0, uid=[], range=(0, 10000, 1)), ]), @@ -96,6 +115,21 @@ class CameraInit(desc.CommandLineNode): size = desc.DynamicNodeSize('viewpoints') + documentation = ''' +This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length +and which images are sharing the same internal camera parameters, as well as potential cameras rigs. + +When you import new images into Meshroom, this node is automatically configured from the analysis of the image metadata. +The software can support images without any metadata but it is recommended to have them for robustness. + +### Metadata +Metadata allows images to be grouped together and provides an initialization of the focal length (in pixel unit). +The metadata needed are: + * **Focal Length**: the focal length in mm. + * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database. + * **Serial Number**: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately (in the photogrammetry case). +''' + inputs = [ desc.ListAttribute( name="viewpoints", diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 5260a59b79..2ffc80225b 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -6,7 +6,12 @@ class ConvertSfMFormat(desc.CommandLineNode): commandLine = 'aliceVision_convertSfMFormat {allParams}' size = desc.DynamicNodeSize('input') - + + documentation = ''' +Convert an SfM scene from one file format to another. +It can also be used to remove specific parts of from an SfM scene (like filter all 3D landmarks or filter 2D observations). +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 24fa430009..3c4596226a 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -10,6 +10,16 @@ class DepthMap(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=3) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentation = ''' +For each camera that have been estimated by the Structure-From-Motion, it estimates the depth value per pixel. + +Adjust the downscale factor to compute depth maps at a higher/lower resolution. +Use a downscale factor of one (full-resolution) only if the quality of the input images is really high (camera on a tripod with high-quality optics). + +## Online +[https://alicevision.org/#photogrammetry/depth_maps_estimation](https://alicevision.org/#photogrammetry/depth_maps_estimation) +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index a4f2ed5d14..7dd0eb0448 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -10,6 +10,11 @@ class DepthMapFilter(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=10) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentation = ''' +Filter depth map values that are not coherent in multiple depth maps. +This allows to filter unstable points before starting the fusion of all depth maps in the Meshing node. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index b8d97557aa..eefeb48900 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -6,6 +6,11 @@ class ExportAnimatedCamera(desc.CommandLineNode): commandLine = 'aliceVision_exportAnimatedCamera {allParams}' + documentation = ''' +Convert cameras from an SfM scene into an animated cameras in Alembic file format. +Based on the input image filenames, it will recognize the input video sequence to create an animated camera. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 41568f5df1..9328852685 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -6,6 +6,13 @@ class ExportMaya(desc.CommandLineNode): commandLine = 'aliceVision_exportMeshroomMaya {allParams}' + documentation = ''' +Export a scene for Autodesk Maya, with an Alembic file describing the SfM: cameras and 3D points. +It will export half-size undistorted images to use as image planes for cameras and also export thumbnails. +Use the MeshroomMaya plugin, to load the ABC file. It will recognize the file structure and will setup the scene. +MeshroomMaya contains a user interface to browse all cameras. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index e5c1cfd4cf..a18537787a 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -9,6 +9,26 @@ class FeatureExtraction(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentation = ''' +This node extracts distinctive groups of pixels that are, to some extent, invariant to changing camera viewpoints during image acquisition. +Hence, a feature in the scene should have similar feature descriptions in all images. + +This node implements multiple methods: + * **SIFT** +The most standard method. This is the default and recommended value for all use cases. + * **AKAZE** +AKAZE can be interesting solution to extract features in challenging condition. It could be able to match wider angle than SIFT but has drawbacks. +It may extract to many features, the repartition is not always good. +It is known to be good on challenging surfaces such as skin. + * **CCTAG** +CCTag is a marker type with 3 or 4 crowns. You can put markers in the scene during the shooting session to automatically re-orient and re-scale the scene to a known size. +It is robust to motion-blur, depth-of-field, occlusion. Be careful to have enough white margin around your CCTags. + + +## Online +[https://alicevision.org/#photogrammetry/natural_feature_extraction](https://alicevision.org/#photogrammetry/natural_feature_extraction) +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 0b4c00d7f9..f86ff7b7c6 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -9,6 +9,28 @@ class FeatureMatching(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=20) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentation = ''' +This node performs the matching of all features between the candidate image pairs. + +It is performed in 2 steps: + + 1/ **Photometric Matches** + +It performs the photometric matches between the set of features descriptors from the 2 input images. +For each feature descriptor on the first image, it looks for the 2 closest descriptors in the second image and uses a relative threshold between them. +This assumption kill features on repetitive structure but has proved to be a robust criterion. + + 2/ **Geometric Filtering** + +It performs a geometric filtering of the photometric match candidates. +It uses the features positions in the images to make a geometric filtering by using epipolar geometry in an outlier detection framework +called RANSAC (RANdom SAmple Consensus). It randomly selects a small set of feature correspondences and compute the fundamental (or essential) matrix, +then it checks the number of features that validates this model and iterate through the RANSAC framework. + +## Online +[https://alicevision.org/#photogrammetry/feature_matching](https://alicevision.org/#photogrammetry/feature_matching) +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index a60b7a7895..42996b938b 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -10,6 +10,11 @@ class GlobalSfM(desc.CommandLineNode): commandLine = 'aliceVision_globalSfM {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +Performs the Structure-From-Motion with a global approach. +It is known to be faster but less robust to challenging datasets than the Incremental approach. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 3e1ffb409c..5c7485265c 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -8,6 +8,28 @@ class ImageMatching(desc.CommandLineNode): commandLine = 'aliceVision_imageMatching {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +The goal of this node is to select the image pairs to match. The ambition is to find the images that are looking to the same areas of the scene. +Thanks to this node, the FeatureMatching node will only compute the matches between the selected image pairs. + +It provides multiple methods: + * **VocabularyTree** +It uses image retrieval techniques to find images that share some content without the cost of resolving all feature matches in details. +Each image is represented in a compact image descriptor which allows to compute the distance between all images descriptors very efficiently. +If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected. + * **Sequential** +If your input is a video sequence, you can use this option to link images between them over time. + * **SequentialAndVocabularyTree** +Combines sequential approach with Voc Tree to enable connections between keyframes at different times. + * **Exhaustive** +Export all image pairs. + * **Frustum** +If images have known poses, computes the intersection between cameras frustums to create the list of image pairs. + +## Online +[https://alicevision.org/#photogrammetry/image_matching](https://alicevision.org/#photogrammetry/image_matching) +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index b5601c840f..2d506227a5 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -9,6 +9,14 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): # use both SfM inputs to define Node's size size = desc.MultiDynamicNodeSize(['input', 'inputB']) + documentation = ''' +The goal of this node is to select the image pairs to match in the context of an SfM augmentation. +The ambition is to find the images that are looking to the same areas of the scene. +Thanks to this node, the FeatureMatching node will only compute the matches between the selected image pairs. + +## Online +[https://alicevision.org/#photogrammetry/image_matching](https://alicevision.org/#photogrammetry/image_matching) +''' inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 8d85dff80a..987af42367 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -7,6 +7,13 @@ class KeyframeSelection(desc.CommandLineNode): commandLine = 'aliceVision_utils_keyframeSelection {allParams}' + documentation = ''' +Allows to extract keyframes from a video and insert metadata. +It can extract frames from a synchronized multi-cameras rig. + +You can extract frames at regular interval by configuring only the min/maxFrameStep. +''' + inputs = [ desc.ListAttribute( elementDesc=desc.File( diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 56e2f247fa..770bfcc70e 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -29,6 +29,17 @@ class LDRToHDR(desc.CommandLineNode): cpu = desc.Level.INTENSIVE ram = desc.Level.NORMAL + documentation=''' +This node fuse LDR (Low Dynamic Range) images with multi-bracketing into HDR (High Dynamic Range) images. + +It is done in 2 steps: + +1/ Estimation of the Camera Response Function (CRF) + +2/ HDR fusion relying on the CRF + +''' + inputs = [ desc.File( name='input', @@ -40,7 +51,7 @@ class LDRToHDR(desc.CommandLineNode): desc.IntParam( name='userNbBrackets', label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic).', + description='Number of exposure brackets per HDR image (0 for automatic detection).', value=0, range=(0, 15, 1), uid=[0], @@ -111,17 +122,18 @@ class LDRToHDR(desc.CommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps", value=False, uid=[0], + advanced=True, ), desc.ChoiceParam( name='calibrationMethod', label='Calibration Method', description="Method used for camera calibration \n" - " * linear \n" - " * robertson \n" - " * debevec \n" - " * grossberg \n" - " * laguerre", - values=['linear', 'robertson', 'debevec', 'grossberg', 'laguerre'], + " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" + " * Debevec: This is the standard method for HDR calibration. \n" + " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" + " * Laguerre: Simple but robust method estimating the minimal number of parameters. \n" + " * Robertson: First method for HDR calibration in the literature. \n", + values=['linear', 'debevec', 'grossberg', 'laguerre', 'robertson'], value='debevec', exclusive=True, uid=[0], @@ -142,7 +154,7 @@ class LDRToHDR(desc.CommandLineNode): desc.ChoiceParam( name='fusionWeight', label='Fusion Weight', - description="Weight function used to fuse all LDR images together \n" + description="Weight function used to fuse all LDR images together:\n" " * gaussian \n" " * triangle \n" " * plateau", diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 280e9319a4..8b928350b0 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -9,6 +9,10 @@ class MeshDecimate(desc.CommandLineNode): cpu = desc.Level.NORMAL ram = desc.Level.NORMAL + documentation = ''' +This node allows to reduce the density of the Mesh. +''' + inputs = [ desc.File( name="input", diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 438e611ca7..a750982698 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -6,6 +6,11 @@ class MeshDenoising(desc.CommandLineNode): commandLine = 'aliceVision_meshDenoising {allParams}' + documentation = ''' +This experimental node allows to reduce noise from a Mesh. +for now, the parameters are difficult to control and vary a lot from one dataset to another. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 4a1ae7ea41..deddc28ff2 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -6,6 +6,11 @@ class MeshFiltering(desc.CommandLineNode): commandLine = 'aliceVision_meshFiltering {allParams}' + documentation = ''' +This node applies a Laplacian filtering to remove local defects from the raw Meshing cut. + +''' + inputs = [ desc.File( name='inputMesh', diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index e6966366a3..64c4cab717 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -9,6 +9,10 @@ class MeshResampling(desc.CommandLineNode): cpu = desc.Level.NORMAL ram = desc.Level.NORMAL + documentation = ''' +This node allows to recompute the mesh surface with a new topology and uniform density. +''' + inputs = [ desc.File( name="input", diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 449ef008aa..bef32309a4 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -9,6 +9,17 @@ class Meshing(desc.CommandLineNode): cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + documentation = ''' +This node creates a dense geometric surface representation of the scene. + +First, it fuses all the depth maps into a global dense point cloud with an adaptive resolution. +It then performs a 3D Delaunay tetrahedralization and a voting procedure is done to compute weights on cells and weights on facets connecting the cells. +A Graph Cut Max-Flow is applied to optimally cut the volume. This cut represents the extracted mesh surface. + +## Online +[https://alicevision.org/#photogrammetry/meshing](https://alicevision.org/#photogrammetry/meshing) +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 417d5fd70e..eea2ae0f13 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -10,6 +10,13 @@ class PanoramaCompositing(desc.CommandLineNode): commandLine = 'aliceVision_panoramaCompositing {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +Once the images have been transformed geometrically (in PanoramaWarping), +they have to be fused together in a single panorama image which looks like a single photography. +The Multi-band Blending method provides the best quality. It averages the pixel values using multiple bands in the frequency domain. +Multiple cameras are contributing to the low frequencies and only the best one contributes to the high frequencies. +''' + inputs = [ desc.File( name='input', @@ -31,7 +38,10 @@ class PanoramaCompositing(desc.CommandLineNode): desc.ChoiceParam( name='compositerType', label='Compositer Type', - description='Which compositer should be used to blend images', + description='Which compositer should be used to blend images:\n' + ' * multiband: high quality transition by fusing images by frequency bands\n' + ' * replace: debug option with straight transitions\n' + ' * alpha: debug option with linear transitions\n', value='multiband', values=['replace', 'alpha', 'multiband'], exclusive=True, @@ -40,7 +50,10 @@ class PanoramaCompositing(desc.CommandLineNode): desc.ChoiceParam( name='overlayType', label='Overlay Type', - description='Which overlay to display on top of panorama for debug', + description='Overlay on top of panorama to analyze transitions:\n' + ' * none: no overlay\n' + ' * borders: display image borders\n' + ' * seams: display transitions between images\n', value='none', values=['none', 'borders', 'seams'], exclusive=True, diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index a2117daf5d..d58b0142a4 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -10,6 +10,10 @@ class PanoramaEstimation(desc.CommandLineNode): commandLine = 'aliceVision_panoramaEstimation {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +Estimate relative camera rotations between input images. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 5d3a4c076c..066deec0a5 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -10,6 +10,18 @@ class PanoramaInit(desc.CommandLineNode): commandLine = 'aliceVision_panoramaInit {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +This node allows to setup the Panorama: + +1/ Enables the initialization the cameras from known position in an XML file (provided by +["Roundshot VR Drive"](https://www.roundshot.com/xml_1/internet/fr/application/d394/d395/f396.cfm) ). + +2/ Enables to setup Full Fisheye Optics (to use an Equirectangular camera model). + +3/ To automatically detects the Fisheye Circle (radius + center) in input images or manually adjust it. + +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index a127fe3524..c44e7b7a17 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -10,6 +10,10 @@ class PanoramaWarping(desc.CommandLineNode): commandLine = 'aliceVision_panoramaWarping {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +Compute the image warping for each input image in the panorama coordinate system. +''' + inputs = [ desc.File( name='input', @@ -21,7 +25,8 @@ class PanoramaWarping(desc.CommandLineNode): desc.IntParam( name='panoramaWidth', label='Panorama Width', - description='Panorama width (pixels). 0 For automatic size', + 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).', value=10000, range=(0, 50000, 1000), uid=[0] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 5467d576ab..afd5b4b27d 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -9,6 +9,10 @@ class PrepareDenseScene(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentation = ''' +This node export undistorted images so the depth map and texturing can be computed on Pinhole images without distortion. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index ebe2b9b832..ae49bdd03f 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -10,6 +10,11 @@ class Publish(desc.Node): size = desc.DynamicNodeSize('inputFiles') + + documentation = ''' +This node allows to copy files into a specific folder. +''' + inputs = [ desc.ListAttribute( elementDesc=desc.File( diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 798ce1c59c..3e277bffa9 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -7,6 +7,18 @@ class SfMAlignment(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmAlignment {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +This node allows to change the coordinate system of one SfM scene to align it on another one. + +The alignment can be based on: + * from_cameras_viewid: Align cameras in both SfM on the specified viewId + * from_cameras_poseid: Align cameras in both SfM on the specified poseId + * from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern' + * from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList' + * from_markers: Align from markers with the same Id + +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index a30695ca26..9be8772b7b 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -7,6 +7,10 @@ class SfMTransfer(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransfer {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +This node allows to transfer poses and/or intrinsics form one SfM scene onto another one. +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 6a9a975a84..e65bb56f6c 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -7,6 +7,18 @@ class SfMTransform(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransform {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +This node allows to change the coordinate system of one SfM scene. + +The transformation can be based on: + * transformation: Apply a given transformation + * auto_from_cameras: Fit all cameras into a box [-1,1] + * auto_from_landmarks: Fit all landmarks into a box [-1,1] + * from_single_camera: Use a specific camera as the origin of the coordinate system + * from_markers: Align specific markers to custom coordinates + +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 2a552b879c..e599b1362a 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -51,6 +51,11 @@ def progressUpdate(size=None, progress=None, logManager=None): class SketchfabUpload(desc.Node): size = desc.DynamicNodeSize('inputFiles') + + documentation = ''' +Upload a textured mesh on Sketchfab. +''' + inputs = [ desc.ListAttribute( elementDesc=desc.File( diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index c0f960abb5..6a00b3cf35 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -10,6 +10,59 @@ class StructureFromMotion(desc.CommandLineNode): commandLine = 'aliceVision_incrementalSfM {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' +This node will analyze feature matches to understand the geometric relationship behind all the 2D observations, +and infer the rigid scene structure (3D points) with the pose (position and orientation) and internal calibration of all cameras. +The pipeline is a growing reconstruction process (called incremental SfM): it first computes an initial two-view reconstruction that is iteratively extended by adding new views. + +1/ Fuse 2-View Matches into Tracks + +It fuses all feature matches between image pairs into tracks. Each track represents a candidate point in space, visible from multiple cameras. +However, at this step of the pipeline, it still contains many outliers. + +2/ Initial Image Pair + +It chooses the best initial image pair. This choice is critical for the quality of the final reconstruction. +It should indeed provide robust matches and contain reliable geometric information. +So, this image pair should maximize the number of matches and the repartition of the corresponding features in each image. +But at the same time, the angle between the cameras should also be large enough to provide reliable geometric information. + +3/ Initial 2-View Geometry + +It computes the fundamental matrix between the 2 images selected and consider that the first one is the origin of the coordinate system. + +4/ Triangulate + +Now with the pose of the 2 first cameras, it triangulates the corresponding 2D features into 3D points. + +5/ Next Best View Selection + +After that, it selects all the images that have enough associations with the features that are already reconstructed in 3D. + +6/ Estimate New Cameras + +Based on these 2D-3D associations it performs the resectioning of each of these new cameras. +The resectioning is a Perspective-n-Point algorithm (PnP) in a RANSAC framework to find the pose of the camera that validates most of the features associations. +On each camera, a non-linear minimization is performed to refine the pose. + +7/ Triangulate + +From these new cameras poses, some tracks become visible by 2 or more resected cameras and it triangulates them. + +8/ Optimize + +It performs a Bundle Adjustment to refine everything: extrinsics and intrinsics parameters of all cameras as well as the position of all 3D points. +It filters the results of the Bundle Adjustment by removing all observations that have high reprojection error or insufficient angles between observations. + +9/ Loop from 5 to 9 + +As we have triangulated new points, we get more image candidates for next best views selection and we can iterate from 5 to 9. +It iterates like that, adding cameras and triangulating new 2D features into 3D points and removing 3D points that became invalidated, until we cannot localize new views. + +## Online +[https://alicevision.org/#photogrammetry/sfm](https://alicevision.org/#photogrammetry/sfm) +''' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 117201a82f..1e36756f06 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -7,6 +7,20 @@ class Texturing(desc.CommandLineNode): commandLine = 'aliceVision_texturing {allParams}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + + documentation = ''' +This node computes the texturing on the mesh. + +If the mesh has no associated UV, it automatically computes UV maps. + +For each triangle, it uses the visibility information associated to each vertex to retrieve the texture candidates. +It select the best cameras based on the resolution covering the triangle. Finally it averages the pixel values using multiple bands in the frequency domain. +Many cameras are contributing to the low frequencies and only the best ones contributes to the high frequencies. + +## Online +[https://alicevision.org/#photogrammetry/texturing](https://alicevision.org/#photogrammetry/texturing) +''' + inputs = [ desc.File( name='input', From fba33198d1ca307a750ce10cf5490807e7fab9de Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 8 Feb 2020 17:45:44 +0100 Subject: [PATCH 0319/1093] [nodes] new ImageProcessing node --- meshroom/aliceVision/ImageProcessing.py | 110 ++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 meshroom/aliceVision/ImageProcessing.py diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py new file mode 100644 index 0000000000..4f917b2e09 --- /dev/null +++ b/meshroom/aliceVision/ImageProcessing.py @@ -0,0 +1,110 @@ +__version__ = "1.1" + +from meshroom.core import desc + + +class ImageProcessing(desc.CommandLineNode): + commandLine = 'aliceVision_utils_imageProcessing {allParams}' + size = desc.DynamicNodeSize('input') + # parallelization = desc.Parallelization(blockSize=40) + # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='extension', + label='File Extension', + description='File Extension.', + value='', + values=['', 'exr', 'jpg', 'tiff', 'png'], + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name='reconstructedViewsOnly', + label='Only Reconstructed Views', + description='Process Only Reconstructed Views', + value=False, + uid=[0], + ), + desc.BoolParam( + name='exposureCompensation', + label='Exposure Compensation', + description='Exposure Compensation', + value=False, + uid=[0], + ), + desc.FloatParam( + name='downscale', + label='Downscale', + description='Downscale.', + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='contrast', + label='Contrast', + description='Contrast.', + value=1.0, + range=(0.0, 100.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='medianFilter', + label='Median Filter', + description='Median Filter.', + value=0, + range=(0, 10, 1), + uid=[0], + ), + desc.IntParam( + name='sharpenWidth', + label='Sharpen Width', + description='Sharpen Width.', + value=1, + range=(1, 9, 2), + uid=[0], + ), + desc.FloatParam( + name='sharpenContrast', + label='Sharpen Contrast', + description='Sharpen Contrast.', + value=1.0, + range=(0.0, 100.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='sharpenThreshold', + label='Sharpen Threshold', + description='Sharpen Threshold.', + value=0.0, + range=(0.0, 1.0, 0.01), + 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='outSfMData', + label='Output sfmData', + description='Output sfmData.', + value=desc.Node.internalFolder + 'sfmData.abc', + uid=[], + ), + ] From 6f923c22bc8ae3b973ff397ed2110d6968d6575a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 26 Mar 2020 19:25:51 +0100 Subject: [PATCH 0320/1093] [nodes] CameraInit: no special characters in descriptions --- meshroom/aliceVision/CameraInit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index bc2814a613..86e920ffef 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -40,8 +40,8 @@ " * radial1: Pinhole camera with one radial distortion parameter\n" " * radial3: Pinhole camera with 3 radial distortion parameters\n" " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" - " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120° FoV)\n" - " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180° FoV)\n", + " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" + " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), From 0a1db965de8bdfa2ec288e35ba53d4e7bf6c0d0b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 26 Mar 2020 20:42:49 +0100 Subject: [PATCH 0321/1093] [nodes] ImageProcessing: add option keepImageFilename --- meshroom/aliceVision/ImageProcessing.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 4f917b2e09..8a7a1afbd1 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -9,6 +9,10 @@ class ImageProcessing(desc.CommandLineNode): # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentation = ''' +Convert or apply filtering to the input images. +''' + inputs = [ desc.File( name='input', @@ -20,8 +24,8 @@ class ImageProcessing(desc.CommandLineNode): desc.ChoiceParam( name='extension', label='File Extension', - description='File Extension.', - value='', + description='File Extension. If empty, use the input file type.', + value='exr', values=['', 'exr', 'jpg', 'tiff', 'png'], exclusive=True, uid=[0], @@ -33,6 +37,13 @@ class ImageProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='keepImageFilename', + label='Keep Image Filename', + description='Keep Image Filename instead of using View UID.', + value=False, + uid=[0], + ), desc.BoolParam( name='exposureCompensation', label='Exposure Compensation', From f9ed7f432ef5e20de3f2ca44a3d5998f153b53b9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 26 Mar 2020 20:51:37 +0100 Subject: [PATCH 0322/1093] [nodes] ImageMatching: add option FrustumOrVocabularyTree --- meshroom/aliceVision/ImageMatching.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 5c7485265c..eea05f27a3 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -25,6 +25,8 @@ class ImageMatching(desc.CommandLineNode): Export all image pairs. * **Frustum** If images have known poses, computes the intersection between cameras frustums to create the list of image pairs. + * **FrustumOrVocabularyTree** +If images have known poses, use frustum intersection else use VocabularuTree. ## Online [https://alicevision.org/#photogrammetry/image_matching](https://alicevision.org/#photogrammetry/image_matching) @@ -53,9 +55,17 @@ class ImageMatching(desc.CommandLineNode): desc.ChoiceParam( name='method', label='Method', - description='Method used to select the image pairs to match.', + description='Method used to select the image pairs to match:\n' + ' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' + 'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' + 'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' + ' * Sequential: If your input is a video sequence, you can use this option to link images between them over time.\n' + ' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' + ' * Exhaustive: Export all image pairs.\n' + ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' + ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularuTree.\n', value='VocabularyTree', - values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree','Exhaustive','Frustum'], + values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum', 'FrustumOrVocabularyTree'], exclusive=True, uid=[0], ), From effdd35eeb373cb7351ee8324d7a41d6977b4660 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 30 Mar 2020 11:24:17 +0200 Subject: [PATCH 0323/1093] [nodes] Panorama/LDRToHDR: remove the "advanced" flag on some parameters --- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/LDRToHDR.py | 1 - meshroom/aliceVision/PanoramaEstimation.py | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index eea05f27a3..c117548b1f 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -63,7 +63,7 @@ class ImageMatching(desc.CommandLineNode): ' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' ' * Exhaustive: Export all image pairs.\n' ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' - ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularuTree.\n', + ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', value='VocabularyTree', values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum', 'FrustumOrVocabularyTree'], exclusive=True, diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 770bfcc70e..5ebd24c7c5 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -64,7 +64,6 @@ class LDRToHDR(desc.CommandLineNode): value=0, range=(0, 10, 1), uid=[], - advanced=True, ), desc.FloatParam( name='highlightCorrectionFactor', diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index d58b0142a4..a26e6244cb 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -64,7 +64,6 @@ class PanoramaEstimation(desc.CommandLineNode): value=0.0, range=(-180.0, 180.0, 1.0), uid=[0], - advanced=True, ), desc.FloatParam( name='offsetLatitude', @@ -73,7 +72,6 @@ class PanoramaEstimation(desc.CommandLineNode): value=0.0, range=(-90.0, 90.0, 1.0), uid=[0], - advanced=True, ), desc.ChoiceParam( name='rotationAveraging', From 64b1b7dab8fa5fbf0f430668df2515e3462f906f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 31 Jan 2019 18:49:22 +0100 Subject: [PATCH 0324/1093] [nodes] Add new node `LightingEstimation` --- meshroom/aliceVision/LightingEstimation.py | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 meshroom/aliceVision/LightingEstimation.py diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py new file mode 100644 index 0000000000..dc5b188fb4 --- /dev/null +++ b/meshroom/aliceVision/LightingEstimation.py @@ -0,0 +1,89 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class LightingEstimation(desc.CommandLineNode): + commandLine = 'aliceVision_utils_lightingEstimation {allParams}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name="depthMapsFilterFolder", + label='Filtered Depth Maps Folder', + description='Input filtered depth maps folder', + value='', + uid=[0], + ), + desc.File( + name='imagesFolder', + label='Images Folder', + description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='lightingEstimationMode', + label='Lighting Estimation Mode', + description='Lighting Estimation Mode.', + value='global', + values=['global', 'per_image'], + exclusive=True, + uid=[0], + advanced=True, + ), + desc.ChoiceParam( + name='lightingColor', + label='Lighting Color Mode', + description='Lighting Color Mode.', + value='RGB', + values=['RGB', 'Luminance'], + exclusive=True, + uid=[0], + advanced=True, + ), + desc.ChoiceParam( + name='albedoEstimationName', + label='Albedo Estimation Name', + description='Albedo estimation method used for light estimation.', + value='constant', + values=['constant', 'picture', 'median_filter', 'blur_filter'], + exclusive=True, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='albedoEstimationFilterSize', + label='Albedo Estimation Filter Size', + description='Albedo filter size for estimation method using filter.', + value=3, + range=(0, 100, 1), + uid=[0], + advanced=True, + ), + 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 Folder', + description='Folder for output lighting vector files.', + value=desc.Node.internalFolder, + uid=[], + ), + ] From eecd3970fe695b692f23d737e3000d6134f58971 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Wed, 17 Jun 2020 11:26:28 +0200 Subject: [PATCH 0325/1093] [nodes] Meshing: use only one depth map folder --- meshroom/aliceVision/Meshing.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 449ef008aa..1e9f7577f7 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -20,14 +20,7 @@ class Meshing(desc.CommandLineNode): desc.File( name="depthMapsFolder", label='Depth Maps Folder', - description='Input depth maps folder', - value='', - uid=[0], - ), - desc.File( - name="depthMapsFilterFolder", - label='Filtered Depth Maps Folder', - description='Input filtered depth maps folder', + description='Input depth maps folder.', value='', uid=[0], ), From efa5fa1a98166fc59c014952f8020ba157c55dc9 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Thu, 18 Jun 2020 16:38:45 +0200 Subject: [PATCH 0326/1093] [nodes] Meshing: update binary version --- meshroom/aliceVision/Meshing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 1e9f7577f7..3b6c478fff 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" from meshroom.core import desc From 552d8e9377306dc6ed31b50273e1c7d878c41d26 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Thu, 11 Jun 2020 14:20:16 +0200 Subject: [PATCH 0327/1093] imageProcessing] fillHoles option Added the fillHoles option --- meshroom/aliceVision/ImageProcessing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 4f917b2e09..0979e11dd8 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -64,6 +64,13 @@ class ImageProcessing(desc.CommandLineNode): range=(0, 10, 1), uid=[0], ), + desc.BoolParam( + name='fillHoles', + label='Fill holes', + description='Fill holes.', + value=False, + uid=[0], + ), desc.IntParam( name='sharpenWidth', label='Sharpen Width', From 14ae57010701f132cda4f50d2e0ba85d3e760f28 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Fri, 12 Jun 2020 17:21:37 +0200 Subject: [PATCH 0328/1093] imageProcessing] bilateral filter option Add the bilateral filter option --- meshroom/aliceVision/ImageProcessing.py | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 0979e11dd8..93b67dd6ed 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -95,6 +95,37 @@ class ImageProcessing(desc.CommandLineNode): range=(0.0, 1.0, 0.01), uid=[0], ), + desc.BoolParam( + name='bilateralFilter', + label='Bilateral Filter', + description='Bilateral Filter.', + value=False, + uid=[0], + ), + desc.IntParam( + name='BilateralFilterDistance', + label='Bilateral Filter Distance', + description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', + value=0, + range=(0, 9, 1), + uid=[0], + ), + desc.FloatParam( + name='BilateralFilterSigmaSpace', + label='Bilateral Filter Sigma Space', + description='Bilateral Filter sigma in the coordinate space.', + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='BilateralFilterSigmaColor', + label='Bilateral Filter Sigma Color Space', + description='Bilateral Filter sigma in the color space.', + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 4cadc62ed89b5e526ad7cca6c4f9bde327692ed4 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Mon, 22 Jun 2020 17:48:04 +0200 Subject: [PATCH 0329/1093] [imageProcessing] more precise descriptions and names --- meshroom/aliceVision/ImageProcessing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 93b67dd6ed..5978a4d134 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -13,14 +13,14 @@ class ImageProcessing(desc.CommandLineNode): desc.File( name='input', label='Input', - description='SfMData file.', + description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', value='', uid=[0], ), desc.ChoiceParam( name='extension', - label='File Extension', - description='File Extension.', + label='Output File Extension', + description='Output Image File Extension.', value='', values=['', 'exr', 'jpg', 'tiff', 'png'], exclusive=True, From 7577bc2783a5e0566482e61157c4eb7ee341cf2f Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Tue, 23 Jun 2020 11:37:48 +0200 Subject: [PATCH 0330/1093] [imageProcessing] add CLAHE filtering option --- meshroom/aliceVision/ImageProcessing.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 5978a4d134..ed952549df 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -126,6 +126,29 @@ class ImageProcessing(desc.CommandLineNode): range=(0.0, 150.0, 0.01), uid=[0], ), + desc.BoolParam( + name='ClaheFilter', + label='Clahe Filter', + description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', + value=False, + uid=[0], + ), + desc.FloatParam( + name='ClaheClipLimit', + label='Clahe Clip Limit.', + description='Sets Threshold For Contrast Limiting.', + value=40.0, + range=(0.0, 80.0, 1.0), + uid=[0], + ), + desc.IntParam( + name='ClaheTileGridSize', + label='Clahe Tile Grid Size.', + description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', + value=8, + range=(4, 64, 4), + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 72024ea14c0b617f1375226ad5e8161427d77e6a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 25 Jun 2020 01:05:09 +0200 Subject: [PATCH 0331/1093] [nodes] PanoramaEstimation: Update output params --- meshroom/aliceVision/PanoramaEstimation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index a26e6244cb..bab96d890e 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -128,16 +128,16 @@ class PanoramaEstimation(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', - description='', - value=desc.Node.internalFolder, + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'panorama.abc', uid=[], ), desc.File( - name='outSfMDataFilename', + name='outputViewsAndPoses', label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.abc', + description='''Path to the output sfmdata file with cameras (views and poses).''', + value=desc.Node.internalFolder + 'cameras.sfm', uid=[], ), ] From 212ed19faa8a6635787bbb77cda695bc58799fbe Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 25 Jun 2020 01:10:25 +0200 Subject: [PATCH 0332/1093] [ui] Reconstruction: the active sfm node can be a StructureFromMotion or a PanoramaEstimation node --- meshroom/aliceVision/StructureFromMotion.py | 27 --------------------- 1 file changed, 27 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 22bcc86333..a3724d6921 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -347,30 +347,3 @@ class StructureFromMotion(desc.CommandLineNode): uid=[], ), ] - - @staticmethod - def getResults(node): - """ - Parse SfM result and return views, poses and intrinsics as three dicts with viewId, poseId and intrinsicId as keys. - """ - reportFile = node.outputViewsAndPoses.value - if not os.path.exists(reportFile): - return {}, {}, {} - - with open(reportFile) as jsonFile: - report = json.load(jsonFile) - - views = dict() - poses = dict() - intrinsics = dict() - - for view in report['views']: - views[view['viewId']] = view - - for pose in report['poses']: - poses[pose['poseId']] = pose['pose'] - - for intrinsic in report['intrinsics']: - intrinsics[intrinsic['intrinsicId']] = intrinsic - - return views, poses, intrinsics From dfdb9eee4b8edd0df475e341dc3e03419c261b16 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Thu, 25 Jun 2020 17:59:17 +0200 Subject: [PATCH 0333/1093] [imageProcessing] add inputFolders and exposes outputFolder - add inputFolders option for batch fitering - exposes the output folder --- meshroom/aliceVision/ImageProcessing.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index ed952549df..a5cad67e22 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -17,6 +17,18 @@ class ImageProcessing(desc.CommandLineNode): value='', uid=[0], ), + desc.ListAttribute( + elementDesc=desc.File( + name="imagesFolder", + label="Images Folder", + description="", + value="", + uid=[0], + ), + name="inputFolders", + label="Images input Folders", + description='Use images from specific folder(s).', + ), desc.ChoiceParam( name='extension', label='Output File Extension', @@ -168,4 +180,12 @@ class ImageProcessing(desc.CommandLineNode): value=desc.Node.internalFolder + 'sfmData.abc', uid=[], ), + desc.File( + name='outputFolder', + label='Output Images Folder', + description='Output Images Folder.', + value=desc.Node.internalFolder, + group='', # do not export on the command line + uid=[], + ), ] From 690b709d3b76c7f10e94cdf5a6b6d478e7317302 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Fri, 26 Jun 2020 16:57:46 +0200 Subject: [PATCH 0334/1093] [imageProcessing] fix scaleFactor name --- meshroom/aliceVision/ImageProcessing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index a5cad67e22..e8048ce8a4 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -53,9 +53,9 @@ class ImageProcessing(desc.CommandLineNode): uid=[0], ), desc.FloatParam( - name='downscale', - label='Downscale', - description='Downscale.', + name='scaleFactor', + label='ScaleFactor', + description='Scale Factor.', value=1.0, range=(0.0, 1.0, 0.01), uid=[0], From 515e2d740ff7478563eaf67bb3e8b628ef11207b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 27 Jun 2020 15:53:58 +0200 Subject: [PATCH 0335/1093] [nodes] ImageProcessing: lower camel case for parameters --- meshroom/aliceVision/ImageProcessing.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index e8048ce8a4..29da9a0e00 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -115,7 +115,7 @@ class ImageProcessing(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name='BilateralFilterDistance', + name='bilateralFilterDistance', label='Bilateral Filter Distance', description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', value=0, @@ -123,7 +123,7 @@ class ImageProcessing(desc.CommandLineNode): uid=[0], ), desc.FloatParam( - name='BilateralFilterSigmaSpace', + name='bilateralFilterSigmaSpace', label='Bilateral Filter Sigma Space', description='Bilateral Filter sigma in the coordinate space.', value=0.0, @@ -131,7 +131,7 @@ class ImageProcessing(desc.CommandLineNode): uid=[0], ), desc.FloatParam( - name='BilateralFilterSigmaColor', + name='bilateralFilterSigmaColor', label='Bilateral Filter Sigma Color Space', description='Bilateral Filter sigma in the color space.', value=0.0, @@ -139,14 +139,14 @@ class ImageProcessing(desc.CommandLineNode): uid=[0], ), desc.BoolParam( - name='ClaheFilter', + name='claheFilter', label='Clahe Filter', description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', value=False, uid=[0], ), desc.FloatParam( - name='ClaheClipLimit', + name='claheClipLimit', label='Clahe Clip Limit.', description='Sets Threshold For Contrast Limiting.', value=40.0, @@ -154,7 +154,7 @@ class ImageProcessing(desc.CommandLineNode): uid=[0], ), desc.IntParam( - name='ClaheTileGridSize', + name='claheTileGridSize', label='Clahe Tile Grid Size.', description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', value=8, From 3eb9c334776fbfcd75af5db8a6f7a33104aa5f95 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 27 Jun 2020 18:06:15 +0200 Subject: [PATCH 0336/1093] [software] ImageProcessing: change default value for claheClipLimit --- meshroom/aliceVision/ImageProcessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 29da9a0e00..f964c9f085 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -149,8 +149,8 @@ class ImageProcessing(desc.CommandLineNode): name='claheClipLimit', label='Clahe Clip Limit.', description='Sets Threshold For Contrast Limiting.', - value=40.0, - range=(0.0, 80.0, 1.0), + value=4.0, + range=(0.0, 8.0, 1.0), uid=[0], ), desc.IntParam( From 6e7b0bfe93e1849473cd51d389f0443c20fb9c32 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 28 Jun 2020 17:39:09 +0200 Subject: [PATCH 0337/1093] [nodes] PanoramaEstimation: expose more advanced params --- meshroom/aliceVision/PanoramaEstimation.py | 36 +++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index bab96d890e..809219ecbe 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -107,13 +107,47 @@ class PanoramaEstimation(desc.CommandLineNode): ), desc.BoolParam( name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters.', + label='Force Lock of All Intrinsics', description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' 'principal point, distortion if any) during the reconstruction.\n' 'This may be helpful if the input cameras are already fully calibrated.', value=False, uid=[0], ), + desc.FloatParam( + name='maxAngleToPrior', + label='Max Angle To Priors (deg.)', + description='''Maximal angle allowed regarding the input prior (in degrees).''', + value=5.0, + range=(0.0, 360.0, 1.0), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='maxAngularError', + label='Max Angular Error (deg.)', + description='''Maximal angular error in global rotation averging (in degrees).''', + value=100.0, + range=(0.0, 360.0, 1.0), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='intermediateRefineWithFocal', + label='Intermediate Refine: Focal', + description='Intermediate refine with rotation and focal length only.', + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='intermediateRefineWithFocalDist', + label='Intermediate Refine: Focal And Distortion', + description='Intermediate refine with rotation, focal length and distortion.', + value=False, + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 582f7b37554fe61a964e117a2e527caa73395191 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 28 Jun 2020 15:56:03 +0200 Subject: [PATCH 0338/1093] [nodes] LDRToHDR: fix the detection of the number of brackets - Detects correctly if there is only bracket (nothing to do) - Only nbBrackets invalidates the UID --- meshroom/aliceVision/LDRToHDR.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 5ebd24c7c5..7df19ae121 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -51,10 +51,10 @@ class LDRToHDR(desc.CommandLineNode): desc.IntParam( name='userNbBrackets', label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', + description='Manually set the number of exposure brackets per HDR image. Set 0 for automatic detection.', value=0, range=(0, 15, 1), - uid=[0], + uid=[], group='user', # not used directly on the command line ), desc.IntParam( @@ -63,7 +63,7 @@ class LDRToHDR(desc.CommandLineNode): description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', value=0, range=(0, 10, 1), - uid=[], + uid=[0], ), desc.FloatParam( name='highlightCorrectionFactor', @@ -258,13 +258,16 @@ def update(cls, node): exposureGroups.append(exposures) exposures = None bracketSizes = set() - for expGroup in exposureGroups: - bracketSizes.add(len(expGroup)) - if len(bracketSizes) == 1: - node.nbBrackets.value = bracketSizes.pop() - # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) + if len(exposureGroups) == 1: + node.nbBrackets.value = 1 else: - node.nbBrackets.value = 0 + for expGroup in exposureGroups: + bracketSizes.add(len(expGroup)) + if len(bracketSizes) == 1: + node.nbBrackets.value = bracketSizes.pop() + # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) + else: + node.nbBrackets.value = 0 # logging.info("[LDRToHDR] Update end") From d15dd698c5ca28c3ecb84137899fd1ffb68a7d4b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 28 Jun 2020 15:56:53 +0200 Subject: [PATCH 0339/1093] [nodes] ImageProcessing: remove old param keepImageFilename --- meshroom/aliceVision/ImageProcessing.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index f167ffcfd1..b7352d0250 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -49,13 +49,6 @@ class ImageProcessing(desc.CommandLineNode): value=False, uid=[0], ), - desc.BoolParam( - name='keepImageFilename', - label='Keep Image Filename', - description='Keep Image Filename instead of using View UID.', - value=False, - uid=[0], - ), desc.BoolParam( name='exposureCompensation', label='Exposure Compensation', From 0d12d7ab6e9e8b4308c2bba5859dc7a78f0c6900 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 28 Jun 2020 16:03:00 +0200 Subject: [PATCH 0340/1093] [nodes] ImageProcessing: define output values using lambda --- meshroom/aliceVision/ImageProcessing.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index b7352d0250..2d78fe3308 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -2,6 +2,8 @@ from meshroom.core import desc +import os.path + class ImageProcessing(desc.CommandLineNode): commandLine = 'aliceVision_utils_imageProcessing {allParams}' @@ -181,7 +183,7 @@ class ImageProcessing(desc.CommandLineNode): name='outSfMData', label='Output sfmData', description='Output sfmData.', - value=desc.Node.internalFolder + 'sfmData.abc', + value=lambda attr: (desc.Node.internalFolder + 'sfmData' + os.path.splitext(attr.node.input.value)[1]) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', uid=[], ), desc.File( @@ -192,4 +194,12 @@ class ImageProcessing(desc.CommandLineNode): group='', # do not export on the command line uid=[], ), + desc.File( + name='outputImages', + label='Output Images', + description='Output Image Files.', + value=lambda attr: desc.Node.internalFolder + '*.' + (attr.node.extension.value or '*'), + group='', # do not export on the command line + uid=[], + ), ] From bcfbeeb9f005aa204fc64a1202f441c48ec36f1b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 29 Jun 2020 13:59:53 +0200 Subject: [PATCH 0341/1093] [nodes] SfMTransform, SfMTransfer, SfMAlignment expose the same output params than the StructureFromMotion node --- meshroom/aliceVision/PanoramaEstimation.py | 2 +- meshroom/aliceVision/SfMAlignment.py | 17 +++++++++++++---- meshroom/aliceVision/SfMTransfer.py | 15 ++++++++++++--- meshroom/aliceVision/SfMTransform.py | 15 ++++++++++++--- meshroom/aliceVision/StructureFromMotion.py | 2 +- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 809219ecbe..d3f37ca565 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -169,7 +169,7 @@ class PanoramaEstimation(desc.CommandLineNode): ), desc.File( name='outputViewsAndPoses', - label='Output SfMData File', + label='Output Poses', description='''Path to the output sfmdata file with cameras (views and poses).''', value=desc.Node.internalFolder + 'cameras.sfm', uid=[], diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 3e277bffa9..0b21005175 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -1,7 +1,9 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc +import os.path + class SfMAlignment(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmAlignment {allParams}' @@ -107,9 +109,16 @@ class SfMAlignment(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', - description='''Aligned SfMData file .''', - value=desc.Node.internalFolder + 'alignedSfM.abc', + label='Output SfMData File', + description='SfMData file.', + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + uid=[], + ), + desc.File( + name='outputViewsAndPoses', + label='Output Poses', + description='''Path to the output sfmdata file with cameras (views and poses).''', + value=desc.Node.internalFolder + 'cameras.sfm', uid=[], ), ] diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 9be8772b7b..3a112d52d6 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -1,7 +1,9 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc +import os.path + class SfMTransfer(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransfer {allParams}' @@ -90,9 +92,16 @@ class SfMTransfer(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', + label='Output SfMData File', description='SfMData file.', - value=desc.Node.internalFolder + 'sfmData.abc', + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + uid=[], + ), + desc.File( + name='outputViewsAndPoses', + label='Output Poses', + description='''Path to the output sfmdata file with cameras (views and poses).''', + value=desc.Node.internalFolder + 'cameras.sfm', uid=[], ), ] diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index e65bb56f6c..f0b1c61f54 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -1,7 +1,9 @@ -__version__ = "1.1" +__version__ = "2.0" from meshroom.core import desc +import os.path + class SfMTransform(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransform {allParams}' @@ -116,9 +118,16 @@ class SfMTransform(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', + label='Output SfMData File', description='''Aligned SfMData file .''', - value=desc.Node.internalFolder + 'transformedSfM.abc', + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + uid=[], + ), + desc.File( + name='outputViewsAndPoses', + label='Output Poses', + description='''Path to the output sfmdata file with cameras (views and poses).''', + value=desc.Node.internalFolder + 'cameras.sfm', uid=[], ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index a3724d6921..9d7c3147e5 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -334,7 +334,7 @@ class StructureFromMotion(desc.CommandLineNode): ), desc.File( name='outputViewsAndPoses', - label='Output SfMData File', + label='Output Poses', description='''Path to the output sfmdata file with cameras (views and poses).''', value=desc.Node.internalFolder + 'cameras.sfm', uid=[], From 8e22026de431957fd587768b95beaaac83e26e4d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 29 Jun 2020 14:00:38 +0200 Subject: [PATCH 0342/1093] [nodes] ImageProcessing: update output parameter changes --- meshroom/aliceVision/ImageProcessing.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 2d78fe3308..28c706b9fd 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -1,4 +1,4 @@ -__version__ = "1.1" +__version__ = "2.0" from meshroom.core import desc @@ -183,22 +183,22 @@ class ImageProcessing(desc.CommandLineNode): name='outSfMData', label='Output sfmData', description='Output sfmData.', - value=lambda attr: (desc.Node.internalFolder + 'sfmData' + os.path.splitext(attr.node.input.value)[1]) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', uid=[], + group='', # do not export on the command line ), desc.File( - name='outputFolder', - label='Output Images Folder', + name='output', + label='Output Folder', description='Output Images Folder.', value=desc.Node.internalFolder, - group='', # do not export on the command line uid=[], ), desc.File( name='outputImages', label='Output Images', description='Output Image Files.', - value=lambda attr: desc.Node.internalFolder + '*.' + (attr.node.extension.value or '*'), + value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value) if (os.path.splitext(attr.node.input.value)[1] not in ['', '.abc', '.sfm']) else (desc.Node.internalFolder + '*.' + (attr.node.extension.value or '*')), group='', # do not export on the command line uid=[], ), From e29faa15af170d5243f2c75d5e89651465d23e46 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Tue, 30 Jun 2020 17:41:16 +0200 Subject: [PATCH 0343/1093] [nodes] cameraInit: allowed intrinsics option --- meshroom/aliceVision/CameraInit.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index eff321e12a..71df627867 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -139,6 +139,17 @@ class CameraInit(desc.CommandLineNode): uid=[0], advanced=True ), + desc.ChoiceParam( + name='allowedCameraModels', + label='Allowed Camera Models', + description='the Camera Models that can be attributed.', + value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1'], + values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1'], + exclusive=False, + uid=[0], + joinChar=',', + advanced= True + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From d79976b1e173402b82f40c6e4fa3d92b5f98ae00 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Tue, 30 Jun 2020 20:41:13 +0200 Subject: [PATCH 0344/1093] [nodes] camerainit: viewId from filename --- meshroom/aliceVision/CameraInit.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 71df627867..b1b62c39c8 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -150,6 +150,29 @@ class CameraInit(desc.CommandLineNode): joinChar=',', advanced= True ), + desc.ChoiceParam( + name='viewIdMethod', + label='ViewId Method', + description="Allows to choose the way the viewID is generated:\n" + " * metadata : Generate viewId from image metadata.\n" + " * filename : Generate viewId from file names using regex.", + value='metadata', + values=['metadata', 'filename'], + exclusive=True, + uid=[0], + advanced= True + ), + desc.StringParam( + name='viewIdRegex', + label='ViewId Regex', + description='Regex used to catch number used as viewId in filename.' + 'You should capture specific parts of the filename with parenthesis to define matching elements. (only number will works)\n' + 'Some examples of patterns:\n' + ' - Match the longest number at the end of filename (default value): ".*?(\d+)"\n' + ' - Match the first number found in filename : "(\d+).*"\n', + value='.*?(\d+)', + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 94ff417782a8943416539e1147e1104a959c6483 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 30 Jun 2020 22:54:56 +0200 Subject: [PATCH 0345/1093] [nodes] CameraInit: view regex is an advanced param --- meshroom/aliceVision/CameraInit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index b1b62c39c8..876bc850cc 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -137,7 +137,7 @@ class CameraInit(desc.CommandLineNode): value='folder', exclusive=True, uid=[0], - advanced=True + advanced=True, ), desc.ChoiceParam( name='allowedCameraModels', @@ -148,7 +148,7 @@ class CameraInit(desc.CommandLineNode): exclusive=False, uid=[0], joinChar=',', - advanced= True + advanced=True, ), desc.ChoiceParam( name='viewIdMethod', @@ -160,7 +160,7 @@ class CameraInit(desc.CommandLineNode): values=['metadata', 'filename'], exclusive=True, uid=[0], - advanced= True + advanced=True, ), desc.StringParam( name='viewIdRegex', @@ -172,6 +172,7 @@ class CameraInit(desc.CommandLineNode): ' - Match the first number found in filename : "(\d+).*"\n', value='.*?(\d+)', uid=[0], + advanced=True, ), desc.ChoiceParam( name='verboseLevel', From b9c089e625e74214ec2234097294a6f66f191866 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 2 Jul 2020 11:28:19 +0200 Subject: [PATCH 0346/1093] [nodes] ldrToHdr: improve metadata search --- meshroom/aliceVision/LDRToHDR.py | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 7df19ae121..1743af2007 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -5,6 +5,23 @@ from meshroom.core import desc +def findMetadata(d, keys, defaultValue): + v = None + for key in keys: + v = d.get(key, None) + k = key.lower() + if v != None: + return v + for dk, dv in d: + dkm = dk.lower().replace(" ", "") + if dkm == key.lower(): + return dv + dkm = dkm.split(":")[-1] + dkm = dkm.split("/")[-1] + if dkm == k: + return dv + return defaultValue + class DividedInputNodeSize(desc.DynamicNodeSize): """ @@ -237,12 +254,13 @@ def update(cls, node): node.nbBrackets.value = 0 return d = json.loads(jsonMetadata) - fnumber = d.get("FNumber", d.get("Exif:ApertureValue", "")) - shutterSpeed = d.get("Exif:ShutterSpeedValue", "") # also "ExposureTime"? - iso = d.get("Exif:ISOSpeedRatings", "") + fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") + shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") + iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") if not fnumber and not shutterSpeed: - # if one image without shutter or fnumber, we cannot found the number of brackets - node.nbBrackets.value = 0 + # If one image without shutter or fnumber, we cannot found the number of brackets. + # We assume that there is no multi-bracketing, so nothing to do. + node.nbBrackets.value = 1 return inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) inputs.sort() From 46ca2f285735d091e78e34c0d8009e8c5a9ceeed Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 2 Jul 2020 11:29:20 +0200 Subject: [PATCH 0347/1093] [nodes] CameraInit: add some debug log --- meshroom/aliceVision/CameraInit.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index e461f8623a..4f2ee49616 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -5,6 +5,7 @@ import psutil import shutil import tempfile +import logging from meshroom.core import desc @@ -257,7 +258,7 @@ def buildIntrinsics(self, node, additionalViews=()): os.makedirs(os.path.join(tmpCache, node.internalFolder)) self.createViewpointsFile(node, additionalViews) cmd = self.buildCommandLine(node.chunks[0]) - # logging.debug(' - commandLine:', cmd) + logging.debug(' - commandLine:', cmd) proc = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) stdout, stderr = proc.communicate() # proc.wait() @@ -270,10 +271,13 @@ def buildIntrinsics(self, node, additionalViews=()): cameraInitSfM = node.output.value return readSfMData(cameraInitSfM) - except Exception: + except Exception as e: + logging.debug("[CameraInit] Error while building intrinsics: {}".format(str(e))) raise finally: - shutil.rmtree(tmpCache) + if os.path.exists(tmpCache): + logging.debug("[CameraInit] Remove temp files in: {}".format(tmpCache)) + shutil.rmtree(tmpCache) def createViewpointsFile(self, node, additionalViews=()): node.viewpointsFile = "" From 9a3f02b68a14ffb0261889b476882a4ce9d7247d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 2 Jul 2020 11:56:30 +0200 Subject: [PATCH 0348/1093] [nodes] ldrToHdr: fix for python-2 compatibility --- meshroom/aliceVision/LDRToHDR.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py index 1743af2007..ec083e63ba 100644 --- a/meshroom/aliceVision/LDRToHDR.py +++ b/meshroom/aliceVision/LDRToHDR.py @@ -12,7 +12,7 @@ def findMetadata(d, keys, defaultValue): k = key.lower() if v != None: return v - for dk, dv in d: + for dk, dv in d.iteritems(): dkm = dk.lower().replace(" ", "") if dkm == key.lower(): return dv From acf2415149f0c8b5a2890013a4e2ab1dc43a0876 Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@interdigital.com> Date: Fri, 26 Jun 2020 14:50:45 +0200 Subject: [PATCH 0349/1093] [nodes] Update hdr pipeline with sampling, calibration and merge --- meshroom/aliceVision/LdrToHdrCalibration.py | 77 +++++++++++++++++++++ meshroom/aliceVision/LdrToHdrMerge.py | 62 +++++++++++++++++ meshroom/aliceVision/LdrToHdrSampling.py | 77 +++++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 meshroom/aliceVision/LdrToHdrCalibration.py create mode 100644 meshroom/aliceVision/LdrToHdrMerge.py create mode 100644 meshroom/aliceVision/LdrToHdrSampling.py diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py new file mode 100644 index 0000000000..e44e0010e6 --- /dev/null +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -0,0 +1,77 @@ +__version__ = "2.0" + +from meshroom.core import desc + + +class LdrToHdrCalibration(desc.CommandLineNode): + commandLine = 'aliceVision_LdrToHdrCalibration {allParams}' + size = desc.DynamicNodeSize('input') + #parallelization = desc.Parallelization(blockSize=40) + #commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + documentation = ''' + Calibrate LDR to HDR response curve from samples +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name='samples', + label='Samples folder', + description='Samples folder', + value=desc.Node.internalFolder, + uid=[0], + ), + desc.ChoiceParam( + name='calibrationMethod', + label='Calibration Method', + description="Method used for camera calibration \n" + " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" + " * Debevec: This is the standard method for HDR calibration. \n" + " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" + " * Laguerre: Simple but robust method estimating the minimal number of parameters. \n" + " * Robertson: First method for HDR calibration in the literature. \n", + values=['linear', 'debevec', 'grossberg', 'laguerre'], + value='debevec', + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='calibrationWeight', + label='Calibration Weight', + description="Weight function used to calibrate camera response \n" + " * default (automatically selected according to the calibrationMethod) \n" + " * gaussian \n" + " * triangle \n" + " * plateau", + value='default', + values=['default', 'gaussian', 'triangle', 'plateau'], + exclusive=True, + 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='response', + label='Output response File', + description='Path to the output response file', + value=desc.Node.internalFolder + 'response.csv', + uid=[], + ) + ] \ No newline at end of file diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py new file mode 100644 index 0000000000..ece1329919 --- /dev/null +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -0,0 +1,62 @@ +__version__ = "2.0" + +from meshroom.core import desc + + +class LdrToHdrMerge(desc.CommandLineNode): + commandLine = 'aliceVision_LdrToHdrMerge {allParams}' + size = desc.DynamicNodeSize('input') + #parallelization = desc.Parallelization(blockSize=40) + #commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + documentation = ''' + Calibrate LDR to HDR response curve from samples +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name='response', + label='Response file', + description='Response file', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='fusionWeight', + label='Fusion Weight', + description="Weight function used to fuse all LDR images together:\n" + " * gaussian \n" + " * triangle \n" + " * plateau", + value='gaussian', + values=['gaussian', 'triangle', 'plateau'], + exclusive=True, + 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='outSfMDataFilename', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfmData.sfm', + uid=[], + ) + ] \ No newline at end of file diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py new file mode 100644 index 0000000000..4547a9d13a --- /dev/null +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -0,0 +1,77 @@ +__version__ = "2.0" + +from meshroom.core import desc + + +class LdrToHdrSampling(desc.CommandLineNode): + commandLine = 'aliceVision_LdrToHdrSampling {allParams}' + size = desc.DynamicNodeSize('input') + #parallelization = desc.Parallelization(blockSize=40) + #commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + documentation = ''' + Sample pixels from Low range images for HDR creation +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file.', + value='', + uid=[0], + ), + desc.IntParam( + name='userNbBrackets', + label='Number of Brackets', + description='Number of exposure brackets per HDR image (0 for automatic detection).', + value=0, + range=(0, 15, 1), + uid=[0], + group='user', # not used directly on the command line + ), + desc.IntParam( + name='nbBrackets', + label='Automatic Nb Brackets', + description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + value=0, + range=(0, 10, 1), + uid=[], + ), + desc.BoolParam( + name='byPass', + label='bypass convert', + description="Bypass HDR creation and use the medium bracket as the source for the next steps", + value=False, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='channelQuantizationPower', + label='Channel Quantization Power', + description='Quantization level like 8 bits or 10 bits.', + value=10, + range=(8, 14, 1), + uid=[0], + advanced=True, + ), + 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 Folder', + description='Output path for the samples.', + value=desc.Node.internalFolder, + uid=[], + ), + ] \ No newline at end of file From 39481cff072cdabddbbc3b06197caf34324d8a3f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 27 Jun 2020 22:25:59 +0200 Subject: [PATCH 0350/1093] [nodes] Add new PanoramaPrepareImages to fix images orientation --- meshroom/aliceVision/PanoramaPrepareImages.py | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meshroom/aliceVision/PanoramaPrepareImages.py diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py new file mode 100644 index 0000000000..e418feb923 --- /dev/null +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -0,0 +1,43 @@ +__version__ = "1.1" + +from meshroom.core import desc + + +class PanoramaPrepareImages(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaPrepareImages {allParams}' + size = desc.DynamicNodeSize('input') + # parallelization = desc.Parallelization(blockSize=40) + # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + documentation = ''' +Prepare images for panorama Estimation +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData 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='outSfMData', + label='Output sfmData', + description='Output sfmData.', + value=desc.Node.internalFolder + 'sfmData.abc', + uid=[], + ), + ] From dc01c7db823c97c950ffc7416ed91c255adfd5c5 Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@interdigital.com> Date: Mon, 29 Jun 2020 19:49:26 +0200 Subject: [PATCH 0351/1093] [nodes] ldrToHdr: expose more parameters --- meshroom/aliceVision/LdrToHdrCalibration.py | 34 +++++++++++++++++++++ meshroom/aliceVision/LdrToHdrMerge.py | 34 +++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index e44e0010e6..33503f723e 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -55,6 +55,40 @@ class LdrToHdrCalibration(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.IntParam( + name='userNbBrackets', + label='Number of Brackets', + description='Number of exposure brackets per HDR image (0 for automatic detection).', + value=0, + range=(0, 15, 1), + uid=[0], + group='user', # not used directly on the command line + ), + desc.IntParam( + name='nbBrackets', + label='Automatic Nb Brackets', + description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + value=0, + range=(0, 10, 1), + uid=[], + ), + desc.BoolParam( + name='byPass', + label='bypass convert', + description="Bypass HDR creation and use the medium bracket as the source for the next steps", + value=False, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='channelQuantizationPower', + label='Channel Quantization Power', + description='Quantization level like 8 bits or 10 bits.', + value=10, + range=(8, 14, 1), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index ece1329919..ba099b8f8f 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -40,6 +40,40 @@ class LdrToHdrMerge(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.IntParam( + name='userNbBrackets', + label='Number of Brackets', + description='Number of exposure brackets per HDR image (0 for automatic detection).', + value=0, + range=(0, 15, 1), + uid=[0], + group='user', # not used directly on the command line + ), + desc.IntParam( + name='nbBrackets', + label='Automatic Nb Brackets', + description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + value=0, + range=(0, 10, 1), + uid=[], + ), + desc.BoolParam( + name='byPass', + label='bypass convert', + description="Bypass HDR creation and use the medium bracket as the source for the next steps", + value=False, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='channelQuantizationPower', + label='Channel Quantization Power', + description='Quantization level like 8 bits or 10 bits.', + value=10, + range=(8, 14, 1), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From f1d945a0680159aeb7591ad4d8b2b227f80fba91 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 2 Jul 2020 18:16:09 +0200 Subject: [PATCH 0352/1093] [nodes] ldrToHdr: automatic brackets estimation (temporary solution) --- meshroom/aliceVision/LdrToHdrCalibration.py | 89 ++++++++++++++++- meshroom/aliceVision/LdrToHdrMerge.py | 103 +++++++++++++++++++- meshroom/aliceVision/LdrToHdrSampling.py | 84 +++++++++++++++- 3 files changed, 270 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 33503f723e..feaa31f204 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,13 +1,32 @@ __version__ = "2.0" +import json +import os + from meshroom.core import desc +def findMetadata(d, keys, defaultValue): + v = None + for key in keys: + v = d.get(key, None) + k = key.lower() + if v != None: + return v + for dk, dv in d.iteritems(): + dkm = dk.lower().replace(" ", "") + if dkm == key.lower(): + return dv + dkm = dkm.split(":")[-1] + dkm = dkm.split("/")[-1] + if dkm == k: + return dv + return defaultValue + + class LdrToHdrCalibration(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrCalibration {allParams}' size = desc.DynamicNodeSize('input') - #parallelization = desc.Parallelization(blockSize=40) - #commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' Calibrate LDR to HDR response curve from samples @@ -108,4 +127,68 @@ class LdrToHdrCalibration(desc.CommandLineNode): value=desc.Node.internalFolder + 'response.csv', uid=[], ) - ] \ No newline at end of file + ] + + @classmethod + def update(cls, node): + if not isinstance(node.nodeDesc, cls): + raise ValueError("Node {} is not an instance of type {}".format(node, cls)) + # TODO: use Node version for this test + if 'userNbBrackets' not in node.getAttributes().keys(): + # Old version of the node + return + if node.userNbBrackets.value != 0: + node.nbBrackets.value = node.userNbBrackets.value + return + # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) + cameraInitOutput = node.input.getLinkParam(recursive=True) + if not cameraInitOutput: + node.nbBrackets.value = 0 + return + print("LdrToHdrCalib cameraInitOutput: " + str(cameraInitOutput)) + viewpoints = cameraInitOutput.node.viewpoints.value + print("LdrToHdrCalib viewpoints: " + str(viewpoints)) + + # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) + inputs = [] + for viewpoint in viewpoints: + jsonMetadata = viewpoint.metadata.value + if not jsonMetadata: + # no metadata, we cannot found the number of brackets + node.nbBrackets.value = 0 + return + d = json.loads(jsonMetadata) + fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") + shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") + iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") + if not fnumber and not shutterSpeed: + # If one image without shutter or fnumber, we cannot found the number of brackets. + # We assume that there is no multi-bracketing, so nothing to do. + node.nbBrackets.value = 1 + return + inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) + inputs.sort() + + exposureGroups = [] + exposures = [] + for path, exp in inputs: + if exposures and exp != exposures[-1] and exp == exposures[0]: + exposureGroups.append(exposures) + exposures = [exp] + else: + exposures.append(exp) + exposureGroups.append(exposures) + exposures = None + bracketSizes = set() + if len(exposureGroups) == 1: + node.nbBrackets.value = 1 + else: + for expGroup in exposureGroups: + bracketSizes.add(len(expGroup)) + if len(bracketSizes) == 1: + node.nbBrackets.value = bracketSizes.pop() + # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) + else: + node.nbBrackets.value = 0 + # logging.info("[LDRToHDR] Update end") + diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index ba099b8f8f..f63606cddc 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,11 +1,48 @@ __version__ = "2.0" +import json +import os + from meshroom.core import desc +def findMetadata(d, keys, defaultValue): + v = None + for key in keys: + v = d.get(key, None) + k = key.lower() + if v != None: + return v + for dk, dv in d.iteritems(): + dkm = dk.lower().replace(" ", "") + if dkm == key.lower(): + return dv + dkm = dkm.split(":")[-1] + dkm = dkm.split("/")[-1] + if dkm == k: + return dv + return defaultValue + + + +class DividedInputNodeSize(desc.DynamicNodeSize): + """ + The LDR2HDR will reduce the amount of views in the SfMData. + This class converts the number of LDR input views into the number of HDR output views. + """ + def __init__(self, param, divParam): + super(DividedInputNodeSize, self).__init__(param) + self._divParam = divParam + def computeSize(self, node): + s = super(DividedInputNodeSize, self).computeSize(node) + divParam = node.attribute(self._divParam) + if divParam.value == 0: + return s + return s / divParam.value + class LdrToHdrMerge(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrMerge {allParams}' - size = desc.DynamicNodeSize('input') + size = DividedInputNodeSize('input', 'nbBrackets') #parallelization = desc.Parallelization(blockSize=40) #commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' @@ -93,4 +130,66 @@ class LdrToHdrMerge(desc.CommandLineNode): value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], ) - ] \ No newline at end of file + ] + + @classmethod + def update(cls, node): + if not isinstance(node.nodeDesc, cls): + raise ValueError("Node {} is not an instance of type {}".format(node, cls)) + # TODO: use Node version for this test + if 'userNbBrackets' not in node.getAttributes().keys(): + # Old version of the node + return + if node.userNbBrackets.value != 0: + node.nbBrackets.value = node.userNbBrackets.value + return + # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) + cameraInitOutput = node.input.getLinkParam(recursive=True) + if not cameraInitOutput: + node.nbBrackets.value = 0 + return + viewpoints = cameraInitOutput.node.viewpoints.value + + # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) + inputs = [] + for viewpoint in viewpoints: + jsonMetadata = viewpoint.metadata.value + if not jsonMetadata: + # no metadata, we cannot found the number of brackets + node.nbBrackets.value = 0 + return + d = json.loads(jsonMetadata) + fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") + shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") + iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") + if not fnumber and not shutterSpeed: + # If one image without shutter or fnumber, we cannot found the number of brackets. + # We assume that there is no multi-bracketing, so nothing to do. + node.nbBrackets.value = 1 + return + inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) + inputs.sort() + + exposureGroups = [] + exposures = [] + for path, exp in inputs: + if exposures and exp != exposures[-1] and exp == exposures[0]: + exposureGroups.append(exposures) + exposures = [exp] + else: + exposures.append(exp) + exposureGroups.append(exposures) + exposures = None + bracketSizes = set() + if len(exposureGroups) == 1: + node.nbBrackets.value = 1 + else: + for expGroup in exposureGroups: + bracketSizes.add(len(expGroup)) + if len(bracketSizes) == 1: + node.nbBrackets.value = bracketSizes.pop() + # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) + else: + node.nbBrackets.value = 0 + # logging.info("[LDRToHDR] Update end") + diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 4547a9d13a..ee481c7930 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,7 +1,27 @@ __version__ = "2.0" +import json +import os + from meshroom.core import desc +def findMetadata(d, keys, defaultValue): + v = None + for key in keys: + v = d.get(key, None) + k = key.lower() + if v != None: + return v + for dk, dv in d.iteritems(): + dkm = dk.lower().replace(" ", "") + if dkm == key.lower(): + return dv + dkm = dkm.split(":")[-1] + dkm = dkm.split("/")[-1] + if dkm == k: + return dv + return defaultValue + class LdrToHdrSampling(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrSampling {allParams}' @@ -74,4 +94,66 @@ class LdrToHdrSampling(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), - ] \ No newline at end of file + ] + + @classmethod + def update(cls, node): + if not isinstance(node.nodeDesc, cls): + raise ValueError("Node {} is not an instance of type {}".format(node, cls)) + # TODO: use Node version for this test + if 'userNbBrackets' not in node.getAttributes().keys(): + # Old version of the node + return + if node.userNbBrackets.value != 0: + node.nbBrackets.value = node.userNbBrackets.value + return + # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) + cameraInitOutput = node.input.getLinkParam() + if not cameraInitOutput: + node.nbBrackets.value = 0 + return + viewpoints = cameraInitOutput.node.viewpoints.value + + # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) + inputs = [] + for viewpoint in viewpoints: + jsonMetadata = viewpoint.metadata.value + if not jsonMetadata: + # no metadata, we cannot found the number of brackets + node.nbBrackets.value = 0 + return + d = json.loads(jsonMetadata) + fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") + shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") + iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") + if not fnumber and not shutterSpeed: + # If one image without shutter or fnumber, we cannot found the number of brackets. + # We assume that there is no multi-bracketing, so nothing to do. + node.nbBrackets.value = 1 + return + inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) + inputs.sort() + + exposureGroups = [] + exposures = [] + for path, exp in inputs: + if exposures and exp != exposures[-1] and exp == exposures[0]: + exposureGroups.append(exposures) + exposures = [exp] + else: + exposures.append(exp) + exposureGroups.append(exposures) + exposures = None + bracketSizes = set() + if len(exposureGroups) == 1: + node.nbBrackets.value = 1 + else: + for expGroup in exposureGroups: + bracketSizes.add(len(expGroup)) + if len(bracketSizes) == 1: + node.nbBrackets.value = bracketSizes.pop() + # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) + else: + node.nbBrackets.value = 0 + # logging.info("[LDRToHDR] Update end") + From 21b009c1f599e7b79733f66378d2db6e73db58a7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 5 Jul 2020 23:08:57 +0200 Subject: [PATCH 0353/1093] Update from LDRToHDR node to LdrToHdrMerge node --- meshroom/aliceVision/LDRToHDR.py | 291 ------------------------------- 1 file changed, 291 deletions(-) delete mode 100644 meshroom/aliceVision/LDRToHDR.py diff --git a/meshroom/aliceVision/LDRToHDR.py b/meshroom/aliceVision/LDRToHDR.py deleted file mode 100644 index ec083e63ba..0000000000 --- a/meshroom/aliceVision/LDRToHDR.py +++ /dev/null @@ -1,291 +0,0 @@ -__version__ = "2.0" - -import json -import os - -from meshroom.core import desc - -def findMetadata(d, keys, defaultValue): - v = None - for key in keys: - v = d.get(key, None) - k = key.lower() - if v != None: - return v - for dk, dv in d.iteritems(): - dkm = dk.lower().replace(" ", "") - if dkm == key.lower(): - return dv - dkm = dkm.split(":")[-1] - dkm = dkm.split("/")[-1] - if dkm == k: - return dv - return defaultValue - - -class DividedInputNodeSize(desc.DynamicNodeSize): - """ - The LDR2HDR will reduce the amount of views in the SfMData. - This class converts the number of LDR input views into the number of HDR output views. - """ - def __init__(self, param, divParam): - super(DividedInputNodeSize, self).__init__(param) - self._divParam = divParam - def computeSize(self, node): - s = super(DividedInputNodeSize, self).computeSize(node) - divParam = node.attribute(self._divParam) - if divParam.value == 0: - return s - return s / divParam.value - - -class LDRToHDR(desc.CommandLineNode): - commandLine = 'aliceVision_convertLDRToHDR {allParams}' - size = DividedInputNodeSize('input', 'nbBrackets') - - cpu = desc.Level.INTENSIVE - ram = desc.Level.NORMAL - - documentation=''' -This node fuse LDR (Low Dynamic Range) images with multi-bracketing into HDR (High Dynamic Range) images. - -It is done in 2 steps: - -1/ Estimation of the Camera Response Function (CRF) - -2/ HDR fusion relying on the CRF - -''' - - inputs = [ - desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', - uid=[0], - ), - desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Manually set the number of exposure brackets per HDR image. Set 0 for automatic detection.', - value=0, - range=(0, 15, 1), - uid=[], - group='user', # not used directly on the command line - ), - desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', - value=0, - range=(0, 10, 1), - uid=[0], - ), - desc.FloatParam( - name='highlightCorrectionFactor', - label='Highlights Correction', - description='Pixels saturated in all input images have a partial information about their real luminance.\n' - 'We only know that the value should be >= to the standard hdr fusion.\n' - 'This parameter allows to perform a post-processing step to put saturated pixels to a constant ' - 'value defined by the `highlightsMaxLuminance` parameter.\n' - 'This parameter is float to enable to weight this correction.', - value=1.0, - range=(0.0, 1.0, 0.01), - uid=[0], - ), - desc.FloatParam( - name='highlightTargetLux', - label='Highlight Target Luminance (Lux)', - description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n' - '\n' - 'Some Outdoor Reference Light Levels:\n' - ' * 120,000 lux : Brightest sunlight\n' - ' * 110,000 lux : Bright sunlight\n' - ' * 20,000 lux : Shade illuminated by entire clear blue sky, midday\n' - ' * 1,000 lux : Typical overcast day, midday\n' - ' * 400 lux : Sunrise or sunset on a clear day\n' - ' * 40 lux : Fully overcast, sunset/sunrise\n' - '\n' - 'Some Indoor Reference Light Levels:\n' - ' * 20000 lux : Max Usually Used Indoor\n' - ' * 750 lux : Supermarkets\n' - ' * 500 lux : Office Work\n' - ' * 150 lux : Home\n', - value=120000.0, - range=(1000.0, 150000.0, 1.0), - uid=[0], - ), - desc.BoolParam( - name='fisheyeLens', - label='Fisheye Lens', - description="Enable if a fisheye lens has been used.\n " - "This will improve the estimation of the Camera's Response Function by considering only the pixels in the center of the image\n" - "and thus ignore undefined/noisy pixels outside the circle defined by the fisheye lens.", - value=False, - uid=[0], - ), - desc.BoolParam( - name='calibrationRefineExposures', - label='Refine Exposures', - description="Refine exposures provided by metadata (shutter speed, f-number, iso). Only available for 'laguerre' calibration method.", - value=False, - uid=[0], - ), - desc.BoolParam( - name='byPass', - label='bypass convert', - description="Bypass HDR creation and use the medium bracket as the source for the next steps", - value=False, - uid=[0], - advanced=True, - ), - desc.ChoiceParam( - name='calibrationMethod', - label='Calibration Method', - description="Method used for camera calibration \n" - " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" - " * Debevec: This is the standard method for HDR calibration. \n" - " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" - " * Laguerre: Simple but robust method estimating the minimal number of parameters. \n" - " * Robertson: First method for HDR calibration in the literature. \n", - values=['linear', 'debevec', 'grossberg', 'laguerre', 'robertson'], - value='debevec', - exclusive=True, - uid=[0], - ), - desc.ChoiceParam( - name='calibrationWeight', - label='Calibration Weight', - description="Weight function used to calibrate camera response \n" - " * default (automatically selected according to the calibrationMethod) \n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='default', - values=['default', 'gaussian', 'triangle', 'plateau'], - exclusive=True, - uid=[0], - ), - desc.ChoiceParam( - name='fusionWeight', - label='Fusion Weight', - description="Weight function used to fuse all LDR images together:\n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='gaussian', - values=['gaussian', 'triangle', 'plateau'], - exclusive=True, - uid=[0], - ), - desc.IntParam( - name='calibrationNbPoints', - label='Calibration Nb Points', - description='Internal number of points used for calibration.', - value=0, - range=(0, 10000000, 1000), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='calibrationDownscale', - label='Calibration Downscale', - description='Scaling factor applied to images before calibration of the response function to reduce the impact of misalignment.', - value=4, - range=(1, 16, 1), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='channelQuantizationPower', - label='Channel Quantization Power', - description='Quantization level like 8 bits or 10 bits.', - value=10, - range=(8, 14, 1), - uid=[0], - advanced=True, - ), - 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='outSfMDataFilename', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.sfm', - uid=[], - ) - ] - - @classmethod - def update(cls, node): - if not isinstance(node.nodeDesc, cls): - raise ValueError("Node {} is not an instance of type {}".format(node, cls)) - # TODO: use Node version for this test - if 'userNbBrackets' not in node.getAttributes().keys(): - # Old version of the node - return - if node.userNbBrackets.value != 0: - node.nbBrackets.value = node.userNbBrackets.value - return - # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) - cameraInitOutput = node.input.getLinkParam() - if not cameraInitOutput: - node.nbBrackets.value = 0 - return - viewpoints = cameraInitOutput.node.viewpoints.value - - # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) - inputs = [] - for viewpoint in viewpoints: - jsonMetadata = viewpoint.metadata.value - if not jsonMetadata: - # no metadata, we cannot found the number of brackets - node.nbBrackets.value = 0 - return - d = json.loads(jsonMetadata) - fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") - shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") - iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") - if not fnumber and not shutterSpeed: - # If one image without shutter or fnumber, we cannot found the number of brackets. - # We assume that there is no multi-bracketing, so nothing to do. - node.nbBrackets.value = 1 - return - inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) - inputs.sort() - - exposureGroups = [] - exposures = [] - for path, exp in inputs: - if exposures and exp != exposures[-1] and exp == exposures[0]: - exposureGroups.append(exposures) - exposures = [exp] - else: - exposures.append(exp) - exposureGroups.append(exposures) - exposures = None - bracketSizes = set() - if len(exposureGroups) == 1: - node.nbBrackets.value = 1 - else: - for expGroup in exposureGroups: - bracketSizes.add(len(expGroup)) - if len(bracketSizes) == 1: - node.nbBrackets.value = bracketSizes.pop() - # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) - else: - node.nbBrackets.value = 0 - # logging.info("[LDRToHDR] Update end") - - From 523efade00623829bb766c6fa7e11b1ae8b84da3 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 5 Jul 2020 23:11:07 +0200 Subject: [PATCH 0354/1093] [nodes] add parallelization to LdrToHdrSampling/Merge and PanoramaWarping --- meshroom/aliceVision/LdrToHdrCalibration.py | 21 ++++---- meshroom/aliceVision/LdrToHdrMerge.py | 59 +++++++++++++-------- meshroom/aliceVision/LdrToHdrSampling.py | 32 +++++++++-- meshroom/aliceVision/PanoramaCompositing.py | 11 +++- meshroom/aliceVision/PanoramaWarping.py | 3 ++ 5 files changed, 88 insertions(+), 38 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index feaa31f204..931d16ccd6 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -91,14 +91,6 @@ class LdrToHdrCalibration(desc.CommandLineNode): range=(0, 10, 1), uid=[], ), - desc.BoolParam( - name='byPass', - label='bypass convert', - description="Bypass HDR creation and use the medium bracket as the source for the next steps", - value=False, - uid=[0], - advanced=True, - ), desc.IntParam( name='channelQuantizationPower', label='Channel Quantization Power', @@ -108,6 +100,17 @@ class LdrToHdrCalibration(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='maxTotalPoints', + label='Max Number of Points', + description='Max number of points selected by the sampling strategy.\n'' + 'This ensures that this sampling step will extract a number of pixels values\n' + 'that the calibration step can manage (in term of computation time and memory usage).', + value=1000000, + range=(8, 10000000, 1000), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -145,9 +148,7 @@ def update(cls, node): if not cameraInitOutput: node.nbBrackets.value = 0 return - print("LdrToHdrCalib cameraInitOutput: " + str(cameraInitOutput)) viewpoints = cameraInitOutput.node.viewpoints.value - print("LdrToHdrCalib viewpoints: " + str(viewpoints)) # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) inputs = [] diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index f63606cddc..1ebb5f52d0 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -23,28 +23,11 @@ def findMetadata(d, keys, defaultValue): return defaultValue - -class DividedInputNodeSize(desc.DynamicNodeSize): - """ - The LDR2HDR will reduce the amount of views in the SfMData. - This class converts the number of LDR input views into the number of HDR output views. - """ - def __init__(self, param, divParam): - super(DividedInputNodeSize, self).__init__(param) - self._divParam = divParam - def computeSize(self, node): - s = super(DividedInputNodeSize, self).computeSize(node) - divParam = node.attribute(self._divParam) - if divParam.value == 0: - return s - return s / divParam.value - - class LdrToHdrMerge(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrMerge {allParams}' - size = DividedInputNodeSize('input', 'nbBrackets') - #parallelization = desc.Parallelization(blockSize=40) - #commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=2) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' Calibrate LDR to HDR response curve from samples @@ -97,7 +80,7 @@ class LdrToHdrMerge(desc.CommandLineNode): desc.BoolParam( name='byPass', label='bypass convert', - description="Bypass HDR creation and use the medium bracket as the source for the next steps", + description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], advanced=True, @@ -111,6 +94,40 @@ class LdrToHdrMerge(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='highlightCorrectionFactor', + label='Highlights Correction', + description='Pixels saturated in all input images have a partial information about their real luminance.\n' + 'We only know that the value should be >= to the standard hdr fusion.\n' + 'This parameter allows to perform a post-processing step to put saturated pixels to a constant ' + 'value defined by the `highlightsMaxLuminance` parameter.\n' + 'This parameter is float to enable to weight this correction.', + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='highlightTargetLux', + label='Highlight Target Luminance (Lux)', + description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n' + '\n' + 'Some Outdoor Reference Light Levels:\n' + ' * 120,000 lux : Brightest sunlight\n' + ' * 110,000 lux : Bright sunlight\n' + ' * 20,000 lux : Shade illuminated by entire clear blue sky, midday\n' + ' * 1,000 lux : Typical overcast day, midday\n' + ' * 400 lux : Sunrise or sunset on a clear day\n' + ' * 40 lux : Fully overcast, sunset/sunrise\n' + '\n' + 'Some Indoor Reference Light Levels:\n' + ' * 20000 lux : Max Usually Used Indoor\n' + ' * 750 lux : Supermarkets\n' + ' * 500 lux : Office Work\n' + ' * 150 lux : Home\n', + value=120000.0, + range=(1000.0, 150000.0, 1.0), + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index ee481c7930..048979403c 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -5,6 +5,7 @@ from meshroom.core import desc + def findMetadata(d, keys, defaultValue): v = None for key in keys: @@ -23,11 +24,27 @@ def findMetadata(d, keys, defaultValue): return defaultValue +class DividedInputNodeSize(desc.DynamicNodeSize): + """ + The LDR2HDR will reduce the amount of views in the SfMData. + This class converts the number of LDR input views into the number of HDR output views. + """ + def __init__(self, param, divParam): + super(DividedInputNodeSize, self).__init__(param) + self._divParam = divParam + def computeSize(self, node): + s = super(DividedInputNodeSize, self).computeSize(node) + divParam = node.attribute(self._divParam) + if divParam.value == 0: + return s + return s / divParam.value + + class LdrToHdrSampling(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrSampling {allParams}' - size = desc.DynamicNodeSize('input') - #parallelization = desc.Parallelization(blockSize=40) - #commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + size = DividedInputNodeSize('input', 'nbBrackets') + parallelization = desc.Parallelization(blockSize=2) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' Sample pixels from Low range images for HDR creation @@ -64,7 +81,7 @@ class LdrToHdrSampling(desc.CommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps", value=False, uid=[0], - advanced=True, + group='internal', ), desc.IntParam( name='channelQuantizationPower', @@ -96,6 +113,11 @@ class LdrToHdrSampling(desc.CommandLineNode): ), ] + def processChunk(self, chunk): + if chunk.node.byPass.value: + return + super(LdrToHdrSampling, self).processChunk(chunk) + @classmethod def update(cls, node): if not isinstance(node.nodeDesc, cls): @@ -108,7 +130,7 @@ def update(cls, node): node.nbBrackets.value = node.userNbBrackets.value return # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) - cameraInitOutput = node.input.getLinkParam() + cameraInitOutput = node.input.getLinkParam(recursive=True) if not cameraInitOutput: node.nbBrackets.value = 0 return diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index eea2ae0f13..5b34fc247a 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -20,8 +20,15 @@ class PanoramaCompositing(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', - description="Panorama Warping result", + label='Input SfMData', + description="Input SfMData.", + value='', + uid=[0], + ), + desc.File( + name='warpingFolder', + label='Warping Folder', + description="Panorama Warping results", value='', uid=[0], ), diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index c44e7b7a17..7cba255f74 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -10,6 +10,9 @@ class PanoramaWarping(desc.CommandLineNode): commandLine = 'aliceVision_panoramaWarping {allParams}' size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=5) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentation = ''' Compute the image warping for each input image in the panorama coordinate system. ''' From d2c12361fb287f51fa06159b73924ab91e5c0dc1 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 6 Jul 2020 00:39:32 +0200 Subject: [PATCH 0355/1093] [multiview] HDRI: add PanoramaPrepareImages in default HDRI pipeline - update access to CameraInit from LdrToHdr nodes - update PanoramaPrepareImages param names --- meshroom/aliceVision/LdrToHdrCalibration.py | 5 ++++- meshroom/aliceVision/LdrToHdrMerge.py | 5 ++++- meshroom/aliceVision/LdrToHdrSampling.py | 3 +++ meshroom/aliceVision/PanoramaPrepareImages.py | 10 +++++----- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 931d16ccd6..c4650139eb 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -103,7 +103,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): desc.IntParam( name='maxTotalPoints', label='Max Number of Points', - description='Max number of points selected by the sampling strategy.\n'' + description='Max number of points selected by the sampling strategy.\n' 'This ensures that this sampling step will extract a number of pixels values\n' 'that the calibration step can manage (in term of computation time and memory usage).', value=1000000, @@ -148,6 +148,9 @@ def update(cls, node): if not cameraInitOutput: node.nbBrackets.value = 0 return + if not cameraInitOutput.node.hasAttribute('viewpoints'): + if cameraInitOutput.node.hasAttribute('input'): + cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) viewpoints = cameraInitOutput.node.viewpoints.value # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 1ebb5f52d0..f57064677d 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -99,7 +99,7 @@ class LdrToHdrMerge(desc.CommandLineNode): label='Highlights Correction', description='Pixels saturated in all input images have a partial information about their real luminance.\n' 'We only know that the value should be >= to the standard hdr fusion.\n' - 'This parameter allows to perform a post-processing step to put saturated pixels to a constant ' + 'This parameter allows to perform a post-processing step to put saturated pixels to a constant\n' 'value defined by the `highlightsMaxLuminance` parameter.\n' 'This parameter is float to enable to weight this correction.', value=1.0, @@ -165,6 +165,9 @@ def update(cls, node): if not cameraInitOutput: node.nbBrackets.value = 0 return + if not cameraInitOutput.node.hasAttribute('viewpoints'): + if cameraInitOutput.node.hasAttribute('input'): + cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) viewpoints = cameraInitOutput.node.viewpoints.value # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 048979403c..a68538f315 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -134,6 +134,9 @@ def update(cls, node): if not cameraInitOutput: node.nbBrackets.value = 0 return + if not cameraInitOutput.node.hasAttribute('viewpoints'): + if cameraInitOutput.node.hasAttribute('input'): + cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) viewpoints = cameraInitOutput.node.viewpoints.value # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index e418feb923..67a6357bb3 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -2,15 +2,15 @@ from meshroom.core import desc +import os.path + class PanoramaPrepareImages(desc.CommandLineNode): commandLine = 'aliceVision_panoramaPrepareImages {allParams}' size = desc.DynamicNodeSize('input') - # parallelization = desc.Parallelization(blockSize=40) - # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' -Prepare images for panorama Estimation +Prepare images for Panorama pipeline: ensures that images orientations are coherent. ''' inputs = [ @@ -34,10 +34,10 @@ class PanoramaPrepareImages(desc.CommandLineNode): outputs = [ desc.File( - name='outSfMData', + name='output', label='Output sfmData', description='Output sfmData.', - value=desc.Node.internalFolder + 'sfmData.abc', + value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value), uid=[], ), ] From 264a82c113507e8df65b6da6154a8fce0cfc7d0d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 6 Jul 2020 11:43:28 +0200 Subject: [PATCH 0356/1093] [nodes] LdrToHdrSampling: expose new advanced params --- meshroom/aliceVision/LdrToHdrSampling.py | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index a68538f315..7222308edd 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -92,6 +92,33 @@ class LdrToHdrSampling(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='blockSize', + label='Block Size', + description='Size of the image tile to extract a sample.', + value=256, + range=(8, 1024, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='radius', + label='Patch Radius', + description='Radius of the patch used to analyze the sample statistics.', + value=5, + range=(0, 10, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='maxCountSample', + label='Max Number of Samples', + description='Max number of samples per image group.', + value=200, + range=(10, 1000, 10), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 7af6b2340eecd81a9e9dd07e673b14f9dbb3cb83 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Jul 2020 14:08:43 +0200 Subject: [PATCH 0357/1093] [nodes] LdrToHdrMerge: rename output param --- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index f57064677d..767612361a 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -141,7 +141,7 @@ class LdrToHdrMerge(desc.CommandLineNode): outputs = [ desc.File( - name='outSfMDataFilename', + name='outSfMData', label='Output SfMData File', description='Path to the output sfmdata file', value=desc.Node.internalFolder + 'sfmData.sfm', From dc410b547d3302816c88cbf5b2a803f20f110abc Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Jul 2020 14:09:04 +0200 Subject: [PATCH 0358/1093] [nodes] LdrToHdrMerge: add offsetRefBracketIndex param --- meshroom/aliceVision/LdrToHdrMerge.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 767612361a..ca770258bc 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -48,6 +48,14 @@ class LdrToHdrMerge(desc.CommandLineNode): value='', uid=[0], ), + desc.IntParam( + name='offsetRefBracketIndex', + label='Offset Ref Bracket Index', + description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', + value=0, + range=(-4, 4, 1), + uid=[0], + ), desc.ChoiceParam( name='fusionWeight', label='Fusion Weight', From a05139e29a37fc63557747b825bb3b94edd6775f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Jul 2020 14:11:33 +0200 Subject: [PATCH 0359/1093] [nodes] PanoramaEstimation: change default value for maxAngleToPrior Avoid to cut too much connections. --- meshroom/aliceVision/PanoramaEstimation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index d3f37ca565..23dac100cc 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -118,7 +118,7 @@ class PanoramaEstimation(desc.CommandLineNode): name='maxAngleToPrior', label='Max Angle To Priors (deg.)', description='''Maximal angle allowed regarding the input prior (in degrees).''', - value=5.0, + value=20.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, From ccf9443d0fe0e0c4ef8a254a1b423d7168167810 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Jul 2020 16:19:09 +0200 Subject: [PATCH 0360/1093] [nodes] remove old CameraDownscale node --- meshroom/aliceVision/CameraDownscale.py | 49 ------------------------- 1 file changed, 49 deletions(-) delete mode 100644 meshroom/aliceVision/CameraDownscale.py diff --git a/meshroom/aliceVision/CameraDownscale.py b/meshroom/aliceVision/CameraDownscale.py deleted file mode 100644 index 894c3cc3c6..0000000000 --- a/meshroom/aliceVision/CameraDownscale.py +++ /dev/null @@ -1,49 +0,0 @@ -__version__ = "1.0" - -import json -import os - -from meshroom.core import desc - - -class CameraDownscale(desc.CommandLineNode): - commandLine = 'aliceVision_cameraDownscale {allParams}' - size = desc.DynamicNodeSize('input') - - inputs = [ - desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', - uid=[0], - ), - desc.FloatParam( - name='rescalefactor', - label='RescaleFactor', - description='Newsize = rescalefactor * oldsize', - value=0.5, - range=(0.0, 1.0, 0.1), - uid=[0], - advanced=True, - ), - 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='outSfMDataFilename', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.abc', - uid=[], - ) - ] From ac825f433eb3be4fd15fc93a1fa1a2454374b007 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Jul 2020 16:20:35 +0200 Subject: [PATCH 0361/1093] [nodes] GlobalSfM: update output param names --- meshroom/aliceVision/GlobalSfM.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 42996b938b..fb06535161 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -104,16 +104,23 @@ class GlobalSfM(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', - description='', - value=desc.Node.internalFolder, + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfm.abc', uid=[], ), desc.File( - name='outSfMDataFilename', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'SfmData.abc', + name='outputViewsAndPoses', + label='Output Poses', + description='''Path to the output sfmdata file with cameras (views and poses).''', + value=desc.Node.internalFolder + 'cameras.sfm', + uid=[], + ), + desc.File( + name='extraInfoFolder', + label='Output Folder', + description='Folder for intermediate reconstruction files and additional reconstruction information files.', + value=desc.Node.internalFolder, uid=[], ), ] From f3ac7e3c631e7c867639ce9e70b3c38f1976dd54 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Jul 2020 16:21:13 +0200 Subject: [PATCH 0362/1093] [nodes] PanoramaInit: update output param name --- meshroom/aliceVision/PanoramaInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 066deec0a5..844628386a 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -103,7 +103,7 @@ class PanoramaInit(desc.CommandLineNode): outputs = [ desc.File( - name='outSfMDataFilename', + name='outSfMData', label='Output SfMData File', description='Path to the output sfmdata file', value=desc.Node.internalFolder + 'sfmData.sfm', From 83f79efb454991faca3c2c0a7b928cdc88f2b593 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 10 Jul 2020 12:48:11 +0200 Subject: [PATCH 0363/1093] [nodes] LdrToHdrMerge: change default value for the center bracket index --- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index ca770258bc..757a57d5ba 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -52,7 +52,7 @@ class LdrToHdrMerge(desc.CommandLineNode): name='offsetRefBracketIndex', label='Offset Ref Bracket Index', description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', - value=0, + value=1, range=(-4, 4, 1), uid=[0], ), From f6c70acab09b6023c70c930701ed01b0ebeab136 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 16 Jul 2020 10:49:49 +0200 Subject: [PATCH 0364/1093] fix warnings: unused import --- meshroom/aliceVision/LdrToHdrCalibration.py | 1 - meshroom/aliceVision/LdrToHdrSampling.py | 1 - meshroom/aliceVision/PanoramaInit.py | 3 --- 3 files changed, 5 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index c4650139eb..06ad416c64 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,7 +1,6 @@ __version__ = "2.0" import json -import os from meshroom.core import desc diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 7222308edd..5f65b6e97c 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,7 +1,6 @@ __version__ = "2.0" import json -import os from meshroom.core import desc diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 844628386a..9abcdcd871 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -1,8 +1,5 @@ __version__ = "1.0" -import json -import os - from meshroom.core import desc From d0db74a45a2854b169b5504b268b46c5450016b9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 16 Jul 2020 11:04:43 +0200 Subject: [PATCH 0365/1093] warning fixes --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrMerge.py | 3 +-- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 3 --- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 4f2ee49616..1d632a3ddf 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -258,7 +258,7 @@ def buildIntrinsics(self, node, additionalViews=()): os.makedirs(os.path.join(tmpCache, node.internalFolder)) self.createViewpointsFile(node, additionalViews) cmd = self.buildCommandLine(node.chunks[0]) - logging.debug(' - commandLine:', cmd) + logging.debug(' - commandLine: {}'.format(cmd)) proc = psutil.Popen(cmd, stdout=None, stderr=None, shell=True) stdout, stderr = proc.communicate() # proc.wait() diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 06ad416c64..62e31283cc 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -9,7 +9,7 @@ def findMetadata(d, keys, defaultValue): for key in keys: v = d.get(key, None) k = key.lower() - if v != None: + if v is not None: return v for dk, dv in d.iteritems(): dkm = dk.lower().replace(" ", "") diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 757a57d5ba..b58537bdf0 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,7 +1,6 @@ __version__ = "2.0" import json -import os from meshroom.core import desc @@ -10,7 +9,7 @@ def findMetadata(d, keys, defaultValue): for key in keys: v = d.get(key, None) k = key.lower() - if v != None: + if v is not None: return v for dk, dv in d.iteritems(): dkm = dk.lower().replace(" ", "") diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 5f65b6e97c..4e9387e3dd 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -10,7 +10,7 @@ def findMetadata(d, keys, defaultValue): for key in keys: v = d.get(key, None) k = key.lower() - if v != None: + if v is not None: return v for dk, dv in d.iteritems(): dkm = dk.lower().replace(" ", "") diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 9d7c3147e5..685aa94534 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,8 +1,5 @@ __version__ = "2.0" -import json -import os - from meshroom.core import desc From 717a5db1fbef5516cb60a594955d9380d9f8cc28 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Mon, 29 Jun 2020 13:02:34 +0200 Subject: [PATCH 0366/1093] [nodes] ImageProcessing: add metadata input folder --- meshroom/aliceVision/ImageProcessing.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 28c706b9fd..d5c8028531 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -35,6 +35,18 @@ class ImageProcessing(desc.CommandLineNode): label="Images input Folders", description='Use images from specific folder(s).', ), + desc.ListAttribute( + elementDesc=desc.File( + name="metadataFolder", + label="Metadata Folder", + description="", + value="", + uid=[0], + ), + name="metadataFolders", + label="Metadata input Folders", + description='Use images metadata from specific folder(s).', + ), desc.ChoiceParam( name='extension', label='Output File Extension', From 4c817245dc49d7589f04c393f7de9b299603a40e Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Mon, 29 Jun 2020 13:21:19 +0200 Subject: [PATCH 0367/1093] [nodes] imageProcessing: add a checkbox for the Sharpen Filter --- meshroom/aliceVision/ImageProcessing.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index d5c8028531..2e84d5baa7 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -25,8 +25,8 @@ class ImageProcessing(desc.CommandLineNode): ), desc.ListAttribute( elementDesc=desc.File( - name="imagesFolder", - label="Images Folder", + name="inputFolder", + label="input Folder", description="", value="", uid=[0], @@ -101,11 +101,18 @@ class ImageProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='sharpen', + label='Sharpen', + description='Use sharpen.', + value=False, + uid=[0], + ), desc.IntParam( name='sharpenWidth', label='Sharpen Width', description='Sharpen Width.', - value=1, + value=3, range=(1, 9, 2), uid=[0], ), From 67ce0f9585d9025c9ff37faa3c0eb58818b69bc7 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Mon, 29 Jun 2020 14:15:57 +0200 Subject: [PATCH 0368/1093] [nodes] ImageProcessing: use advanced StringParams for metadataFolders --- meshroom/aliceVision/ImageProcessing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 2e84d5baa7..e83c09d6df 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -36,7 +36,7 @@ class ImageProcessing(desc.CommandLineNode): description='Use images from specific folder(s).', ), desc.ListAttribute( - elementDesc=desc.File( + elementDesc=desc.StringParam( name="metadataFolder", label="Metadata Folder", description="", @@ -46,6 +46,7 @@ class ImageProcessing(desc.CommandLineNode): name="metadataFolders", label="Metadata input Folders", description='Use images metadata from specific folder(s).', + advanced=True, ), desc.ChoiceParam( name='extension', From 7b53f2512cf18150d4fae8989f5bc0ddcda85549 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Mon, 29 Jun 2020 14:30:28 +0200 Subject: [PATCH 0369/1093] [nodes] imageProcessing: group and rename filters params --- meshroom/aliceVision/ImageProcessing.py | 176 ++++++++++++------------ 1 file changed, 91 insertions(+), 85 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index e83c09d6df..e6e792580d 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -102,91 +102,97 @@ class ImageProcessing(desc.CommandLineNode): value=False, uid=[0], ), - desc.BoolParam( - name='sharpen', - label='Sharpen', - description='Use sharpen.', - value=False, - uid=[0], - ), - desc.IntParam( - name='sharpenWidth', - label='Sharpen Width', - description='Sharpen Width.', - value=3, - range=(1, 9, 2), - uid=[0], - ), - desc.FloatParam( - name='sharpenContrast', - label='Sharpen Contrast', - description='Sharpen Contrast.', - value=1.0, - range=(0.0, 100.0, 0.1), - uid=[0], - ), - desc.FloatParam( - name='sharpenThreshold', - label='Sharpen Threshold', - description='Sharpen Threshold.', - value=0.0, - range=(0.0, 1.0, 0.01), - uid=[0], - ), - desc.BoolParam( - name='bilateralFilter', - label='Bilateral Filter', - description='Bilateral Filter.', - value=False, - uid=[0], - ), - desc.IntParam( - name='bilateralFilterDistance', - label='Bilateral Filter Distance', - description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', - value=0, - range=(0, 9, 1), - uid=[0], - ), - desc.FloatParam( - name='bilateralFilterSigmaSpace', - label='Bilateral Filter Sigma Space', - description='Bilateral Filter sigma in the coordinate space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - ), - desc.FloatParam( - name='bilateralFilterSigmaColor', - label='Bilateral Filter Sigma Color Space', - description='Bilateral Filter sigma in the color space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - ), - desc.BoolParam( - name='claheFilter', - label='Clahe Filter', - description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', - value=False, - uid=[0], - ), - desc.FloatParam( - name='claheClipLimit', - label='Clahe Clip Limit.', - description='Sets Threshold For Contrast Limiting.', - value=4.0, - range=(0.0, 8.0, 1.0), - uid=[0], - ), - desc.IntParam( - name='claheTileGridSize', - label='Clahe Tile Grid Size.', - description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', - value=8, - range=(4, 64, 4), - uid=[0], - ), + desc.GroupAttribute(name="sharpenFilter", label="Sharpen Filter", description="Sharpen Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='enabled', + label='Enable', + description='Use sharpen.', + value=False, + uid=[0], + ), + desc.IntParam( + name='width', + label='Width', + description='Sharpen Width.', + value=3, + range=(1, 9, 2), + uid=[0], + ), + desc.FloatParam( + name='contrast', + label='Contrast', + description='Sharpen Contrast.', + value=1.0, + range=(0.0, 100.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='threshold', + label='Threshold', + description='Sharpen Threshold.', + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + ]), + desc.GroupAttribute(name="bilateralFilter", label="Bilateral Filter", description="Bilateral Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='bilateralFilterEnabled', + label='Enable', + description='Bilateral Filter.', + value=False, + uid=[0], + ), + desc.IntParam( + name='bilateralFilterDistance', + label='Distance', + description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', + value=0, + range=(0, 9, 1), + uid=[0], + ), + desc.FloatParam( + name='bilateralFilterSigmaSpace', + label='Sigma Coordinate Space', + description='Bilateral Filter sigma in the coordinate space.', + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='bilateralFilterSigmaColor', + label='Sigma Color Space', + description='Bilateral Filter sigma in the color space.', + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + ), + ]), + desc.GroupAttribute(name="claheFilter", label="Clahe Filter", description="Clahe Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='claheEnabled', + label='Enable', + description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', + value=False, + uid=[0], + ), + desc.FloatParam( + name='claheClipLimit', + label='Clip Limit.', + description='Sets Threshold For Contrast Limiting.', + value=4.0, + range=(0.0, 8.0, 1.0), + uid=[0], + ), + desc.IntParam( + name='claheTileGridSize', + label='Tile Grid Size.', + description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', + value=8, + range=(4, 64, 4), + uid=[0], + ), + ]), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 00db7197bacfdfdfdacbb30f6e7550ce58a7c754 Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Wed, 1 Jul 2020 12:02:08 +0200 Subject: [PATCH 0370/1093] [nodes] imageProcessing: Add Noise Filtering option --- meshroom/aliceVision/ImageProcessing.py | 48 +++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index e6e792580d..90316037a6 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -178,7 +178,7 @@ class ImageProcessing(desc.CommandLineNode): ), desc.FloatParam( name='claheClipLimit', - label='Clip Limit.', + label='Clip Limit', description='Sets Threshold For Contrast Limiting.', value=4.0, range=(0.0, 8.0, 1.0), @@ -186,13 +186,57 @@ class ImageProcessing(desc.CommandLineNode): ), desc.IntParam( name='claheTileGridSize', - label='Tile Grid Size.', + label='Tile Grid Size', description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', value=8, range=(4, 64, 4), uid=[0], ), ]), + desc.GroupAttribute(name="noiseFilter", label="Noise Filter", description="Noise Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='noiseEnabled', + label='Enable', + description='Add Noise.', + value=False, + uid=[0], + ), + desc.ChoiceParam( + name='noiseMethod', + label='Method', + description=" * method: There are several noise types to choose from:\n" + " * uniform: adds noise values uninformly distributed on range [A,B).\n" + " * gaussian: adds Gaussian (normal distribution) noise values with mean value A and standard deviation B.\n" + " * salt: changes to value A a portion of pixels given by B.\n", + value='uniform', + values=['uniform', 'gaussian', 'salt'], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name='noiseA', + label='A', + description='Parameter that have a different interpretation depending on the method chosen.', + value=0.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + ), + desc.FloatParam( + name='noiseB', + label='B', + description='Parameter that have a different interpretation depending on the method chosen.', + value=1.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + ), + desc.BoolParam( + name='noiseMono', + label='Mono', + description='If is Checked, a single noise value will be applied to all channels otherwise a separate noise value will be computed for each channel.', + value=True, + uid=[0], + ), + ]), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From d9dddf3f7e029277991132a5ccd3a7b42c99eb8a Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Thu, 2 Jul 2020 17:02:26 +0200 Subject: [PATCH 0371/1093] [nodes] imageProcessing: output format option Allows you to choose the output format (RGBA, RGB, Grayscale) --- meshroom/aliceVision/ImageProcessing.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 90316037a6..8f3feba1b6 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -237,6 +237,16 @@ class ImageProcessing(desc.CommandLineNode): uid=[0], ), ]), + desc.ChoiceParam( + name='outputFormat', + label='Output Image Format', + description='Allows you to choose the format of the output image.', + value='rgba', + values=['rgba', 'rgb', 'grayscale'], + exclusive=True, + advanced=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 3d6d4ae9f93d279df7927fbeb67d48bd05d4b2fb Mon Sep 17 00:00:00 2001 From: Enguerrand DE SMET <desmet.enguerrand@gmail.com> Date: Fri, 17 Jul 2020 10:49:14 +0200 Subject: [PATCH 0372/1093] [nodes] imageProcessing: fix outputImages value --- meshroom/aliceVision/ImageProcessing.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 8f3feba1b6..ffc60e258d 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -4,7 +4,24 @@ import os.path - +def outputImagesValueFunct(attr): + basename = os.path.basename(attr.node.input.value) + fileStem = os.path.splitext(basename)[0] + inputExt = os.path.splitext(basename)[1] + outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None + + if inputExt in ['.abc', '.sfm']: + return desc.Node.internalFolder + '*' + (outputExt or '.*') + elif inputExt : + return desc.Node.internalFolder + fileStem + (outputExt or inputExt) + else: + if '*' in fileStem: + # Assume the input fileStem is a regular expression to files + return desc.Node.internalFolder + fileStem + (outputExt or '.*') + else: + # No extension mean it is a folder path + return desc.Node.internalFolder + fileStem + '/' + (outputExt or '.*') + class ImageProcessing(desc.CommandLineNode): commandLine = 'aliceVision_utils_imageProcessing {allParams}' size = desc.DynamicNodeSize('input') @@ -278,8 +295,9 @@ class ImageProcessing(desc.CommandLineNode): name='outputImages', label='Output Images', description='Output Image Files.', - value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value) if (os.path.splitext(attr.node.input.value)[1] not in ['', '.abc', '.sfm']) else (desc.Node.internalFolder + '*.' + (attr.node.extension.value or '*')), + # value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.input.value)[0] + (('.' + attr.node.extension.value) if attr.node.extension.value else os.path.splitext(attr.node.input.value)[1]) if (os.path.splitext(attr.node.input.value)[1] not in ['', '.abc', '.sfm']) else (desc.Node.internalFolder + '*.' + (attr.node.extension.value or '*')), + value= outputImagesValueFunct, group='', # do not export on the command line uid=[], ), - ] + ] \ No newline at end of file From b59ab98c51cd095e5b4bd6c9082e3a4b5fb92f1a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 17 Jul 2020 20:39:11 +0200 Subject: [PATCH 0373/1093] python-3 compatibility --- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 62e31283cc..80bfb6cc57 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -11,7 +11,7 @@ def findMetadata(d, keys, defaultValue): k = key.lower() if v is not None: return v - for dk, dv in d.iteritems(): + for dk, dv in d.items(): dkm = dk.lower().replace(" ", "") if dkm == key.lower(): return dv diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index b58537bdf0..3304670ba0 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -11,7 +11,7 @@ def findMetadata(d, keys, defaultValue): k = key.lower() if v is not None: return v - for dk, dv in d.iteritems(): + for dk, dv in d.items(): dkm = dk.lower().replace(" ", "") if dkm == key.lower(): return dv diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 4e9387e3dd..202390822e 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -12,7 +12,7 @@ def findMetadata(d, keys, defaultValue): k = key.lower() if v is not None: return v - for dk, dv in d.iteritems(): + for dk, dv in d.items(): dkm = dk.lower().replace(" ", "") if dkm == key.lower(): return dv From ba59b5add290c424ddab605e64a357bb4d98e6ce Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 18 Jul 2020 13:08:21 +0200 Subject: [PATCH 0374/1093] [nodes] LdrToHdrSampling: add debug option --- meshroom/aliceVision/LdrToHdrSampling.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 4e9387e3dd..14179e44ba 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -118,6 +118,13 @@ class LdrToHdrSampling(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='debug', + label='Export Debug Files', + description="Export debug files to analyze the sampling strategy.", + value=False, + uid=[], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 31757f8564360c59bac44541c5f4f2560ab2287d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 18 Jul 2020 13:52:34 +0200 Subject: [PATCH 0375/1093] [nodes] ImageProcessing: bug fix and minor code simplification --- meshroom/aliceVision/ImageProcessing.py | 26 +++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index ffc60e258d..43d4f3fcb5 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -9,19 +9,25 @@ def outputImagesValueFunct(attr): fileStem = os.path.splitext(basename)[0] inputExt = os.path.splitext(basename)[1] outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None - + if inputExt in ['.abc', '.sfm']: + # If we have an SfM in input return desc.Node.internalFolder + '*' + (outputExt or '.*') - elif inputExt : + + if inputExt: + # if we have one or multiple files in input return desc.Node.internalFolder + fileStem + (outputExt or inputExt) - else: - if '*' in fileStem: - # Assume the input fileStem is a regular expression to files - return desc.Node.internalFolder + fileStem + (outputExt or '.*') - else: - # No extension mean it is a folder path - return desc.Node.internalFolder + fileStem + '/' + (outputExt or '.*') - + + if '*' in fileStem: + # The fileStem of the input param is a regular expression, + # so even if there is no file extension, + # we consider that the expression represents files. + return desc.Node.internalFolder + fileStem + (outputExt or '.*') + + # No extension and no expression means that the input param is a folder path + return desc.Node.internalFolder + '*' + (outputExt or '.*') + + class ImageProcessing(desc.CommandLineNode): commandLine = 'aliceVision_utils_imageProcessing {allParams}' size = desc.DynamicNodeSize('input') From 5a3bb9a2ac6444373aff1dc05fe6adab63ea3fd9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 18 Jul 2020 13:53:43 +0200 Subject: [PATCH 0376/1093] [nodes] ImageProcessing: remove useless comment --- meshroom/aliceVision/ImageProcessing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 43d4f3fcb5..e1b1a68070 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -301,9 +301,8 @@ class ImageProcessing(desc.CommandLineNode): name='outputImages', label='Output Images', description='Output Image Files.', - # value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.input.value)[0] + (('.' + attr.node.extension.value) if attr.node.extension.value else os.path.splitext(attr.node.input.value)[1]) if (os.path.splitext(attr.node.input.value)[1] not in ['', '.abc', '.sfm']) else (desc.Node.internalFolder + '*.' + (attr.node.extension.value or '*')), value= outputImagesValueFunct, group='', # do not export on the command line uid=[], ), - ] \ No newline at end of file + ] From dc5a616af4073371553d3819653eb0af001f02c2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 18 Jul 2020 13:57:08 +0200 Subject: [PATCH 0377/1093] [nodes] ImageProcessing: change advanced status --- meshroom/aliceVision/ImageProcessing.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index e1b1a68070..fda72c712a 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -69,7 +69,6 @@ class ImageProcessing(desc.CommandLineNode): name="metadataFolders", label="Metadata input Folders", description='Use images metadata from specific folder(s).', - advanced=True, ), desc.ChoiceParam( name='extension', @@ -267,9 +266,8 @@ class ImageProcessing(desc.CommandLineNode): value='rgba', values=['rgba', 'rgb', 'grayscale'], exclusive=True, - advanced=True, uid=[0], - ), + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 445d9dcb48097d508a2a0b969161c5441d87b342 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Wed, 29 Jul 2020 11:38:13 +0200 Subject: [PATCH 0378/1093] [nodes] update several nodes with enabled parameter --- meshroom/aliceVision/CameraInit.py | 1 + meshroom/aliceVision/ImageMatching.py | 6 ++++++ meshroom/aliceVision/ImageProcessing.py | 14 +++++++++++++- meshroom/aliceVision/Meshing.py | 2 ++ meshroom/aliceVision/PanoramaInit.py | 7 +++++-- 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 1d632a3ddf..53671443a9 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -210,6 +210,7 @@ class CameraInit(desc.CommandLineNode): value='.*?(\d+)', uid=[0], advanced=True, + enabled=lambda node: node.viewIdMethod.value == 'filename', ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index c117548b1f..795afae13d 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -75,6 +75,7 @@ class ImageMatching(desc.CommandLineNode): description='Input name for the vocabulary tree file.', value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[], + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.File( name='weights', @@ -83,6 +84,7 @@ class ImageMatching(desc.CommandLineNode): value='', uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.IntParam( name='minNbImages', @@ -92,6 +94,7 @@ class ImageMatching(desc.CommandLineNode): range=(0, 500, 1), uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.IntParam( name='maxDescriptors', @@ -101,6 +104,7 @@ class ImageMatching(desc.CommandLineNode): range=(0, 100000, 1), uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.IntParam( name='nbMatches', @@ -110,6 +114,7 @@ class ImageMatching(desc.CommandLineNode): range=(0, 1000, 1), uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.IntParam( name='nbNeighbors', @@ -119,6 +124,7 @@ class ImageMatching(desc.CommandLineNode): range=(0, 1000, 1), uid=[0], advanced=True, + enabled=lambda node: 'Sequential' in node.method.value, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index fda72c712a..c86b038669 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -126,7 +126,7 @@ class ImageProcessing(desc.CommandLineNode): ), desc.GroupAttribute(name="sharpenFilter", label="Sharpen Filter", description="Sharpen Filtering Parameters.", joinChar=":", groupDesc=[ desc.BoolParam( - name='enabled', + name='sharpenFilterEnabled', label='Enable', description='Use sharpen.', value=False, @@ -139,6 +139,7 @@ class ImageProcessing(desc.CommandLineNode): value=3, range=(1, 9, 2), uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), desc.FloatParam( name='contrast', @@ -147,6 +148,7 @@ class ImageProcessing(desc.CommandLineNode): value=1.0, range=(0.0, 100.0, 0.1), uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), desc.FloatParam( name='threshold', @@ -155,6 +157,7 @@ class ImageProcessing(desc.CommandLineNode): value=0.0, range=(0.0, 1.0, 0.01), uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), ]), desc.GroupAttribute(name="bilateralFilter", label="Bilateral Filter", description="Bilateral Filtering Parameters.", joinChar=":", groupDesc=[ @@ -172,6 +175,7 @@ class ImageProcessing(desc.CommandLineNode): value=0, range=(0, 9, 1), uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), desc.FloatParam( name='bilateralFilterSigmaSpace', @@ -180,6 +184,7 @@ class ImageProcessing(desc.CommandLineNode): value=0.0, range=(0.0, 150.0, 0.01), uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), desc.FloatParam( name='bilateralFilterSigmaColor', @@ -188,6 +193,7 @@ class ImageProcessing(desc.CommandLineNode): value=0.0, range=(0.0, 150.0, 0.01), uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), ]), desc.GroupAttribute(name="claheFilter", label="Clahe Filter", description="Clahe Filtering Parameters.", joinChar=":", groupDesc=[ @@ -205,6 +211,7 @@ class ImageProcessing(desc.CommandLineNode): value=4.0, range=(0.0, 8.0, 1.0), uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, ), desc.IntParam( name='claheTileGridSize', @@ -213,6 +220,7 @@ class ImageProcessing(desc.CommandLineNode): value=8, range=(4, 64, 4), uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, ), ]), desc.GroupAttribute(name="noiseFilter", label="Noise Filter", description="Noise Filtering Parameters.", joinChar=":", groupDesc=[ @@ -234,6 +242,7 @@ class ImageProcessing(desc.CommandLineNode): values=['uniform', 'gaussian', 'salt'], exclusive=True, uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.FloatParam( name='noiseA', @@ -242,6 +251,7 @@ class ImageProcessing(desc.CommandLineNode): value=0.0, range=(0.0, 1.0, 0.0001), uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.FloatParam( name='noiseB', @@ -250,6 +260,7 @@ class ImageProcessing(desc.CommandLineNode): value=1.0, range=(0.0, 1.0, 0.0001), uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.BoolParam( name='noiseMono', @@ -257,6 +268,7 @@ class ImageProcessing(desc.CommandLineNode): description='If is Checked, a single noise value will be applied to all channels otherwise a separate noise value will be computed for each channel.', value=True, uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), ]), desc.ChoiceParam( diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index e46bffbf29..f48b71b1f3 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -51,6 +51,7 @@ class Meshing(desc.CommandLineNode): range=(0, 100, 1), uid=[0], advanced=True, + enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.FloatParam( name='estimateSpaceMinObservationAngle', @@ -59,6 +60,7 @@ class Meshing(desc.CommandLineNode): value=10, range=(0, 120, 1), uid=[0], + enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.IntParam( name='maxInputPoints', diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 9abcdcd871..fcbb479444 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -45,7 +45,7 @@ class PanoramaInit(desc.CommandLineNode): name='dependency', label='Dependency', description="Folder(s) in which computed features are stored. (WORKAROUND for valid Tractor graph submission)", - group='forDependencyOnly', # not a command line argument + group='forDependencyOnly', # not a command line argument ), desc.BoolParam( name='useFisheye', @@ -60,6 +60,7 @@ class PanoramaInit(desc.CommandLineNode): description='Automatically estimate the Fisheye Circle center and radius instead of using user values.', value=True, uid=[0], + enabled=lambda node: node.useFisheye.value, ), desc.GroupAttribute( name="fisheyeCenterOffset", @@ -77,7 +78,8 @@ class PanoramaInit(desc.CommandLineNode): uid=[0], range=(-1000.0, 10000.0, 1.0)), ], - group=None, # skip group from command line + group=None, # skip group from command line + enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.FloatParam( name='fisheyeRadius', @@ -86,6 +88,7 @@ class PanoramaInit(desc.CommandLineNode): value=96.0, range=(0.0, 150.0, 0.01), uid=[0], + enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.ChoiceParam( name='verboseLevel', From 8caaa4e733133e377c2f17ccfe5c90a44eda0c12 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Wed, 29 Jul 2020 14:39:38 +0200 Subject: [PATCH 0379/1093] [nodes] increment nodes version --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/ImageProcessing.py | 2 +- meshroom/aliceVision/Meshing.py | 2 +- meshroom/aliceVision/PanoramaInit.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 53671443a9..391c80b5b1 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" import os import json diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 795afae13d..6560afbb34 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -1,4 +1,4 @@ -__version__ = "1.1" +__version__ = "2.0" import os from meshroom.core import desc diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index c86b038669..f97c8ab4c3 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index f48b71b1f3..0c7b19e894 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,4 +1,4 @@ -__version__ = "4.0" +__version__ = "5.0" from meshroom.core import desc diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index fcbb479444..068faea436 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc From d85963bfc585bdf22dfa274c80d8089f8ac48026 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Wed, 29 Jul 2020 16:04:41 +0200 Subject: [PATCH 0380/1093] [nodes] update LdrToHdr nodes with enabled parameter --- meshroom/aliceVision/LdrToHdrMerge.py | 51 +++++++++++++----------- meshroom/aliceVision/LdrToHdrSampling.py | 12 ++++-- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 3304670ba0..0b8811ce2f 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" import json @@ -47,26 +47,6 @@ class LdrToHdrMerge(desc.CommandLineNode): value='', uid=[0], ), - desc.IntParam( - name='offsetRefBracketIndex', - label='Offset Ref Bracket Index', - description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', - value=1, - range=(-4, 4, 1), - uid=[0], - ), - desc.ChoiceParam( - name='fusionWeight', - label='Fusion Weight', - description="Weight function used to fuse all LDR images together:\n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='gaussian', - values=['gaussian', 'triangle', 'plateau'], - exclusive=True, - uid=[0], - ), desc.IntParam( name='userNbBrackets', label='Number of Brackets', @@ -84,13 +64,35 @@ class LdrToHdrMerge(desc.CommandLineNode): range=(0, 10, 1), uid=[], ), + desc.IntParam( + name='offsetRefBracketIndex', + label='Offset Ref Bracket Index', + description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', + value=1, + range=(-4, 4, 1), + uid=[0], + enabled= lambda node: node.nbBrackets.value != 1, + ), desc.BoolParam( name='byPass', - label='bypass convert', + label='Bypass', description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], - advanced=True, + enabled= lambda node: node.nbBrackets.value != 1, + ), + desc.ChoiceParam( + name='fusionWeight', + label='Fusion Weight', + description="Weight function used to fuse all LDR images together:\n" + " * gaussian \n" + " * triangle \n" + " * plateau", + value='gaussian', + values=['gaussian', 'triangle', 'plateau'], + exclusive=True, + uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='channelQuantizationPower', @@ -100,6 +102,7 @@ class LdrToHdrMerge(desc.CommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.FloatParam( name='highlightCorrectionFactor', @@ -112,6 +115,7 @@ class LdrToHdrMerge(desc.CommandLineNode): value=1.0, range=(0.0, 1.0, 0.01), uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.FloatParam( name='highlightTargetLux', @@ -134,6 +138,7 @@ class LdrToHdrMerge(desc.CommandLineNode): value=120000.0, range=(1000.0, 150000.0, 1.0), uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( name='verboseLevel', diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 5db4adf1b6..eeb27aaab7 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" import json @@ -76,11 +76,12 @@ class LdrToHdrSampling(desc.CommandLineNode): ), desc.BoolParam( name='byPass', - label='bypass convert', + label='Bypass', description="Bypass HDR creation and use the medium bracket as the source for the next steps", value=False, uid=[0], group='internal', + enabled= lambda node: node.nbBrackets.value != 1, ), desc.IntParam( name='channelQuantizationPower', @@ -90,6 +91,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='blockSize', @@ -99,6 +101,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(8, 1024, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='radius', @@ -108,6 +111,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(0, 10, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='maxCountSample', @@ -117,6 +121,7 @@ class LdrToHdrSampling(desc.CommandLineNode): range=(10, 1000, 10), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( name='debug', @@ -124,6 +129,7 @@ class LdrToHdrSampling(desc.CommandLineNode): description="Export debug files to analyze the sampling strategy.", value=False, uid=[], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name='verboseLevel', @@ -147,7 +153,7 @@ class LdrToHdrSampling(desc.CommandLineNode): ] def processChunk(self, chunk): - if chunk.node.byPass.value: + if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value: return super(LdrToHdrSampling, self).processChunk(chunk) From dd9204163e429ad9fc8c4ca0769ecdc8a0b5395d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 29 Jul 2020 18:33:39 +0200 Subject: [PATCH 0381/1093] [nodes] CameraInit: no more params invalidation Params are only used on drag&drop and do not invalidate the node computation. Only Viewpoints and Intrinsics are now used in the invalidation. --- meshroom/aliceVision/CameraInit.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 391c80b5b1..4d72b8a999 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -159,7 +159,8 @@ class CameraInit(desc.CommandLineNode): description='Empirical value for the field of view in degree.', value=45.0, range=(0, 180.0, 1), - uid=[0], + uid=[], + advanced=True, ), desc.ChoiceParam( name='groupCameraFallback', @@ -173,7 +174,7 @@ class CameraInit(desc.CommandLineNode): values=['global', 'folder', 'image'], value='folder', exclusive=True, - uid=[0], + uid=[], advanced=True, ), desc.ChoiceParam( @@ -183,7 +184,7 @@ class CameraInit(desc.CommandLineNode): value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1'], values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1'], exclusive=False, - uid=[0], + uid=[], joinChar=',', advanced=True, ), @@ -196,7 +197,7 @@ class CameraInit(desc.CommandLineNode): value='metadata', values=['metadata', 'filename'], exclusive=True, - uid=[0], + uid=[], advanced=True, ), desc.StringParam( @@ -208,7 +209,7 @@ class CameraInit(desc.CommandLineNode): ' - Match the longest number at the end of filename (default value): ".*?(\d+)"\n' ' - Match the first number found in filename : "(\d+).*"\n', value='.*?(\d+)', - uid=[0], + uid=[], advanced=True, enabled=lambda node: node.viewIdMethod.value == 'filename', ), From a00cd15d274e946c73fe99e49e8f944787acf1a8 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 3 Aug 2020 10:43:20 +0200 Subject: [PATCH 0382/1093] [nodes] LdrToHdr nodes: update nb brackets detection for single view/multiple exposures --- meshroom/aliceVision/LdrToHdrCalibration.py | 7 ++++++- meshroom/aliceVision/LdrToHdrMerge.py | 7 ++++++- meshroom/aliceVision/LdrToHdrSampling.py | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 80bfb6cc57..3a414210ae 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -184,7 +184,12 @@ def update(cls, node): exposures = None bracketSizes = set() if len(exposureGroups) == 1: - node.nbBrackets.value = 1 + if len(set(exposureGroups[0])) == 1: + # Single exposure and multiple views + node.nbBrackets.value = 1 + else: + # Single view and multiple exposures + node.nbBrackets.value = len(exposureGroups[0]) else: for expGroup in exposureGroups: bracketSizes.add(len(expGroup)) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 0b8811ce2f..3bbb5122a2 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -214,7 +214,12 @@ def update(cls, node): exposures = None bracketSizes = set() if len(exposureGroups) == 1: - node.nbBrackets.value = 1 + if len(set(exposureGroups[0])) == 1: + # Single exposure and multiple views + node.nbBrackets.value = 1 + else: + # Single view and multiple exposures + node.nbBrackets.value = len(exposureGroups[0]) else: for expGroup in exposureGroups: bracketSizes.add(len(expGroup)) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index eeb27aaab7..1e73a87eb9 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -210,7 +210,12 @@ def update(cls, node): exposures = None bracketSizes = set() if len(exposureGroups) == 1: - node.nbBrackets.value = 1 + if len(set(exposureGroups[0])) == 1: + # Single exposure and multiple views + node.nbBrackets.value = 1 + else: + # Single view and multiple exposures + node.nbBrackets.value = len(exposureGroups[0]) else: for expGroup in exposureGroups: bracketSizes.add(len(expGroup)) From cc2b5885317226a769d71063978098284ef2a33b Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@interdigital.com> Date: Tue, 11 Aug 2020 07:56:01 +0200 Subject: [PATCH 0383/1093] add a choice for graphcut use --- meshroom/aliceVision/PanoramaCompositing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 5b34fc247a..ff08d3a546 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -54,6 +54,13 @@ class PanoramaCompositing(desc.CommandLineNode): exclusive=True, uid=[0] ), + desc.BoolParam( + name='useGraphCut', + label='Use smart seams', + description='Use a graphcut algorithm to select the seams for better compositing', + value=True, + uid=[0], + ), desc.ChoiceParam( name='overlayType', label='Overlay Type', From e40323d610f2a3c5b8626d64bc2230d65b338a50 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 12 Aug 2020 13:42:35 +0200 Subject: [PATCH 0384/1093] [nodes] LdrToHdr: fix error when no CameraInit connected --- meshroom/aliceVision/LdrToHdrCalibration.py | 7 ++++++- meshroom/aliceVision/LdrToHdrMerge.py | 7 ++++++- meshroom/aliceVision/LdrToHdrSampling.py | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 3a414210ae..6caacb8cb3 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -150,7 +150,12 @@ def update(cls, node): if not cameraInitOutput.node.hasAttribute('viewpoints'): if cameraInitOutput.node.hasAttribute('input'): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) - viewpoints = cameraInitOutput.node.viewpoints.value + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute('viewpoints'): + viewpoints = cameraInitOutput.node.viewpoints.value + else: + # No connected CameraInit + node.nbBrackets.value = 0 + return # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) inputs = [] diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 3bbb5122a2..e206d3ba55 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -180,7 +180,12 @@ def update(cls, node): if not cameraInitOutput.node.hasAttribute('viewpoints'): if cameraInitOutput.node.hasAttribute('input'): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) - viewpoints = cameraInitOutput.node.viewpoints.value + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute('viewpoints'): + viewpoints = cameraInitOutput.node.viewpoints.value + else: + # No connected CameraInit + node.nbBrackets.value = 0 + return # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) inputs = [] diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 1e73a87eb9..dc1578c488 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -176,7 +176,12 @@ def update(cls, node): if not cameraInitOutput.node.hasAttribute('viewpoints'): if cameraInitOutput.node.hasAttribute('input'): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) - viewpoints = cameraInitOutput.node.viewpoints.value + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute('viewpoints'): + viewpoints = cameraInitOutput.node.viewpoints.value + else: + # No connected CameraInit + node.nbBrackets.value = 0 + return # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) inputs = [] From 6d4e427dc303e3fbbb81aec19271a35de5e0d7f7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 12 Aug 2020 16:25:07 +0200 Subject: [PATCH 0385/1093] [nodes] StructureFromMotion: change default value for filterTrackForks --- meshroom/aliceVision/StructureFromMotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 685aa94534..7fa6c194a1 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -283,7 +283,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Filter Track Forks', description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' 'lead to multiple features in the same image for a single track. \n', - value=True, + value=False, uid=[0], ), desc.File( From cfd36c77fd069b6aacad163945dcf07aeb5d5fb3 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Mon, 20 Jul 2020 11:42:55 +0200 Subject: [PATCH 0386/1093] [nodes] meshing: add bounding box options - Checkbox in optional settings. - Parameters in advanced settings. --- meshroom/aliceVision/Meshing.py | 95 +++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 0c7b19e894..e62fa301b3 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -35,6 +35,101 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), + desc.BoolParam( + name='useBoundingBox', + label='Custom Bounding Box', + description='Edit the meshing bounding box. If enabled, it takes priority over the Estimate From SfM option. Parameters can be adjusted in advanced settings.', + value=False, + uid=[0], + group='' + ), + desc.GroupAttribute( + name="boundingBox", + label="Bounding Box Settings", + description="Translation, rotation and scale of the bounding box.", + groupDesc=[ + desc.GroupAttribute( + name="bboxTranslation", + label="Translation", + description="Position in space.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="X Offset", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01) + ), + desc.FloatParam( + name="y", label="y", description="Y Offset", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01) + ), + desc.FloatParam( + name="z", label="z", description="Z Offset", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01) + ) + ], + joinChar="," + ), + desc.GroupAttribute( + name="bboxRotation", + label="Euler Rotation", + description="Rotation in Euler degrees.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="Euler X Rotation", + value=0.0, + uid=[0], + range=(-90.0, 90.0, 1) + ), + desc.FloatParam( + name="y", label="y", description="Euler Y Rotation", + value=0.0, + uid=[0], + range=(-180.0, 180.0, 1) + ), + desc.FloatParam( + name="z", label="z", description="Euler Z Rotation", + value=0.0, + uid=[0], + range=(-180.0, 180.0, 1) + ) + ], + joinChar="," + ), + desc.GroupAttribute( + name="bboxScale", + label="Scale", + description="Scale of the bounding box.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="X Scale", + value=1.0, + uid=[0], + range=(0.0, 20.0, 0.01) + ), + desc.FloatParam( + name="y", label="y", description="Y Scale", + value=1.0, + uid=[0], + range=(0.0, 20.0, 0.01) + ), + desc.FloatParam( + name="z", label="z", description="Z Scale", + value=1.0, + uid=[0], + range=(0.0, 20.0, 0.01) + ) + ], + joinChar="," + ) + ], + joinChar=",", + advanced=True + ), desc.BoolParam( name='estimateSpaceFromSfM', label='Estimate Space From SfM', From 97d62a5b49c9461b6c17385f51e021896de6e51f Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Thu, 23 Jul 2020 12:26:25 +0200 Subject: [PATCH 0387/1093] [nodes] SfMTransform : add gizmo transformation --- meshroom/aliceVision/SfMTransform.py | 72 +++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index f0b1c61f54..b7eff24ae5 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -34,12 +34,13 @@ class SfMTransform(desc.CommandLineNode): label='Transformation Method', description="Transformation method:\n" " * transformation: Apply a given transformation\n" + " * manual: Apply the gizmo transformation\n" " * auto_from_cameras: Use cameras\n" " * auto_from_landmarks: Use landmarks\n" " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" " * from_markers: Align specific markers to custom coordinates", value='auto_from_landmarks', - values=['transformation', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_markers'], + values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_markers'], exclusive=True, uid=[0], ), @@ -52,6 +53,75 @@ class SfMTransform(desc.CommandLineNode): value='', uid=[0], ), + desc.GroupAttribute( + name="transformGizmo", + label="Transform Gizmo Settings", + description="Translation, rotation and scale defined by the gizmo.", + groupDesc=[ + desc.GroupAttribute( + name="gizmoTranslation", + label="Translation", + description="Translation in space.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="X Offset", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01) + ), + desc.FloatParam( + name="y", label="y", description="Y Offset", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01) + ), + desc.FloatParam( + name="z", label="z", description="Z Offset", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01) + ) + ], + joinChar="," + ), + desc.GroupAttribute( + name="gizmoRotation", + label="Euler Rotation", + description="Rotation in Euler degrees.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="Euler X Rotation", + value=0.0, + uid=[0], + range=(-90.0, 90.0, 1) + ), + desc.FloatParam( + name="y", label="y", description="Euler Y Rotation", + value=0.0, + uid=[0], + range=(-180.0, 180.0, 1) + ), + desc.FloatParam( + name="z", label="z", description="Euler Z Rotation", + value=0.0, + uid=[0], + range=(-180.0, 180.0, 1) + ) + ], + joinChar="," + ), + desc.FloatParam( + name="gizmoScale", + label="Scale", + description="Uniform Scale.", + value=1.0, + uid=[0], + range=(0.0, 20.0, 0.01) + ) + ], + joinChar=",", + advanced=True + ), desc.ChoiceParam( name='landmarksDescriberTypes', label='Landmarks Describer Types', From 1cc7f83519e677a08f40e99dc2b60aaef725dbc8 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Fri, 24 Jul 2020 12:56:51 +0200 Subject: [PATCH 0388/1093] [ui] Viewer3D: SfMTransformGizmo - real-time transformed input rendering - When SfMTransform uses manual method, we display in real-time the input on which we apply the gizmo transformation. - For now, the options "Additional Scale", "Apply Scale/Rotation/Translation" of the node are not handled. The purpose will be to disable them when the method is "manual". --- meshroom/aliceVision/SfMTransform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index b7eff24ae5..c42a22c1e2 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -34,7 +34,7 @@ class SfMTransform(desc.CommandLineNode): label='Transformation Method', description="Transformation method:\n" " * transformation: Apply a given transformation\n" - " * manual: Apply the gizmo transformation\n" + " * manual: Apply the gizmo transformation (show the transformed input)\n" " * auto_from_cameras: Use cameras\n" " * auto_from_landmarks: Use landmarks\n" " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" From 1f948ced213df7a5c76e5c7928e18bfff932aa71 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Thu, 30 Jul 2020 11:26:01 +0200 Subject: [PATCH 0389/1093] [nodes] Meshing: add enabled parameter to bounding box - Add enabled parameter to Bounding Box and update the major version of the node (important) --- meshroom/aliceVision/Meshing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index e62fa301b3..78d1a170e7 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,4 +1,4 @@ -__version__ = "5.0" +__version__ = "6.0" from meshroom.core import desc @@ -128,7 +128,7 @@ class Meshing(desc.CommandLineNode): ) ], joinChar=",", - advanced=True + enabled=lambda node: node.useBoundingBox.value, ), desc.BoolParam( name='estimateSpaceFromSfM', From c4d3364da3d2e4fab63e2bfe5cde385d2619ade2 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Thu, 30 Jul 2020 11:29:30 +0200 Subject: [PATCH 0390/1093] [nodes] SfMTransform: change name from gizmo to manual + enabled param --- meshroom/aliceVision/SfMTransform.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index c42a22c1e2..18b0324e66 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc @@ -52,14 +52,15 @@ class SfMTransform(desc.CommandLineNode): " * from_single_camera: Camera UID or image filename", value='', uid=[0], + enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera", ), desc.GroupAttribute( - name="transformGizmo", - label="Transform Gizmo Settings", - description="Translation, rotation and scale defined by the gizmo.", + name="manualTransform", + label="Manual Transform (Gizmo)", + description="Translation, rotation (Euler ZXY) and uniform scale.", groupDesc=[ desc.GroupAttribute( - name="gizmoTranslation", + name="manualTranslation", label="Translation", description="Translation in space.", groupDesc=[ @@ -85,7 +86,7 @@ class SfMTransform(desc.CommandLineNode): joinChar="," ), desc.GroupAttribute( - name="gizmoRotation", + name="manualRotation", label="Euler Rotation", description="Rotation in Euler degrees.", groupDesc=[ @@ -111,7 +112,7 @@ class SfMTransform(desc.CommandLineNode): joinChar="," ), desc.FloatParam( - name="gizmoScale", + name="manualScale", label="Scale", description="Uniform Scale.", value=1.0, @@ -120,7 +121,7 @@ class SfMTransform(desc.CommandLineNode): ) ], joinChar=",", - advanced=True + enabled=lambda node: node.method.value == "manual", ), desc.ChoiceParam( name='landmarksDescriberTypes', @@ -158,21 +159,24 @@ class SfMTransform(desc.CommandLineNode): label='Scale', description='Apply scale transformation.', value=True, - uid=[0] + uid=[0], + enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( name='applyRotation', label='Rotation', description='Apply rotation transformation.', value=True, - uid=[0] + uid=[0], + enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( name='applyTranslation', label='Translation', description='Apply translation transformation.', value=True, - uid=[0] + uid=[0], + enabled=lambda node: node.method.value != "manual", ), desc.ChoiceParam( name='verboseLevel', From e68c2b3cff6b114720c9a902667a8ad7078663cb Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@interdigital.com> Date: Fri, 28 Aug 2020 11:42:08 +0200 Subject: [PATCH 0391/1093] add a parameter for panorama upscale choice --- meshroom/aliceVision/PanoramaWarping.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 7cba255f74..8fbe6816a3 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/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 8b57e45ee64e1351e7a5e6e065158063650dc381 Mon Sep 17 00:00:00 2001 From: Fabien Servant <55734626+servantf@users.noreply.github.com> Date: Wed, 2 Sep 2020 11:54:12 +0200 Subject: [PATCH 0392/1093] [nodes] PanoramaInit: New parameter to set an extra image rotation to each camera declared the input xml (#1046) Add XML additional input angle --- meshroom/aliceVision/PanoramaInit.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 068faea436..8ac5875641 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -90,6 +90,15 @@ class PanoramaInit(desc.CommandLineNode): uid=[0], enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), + desc.ChoiceParam( + name='inputAngle', + label='input Angle offset', + description='Add a rotation to the input XML given poses.', + value='None', + values=['None', 'rotate90', 'rotate180', 'rotate270'], + exclusive=True, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 415ec6f400d26891d53db6884237821aa84dfb5e Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 3 Sep 2020 12:26:19 +0200 Subject: [PATCH 0393/1093] [nodes] PanoramaCompositing: add "all" option to "overlayType" choice param --- meshroom/aliceVision/PanoramaCompositing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index ff08d3a546..40bbbac496 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -67,9 +67,10 @@ class PanoramaCompositing(desc.CommandLineNode): description='Overlay on top of panorama to analyze transitions:\n' ' * none: no overlay\n' ' * borders: display image borders\n' - ' * seams: display transitions between images\n', + ' * seams: display transitions between images\n' + ' * all: display borders and seams\n', value='none', - values=['none', 'borders', 'seams'], + values=['none', 'borders', 'seams', 'all'], exclusive=True, advanced=True, uid=[0] From f79a551c9a87ebded1c63453654b0d5fb00df941 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 3 Sep 2020 15:37:01 +0200 Subject: [PATCH 0394/1093] [nodes] Texturing: put downscale to 2 by default Scale 1 could be better for objects, but is really too much for large environments. Better to have a default value which ensures that we can open the result. --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 1e36756f06..c69daabc7d 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -56,7 +56,7 @@ class Texturing(desc.CommandLineNode): name='downscale', label='Texture Downscale', description='''Texture downscale factor''', - value=1, + value=2, values=(1, 2, 4, 8), exclusive=True, uid=[0], From a3951c579c8f68b7a3e7196cbfb6b054b7c762e3 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 4 Sep 2020 16:59:08 +0200 Subject: [PATCH 0395/1093] [nodes] PanoramaCompositing: minor wording change --- meshroom/aliceVision/PanoramaCompositing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 40bbbac496..02368542e4 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -56,8 +56,8 @@ class PanoramaCompositing(desc.CommandLineNode): ), desc.BoolParam( name='useGraphCut', - label='Use smart seams', - description='Use a graphcut algorithm to select the seams for better compositing', + label='Use Smart Seams', + description='Use a graphcut algorithm to optmize seams for better transitions between images.', value=True, uid=[0], ), From 07ab3b54b5b93e33363029e487769fb60016a640 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 4 Sep 2020 16:59:46 +0200 Subject: [PATCH 0396/1093] [nodes] ImageProcessing: minor wording change --- meshroom/aliceVision/ImageProcessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index f97c8ab4c3..6ae880e9bc 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -119,8 +119,8 @@ class ImageProcessing(desc.CommandLineNode): ), desc.BoolParam( name='fillHoles', - label='Fill holes', - description='Fill holes.', + label='Fill Holes', + description='Fill holes based on the alpha channel.', value=False, uid=[0], ), From 23e96877d4676c44881bd55b07c36a77fd878ac2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 4 Sep 2020 17:58:39 +0200 Subject: [PATCH 0397/1093] [nodes] PanoramaWarping: improve wording and enable/disable percentUpscale --- meshroom/aliceVision/PanoramaWarping.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 8fbe6816a3..b53e7e1c03 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/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( From 0b6c4982e407ec3264652e3cbf8241b0222d04f4 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@interdigital.com> Date: Wed, 9 Sep 2020 13:25:52 +0200 Subject: [PATCH 0398/1093] [SfmTransfer] Copy intrinsics parameters --- meshroom/aliceVision/SfMTransfer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 3a112d52d6..caf0c30a24 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -34,9 +34,10 @@ class SfMTransfer(desc.CommandLineNode): description="Matching Method:\n" " * from_viewid: Align cameras with same view Id\n" " * from_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n" - " * from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n", + " * from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n" + " * from_intrinsicid: Copy intrinsics parameters\n", value='from_viewid', - values=['from_viewid', 'from_filepath', 'from_metadata'], + values=['from_viewid', 'from_filepath', 'from_metadata', 'from_intrinsicid'], exclusive=True, uid=[0], ), From d78088fb6fc63925cbbdca27a052427bf8803f7d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 10 Sep 2020 17:24:47 +0200 Subject: [PATCH 0399/1093] [nodes] PanoramaWarping: use a boolean parameter to estimate the resolution automatically --- meshroom/aliceVision/PanoramaWarping.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index b53e7e1c03..2fe96df17f 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -25,20 +25,27 @@ class PanoramaWarping(desc.CommandLineNode): value='', uid=[0], ), + desc.BoolParam( + name='estimateResolution', + label='Estimate Resolution', + description='Estimate output panorama resolution automatically based on the input images resolution.', + value=False, + uid=[0], + group=None, # skip group from command line + ), desc.IntParam( name='panoramaWidth', label='Panorama Width', - description='Panorama Width (in pixels).\n' - 'Set 0 to let the software choose the size automatically, based on "percentUpscale" parameter.', + description='Choose the output panorama width (in pixels).', value=10000, range=(0, 50000, 1000), - uid=[0] + uid=[0], + enabled=lambda node: (not node.estimateResolution.value), ), desc.IntParam( name='percentUpscale', label='Upscale ratio', - description='Upscale percent\n' - 'Only used if panorama width is set to 0 for automatic estimation.\n' + description='Percentage of upscaled pixels.\n' '\n' 'How many percent of the pixels will be upscaled (compared to its original resolution):\n' ' * 0: all pixels will be downscaled\n' @@ -46,7 +53,7 @@ class PanoramaWarping(desc.CommandLineNode): ' * 100: all pixels will be upscaled\n', value=50, range=(0, 100, 1), - enabled=lambda node: (node.panoramaWidth.value == 0), + enabled=lambda node: (node.estimateResolution.value), uid=[0] ), desc.ChoiceParam( From f87c6cd89c5106436142e169f8ed51485e697a05 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 10 Sep 2020 17:25:12 +0200 Subject: [PATCH 0400/1093] [nodes] PanoramaWarping: use automatic resolution by default --- meshroom/aliceVision/PanoramaWarping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 2fe96df17f..6ac38a9f53 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -29,7 +29,7 @@ class PanoramaWarping(desc.CommandLineNode): name='estimateResolution', label='Estimate Resolution', description='Estimate output panorama resolution automatically based on the input images resolution.', - value=False, + value=True, uid=[0], group=None, # skip group from command line ), From b10564a815040750bd4d7c38af283618ab326f68 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 10 Sep 2020 17:26:09 +0200 Subject: [PATCH 0401/1093] [nodes] LdrToHdrCalibration & PanoramaCompositing are compute intensive nodes --- meshroom/aliceVision/LdrToHdrCalibration.py | 3 +++ meshroom/aliceVision/PanoramaCompositing.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 6caacb8cb3..a93ca22634 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -27,6 +27,9 @@ class LdrToHdrCalibration(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrCalibration {allParams}' size = desc.DynamicNodeSize('input') + cpu = desc.Level.INTENSIVE + ram = desc.Level.NORMAL + documentation = ''' Calibrate LDR to HDR response curve from samples ''' diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 02368542e4..d4255737f8 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -10,6 +10,9 @@ class PanoramaCompositing(desc.CommandLineNode): commandLine = 'aliceVision_panoramaCompositing {allParams}' size = desc.DynamicNodeSize('input') + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE + documentation = ''' Once the images have been transformed geometrically (in PanoramaWarping), they have to be fused together in a single panorama image which looks like a single photography. From c402b1bfc572fcd79243ba42b67d970930570675 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 11 Sep 2020 13:04:16 +0200 Subject: [PATCH 0402/1093] [nodes] ImageProcessing: add new option to fix non finite pixels --- meshroom/aliceVision/ImageProcessing.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 6ae880e9bc..32298d8077 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -86,6 +86,13 @@ class ImageProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='fixNonFinite', + label='Fix Non-Finite', + description='Fix non-finite pixels based on neighboring pixels average.', + value=False, + uid=[0], + ), desc.BoolParam( name='exposureCompensation', label='Exposure Compensation', @@ -120,7 +127,8 @@ class ImageProcessing(desc.CommandLineNode): desc.BoolParam( name='fillHoles', label='Fill Holes', - description='Fill holes based on the alpha channel.', + description='Fill holes based on the alpha channel.\n' + 'Note: It will enable fixNonFinite, as it is required for the image pyramid construction used to fill holes.', value=False, uid=[0], ), From b7a9f23a3487e48f4470669c25847777ecca3a27 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 11 Sep 2020 21:25:42 +0200 Subject: [PATCH 0403/1093] [nodes] expose image storageDataType on some nodes --- meshroom/aliceVision/LdrToHdrMerge.py | 13 +++++++++++++ meshroom/aliceVision/PanoramaCompositing.py | 13 +++++++++++++ meshroom/aliceVision/PanoramaWarping.py | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index e206d3ba55..cd9b4632f2 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -140,6 +140,19 @@ class LdrToHdrMerge(desc.CommandLineNode): uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value and node.highlightCorrectionFactor.value != 0, ), + desc.ChoiceParam( + name='storageDataType', + label='Storage Data Type', + description='Storage image data type:\n' + ' * Float : Use full floating point (32 bits per channel)\n' + ' * Half : Use half float (16 bits per channel)\n' + ' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n' + ' * Auto : Use half float if all values can fit, else use full float\n', + value='Float', + values=['Float', 'Half', 'HalfFinite', 'Auto'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index d4255737f8..ae5997a193 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -64,6 +64,19 @@ class PanoramaCompositing(desc.CommandLineNode): value=True, uid=[0], ), + desc.ChoiceParam( + name='storageDataType', + label='Storage Data Type', + description='Storage image data type:\n' + ' * Float : Use full floating point (32 bits per channel)\n' + ' * Half : Use half float (16 bits per channel)\n' + ' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n' + ' * Auto : Use half float if all values can fit, else use full float\n', + value='Float', + values=['Float', 'Half', 'HalfFinite', 'Auto'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='overlayType', label='Overlay Type', diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 6ac38a9f53..e5dbe11416 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -56,6 +56,19 @@ class PanoramaWarping(desc.CommandLineNode): enabled=lambda node: (node.estimateResolution.value), uid=[0] ), + desc.ChoiceParam( + name='storageDataType', + label='Storage Data Type', + description='Storage image data type:\n' + ' * Float : Use full floating point (32 bits per channel)\n' + ' * Half : Use half float (16 bits per channel)\n' + ' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n' + ' * Auto : Use half float if all values can fit, else use full float\n', + value='Float', + values=['Float', 'Half', 'HalfFinite', 'Auto'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From db7e1bed09ac501005d6a84a3ae79f4a21cd0e06 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 14 Sep 2020 22:28:02 +0200 Subject: [PATCH 0404/1093] [nodes] use lowerCamelCase for storageDataType param values --- meshroom/aliceVision/LdrToHdrMerge.py | 32 ++++++++++----------- meshroom/aliceVision/PanoramaCompositing.py | 12 ++++---- meshroom/aliceVision/PanoramaWarping.py | 12 ++++---- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index cd9b4632f2..30357eee0d 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -123,18 +123,18 @@ class LdrToHdrMerge(desc.CommandLineNode): description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n' '\n' 'Some Outdoor Reference Light Levels:\n' - ' * 120,000 lux : Brightest sunlight\n' - ' * 110,000 lux : Bright sunlight\n' - ' * 20,000 lux : Shade illuminated by entire clear blue sky, midday\n' - ' * 1,000 lux : Typical overcast day, midday\n' - ' * 400 lux : Sunrise or sunset on a clear day\n' - ' * 40 lux : Fully overcast, sunset/sunrise\n' + ' * 120,000 lux: Brightest sunlight\n' + ' * 110,000 lux: Bright sunlight\n' + ' * 20,000 lux: Shade illuminated by entire clear blue sky, midday\n' + ' * 1,000 lux: Typical overcast day, midday\n' + ' * 400 lux: Sunrise or sunset on a clear day\n' + ' * 40 lux: Fully overcast, sunset/sunrise\n' '\n' 'Some Indoor Reference Light Levels:\n' - ' * 20000 lux : Max Usually Used Indoor\n' - ' * 750 lux : Supermarkets\n' - ' * 500 lux : Office Work\n' - ' * 150 lux : Home\n', + ' * 20000 lux: Max Usually Used Indoor\n' + ' * 750 lux: Supermarkets\n' + ' * 500 lux: Office Work\n' + ' * 150 lux: Home\n', value=120000.0, range=(1000.0, 150000.0, 1.0), uid=[0], @@ -144,12 +144,12 @@ class LdrToHdrMerge(desc.CommandLineNode): name='storageDataType', label='Storage Data Type', description='Storage image data type:\n' - ' * Float : Use full floating point (32 bits per channel)\n' - ' * Half : Use half float (16 bits per channel)\n' - ' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n' - ' * Auto : Use half float if all values can fit, else use full float\n', - value='Float', - values=['Float', 'Half', 'HalfFinite', 'Auto'], + ' * float: Use full floating point (32 bits per channel)\n' + ' * half: Use half float (16 bits per channel)\n' + ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' + ' * auto: Use half float if all values can fit, else use full float\n', + value='float', + values=['float', 'half', 'halfFinite', 'auto'], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index ae5997a193..7a754fe100 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -68,12 +68,12 @@ class PanoramaCompositing(desc.CommandLineNode): name='storageDataType', label='Storage Data Type', description='Storage image data type:\n' - ' * Float : Use full floating point (32 bits per channel)\n' - ' * Half : Use half float (16 bits per channel)\n' - ' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n' - ' * Auto : Use half float if all values can fit, else use full float\n', - value='Float', - values=['Float', 'Half', 'HalfFinite', 'Auto'], + ' * float: Use full floating point (32 bits per channel)\n' + ' * half: Use half float (16 bits per channel)\n' + ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' + ' * auto: Use half float if all values can fit, else use full float\n', + value='float', + values=['float', 'half', 'halfFinite', 'auto'], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index e5dbe11416..78fb9d8b8b 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -60,12 +60,12 @@ class PanoramaWarping(desc.CommandLineNode): name='storageDataType', label='Storage Data Type', description='Storage image data type:\n' - ' * Float : Use full floating point (32 bits per channel)\n' - ' * Half : Use half float (16 bits per channel)\n' - ' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n' - ' * Auto : Use half float if all values can fit, else use full float\n', - value='Float', - values=['Float', 'Half', 'HalfFinite', 'Auto'], + ' * float: Use full floating point (32 bits per channel)\n' + ' * half: Use half float (16 bits per channel)\n' + ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' + ' * auto: Use half float if all values can fit, else use full float\n', + value='float', + values=['float', 'half', 'halfFinite', 'auto'], exclusive=True, uid=[0], ), From c2b703aac5cf4b6416128dd6886f30d506d9e771 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 14 Sep 2020 22:28:24 +0200 Subject: [PATCH 0405/1093] [nodes] ImageProcessing: add storageDataType option --- meshroom/aliceVision/ImageProcessing.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 32298d8077..653a160055 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -288,6 +288,19 @@ class ImageProcessing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='storageDataType', + label='Storage Data Type for EXR output', + description='Storage image data type:\n' + ' * float: Use full floating point (32 bits per channel)\n' + ' * half: Use half float (16 bits per channel)\n' + ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' + ' * auto: Use half float if all values can fit, else use full float\n', + value='float', + values=['float', 'half', 'halfFinite', 'auto'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 87596dbbd144fd1390f44a4a9e548baa83155a1d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 20 Sep 2020 19:15:26 +0200 Subject: [PATCH 0406/1093] [nodes] PanoramaInit: add debug circle detection option --- meshroom/aliceVision/PanoramaInit.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 8ac5875641..a24e112a44 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -99,6 +99,15 @@ class PanoramaInit(desc.CommandLineNode): exclusive=True, uid=[0] ), + desc.BoolParam( + name='debugFisheyeCircleEstimation', + label='Debug Fisheye Circle Detection', + description='Debug fisheye circle detection.', + value=False, + uid=[0], + enabled=lambda node: node.useFisheye.value, + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From deb104894d60a3cf942675fdafa34e6d0b3a8861 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 28 Sep 2020 19:02:06 +0200 Subject: [PATCH 0407/1093] [nodes] PanoramaWarping: change default percentUpscale --- meshroom/aliceVision/PanoramaWarping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 78fb9d8b8b..708f3573c3 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -51,7 +51,7 @@ class PanoramaWarping(desc.CommandLineNode): ' * 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, + value=30, range=(0, 100, 1), enabled=lambda node: (node.estimateResolution.value), uid=[0] From d4ae71c6ee5613e4216dd3b87c24eaefe25ae5a8 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 30 Sep 2020 15:21:12 +0200 Subject: [PATCH 0408/1093] [nodes] PanoramaWarping: add maxPanoramaWidth --- meshroom/aliceVision/PanoramaWarping.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 708f3573c3..0bcb646e3a 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -51,11 +51,20 @@ class PanoramaWarping(desc.CommandLineNode): ' * 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=30, + value=50, range=(0, 100, 1), enabled=lambda node: (node.estimateResolution.value), uid=[0] ), + desc.IntParam( + name='maxPanoramaWidth', + label='Max Panorama Width', + description='Choose the maximal output panorama width (in pixels). Zero means no limit.', + value=35000, + range=(0, 100000, 1000), + uid=[0], + enabled=lambda node: (node.estimateResolution.value), + ), desc.ChoiceParam( name='storageDataType', label='Storage Data Type', From 4222c54b80245cf8f9f27c4b9ccb36f5406ff757 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 30 Sep 2020 15:24:05 +0200 Subject: [PATCH 0409/1093] [nodes] ldrToHdr: nbBrackets should invalidate UID instead of "userNbBrackets" (which is only an intermediate parameter used to compute "nbBrackets") --- meshroom/aliceVision/LdrToHdrCalibration.py | 6 +++--- meshroom/aliceVision/LdrToHdrMerge.py | 6 +++--- meshroom/aliceVision/LdrToHdrSampling.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index a93ca22634..752b2e5aa3 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" import json @@ -82,7 +82,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): description='Number of exposure brackets per HDR image (0 for automatic detection).', value=0, range=(0, 15, 1), - uid=[0], + uid=[], group='user', # not used directly on the command line ), desc.IntParam( @@ -91,7 +91,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', value=0, range=(0, 10, 1), - uid=[], + uid=[0], ), desc.IntParam( name='channelQuantizationPower', diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 30357eee0d..af6f043503 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" import json @@ -53,7 +53,7 @@ class LdrToHdrMerge(desc.CommandLineNode): description='Number of exposure brackets per HDR image (0 for automatic detection).', value=0, range=(0, 15, 1), - uid=[0], + uid=[], group='user', # not used directly on the command line ), desc.IntParam( @@ -62,7 +62,7 @@ class LdrToHdrMerge(desc.CommandLineNode): description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', value=0, range=(0, 10, 1), - uid=[], + uid=[0], ), desc.IntParam( name='offsetRefBracketIndex', diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index dc1578c488..7b22cded0a 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" import json @@ -63,7 +63,7 @@ class LdrToHdrSampling(desc.CommandLineNode): description='Number of exposure brackets per HDR image (0 for automatic detection).', value=0, range=(0, 15, 1), - uid=[0], + uid=[], group='user', # not used directly on the command line ), desc.IntParam( @@ -72,7 +72,7 @@ class LdrToHdrSampling(desc.CommandLineNode): description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', value=0, range=(0, 10, 1), - uid=[], + uid=[0], ), desc.BoolParam( name='byPass', From c8de65183cb269574c4688a0ea45e60d3b8443a1 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 30 Sep 2020 15:31:22 +0200 Subject: [PATCH 0410/1093] [nodes] LdrToHdrCalibration: add bypass option --- meshroom/aliceVision/LdrToHdrCalibration.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 752b2e5aa3..f625bce524 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -49,6 +49,15 @@ class LdrToHdrCalibration(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[0], ), + desc.BoolParam( + name='byPass', + label='Bypass', + description="Bypass HDR creation and use the medium bracket as the source for the next steps", + value=False, + uid=[0], + group='internal', + enabled= lambda node: node.nbBrackets.value != 1, + ), desc.ChoiceParam( name='calibrationMethod', label='Calibration Method', @@ -62,6 +71,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): value='debevec', exclusive=True, uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name='calibrationWeight', @@ -75,6 +85,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): values=['default', 'gaussian', 'triangle', 'plateau'], exclusive=True, uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='userNbBrackets', @@ -101,6 +112,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name='maxTotalPoints', @@ -112,6 +124,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): range=(8, 10000000, 1000), uid=[0], advanced=True, + enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name='verboseLevel', @@ -134,6 +147,11 @@ class LdrToHdrCalibration(desc.CommandLineNode): ) ] + def processChunk(self, chunk): + if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value: + return + super(LdrToHdrCalibration, self).processChunk(chunk) + @classmethod def update(cls, node): if not isinstance(node.nodeDesc, cls): From 3be54337dd06276b5aa01b1040d9f054b38cc2ac Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 30 Sep 2020 15:31:42 +0200 Subject: [PATCH 0411/1093] [nodes] LdrToHdrCalibration: update maxTotalPoints description --- meshroom/aliceVision/LdrToHdrCalibration.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index f625bce524..1be2cdd231 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -117,9 +117,8 @@ class LdrToHdrCalibration(desc.CommandLineNode): desc.IntParam( name='maxTotalPoints', label='Max Number of Points', - description='Max number of points selected by the sampling strategy.\n' - 'This ensures that this sampling step will extract a number of pixels values\n' - 'that the calibration step can manage (in term of computation time and memory usage).', + description='Max number of points used from the sampling. This ensures that the number of pixels values extracted by the sampling\n' + 'can be managed by the calibration step (in term of computation time and memory usage).', value=1000000, range=(8, 10000000, 1000), uid=[0], From da0dc180a6cbced36c50c6786e82ee85aef33cf2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 4 Nov 2020 16:31:05 +0100 Subject: [PATCH 0412/1093] [nodes] PanoramaInit: add direction in comment --- meshroom/aliceVision/PanoramaInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index a24e112a44..740f791a11 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -93,7 +93,7 @@ class PanoramaInit(desc.CommandLineNode): desc.ChoiceParam( name='inputAngle', label='input Angle offset', - description='Add a rotation to the input XML given poses.', + description='Add a rotation to the input XML given poses (CCW).', value='None', values=['None', 'rotate90', 'rotate180', 'rotate270'], exclusive=True, From 6e10e81d59aa889a96935fc1c712f04f8762d397 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 4 Nov 2020 16:31:30 +0100 Subject: [PATCH 0413/1093] [nodes] Add new FeatureRepeatability node --- meshroom/aliceVision/FeatureRepeatability.py | 130 +++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 meshroom/aliceVision/FeatureRepeatability.py diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py new file mode 100644 index 0000000000..fffcddf34f --- /dev/null +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -0,0 +1,130 @@ +__version__ = "1.1" + +from meshroom.core import desc + + +class FeatureRepeatability(desc.CommandLineNode): + commandLine = 'aliceVision_samples_repeatabilityDataset {allParams}' + size = desc.DynamicNodeSize('input') + # parallelization = desc.Parallelization(blockSize=40) + # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='Input Folder', + description='Input Folder with evaluation datasets.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['sift'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ChoiceParam( + name='describerPreset', + label='Describer Density', + description='Control the ImageDescriber density (low, medium, normal, high, ultra).\n' + 'Warning: Use ULTRA only on small datasets.', + value='normal', + values=['low', 'medium', 'normal', 'high', 'ultra'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='describerQuality', + label='Describer Quality', + description='Control the ImageDescriber quality (low, medium, normal, high, ultra).', + value='normal', + values=['low', 'medium', 'normal', 'high', 'ultra'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='contrastFiltering', + label='Contrast Filtering', + description="Contrast filtering method to ignore features with too low contrast that can be considered as noise:\n" + "* Static: Fixed threshold.\n" + "* AdaptiveToMedianVariance: Based on image content analysis.\n" + "* NoFiltering: Disable contrast filtering.\n" + "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" + "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" + "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n", + value='Static', + values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps'], + exclusive=True, + advanced=True, + uid=[0], + ), + desc.FloatParam( + name='relativePeakThreshold', + label='Relative Peak Threshold', + description='Peak Threshold relative to median of gradiants.', + value=0.01, + range=(0.01, 1.0, 0.001), + advanced=True, + uid=[0], + enabled=lambda node: (node.contrastFiltering.value == 'AdaptiveToMedianVariance'), + ), + desc.BoolParam( + name='gridFiltering', + label='Grid Filtering', + description='Enable grid filtering. Highly recommended to ensure usable number of features.', + value=True, + advanced=True, + uid=[0], + ), + desc.BoolParam( + name='forceCpuExtraction', + label='Force CPU Extraction', + description='Use only CPU feature extraction.', + value=True, + uid=[], + advanced=True, + ), + desc.IntParam( + name='invalidate', + label='Invalidate', + description='Invalidate.', + value=0, + range=(0, 10000, 1), + group="", + uid=[0], + ), + desc.StringParam( + name="comments", + label="Comments", + description="Comments", + value="", + group="", + uid=[], + ), + 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 Folder', + description='Output path for the features and descriptors files (*.feat, *.desc).', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 5566f90c8a654308c14533e9210c2b1caaf74cbd Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 4 Nov 2020 16:32:12 +0100 Subject: [PATCH 0414/1093] [nodes] FeatureExtraction: expose more options --- meshroom/aliceVision/FeatureExtraction.py | 65 ++++++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index a18537787a..a73381f26a 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -49,13 +49,57 @@ class FeatureExtraction(desc.CommandLineNode): ), desc.ChoiceParam( name='describerPreset', - label='Describer Preset', - description='Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration "ultra" can take long time !', + label='Describer Density', + description='Control the ImageDescriber density (low, medium, normal, high, ultra).\n' + 'Warning: Use ULTRA only on small datasets.', value='normal', values=['low', 'medium', 'normal', 'high', 'ultra'], exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='describerQuality', + label='Describer Quality', + description='Control the ImageDescriber quality (low, medium, normal, high, ultra).', + value='normal', + values=['low', 'medium', 'normal', 'high', 'ultra'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='contrastFiltering', + label='Contrast Filtering', + description="Contrast filtering method to ignore features with too low contrast that can be considered as noise:\n" + "* Static: Fixed threshold.\n" + "* AdaptiveToMedianVariance: Based on image content analysis.\n" + "* NoFiltering: Disable contrast filtering.\n" + "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" + "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" + "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n", + value='Static', + values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps'], + exclusive=True, + advanced=True, + uid=[0], + ), + desc.FloatParam( + name='relativePeakThreshold', + label='Relative Peak Threshold', + description='Peak Threshold relative to median of gradiants.', + value=0.01, + range=(0.01, 1.0, 0.001), + advanced=True, + uid=[0], + enabled=lambda node: (node.contrastFiltering.value == 'AdaptiveToMedianVariance'), + ), + desc.BoolParam( + name='gridFiltering', + label='Grid Filtering', + description='Enable grid filtering. Highly recommended to ensure usable number of features.', + value=True, + advanced=True, + uid=[0], + ), desc.BoolParam( name='forceCpuExtraction', label='Force CPU Extraction', @@ -73,6 +117,23 @@ class FeatureExtraction(desc.CommandLineNode): uid=[], advanced=True, ), + desc.IntParam( + name='invalidate', + label='Invalidate', + description='Invalidate.', + value=0, + range=(0, 10000, 1), + group="", + uid=[0], + ), + desc.StringParam( + name="comments", + label="Comments", + description="Comments", + value="", + group="", + uid=[], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 0b0029691c0f818b95387ae342a40c203d71e8c0 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 20 Nov 2020 18:00:22 +0100 Subject: [PATCH 0415/1093] [nodes] add feature type: dsp-sift --- meshroom/aliceVision/FeatureExtraction.py | 2 +- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/FeatureRepeatability.py | 2 +- meshroom/aliceVision/GlobalSfM.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index a73381f26a..34a9b2fd18 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -42,7 +42,7 @@ class FeatureExtraction(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 9ffcca0045..addc6c3204 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -63,7 +63,7 @@ class FeatureMatching(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index fffcddf34f..c0dd167b66 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -25,7 +25,7 @@ class FeatureRepeatability(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index fb06535161..49410fea08 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -52,7 +52,7 @@ class GlobalSfM(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 7fa6c194a1..878db32b89 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -97,7 +97,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', From 14fa977666f8b9f0ab6c1203e15b9f8d6961dbf2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 20 Nov 2020 18:01:37 +0100 Subject: [PATCH 0416/1093] [nodes] FeatureExtraction: add NonExtremaFiltering filtering --- meshroom/aliceVision/FeatureExtraction.py | 5 +++-- meshroom/aliceVision/FeatureRepeatability.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 34a9b2fd18..88bbe36808 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -75,9 +75,10 @@ class FeatureExtraction(desc.CommandLineNode): "* NoFiltering: Disable contrast filtering.\n" "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" - "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n", + "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" + "* NonExtremaFiltering: Filter non-extrema peakValues.\n", value='Static', - values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps'], + values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps', 'NonExtremaFiltering'], exclusive=True, advanced=True, uid=[0], diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index c0dd167b66..746ba551a0 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -58,9 +58,10 @@ class FeatureRepeatability(desc.CommandLineNode): "* NoFiltering: Disable contrast filtering.\n" "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" - "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n", + "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" + "* NonExtremaFiltering: Filter non-extrema peakValues.\n", value='Static', - values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps'], + values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps', 'NonExtremaFiltering'], exclusive=True, advanced=True, uid=[0], From 83155ddaf769b0fd52899fa7c24568fc68ac320c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 20 Nov 2020 18:03:02 +0100 Subject: [PATCH 0417/1093] [nodes] FeatureExtraction: add custom maxNbFeatures option --- meshroom/aliceVision/FeatureExtraction.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 88bbe36808..06feadce60 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -53,9 +53,20 @@ class FeatureExtraction(desc.CommandLineNode): description='Control the ImageDescriber density (low, medium, normal, high, ultra).\n' 'Warning: Use ULTRA only on small datasets.', value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + values=['low', 'medium', 'normal', 'high', 'ultra', 'custom'], exclusive=True, uid=[0], + group=lambda node: 'allParams' if node.describerPreset.value != 'custom' else None, + ), + desc.IntParam( + name='maxNbFeatures', + label='Max Nb Features', + description='Max number of features extracted (0 means default value based on Describer Density).', + value=0, + range=(0, 100000, 1000), + uid=[0], + advanced=True, + enabled=lambda node: (node.describerPreset.value == 'custom'), ), desc.ChoiceParam( name='describerQuality', From 5ad193454c8bf864b6943a8d21740c55e86b0714 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Mon, 23 Nov 2020 08:05:40 +0100 Subject: [PATCH 0418/1093] [camerainit] add a boolean for white balance use --- meshroom/aliceVision/CameraInit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 4d72b8a999..1f50942af8 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -188,6 +188,13 @@ class CameraInit(desc.CommandLineNode): joinChar=',', advanced=True, ), + desc.BoolParam( + name='useInternalWhiteBalance', + label='Apply internal white balance', + description='Apply image white balance (Only for raw images)', + value=True, + uid=[0], + ), desc.ChoiceParam( name='viewIdMethod', label='ViewId Method', From 2828b31547318ac716cc3df3134952acbe35910c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Nov 2020 15:23:41 +0100 Subject: [PATCH 0419/1093] [nodes] add dspsift on all nodes using features --- meshroom/aliceVision/CameraLocalization.py | 2 +- meshroom/aliceVision/CameraRigCalibration.py | 2 +- meshroom/aliceVision/ConvertSfMFormat.py | 2 +- meshroom/aliceVision/ExportMatches.py | 2 +- meshroom/aliceVision/PanoramaEstimation.py | 2 +- meshroom/aliceVision/SfMTransform.py | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 0900282747..08a14e412c 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -41,7 +41,7 @@ class CameraLocalization(desc.CommandLineNode): label='Match Desc Types', description='''Describer types to use for the matching.''', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 67ea8730f5..fe189d082f 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -48,7 +48,7 @@ class CameraRigCalibration(desc.CommandLineNode): label='Match Describer Types', description='''The describer types to use for the matching''', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 2ffc80225b..687ad5c496 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -35,7 +35,7 @@ class ConvertSfMFormat(desc.CommandLineNode): label='Describer Types', description='Describer types to keep.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'unknown'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'unknown'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 8df3b39181..53525165df 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -20,7 +20,7 @@ class ExportMatches(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 23dac100cc..b89ae370da 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -51,7 +51,7 @@ class PanoramaEstimation(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 18b0324e66..3bd2f006d0 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -112,8 +112,8 @@ class SfMTransform(desc.CommandLineNode): joinChar="," ), desc.FloatParam( - name="manualScale", - label="Scale", + name="manualScale", + label="Scale", description="Uniform Scale.", value=1.0, uid=[0], @@ -127,8 +127,8 @@ class SfMTransform(desc.CommandLineNode): name='landmarksDescriberTypes', label='Landmarks Describer Types', description='Image describer types used to compute the mean of the point cloud. (only for "landmarks" method).', - value=['sift', 'akaze'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + value=['sift', 'dspsift', 'akaze'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'unknown'], exclusive=False, uid=[0], joinChar=',', From f834f1725309de72c170b6a28b7c0478e54fb450 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Nov 2020 22:17:40 +0100 Subject: [PATCH 0420/1093] [nodes] FeatureExtraction: GridSort filtering by default --- meshroom/aliceVision/FeatureExtraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 06feadce60..f534c6a4af 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -88,7 +88,7 @@ class FeatureExtraction(desc.CommandLineNode): "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" "* NonExtremaFiltering: Filter non-extrema peakValues.\n", - value='Static', + value='GridSort', values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps', 'NonExtremaFiltering'], exclusive=True, advanced=True, From 6bd385993b5962fdaee05630d26d36d059d91b60 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 23 Nov 2020 22:17:55 +0100 Subject: [PATCH 0421/1093] [nodes] FeatureExtraction: remove dev params --- meshroom/aliceVision/FeatureExtraction.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index f534c6a4af..923ed7ee9f 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -129,23 +129,6 @@ class FeatureExtraction(desc.CommandLineNode): uid=[], advanced=True, ), - desc.IntParam( - name='invalidate', - label='Invalidate', - description='Invalidate.', - value=0, - range=(0, 10000, 1), - group="", - uid=[0], - ), - desc.StringParam( - name="comments", - label="Comments", - description="Comments", - value="", - group="", - uid=[], - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 8f42fbcc450e7e87ea814be2be9761a846264819 Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Sun, 20 Dec 2020 21:57:21 +0100 Subject: [PATCH 0422/1093] Update LdrToHdrSampling.py --- meshroom/aliceVision/LdrToHdrSampling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 7b22cded0a..8c86246653 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -24,10 +24,10 @@ def findMetadata(d, keys, defaultValue): class DividedInputNodeSize(desc.DynamicNodeSize): - """ + ''' The LDR2HDR will reduce the amount of views in the SfMData. This class converts the number of LDR input views into the number of HDR output views. - """ + ''' def __init__(self, param, divParam): super(DividedInputNodeSize, self).__init__(param) self._divParam = divParam From 663527d470c0ddd1c0cb02ced0fa27430b0470b0 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 28 Dec 2020 17:34:32 +0100 Subject: [PATCH 0423/1093] [multiview] connect common attributes in LdrToHdr* nodes --- meshroom/aliceVision/LdrToHdrCalibration.py | 34 ++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 1be2cdd231..2c16734e77 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -49,6 +49,23 @@ class LdrToHdrCalibration(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[0], ), + desc.IntParam( + name='userNbBrackets', + label='Number of Brackets', + description='Number of exposure brackets per HDR image (0 for automatic detection).', + value=0, + range=(0, 15, 1), + uid=[], + group='user', # not used directly on the command line + ), + desc.IntParam( + name='nbBrackets', + label='Automatic Nb Brackets', + description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + value=0, + range=(0, 10, 1), + uid=[0], + ), desc.BoolParam( name='byPass', label='Bypass', @@ -87,23 +104,6 @@ class LdrToHdrCalibration(desc.CommandLineNode): uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), - desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', - value=0, - range=(0, 15, 1), - uid=[], - group='user', # not used directly on the command line - ), - desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', - value=0, - range=(0, 10, 1), - uid=[0], - ), desc.IntParam( name='channelQuantizationPower', label='Channel Quantization Power', From b791b175d9bdb284ac0defb08a8c5c6c2e59d802 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 31 Dec 2020 14:11:32 +0100 Subject: [PATCH 0424/1093] [nodes] PanoramaWarping: fix missing Camel Case in label --- meshroom/aliceVision/PanoramaWarping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 0bcb646e3a..37642eacfb 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -44,7 +44,7 @@ class PanoramaWarping(desc.CommandLineNode): ), desc.IntParam( name='percentUpscale', - label='Upscale ratio', + label='Upscale Ratio', description='Percentage of upscaled pixels.\n' '\n' 'How many percent of the pixels will be upscaled (compared to its original resolution):\n' From 5332c9731a92eda56c46df0937995fcf7d62083d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 15 Jan 2021 10:55:24 +0100 Subject: [PATCH 0425/1093] [nodes] PanoramaInit: init camera poses --- meshroom/aliceVision/PanoramaInit.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 740f791a11..29c83fe1fc 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -27,12 +27,37 @@ class PanoramaInit(desc.CommandLineNode): value='', uid=[0], ), + desc.ChoiceParam( + name='initializeCameras', + label='Initialize Cameras', + description='Initialize cameras.', + value='No', + values=['No', 'File', 'Horizontal', 'Horizontal+Nadir', 'Nadir+Horizontal', 'Spherical'], + exclusive=True, + uid=[0], + ), desc.File( name='config', label='Xml Config', description="XML Data File", value='', uid=[0], + enabled=lambda node: node.initializeCameras.value == 'File', + ), + desc.ListAttribute( + elementDesc=desc.IntParam( + name='nbViews', + label='', + description='', + value=-1, + range=[-1, 20], + uid=[0], + ), + name='nbViewsPerLine', + label='Spherical: Nb Views Per Line', + description='Number of views per line in Spherical acquisition. Assumes angles from [-90°,+90°] for pitch and [-180°,+180°] for yaw. Use -1 to estimate the number of images automatically.', + joinChar=',', + enabled=lambda node: node.initializeCameras.value == 'Spherical', ), desc.ListAttribute( elementDesc=desc.File( From a6632e64c73bfbd73eb6c3ffc4349206b914e388 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 15 Jan 2021 14:27:46 +0100 Subject: [PATCH 0426/1093] [nodes] PanoramaInit: add yawCW param --- meshroom/aliceVision/PanoramaInit.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 29c83fe1fc..4173ad4297 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -44,6 +44,14 @@ class PanoramaInit(desc.CommandLineNode): uid=[0], enabled=lambda node: node.initializeCameras.value == 'File', ), + desc.BoolParam( + name='yawCW', + label='Yaw CW', + description="Yaw ClockWise or CounterClockWise", + value=1, + uid=[0], + enabled=lambda node: ('Horizontal' in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), + ), desc.ListAttribute( elementDesc=desc.IntParam( name='nbViews', From b100546984135e9f1163e62040385f30eb63ced9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 18 Jan 2021 15:37:49 +0100 Subject: [PATCH 0427/1093] [nodes] LdrToHdr: enable highlights boolean option --- meshroom/aliceVision/LdrToHdrMerge.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index af6f043503..e1b1c88cfb 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -104,6 +104,15 @@ class LdrToHdrMerge(desc.CommandLineNode): advanced=True, enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), + desc.BoolParam( + name='enableHighlight', + label='Enable Highlight', + description="Enable highlights correction.", + value=True, + uid=[0], + group='user', # not used directly on the command line + enabled= lambda node: node.byPass.enabled and not node.byPass.value, + ), desc.FloatParam( name='highlightCorrectionFactor', label='Highlights Correction', @@ -115,7 +124,7 @@ class LdrToHdrMerge(desc.CommandLineNode): value=1.0, range=(0.0, 1.0, 0.01), uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value, ), desc.FloatParam( name='highlightTargetLux', @@ -138,7 +147,7 @@ class LdrToHdrMerge(desc.CommandLineNode): value=120000.0, range=(1000.0, 150000.0, 1.0), uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value and node.highlightCorrectionFactor.value != 0, + enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( name='storageDataType', From af0316e1f105c0b848c2d54370e6c5620207f9cf Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 18 Jan 2021 15:38:35 +0100 Subject: [PATCH 0428/1093] [nodes] PanoramaEstimation: new option to filter tracks This option disables tracks filtering by default. --- meshroom/aliceVision/PanoramaEstimation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index b89ae370da..449bfa3b89 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -98,6 +98,13 @@ class PanoramaEstimation(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='filterMatches', + label='Filter Matches', + description='Filter Matches', + value=False, + uid=[0], + ), desc.BoolParam( name='refine', label='Refine', From e78d037de1e7ac3011b3fc5730468a45440b1ee4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 18 Jan 2021 17:31:29 +0100 Subject: [PATCH 0429/1093] [nodes] PanoramaInit: init cameras with zenith option --- meshroom/aliceVision/PanoramaInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 4173ad4297..c95fe6ff04 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -32,7 +32,7 @@ class PanoramaInit(desc.CommandLineNode): label='Initialize Cameras', description='Initialize cameras.', value='No', - values=['No', 'File', 'Horizontal', 'Horizontal+Nadir', 'Nadir+Horizontal', 'Spherical'], + values=['No', 'File', 'Horizontal', 'Horizontal+Zenith', 'Zenith+Horizontal', 'Spherical'], exclusive=True, uid=[0], ), From e9f5ab1e246d4b4b3b4b7dd59bfc560e3bc53cd5 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 18 Jan 2021 19:05:07 +0100 Subject: [PATCH 0430/1093] [nodes] PanoramaEstimation: add rotation averaging weighting option --- meshroom/aliceVision/PanoramaEstimation.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 449bfa3b89..1cc147fa92 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -98,6 +98,14 @@ class PanoramaEstimation(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='rotationAveragingWeighting', + label='Rotation Averaging Weighting', + description='Rotation averaging weighting based on the number of feature matches.', + value=True, + uid=[0], + advanced=True, + ), desc.BoolParam( name='filterMatches', label='Filter Matches', From c3f0fea7289a631f527594e83d0f211f468efc48 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Fri, 6 Nov 2020 17:50:04 +0100 Subject: [PATCH 0431/1093] [panorama] Add a cache folder --- meshroom/aliceVision/PanoramaCompositing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 7a754fe100..e782f3e569 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -28,6 +28,13 @@ class PanoramaCompositing(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='cacheFolder', + label='Cache Folder', + description="Temporary cache directory", + value='', + uid=[0], + ), desc.File( name='warpingFolder', label='Warping Folder', From cb2539b8dff86a4b21f733e7b8e6bb183ca53cd8 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 8 Dec 2020 12:10:13 +0100 Subject: [PATCH 0432/1093] [nodes] PanoramaCompositing: add optional custom cache folder --- meshroom/aliceVision/PanoramaCompositing.py | 23 ++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index e782f3e569..8485e4fd55 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -28,13 +28,6 @@ class PanoramaCompositing(desc.CommandLineNode): value='', uid=[0], ), - desc.File( - name='cacheFolder', - label='Cache Folder', - description="Temporary cache directory", - value='', - uid=[0], - ), desc.File( name='warpingFolder', label='Warping Folder', @@ -98,6 +91,15 @@ class PanoramaCompositing(desc.CommandLineNode): advanced=True, uid=[0] ), + desc.File( + name='customCacheFolder', + label='Cache Folder', + description="Temporary cache directory", + value='', + uid=[0], + group='', + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -117,4 +119,11 @@ class PanoramaCompositing(desc.CommandLineNode): value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', uid=[], ), + desc.File( + name='cacheFolder', + label='Cache Folder', + description='Temporary cache directory', + value=lambda attr: attr.node.customCacheFolder.value if attr.node.customCacheFolder.value else (desc.Node.internalFolder + 'cache/'), + uid=[], + ), ] From 206a63e50acf1aa30e5fa7ede1a62c16dc7f2ec1 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Mon, 14 Dec 2020 15:06:09 +0100 Subject: [PATCH 0433/1093] [panorama] new method for large panoramas --- meshroom/aliceVision/PanoramaCompositing.py | 36 +---------- meshroom/aliceVision/PanoramaSeams.py | 68 +++++++++++++++++++++ 2 files changed, 71 insertions(+), 33 deletions(-) create mode 100644 meshroom/aliceVision/PanoramaSeams.py diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 8485e4fd55..ca52ad51aa 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -10,6 +10,7 @@ class PanoramaCompositing(desc.CommandLineNode): commandLine = 'aliceVision_panoramaCompositing {allParams}' size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=5) cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE @@ -35,16 +36,6 @@ class PanoramaCompositing(desc.CommandLineNode): value='', uid=[0], ), - desc.ChoiceParam( - name='outputFileType', - label='Output File Type', - description='Output file type for the undistorted images.', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], - exclusive=True, - uid=[0], - group='', # not part of allParams, as this is not a parameter for the command line - ), desc.ChoiceParam( name='compositerType', label='Compositer Type', @@ -57,13 +48,6 @@ class PanoramaCompositing(desc.CommandLineNode): exclusive=True, uid=[0] ), - desc.BoolParam( - name='useGraphCut', - label='Use Smart Seams', - description='Use a graphcut algorithm to optmize seams for better transitions between images.', - value=True, - uid=[0], - ), desc.ChoiceParam( name='storageDataType', label='Storage Data Type', @@ -77,20 +61,6 @@ class PanoramaCompositing(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.ChoiceParam( - name='overlayType', - label='Overlay Type', - description='Overlay on top of panorama to analyze transitions:\n' - ' * none: no overlay\n' - ' * borders: display image borders\n' - ' * seams: display transitions between images\n' - ' * all: display borders and seams\n', - value='none', - values=['none', 'borders', 'seams', 'all'], - exclusive=True, - advanced=True, - uid=[0] - ), desc.File( name='customCacheFolder', label='Cache Folder', @@ -114,9 +84,9 @@ class PanoramaCompositing(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Panorama', + label='Output Folder', description='', - value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', + value=desc.Node.internalFolder, uid=[], ), desc.File( diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py new file mode 100644 index 0000000000..5ada2ad37a --- /dev/null +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -0,0 +1,68 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class PanoramaSeams(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaSeams {allParams}' + size = desc.DynamicNodeSize('input') + + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE + + documentation = ''' +Estimate the seams lines between the inputs to provide an optimal compositing in a further node +''' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description="Input SfMData.", + value='', + uid=[0], + ), + desc.File( + name='warpingFolder', + label='Warping Folder', + description="Panorama Warping results", + value='', + uid=[0], + ), + desc.BoolParam( + name='useGraphCut', + label='Use Smart Seams', + description='Use a graphcut algorithm to optmize seams for better transitions between images.', + value=True, + 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=[], + ), + desc.File( + name='cacheFolder', + label='Cache Folder', + description='Temporary cache directory', + value="", + uid=[], + ) + ] + + outputs = [ + desc.File( + name='output', + label='Output Labels', + description='', + value=desc.Node.internalFolder + 'labels.exr', + uid=[], + ) + ] From 6f20de3e32b6c0df5d80412d39cc276f9ccfd809 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Tue, 15 Dec 2020 14:01:09 +0100 Subject: [PATCH 0434/1093] [panorama] error in compositing parrallelization --- meshroom/aliceVision/PanoramaCompositing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index ca52ad51aa..0695b3dc5b 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -11,6 +11,8 @@ class PanoramaCompositing(desc.CommandLineNode): size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=5) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE From 84a43a5055dfc53c867726d9fa6b3e93ab90cc2b Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Thu, 17 Dec 2020 13:16:56 +0100 Subject: [PATCH 0435/1093] [panorama] replace rangeStart with rangeIteration --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 0695b3dc5b..11c8d7dc8b 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -11,7 +11,7 @@ class PanoramaCompositing(desc.CommandLineNode): size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=5) - commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + commandLineRange = '--rangeIteration {rangeIteration} --rangeSize {rangeBlockSize}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE From 4b2235e7d1e468296c311c12eed9bb709a430292 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Thu, 17 Dec 2020 16:26:53 +0100 Subject: [PATCH 0436/1093] [panorama] add Panorama Merging node --- meshroom/aliceVision/PanoramaCompositing.py | 18 +---- meshroom/aliceVision/PanoramaMerging.py | 75 +++++++++++++++++++++ 2 files changed, 76 insertions(+), 17 deletions(-) create mode 100644 meshroom/aliceVision/PanoramaMerging.py diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 11c8d7dc8b..a7f284b4d3 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -63,15 +63,6 @@ class PanoramaCompositing(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.File( - name='customCacheFolder', - label='Cache Folder', - description="Temporary cache directory", - value='', - uid=[0], - group='', - advanced=True, - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -90,12 +81,5 @@ class PanoramaCompositing(desc.CommandLineNode): description='', value=desc.Node.internalFolder, uid=[], - ), - desc.File( - name='cacheFolder', - label='Cache Folder', - description='Temporary cache directory', - value=lambda attr: attr.node.customCacheFolder.value if attr.node.customCacheFolder.value else (desc.Node.internalFolder + 'cache/'), - uid=[], - ), + ) ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py new file mode 100644 index 0000000000..4be405dda7 --- /dev/null +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -0,0 +1,75 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class PanoramaMerging(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaMerging {allParams}' + size = desc.DynamicNodeSize('input') + + + documentation = ''' +Merge all inputs coming from PanoramaComposiring +''' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description="Input SfMData.", + value='', + uid=[0], + ), + desc.File( + name='compositingFolder', + label='compositing Folder', + description="Panorama Compositing results", + value='', + uid=[0], + ), + desc.ChoiceParam( + name='outputFileType', + label='Output File Type', + description='Output file type for the undistorted images.', + value='exr', + values=['jpg', 'png', 'tif', 'exr'], + exclusive=True, + uid=[0], + group='', # not part of allParams, as this is not a parameter for the command line + ), + desc.ChoiceParam( + name='storageDataType', + label='Storage Data Type', + description='Storage image data type:\n' + ' * float: Use full floating point (32 bits per channel)\n' + ' * half: Use half float (16 bits per channel)\n' + ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' + ' * auto: Use half float if all values can fit, else use full float\n', + value='float', + values=['float', 'half', 'halfFinite', 'auto'], + exclusive=True, + 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='outputPanorama', + label='Output Folder', + description='', + value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', + uid=[], + ), + ] From f65f0b1f72533dab8b7908497aeb2c213c217bb1 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Fri, 18 Dec 2020 11:19:41 +0100 Subject: [PATCH 0437/1093] [panorama] enable panorama compositing multi threading --- meshroom/aliceVision/PanoramaCompositing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index a7f284b4d3..e811b7eb9b 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -50,6 +50,15 @@ class PanoramaCompositing(desc.CommandLineNode): exclusive=True, uid=[0] ), + desc.IntParam( + name='maxThreads', + label='Max Nb Threads', + description='Specifies the maximum number of threads to run simultaneously.', + value=1, + range=(1, 48, 1), + uid=[], + advanced=True, + ), desc.ChoiceParam( name='storageDataType', label='Storage Data Type', From 91a78e845be1ecf82ec955cab4143bfd63a5fed2 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Mon, 11 Jan 2021 11:37:49 +0100 Subject: [PATCH 0438/1093] [panorama] flag for graphcut --- meshroom/aliceVision/PanoramaSeams.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 5ada2ad37a..a890a584d7 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -47,13 +47,6 @@ class PanoramaSeams(desc.CommandLineNode): values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], exclusive=True, uid=[], - ), - desc.File( - name='cacheFolder', - label='Cache Folder', - description='Temporary cache directory', - value="", - uid=[], ) ] From 069f328efb30611c3e17a862e904f42cf3298ef1 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Mon, 11 Jan 2021 12:15:11 +0100 Subject: [PATCH 0439/1093] [panoramaCompositing] add label image field --- meshroom/aliceVision/PanoramaCompositing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index e811b7eb9b..14cd8deaa0 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -38,6 +38,13 @@ class PanoramaCompositing(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='labels', + label='Labels image', + description="Panorama Seams results", + value='', + uid=[0], + ), desc.ChoiceParam( name='compositerType', label='Compositer Type', From 4be1cc90eb7fc7ced5e522b575b3815c2c5168b2 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Tue, 19 Jan 2021 11:28:47 +0100 Subject: [PATCH 0440/1093] [panorama] add debug capacities --- meshroom/aliceVision/PanoramaCompositing.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 14cd8deaa0..0d907bca4a 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -79,6 +79,20 @@ class PanoramaCompositing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='overlayType', + label='Overlay Type', + description='Overlay on top of panorama to analyze transitions:\n' + ' * none: no overlay\n' + ' * borders: display image borders\n' + ' * seams: display transitions between images\n' + ' * all: display borders and seams\n', + value='none', + values=['none', 'borders', 'seams', 'all'], + exclusive=True, + advanced=True, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From c2d882f79196a7a98db74d385dac2161e941625f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 26 Jan 2021 19:14:12 +0100 Subject: [PATCH 0441/1093] [nodes] PanoramaSeams: new maxWidth parameter --- meshroom/aliceVision/PanoramaSeams.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index a890a584d7..389c0eb408 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -32,6 +32,14 @@ class PanoramaSeams(desc.CommandLineNode): value='', uid=[0], ), + desc.IntParam( + name='maxWidth', + label='Max Resolution', + description='Maximal resolution for the panorama seams estimation.', + value=5000, + range=(0, 100000, 1), + uid=[0], + ), desc.BoolParam( name='useGraphCut', label='Use Smart Seams', From 76fe8cc640e8fe3f7ae816dd565d82b5312e475b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 27 Jan 2021 14:17:38 +0100 Subject: [PATCH 0442/1093] [nodes] remove non-ascii --- meshroom/aliceVision/PanoramaInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index c95fe6ff04..458cb82d19 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -63,7 +63,7 @@ class PanoramaInit(desc.CommandLineNode): ), name='nbViewsPerLine', label='Spherical: Nb Views Per Line', - description='Number of views per line in Spherical acquisition. Assumes angles from [-90°,+90°] for pitch and [-180°,+180°] for yaw. Use -1 to estimate the number of images automatically.', + description='Number of views per line in Spherical acquisition. Assumes angles from [-90,+90deg] for pitch and [-180,+180deg] for yaw. Use -1 to estimate the number of images automatically.', joinChar=',', enabled=lambda node: node.initializeCameras.value == 'Spherical', ), From da66f5fb61c683fcdea56975d9b362e9e38073b5 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 27 Jan 2021 14:18:10 +0100 Subject: [PATCH 0443/1093] [nodes] PanoramaCompositing: maxThread to 0 by default --- meshroom/aliceVision/PanoramaCompositing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 0d907bca4a..d6d743a421 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -12,7 +12,7 @@ class PanoramaCompositing(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=5) commandLineRange = '--rangeIteration {rangeIteration} --rangeSize {rangeBlockSize}' - + cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE @@ -61,8 +61,8 @@ class PanoramaCompositing(desc.CommandLineNode): name='maxThreads', label='Max Nb Threads', description='Specifies the maximum number of threads to run simultaneously.', - value=1, - range=(1, 48, 1), + value=0, + range=(0, 48, 1), uid=[], advanced=True, ), From 95144515c832088fb1d5b17017f936fe8189353a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 27 Jan 2021 14:18:30 +0100 Subject: [PATCH 0444/1093] [nodes] PanoramaMerging: add ram requirements --- meshroom/aliceVision/PanoramaMerging.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 4be405dda7..72ed3b7ed6 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -10,6 +10,9 @@ class PanoramaMerging(desc.CommandLineNode): commandLine = 'aliceVision_panoramaMerging {allParams}' size = desc.DynamicNodeSize('input') + cpu = desc.Level.NORMAL + ram = desc.Level.INTENSIVE + documentation = ''' Merge all inputs coming from PanoramaComposiring From 867f944d33ef0835bf2f307ede5b5aa113088430 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 27 Jan 2021 14:19:16 +0100 Subject: [PATCH 0445/1093] [nodes] PanoramaWarping: change maxPanoramaWidth to 70k --- meshroom/aliceVision/PanoramaWarping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 37642eacfb..de25238b75 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -60,7 +60,7 @@ class PanoramaWarping(desc.CommandLineNode): name='maxPanoramaWidth', label='Max Panorama Width', description='Choose the maximal output panorama width (in pixels). Zero means no limit.', - value=35000, + value=70000, range=(0, 100000, 1000), uid=[0], enabled=lambda node: (node.estimateResolution.value), From d464c44779d9a4e769844529acfad75cb93bdeb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 28 Jan 2021 11:40:51 +0100 Subject: [PATCH 0446/1093] [nodes] Meshing: Add `addMaskHelperPoints` option --- meshroom/aliceVision/Meshing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 29cb664f2d..45c73e2685 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -317,6 +317,14 @@ class Meshing(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='addMaskHelperPoints', + label='Add Mask Helper Points', + description='Add Helper points on the outline of the depth maps masks.', + value=False, + uid=[0], + advanced=True, + ), desc.BoolParam( name='saveRawDensePointCloud', label='Save Raw Dense Point Cloud', From 5fd7d4954c5e49a570f410b2df5db9acde6c3706 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 28 Jan 2021 13:08:34 +0100 Subject: [PATCH 0447/1093] [nodes] PanoramaCompositing: limit max nb threads --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index d6d743a421..e5270c6646 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -61,7 +61,7 @@ class PanoramaCompositing(desc.CommandLineNode): name='maxThreads', label='Max Nb Threads', description='Specifies the maximum number of threads to run simultaneously.', - value=0, + value=4, range=(0, 48, 1), uid=[], advanced=True, From cbfe248f1e904dbd678b4ccd0c9090c545aaa920 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 28 Jan 2021 13:08:59 +0100 Subject: [PATCH 0448/1093] [nodes] LdrToHdrMerge: disable highlight corrections --- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index e1b1c88cfb..b22a25650e 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -108,7 +108,7 @@ class LdrToHdrMerge(desc.CommandLineNode): name='enableHighlight', label='Enable Highlight', description="Enable highlights correction.", - value=True, + value=False, uid=[0], group='user', # not used directly on the command line enabled= lambda node: node.byPass.enabled and not node.byPass.value, From 0d312adc92e7a887b35689f422f609e448fdafc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 1 Feb 2021 01:19:55 +0100 Subject: [PATCH 0449/1093] [nodes] Add `MergeMeshes` node --- meshroom/aliceVision/MergeMeshes.py | 67 +++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 meshroom/aliceVision/MergeMeshes.py diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py new file mode 100644 index 0000000000..483d92c6e8 --- /dev/null +++ b/meshroom/aliceVision/MergeMeshes.py @@ -0,0 +1,67 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class MergeMeshes(desc.CommandLineNode): + commandLine = 'aliceVision_utils_mergeMeshes {allParams}' + documentation = '''This node allows to merge two meshes in one.''' + + inputs = [ + desc.File( + name='inputFirstMesh', + label='Input First Mesh', + description='Input First Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', + value='', + uid=[0], + ), + desc.File( + name='inputSecondMesh', + label='Input Second Mesh', + description='Input Second Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='mergeOperation', + label='Merge Operation', + description='''Operation types used to merge two meshes.''', + value='boolean_union', + values=['boolean_union', 'boolean_intersection', 'boolean_difference'], + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name='preProcess', + label='Pre-Process', + description='''Pre-process input meshes in order to avoid geometric errors in the merging process''', + value=True, + uid=[0], + ), + desc.BoolParam( + name='postProcess', + label='Post-Process', + description='''Post-process output mesh in order to avoid future geometric errors.''', + value=True, + 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 mesh', + description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', + value=desc.Node.internalFolder + 'mesh.stl', + uid=[], + ), + ] From 967583b3f83d6c045d421df181ea7fa92e2eb12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 1 Feb 2021 01:20:28 +0100 Subject: [PATCH 0450/1093] [nodes] Add `ConvertMesh` node --- meshroom/aliceVision/ConvertMesh.py | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meshroom/aliceVision/ConvertMesh.py diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py new file mode 100644 index 0000000000..9fa3c16196 --- /dev/null +++ b/meshroom/aliceVision/ConvertMesh.py @@ -0,0 +1,47 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class ConvertMesh(desc.CommandLineNode): + commandLine = 'aliceVision_convertMesh {allParams}' + documentation = '''This node allows to convert a mesh to another format.''' + + inputs = [ + desc.File( + name='inputMesh', + label='Input Mesh', + description='Input Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='outputMeshFormat', + label='Output Mesh Format', + description='''Output Mesh Format (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', + value='obj', + values=['obj', 'mesh', 'meshb', 'ply', 'off','stl'], + exclusive=True, + uid=[0], + group='', + ), + 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 Mesh', + description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', + value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFormatValue}', + uid=[], + ), + ] From bc111536e0aa4d8887a21c4374f9b9f784a723be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 3 Feb 2021 23:17:15 +0100 Subject: [PATCH 0451/1093] [nodes] MeshFiltering; Add options for smoothing & filtering See AliceVision/dev_meshFilteringOptions --- meshroom/aliceVision/MeshFiltering.py | 75 +++++++++++++++++++++------ 1 file changed, 60 insertions(+), 15 deletions(-) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 94f1db5009..9cc4994c04 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -1,14 +1,12 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc class MeshFiltering(desc.CommandLineNode): commandLine = 'aliceVision_meshFiltering {allParams}' - documentation = ''' This node applies a Laplacian filtering to remove local defects from the raw Meshing cut. - ''' inputs = [ @@ -19,14 +17,6 @@ class MeshFiltering(desc.CommandLineNode): value='', uid=[0], ), - desc.FloatParam( - name='removeLargeTrianglesFactor', - label='Filter Large Triangles Factor', - description='Remove all large triangles. We consider a triangle as large if one edge is bigger than N times the average edge length. Put zero to disable it.', - value=60.0, - range=(1.0, 100.0, 0.1), - uid=[0], - ), desc.BoolParam( name='keepLargestMeshOnly', label='Keep Only the Largest Mesh', @@ -34,8 +24,27 @@ class MeshFiltering(desc.CommandLineNode): value=False, uid=[0], ), + desc.ChoiceParam( + name='smoothingSubset', + label='Smoothing Subset', + description='Subset for smoothing (all, surface_boundaries, surface_inner_part).', + value='all', + values=['all', 'surface_boundaries', 'surface_inner_part'], + exclusive=True, + uid=[0], + advanced=True, + ), desc.IntParam( - name='iterations', + name='smoothingBoundariesNeighbours', + label='Smoothing Boundaries Neighbours', + description='Neighbours of the boundaries to consider.', + value=0, + range=(0, 20, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='smoothingIterations', label='Smoothing Iterations', description='Number of smoothing iterations', value=5, @@ -43,14 +52,50 @@ class MeshFiltering(desc.CommandLineNode): uid=[0], ), desc.FloatParam( - name='lambda', - label='Lambda', - description='', + name='smoothingLambda', + label='Smoothing Lambda', + description='Smoothing size.', value=1.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), + desc.ChoiceParam( + name='filteringSubset', + label='Filtering Subset', + description='Subset for filtering (all, surface_boundaries, surface_inner_part).', + value='all', + values=['all', 'surface_boundaries', 'surface_inner_part'], + exclusive=True, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='filteringIterations', + label='Filtering Iterations', + description='Number of filtering iterations.', + value=1, + range=(0, 20, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='filterLargeTrianglesFactor', + label='Filter Large Triangles Factor', + description='Remove all large triangles. We consider a triangle as large if one edge is bigger than N times the average edge length. Put zero to disable it.', + value=60.0, + range=(0.0, 100.0, 0.1), + uid=[0], + ), + desc.FloatParam( + name='filterTrianglesRatio', + label='Filter Triangles Ratio', + description='Remove all triangles by ratio (largest edge /smallest edge). Put zero to disable it.', + value=0.0, + range=(1.0, 50.0, 0.1), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From fb1ce2f670d7f94a3f5113368534a6191e10d806 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 10 Feb 2021 22:23:51 +0100 Subject: [PATCH 0452/1093] [nodes] Meshing: add seed and voteFilteringForWeaklySupportedSurfaces --- meshroom/aliceVision/Meshing.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 29cb664f2d..b79fc751a1 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -302,6 +302,13 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='voteFilteringForWeaklySupportedSurfaces', + label='Weakly Supported Surface Support', + description='Improve support of weakly supported surfaces with a tetrahedra fullness score filtering.', + value=True, + uid=[0], + ), desc.BoolParam( name='addLandmarksToTheDensePointCloud', label='Add Landmarks To The Dense Point Cloud', @@ -325,6 +332,15 @@ class Meshing(desc.CommandLineNode): uid=[], advanced=True, ), + desc.IntParam( + name='seed', + label='Seed', + description='Seed used for random operations. Zero means use of random device instead of a fixed seed.', + value=0, + range=(0, 10000, 1), + uid=[0], + advanced=True, + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 11715914c07a90a2452d1e2dfaacbaeeccf48ac4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 12 Feb 2021 11:23:53 +0100 Subject: [PATCH 0453/1093] [nodes] Meshing: new cells filtering by solid angle ratio --- meshroom/aliceVision/Meshing.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index b79fc751a1..7f94f8b0c5 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -294,6 +294,24 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='minSolidAngleRatio', + label='minSolidAngleRatio', + description='Change cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + value=0.2, + range=(0.0, 0.5, 0.01), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='nbSolidAngleFilteringIterations', + label='Nb Solid Angle Filtering Iterations', + description='Filter cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + value=2, + range=(0, 30, 1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='refineFuse', label='Refine Fuse', From cc1f9f2f359738c59411dd9659149912b855267f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Fri, 12 Feb 2021 12:13:40 +0100 Subject: [PATCH 0454/1093] [node] Add documentation for `MergeMeshes` node --- meshroom/aliceVision/MergeMeshes.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 483d92c6e8..12240fe4c9 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -5,7 +5,15 @@ class MergeMeshes(desc.CommandLineNode): commandLine = 'aliceVision_utils_mergeMeshes {allParams}' - documentation = '''This node allows to merge two meshes in one.''' + documentation = ''' +This node allows to merge two meshes in one. + +Operation types used to merge two meshes: + +- boolean_union: Create a new mesh with the combined volume of the two input meshes. +- boolean_intersection: Create a new mesh from the intersected volumes of the two input meshes. +- boolean_difference: Create a new mesh from the volume of the first input mesh subtracted by the second input mesh. +''' inputs = [ desc.File( From d6eaba48e5727695251e3c35d7b89d11f502cad1 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@interdigital.com> Date: Sat, 13 Feb 2021 09:07:44 +0100 Subject: [PATCH 0455/1093] [nodes] featureMatching add cross verification --- meshroom/aliceVision/FeatureMatching.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index d5bf61f9dc..bd3f51ecd0 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -166,6 +166,13 @@ class FeatureMatching(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='crossMatching', + label='Cross Matching', + description='Make sure that the matching process is symmetric (same matches for I->J than fo J->I)', + value=False, + uid=[0], + ), desc.BoolParam( name='guidedMatching', label='Guided Matching', From 3a4938e81129a1b17ebe48320a8bea3c15cc3a98 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <32775248+ChemicalXandco@users.noreply.github.com> Date: Sun, 14 Feb 2021 17:03:42 +0000 Subject: [PATCH 0456/1093] [nodes] add node categories --- meshroom/aliceVision/CameraCalibration.py | 2 ++ meshroom/aliceVision/CameraInit.py | 1 + meshroom/aliceVision/CameraLocalization.py | 2 ++ meshroom/aliceVision/CameraRigCalibration.py | 2 ++ meshroom/aliceVision/CameraRigLocalization.py | 2 ++ meshroom/aliceVision/ConvertMesh.py | 2 ++ meshroom/aliceVision/ConvertSfMFormat.py | 1 + meshroom/aliceVision/DepthMap.py | 1 + meshroom/aliceVision/DepthMapFilter.py | 1 + meshroom/aliceVision/ExportAnimatedCamera.py | 1 + meshroom/aliceVision/ExportColoredPointCloud.py | 2 ++ meshroom/aliceVision/ExportMatches.py | 2 ++ meshroom/aliceVision/ExportMaya.py | 1 + meshroom/aliceVision/FeatureExtraction.py | 1 + meshroom/aliceVision/FeatureMatching.py | 1 + meshroom/aliceVision/FeatureRepeatability.py | 2 ++ meshroom/aliceVision/GlobalSfM.py | 1 + meshroom/aliceVision/ImageMatching.py | 1 + meshroom/aliceVision/ImageMatchingMultiSfM.py | 1 + meshroom/aliceVision/ImageProcessing.py | 1 + meshroom/aliceVision/KeyframeSelection.py | 1 + meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrMerge.py | 1 + meshroom/aliceVision/LdrToHdrSampling.py | 1 + meshroom/aliceVision/LightingEstimation.py | 2 ++ meshroom/aliceVision/MergeMeshes.py | 2 ++ meshroom/aliceVision/MeshDecimate.py | 2 +- meshroom/aliceVision/MeshDenoising.py | 1 + meshroom/aliceVision/MeshFiltering.py | 2 ++ meshroom/aliceVision/MeshResampling.py | 2 +- meshroom/aliceVision/Meshing.py | 1 + meshroom/aliceVision/PanoramaCompositing.py | 3 +-- meshroom/aliceVision/PanoramaEstimation.py | 1 + meshroom/aliceVision/PanoramaInit.py | 1 + meshroom/aliceVision/PanoramaMerging.py | 3 +-- meshroom/aliceVision/PanoramaPrepareImages.py | 1 + meshroom/aliceVision/PanoramaSeams.py | 2 +- meshroom/aliceVision/PanoramaWarping.py | 2 +- meshroom/aliceVision/PrepareDenseScene.py | 1 + meshroom/aliceVision/Publish.py | 1 + meshroom/aliceVision/SfMAlignment.py | 1 + meshroom/aliceVision/SfMTransfer.py | 1 + meshroom/aliceVision/SfMTransform.py | 1 + meshroom/aliceVision/SketchfabUpload.py | 1 + meshroom/aliceVision/StructureFromMotion.py | 1 + meshroom/aliceVision/Texturing.py | 1 + 46 files changed, 57 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 3609387c16..888138cc3a 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -6,6 +6,8 @@ class CameraCalibration(desc.CommandLineNode): commandLine = 'aliceVision_cameraCalibration {allParams}' + category = 'Utils' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 2042ea1050..d39a70b010 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -116,6 +116,7 @@ class CameraInit(desc.CommandLineNode): size = desc.DynamicNodeSize('viewpoints') + category = 'Sparse Reconstruction' documentation = ''' This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length and which images are sharing the same internal camera parameters, as well as potential cameras rigs. diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 08a14e412c..484304d6aa 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -7,6 +7,8 @@ class CameraLocalization(desc.CommandLineNode): commandLine = 'aliceVision_cameraLocalization {allParams}' + category = 'Utils' + inputs = [ desc.File( name='sfmdata', diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index fe189d082f..f12ca6c401 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -7,6 +7,8 @@ class CameraRigCalibration(desc.CommandLineNode): commandLine = 'aliceVision_rigCalibration {allParams}' + category = 'Utils' + inputs = [ desc.File( name='sfmdata', diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 527a6ed603..94e9514f96 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -7,6 +7,8 @@ class CameraRigLocalization(desc.CommandLineNode): commandLine = 'aliceVision_rigLocalization {allParams}' + category = 'Utils' + inputs = [ desc.File( name='sfmdata', diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 9fa3c16196..1a59cc8b0a 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -5,6 +5,8 @@ class ConvertMesh(desc.CommandLineNode): commandLine = 'aliceVision_convertMesh {allParams}' + + category = 'Utils' documentation = '''This node allows to convert a mesh to another format.''' inputs = [ diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 687ad5c496..324329fbba 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -7,6 +7,7 @@ class ConvertSfMFormat(desc.CommandLineNode): commandLine = 'aliceVision_convertSfMFormat {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' Convert an SfM scene from one file format to another. It can also be used to remove specific parts of from an SfM scene (like filter all 3D landmarks or filter 2D observations). diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 1051ab23e6..bb6ca66e77 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -10,6 +10,7 @@ class DepthMap(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=3) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Dense Reconstruction' documentation = ''' For each camera that have been estimated by the Structure-From-Motion, it estimates the depth value per pixel. diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 77f891403a..d2d9c313db 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -10,6 +10,7 @@ class DepthMapFilter(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=10) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Dense Reconstruction' documentation = ''' Filter depth map values that are not coherent in multiple depth maps. This allows to filter unstable points before starting the fusion of all depth maps in the Meshing node. diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index eefeb48900..7fef4a1115 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -6,6 +6,7 @@ class ExportAnimatedCamera(desc.CommandLineNode): commandLine = 'aliceVision_exportAnimatedCamera {allParams}' + category = 'Export' documentation = ''' Convert cameras from an SfM scene into an animated cameras in Alembic file format. Based on the input image filenames, it will recognize the input video sequence to create an animated camera. diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index ced880b46e..a922a4a965 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -6,6 +6,8 @@ class ExportColoredPointCloud(desc.CommandLineNode): commandLine = 'aliceVision_exportColoredPointCloud {allParams}' + category = 'Export' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 53525165df..24a45d584e 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -7,6 +7,8 @@ class ExportMatches(desc.CommandLineNode): commandLine = 'aliceVision_exportMatches {allParams}' size = desc.DynamicNodeSize('input') + category = 'Export' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 9328852685..aeea1b8122 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -6,6 +6,7 @@ class ExportMaya(desc.CommandLineNode): commandLine = 'aliceVision_exportMeshroomMaya {allParams}' + category = 'Export' documentation = ''' Export a scene for Autodesk Maya, with an Alembic file describing the SfM: cameras and 3D points. It will export half-size undistorted images to use as image planes for cameras and also export thumbnails. diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 4390ddba82..c733fc61f3 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -9,6 +9,7 @@ class FeatureExtraction(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Sparse Reconstruction' documentation = ''' This node extracts distinctive groups of pixels that are, to some extent, invariant to changing camera viewpoints during image acquisition. Hence, a feature in the scene should have similar feature descriptions in all images. diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index d5bf61f9dc..9b5d23a77b 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -9,6 +9,7 @@ class FeatureMatching(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=20) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Sparse Reconstruction' documentation = ''' This node performs the matching of all features between the candidate image pairs. diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index 746ba551a0..162fb455b2 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -9,7 +9,9 @@ class FeatureRepeatability(desc.CommandLineNode): # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Utils' documentation = ''' +Compare feature/descriptor matching repeatability on some dataset with known homography motions. ''' inputs = [ diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 49410fea08..7a0242d452 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -10,6 +10,7 @@ class GlobalSfM(desc.CommandLineNode): commandLine = 'aliceVision_globalSfM {allParams}' size = desc.DynamicNodeSize('input') + category = 'Sparse Reconstruction' documentation = ''' Performs the Structure-From-Motion with a global approach. It is known to be faster but less robust to challenging datasets than the Incremental approach. diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 2a1e60f888..62b9e2323c 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -8,6 +8,7 @@ class ImageMatching(desc.CommandLineNode): commandLine = 'aliceVision_imageMatching {allParams}' size = desc.DynamicNodeSize('input') + category = 'Sparse Reconstruction' documentation = ''' The goal of this node is to select the image pairs to match. The ambition is to find the images that are looking to the same areas of the scene. Thanks to this node, the FeatureMatching node will only compute the matches between the selected image pairs. diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 2d506227a5..a10ce9a303 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -9,6 +9,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): # use both SfM inputs to define Node's size size = desc.MultiDynamicNodeSize(['input', 'inputB']) + category = 'Sparse Reconstruction' documentation = ''' The goal of this node is to select the image pairs to match in the context of an SfM augmentation. The ambition is to find the images that are looking to the same areas of the scene. diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 653a160055..f2079f2bb4 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -34,6 +34,7 @@ class ImageProcessing(desc.CommandLineNode): # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Utils' documentation = ''' Convert or apply filtering to the input images. ''' diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 987af42367..db035ec1c6 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -7,6 +7,7 @@ class KeyframeSelection(desc.CommandLineNode): commandLine = 'aliceVision_utils_keyframeSelection {allParams}' + category = 'Utils' documentation = ''' Allows to extract keyframes from a video and insert metadata. It can extract frames from a synchronized multi-cameras rig. diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 2c16734e77..5b6ebbbf0d 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -26,10 +26,10 @@ def findMetadata(d, keys, defaultValue): class LdrToHdrCalibration(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrCalibration {allParams}' size = desc.DynamicNodeSize('input') - cpu = desc.Level.INTENSIVE ram = desc.Level.NORMAL + category = 'Panorama HDR' documentation = ''' Calibrate LDR to HDR response curve from samples ''' diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index b22a25650e..391ae9e398 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -28,6 +28,7 @@ class LdrToHdrMerge(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=2) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Panorama HDR' documentation = ''' Calibrate LDR to HDR response curve from samples ''' diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 8c86246653..a32f86c195 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -45,6 +45,7 @@ class LdrToHdrSampling(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=2) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Panorama HDR' documentation = ''' Sample pixels from Low range images for HDR creation ''' diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index dc5b188fb4..c9d44b1a9d 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -6,6 +6,8 @@ class LightingEstimation(desc.CommandLineNode): commandLine = 'aliceVision_utils_lightingEstimation {allParams}' + category = 'Utils' + inputs = [ desc.File( name='input', diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 12240fe4c9..1669dde52d 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -5,6 +5,8 @@ class MergeMeshes(desc.CommandLineNode): commandLine = 'aliceVision_utils_mergeMeshes {allParams}' + + category = 'Utils' documentation = ''' This node allows to merge two meshes in one. diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 8b928350b0..4294e85848 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -5,10 +5,10 @@ class MeshDecimate(desc.CommandLineNode): commandLine = 'aliceVision_meshDecimate {allParams}' - cpu = desc.Level.NORMAL ram = desc.Level.NORMAL + category = 'Mesh Post-Processing' documentation = ''' This node allows to reduce the density of the Mesh. ''' diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 1b6863edd5..aa118bbe06 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -6,6 +6,7 @@ class MeshDenoising(desc.CommandLineNode): commandLine = 'aliceVision_meshDenoising {allParams}' + category = 'Mesh Post-Processing' documentation = ''' This experimental node allows to reduce noise from a Mesh. for now, the parameters are difficult to control and vary a lot from one dataset to another. diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 9cc4994c04..9327a3b041 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -5,6 +5,8 @@ class MeshFiltering(desc.CommandLineNode): commandLine = 'aliceVision_meshFiltering {allParams}' + + category = 'Dense Reconstruction' documentation = ''' This node applies a Laplacian filtering to remove local defects from the raw Meshing cut. ''' diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 64c4cab717..d9a836cd36 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -5,10 +5,10 @@ class MeshResampling(desc.CommandLineNode): commandLine = 'aliceVision_meshResampling {allParams}' - cpu = desc.Level.NORMAL ram = desc.Level.NORMAL + category = 'Mesh Post-Processing' documentation = ''' This node allows to recompute the mesh surface with a new topology and uniform density. ''' diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index b2970e62ad..2019eb38ea 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -9,6 +9,7 @@ class Meshing(desc.CommandLineNode): cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Dense Reconstruction' documentation = ''' This node creates a dense geometric surface representation of the scene. diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index e5270c6646..4e4b0fb9fd 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -9,13 +9,12 @@ class PanoramaCompositing(desc.CommandLineNode): commandLine = 'aliceVision_panoramaCompositing {allParams}' size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=5) commandLineRange = '--rangeIteration {rangeIteration} --rangeSize {rangeBlockSize}' - cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Panorama HDR' documentation = ''' Once the images have been transformed geometrically (in PanoramaWarping), they have to be fused together in a single panorama image which looks like a single photography. diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 1cc147fa92..6e78dd7ce7 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -10,6 +10,7 @@ class PanoramaEstimation(desc.CommandLineNode): commandLine = 'aliceVision_panoramaEstimation {allParams}' size = desc.DynamicNodeSize('input') + category = 'Panorama HDR' documentation = ''' Estimate relative camera rotations between input images. ''' diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 458cb82d19..7b341b8fd8 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -7,6 +7,7 @@ class PanoramaInit(desc.CommandLineNode): commandLine = 'aliceVision_panoramaInit {allParams}' size = desc.DynamicNodeSize('input') + category = 'Panorama HDR' documentation = ''' This node allows to setup the Panorama: diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 72ed3b7ed6..6fd4b912bb 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -9,11 +9,10 @@ class PanoramaMerging(desc.CommandLineNode): commandLine = 'aliceVision_panoramaMerging {allParams}' size = desc.DynamicNodeSize('input') - cpu = desc.Level.NORMAL ram = desc.Level.INTENSIVE - + category = 'Panorama HDR' documentation = ''' Merge all inputs coming from PanoramaComposiring ''' diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index 67a6357bb3..1add6c4795 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -9,6 +9,7 @@ class PanoramaPrepareImages(desc.CommandLineNode): commandLine = 'aliceVision_panoramaPrepareImages {allParams}' size = desc.DynamicNodeSize('input') + category = 'Panorama HDR' documentation = ''' Prepare images for Panorama pipeline: ensures that images orientations are coherent. ''' diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 389c0eb408..754a9208d1 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -9,10 +9,10 @@ class PanoramaSeams(desc.CommandLineNode): commandLine = 'aliceVision_panoramaSeams {allParams}' size = desc.DynamicNodeSize('input') - cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Panorama HDR' documentation = ''' Estimate the seams lines between the inputs to provide an optimal compositing in a further node ''' diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index de25238b75..33d3e0a97e 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -9,10 +9,10 @@ class PanoramaWarping(desc.CommandLineNode): commandLine = 'aliceVision_panoramaWarping {allParams}' size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=5) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Panorama HDR' documentation = ''' Compute the image warping for each input image in the panorama coordinate system. ''' diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 3087eee6d9..ac2fd0ecc1 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -9,6 +9,7 @@ class PrepareDenseScene(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Dense Reconstruction' documentation = ''' This node export undistorted images so the depth map and texturing can be computed on Pinhole images without distortion. ''' diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 556499f9e4..4ca8b055bb 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -11,6 +11,7 @@ class Publish(desc.Node): size = desc.DynamicNodeSize('inputFiles') + category = 'Export' documentation = ''' This node allows to copy files into a specific folder. ''' diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 0b21005175..60d6d2e38d 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -9,6 +9,7 @@ class SfMAlignment(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmAlignment {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' This node allows to change the coordinate system of one SfM scene to align it on another one. diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index caf0c30a24..dd0f8c4a16 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -9,6 +9,7 @@ class SfMTransfer(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransfer {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' This node allows to transfer poses and/or intrinsics form one SfM scene onto another one. ''' diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 3bd2f006d0..9547470ba5 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -9,6 +9,7 @@ class SfMTransform(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransform {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' This node allows to change the coordinate system of one SfM scene. diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 06571b0f5c..2d980e4d7a 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -52,6 +52,7 @@ def progressUpdate(size=None, progress=None, logManager=None): class SketchfabUpload(desc.Node): size = desc.DynamicNodeSize('inputFiles') + category = 'Export' documentation = ''' Upload a textured mesh on Sketchfab. ''' diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index c70b382c15..afc50f943d 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -7,6 +7,7 @@ class StructureFromMotion(desc.CommandLineNode): commandLine = 'aliceVision_incrementalSfM {allParams}' size = desc.DynamicNodeSize('input') + category = 'Sparse Reconstruction' documentation = ''' This node will analyze feature matches to understand the geometric relationship behind all the 2D observations, and infer the rigid scene structure (3D points) with the pose (position and orientation) and internal calibration of all cameras. diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index f388e44ffc..cc8308da47 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -8,6 +8,7 @@ class Texturing(desc.CommandLineNode): cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Dense Reconstruction' documentation = ''' This node computes the texturing on the mesh. From e11adebdcb9c34331beca3b61625a105f97e43cb Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 15 Feb 2021 18:46:55 +0100 Subject: [PATCH 0457/1093] [nodes] SfMTransform: new from_center_camera --- meshroom/aliceVision/SfMTransform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 9547470ba5..6f68e30ba7 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -39,9 +39,10 @@ class SfMTransform(desc.CommandLineNode): " * auto_from_cameras: Use cameras\n" " * auto_from_landmarks: Use landmarks\n" " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" + " * from_center_camera: Use the center camera as the origin of the coordinate system\n" " * from_markers: Align specific markers to custom coordinates", value='auto_from_landmarks', - values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_markers'], + values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers'], exclusive=True, uid=[0], ), From 72e0ca7bb4d1424d0ed9b421a05ea42c97b67aae Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 17 Feb 2021 00:38:05 +0100 Subject: [PATCH 0458/1093] [nodes] Meshing: add nPixelSizeBehind and invertTetrahedronBasedOnNeighborsNbIterations params --- meshroom/aliceVision/Meshing.py | 54 ++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 2019eb38ea..67e01cad2d 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -295,24 +295,6 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), - desc.FloatParam( - name='minSolidAngleRatio', - label='minSolidAngleRatio', - description='Change cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', - value=0.2, - range=(0.0, 0.5, 0.01), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='nbSolidAngleFilteringIterations', - label='Nb Solid Angle Filtering Iterations', - description='Filter cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', - value=2, - range=(0, 30, 1), - uid=[0], - advanced=True, - ), desc.BoolParam( name='refineFuse', label='Refine Fuse', @@ -321,6 +303,15 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='nPixelSizeBehind', + label='Nb Pixel Size Behind', + description='Number of pixel size units to vote behind the vertex as FULL status.', + value=4.0, + range=(0.0, 10.0, 0.1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='voteFilteringForWeaklySupportedSurfaces', label='Weakly Supported Surface Support', @@ -336,6 +327,33 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='invertTetrahedronBasedOnNeighborsNbIterations', + label='Tretrahedron Neighbors Coherency Nb Iterations', + description='Invert cells status around surface to improve smoothness. Zero to disable.', + value=10, + range=(0, 30, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='minSolidAngleRatio', + label='minSolidAngleRatio', + description='Change cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + value=0.2, + range=(0.0, 0.5, 0.01), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='nbSolidAngleFilteringIterations', + label='Nb Solid Angle Filtering Iterations', + description='Filter cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + value=2, + range=(0, 30, 1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='colorizeOutput', label='Colorize Output', From 87c0188cbe7985b73d1aa313126c64e66ca8e8e2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 18 Feb 2021 13:28:33 +0100 Subject: [PATCH 0459/1093] [nodes] Meshing: add more advanced params --- meshroom/aliceVision/Meshing.py | 95 +++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 67e01cad2d..8803590439 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -303,6 +303,54 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='helperPointsGridSize', + label='Helper Points Grid Size', + description='Grid Size for the helper points.', + value=10, + range=(0, 50, 1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='densify', + label='Densify', + description='Densify scene with helper points around vertices.', + value=False, + uid=[], + advanced=True, + group='', + ), + desc.IntParam( + name='densifyNbFront', + label='Densify: Front', + description='Densify vertices: front.', + value=1, + range=(0, 5, 1), + uid=[0], + advanced=True, + enabled=lambda node: node.densify.value, + ), + desc.IntParam( + name='densifyNbBack', + label='Densify: Back', + description='Densify vertices: back.', + value=1, + range=(0, 5, 1), + uid=[0], + advanced=True, + enabled=lambda node: node.densify.value, + ), + desc.FloatParam( + name='densifyScale', + label='Densify Scale', + description='Scale between points used to densify the scene.', + value=20.0, + range=(0.0, 10.0, 0.1), + uid=[0], + advanced=True, + enabled=lambda node: node.densify.value, + ), desc.FloatParam( name='nPixelSizeBehind', label='Nb Pixel Size Behind', @@ -312,6 +360,15 @@ class Meshing(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='fullWeight', + label='Full Weight', + description='Weighting for full status.', + value=1.0, + range=(0.0, 10.0, 0.1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='voteFilteringForWeaklySupportedSurfaces', label='Weakly Supported Surface Support', @@ -366,6 +423,36 @@ class Meshing(desc.CommandLineNode): label='Add Mask Helper Points', description='Add Helper points on the outline of the depth maps masks.', value=False, + uid=[], + advanced=True, + group='', + ), + desc.FloatParam( + name='maskHelperPointsWeight', + label='Mask Helper Points Weight', + description='Weight value for mask helper points. Zero means no helper point.', + value=1.0, + range=(0.0, 20.0, 1.0), + uid=[0], + advanced=True, + enabled=lambda node: node.addMaskHelperPoints.value, + ), + desc.IntParam( + name='maskBorderSize', + label='Mask Border Size', + description='How many pixels on mask borders?', + value=4, + range=(0, 20, 1), + uid=[0], + advanced=True, + enabled=lambda node: node.addMaskHelperPoints.value, + ), + desc.IntParam( + name='maxNbConnectedHelperPoints', + label='Helper Points: Max Segment Size', + description='Maximum size of a segment of connected helper points before we remove it. Small segments of helper points can be on the real surface and should not be removed to avoid the creation of holes. 0 means that we remove all helper points. -1 means that we do not filter helper points at all.', + value=50, + range=(-1, 100, 1), uid=[0], advanced=True, ), @@ -377,6 +464,14 @@ class Meshing(desc.CommandLineNode): uid=[], advanced=True, ), + desc.BoolParam( + name='exportDebugTetrahedralization', + label='Export DEBUG Tetrahedralization', + description='Export debug cells score as tetrahedral mesh.\nWARNING: Could create HUGE meshes, only use on very small datasets.', + value=False, + uid=[], + advanced=True, + ), desc.IntParam( name='seed', label='Seed', From 1efd3d912052d21295df1ef37962f52132b16851 Mon Sep 17 00:00:00 2001 From: jouetp <pierrick.jouet@interdigital.com> Date: Mon, 18 Jan 2021 15:22:42 +0100 Subject: [PATCH 0460/1093] [nodes] ExportAnimatedCamera: export undistort UV maps --- meshroom/aliceVision/ExportAnimatedCamera.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 7fef4a1115..66cda3a694 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -27,11 +27,18 @@ class ExportAnimatedCamera(desc.CommandLineNode): value='', uid=[0], ), + desc.BoolParam( + name='exportUVMaps', + label='Export UV Maps', + description='Export UV Maps, absolutes values (x,y) of distortion are encoding in UV channels.', + value=True, + uid=[0], + ), desc.BoolParam( name='exportUndistortedImages', label='Export Undistorted Images', description='Export Undistorted Images.', - value=True, + value=False, uid=[0], ), desc.ChoiceParam( @@ -42,6 +49,7 @@ class ExportAnimatedCamera(desc.CommandLineNode): values=['jpg', 'png', 'tif', 'exr'], exclusive=True, uid=[0], + enabled= lambda node: node.exportUndistortedImages.value == 1, ), desc.ChoiceParam( name='verboseLevel', From 1f7f946d34c87dde6f6fd011b961e348996b5923 Mon Sep 17 00:00:00 2001 From: jouetp <pierrick.jouet@interdigital.com> Date: Fri, 29 Jan 2021 17:19:20 +0100 Subject: [PATCH 0461/1093] Add a bool parameter to correct principal point and another to export full RoI in exr format --- meshroom/aliceVision/ExportAnimatedCamera.py | 39 ++++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 66cda3a694..04bf83ab9c 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -41,11 +41,25 @@ class ExportAnimatedCamera(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='exportFullROD', + label='Export Full ROD', + description='Export Full ROD.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='correctPrincipalPoint', + label='Correct Principal Point ', + description='Correct Principal Point.', + value=True, + uid=[0], + ), desc.ChoiceParam( name='undistortedImageType', - label='Undistort Image Format', + label='Undistort Image Format ', description='Image file format to use for undistorted images ("jpg", "png", "tif", "exr (half)").', - value='jpg', + value= lambda node: 'jpg' or 'exr' and not node.exportFullROD, values=['jpg', 'png', 'tif', 'exr'], exclusive=True, uid=[0], @@ -78,4 +92,23 @@ class ExportAnimatedCamera(desc.CommandLineNode): group='', # exclude from command line uid=[], ), - ] + ] + prev = False + @classmethod + def update(cls, node): + if not isinstance(node.nodeDesc, cls): + raise ValueError("Node {} is not an instance of type {}".format(node, cls)) + # TODO: use Node version for this test + + if not cls.prev: + node.undistortedImageType.value = 'jpg' + cls.prev = True + + if node.exportFullROD.value: + node.undistortedImageType.value = 'exr' + node.undistortedImageType.enabled = False + else: + node.undistortedImageType.enabled = True + + if not node.exportUndistortedImages.value: + node.exportFullROD.value = False From 5993565dc764b7659d4759f2c12a08ae91e54617 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 15 Feb 2021 17:11:59 +0100 Subject: [PATCH 0462/1093] [nodes] ExportAnimatedCamera: Use lambdas instead of update method --- meshroom/aliceVision/ExportAnimatedCamera.py | 39 ++++++-------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 04bf83ab9c..390e1ef51d 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -41,11 +41,22 @@ class ExportAnimatedCamera(desc.CommandLineNode): value=False, uid=[0], ), + desc.ChoiceParam( + name='undistortedImageType', + label='Undistort Image Format ', + description='Image file format to use for undistorted images ("jpg", "png", "tif", "exr (half)").', + value='exr', + values=['jpg', 'png', 'tif', 'exr'], + exclusive=True, + uid=[0], + enabled= lambda node: node.exportUndistortedImages.value, + ), desc.BoolParam( name='exportFullROD', label='Export Full ROD', description='Export Full ROD.', value=False, + enabled=lambda node: node.exportUndistortedImages.value and node.undistortedImageType.value == 'exr', uid=[0], ), desc.BoolParam( @@ -55,16 +66,6 @@ class ExportAnimatedCamera(desc.CommandLineNode): value=True, uid=[0], ), - desc.ChoiceParam( - name='undistortedImageType', - label='Undistort Image Format ', - description='Image file format to use for undistorted images ("jpg", "png", "tif", "exr (half)").', - value= lambda node: 'jpg' or 'exr' and not node.exportFullROD, - values=['jpg', 'png', 'tif', 'exr'], - exclusive=True, - uid=[0], - enabled= lambda node: node.exportUndistortedImages.value == 1, - ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -93,22 +94,4 @@ class ExportAnimatedCamera(desc.CommandLineNode): uid=[], ), ] - prev = False - @classmethod - def update(cls, node): - if not isinstance(node.nodeDesc, cls): - raise ValueError("Node {} is not an instance of type {}".format(node, cls)) - # TODO: use Node version for this test - - if not cls.prev: - node.undistortedImageType.value = 'jpg' - cls.prev = True - - if node.exportFullROD.value: - node.undistortedImageType.value = 'exr' - node.undistortedImageType.enabled = False - else: - node.undistortedImageType.enabled = True - if not node.exportUndistortedImages.value: - node.exportFullROD.value = False From eb0ddae2ed19874a03544dbe0c55b66467073e27 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 24 Feb 2021 22:29:35 +0100 Subject: [PATCH 0463/1093] Update nodes versions --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/Meshing.py | 2 +- meshroom/aliceVision/PanoramaCompositing.py | 2 +- meshroom/aliceVision/PanoramaMerging.py | 2 +- meshroom/aliceVision/PanoramaSeams.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index d39a70b010..a0cf800ed7 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" import os import json diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 8803590439..49d423f29c 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,4 +1,4 @@ -__version__ = "6.0" +__version__ = "7.0" from meshroom.core import desc diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 4e4b0fb9fd..896759e754 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" import json import os diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 6fd4b912bb..99a14ec7a0 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -14,7 +14,7 @@ class PanoramaMerging(desc.CommandLineNode): category = 'Panorama HDR' documentation = ''' -Merge all inputs coming from PanoramaComposiring +Merge all inputs coming from the PanoramaCompositing node. ''' inputs = [ diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 754a9208d1..326d795949 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" import json import os From 4fbaebafabce97868ebb63199fc505c390fb8911 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 13 Apr 2021 17:31:15 +0200 Subject: [PATCH 0464/1093] [nodes] use dspsift instead of sift by default --- meshroom/aliceVision/CameraLocalization.py | 2 +- meshroom/aliceVision/CameraRigCalibration.py | 2 +- meshroom/aliceVision/CameraRigLocalization.py | 4 ++-- meshroom/aliceVision/ConvertSfMFormat.py | 2 +- meshroom/aliceVision/ExportMatches.py | 2 +- meshroom/aliceVision/FeatureExtraction.py | 2 +- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/GlobalSfM.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 484304d6aa..3afe30709a 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -42,7 +42,7 @@ class CameraLocalization(desc.CommandLineNode): name='matchDescTypes', label='Match Desc Types', description='''Describer types to use for the matching.''', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index f12ca6c401..9b5eecc61c 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -49,7 +49,7 @@ class CameraRigCalibration(desc.CommandLineNode): name='matchDescTypes', label='Match Describer Types', description='''The describer types to use for the matching''', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 94e9514f96..e5a4dd37c7 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -49,8 +49,8 @@ class CameraRigLocalization(desc.CommandLineNode): name='matchDescTypes', label='Match Describer Types', description='''The describer types to use for the matching''', - value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 324329fbba..a5c71aa7ca 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -35,7 +35,7 @@ class ConvertSfMFormat(desc.CommandLineNode): name='describerTypes', label='Describer Types', description='Describer types to keep.', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'unknown'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 24a45d584e..b90c635898 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -21,7 +21,7 @@ class ExportMatches(desc.CommandLineNode): name='describerTypes', label='Describer Types', description='Describer types used to describe an image.', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index c733fc61f3..6dd487831f 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -42,7 +42,7 @@ class FeatureExtraction(desc.CommandLineNode): name='describerTypes', label='Describer Types', description='Describer types used to describe an image.', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index f9b6b1f8a6..bef82041ec 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -63,7 +63,7 @@ class FeatureMatching(desc.CommandLineNode): name='describerTypes', label='Describer Types', description='Describer types used to describe an image.', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 7a0242d452..a400570a39 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -52,7 +52,7 @@ class GlobalSfM(desc.CommandLineNode): name='describerTypes', label='Describer Types', description='Describer types used to describe an image.', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index afc50f943d..e06b6a9eb6 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -97,7 +97,7 @@ class StructureFromMotion(desc.CommandLineNode): name='describerTypes', label='Describer Types', description='Describer types used to describe an image.', - value=['sift'], + value=['dspsift'], values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], exclusive=False, uid=[0], From 586cd40fd2009fd2cb09848f1c259722cedd2625 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 13 Apr 2021 17:49:37 +0200 Subject: [PATCH 0465/1093] [nodes] sfm: change default value for observationConstraint to scale --- meshroom/aliceVision/StructureFromMotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index e06b6a9eb6..2a3926932a 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -119,7 +119,7 @@ class StructureFromMotion(desc.CommandLineNode): description='Observation contraint mode used in the optimization:\n' ' * Basic: Use standard reprojection error in pixel coordinates\n' ' * Scale: Use reprojection error in pixel coordinates but relative to the feature scale', - value='Basic', + value='Scale', values=['Basic', 'Scale'], exclusive=True, uid=[0], From dafc115b97dd5f4597f5295a1f04be084a57d2e8 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 13 Apr 2021 18:09:43 +0200 Subject: [PATCH 0466/1093] [nodes] ImageMatching: use method SequentialAndVocTree by default --- meshroom/aliceVision/ImageMatching.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 62b9e2323c..c09c701d9d 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -65,7 +65,7 @@ class ImageMatching(desc.CommandLineNode): ' * Exhaustive: Export all image pairs.\n' ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', - value='VocabularyTree', + value='SequentialAndVocabularyTree', values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum', 'FrustumOrVocabularyTree'], exclusive=True, uid=[0], @@ -111,7 +111,7 @@ class ImageMatching(desc.CommandLineNode): name='nbMatches', label='Voc Tree: Nb Matches', description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', - value=50, + value=40, range=(0, 1000, 1), uid=[0], advanced=True, @@ -121,7 +121,7 @@ class ImageMatching(desc.CommandLineNode): name='nbNeighbors', label='Sequential: Nb Neighbors', description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', - value=50, + value=5, range=(0, 1000, 1), uid=[0], advanced=True, From cbcf94b64b6b3644372dd3567e71599d6de10b19 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 16 Apr 2021 10:39:07 +0200 Subject: [PATCH 0467/1093] [nodes] KeyframeSelection: extract all frames by default --- meshroom/aliceVision/KeyframeSelection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index db035ec1c6..c8635a8c6b 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -109,14 +109,14 @@ class KeyframeSelection(desc.CommandLineNode): name='useSparseDistanceSelection', label='Use Sparse Distance Selection', description='Use sparseDistance selection in order to avoid similar keyframes.', - value=True, + value=False, uid=[0], ), desc.BoolParam( name='useSharpnessSelection', label='Use Sharpness Selection', description='Use frame sharpness score for keyframe selection.', - value=True, + value=False, uid=[0], ), desc.FloatParam( @@ -148,7 +148,7 @@ class KeyframeSelection(desc.CommandLineNode): name='minFrameStep', label='Min Frame Step', description='''minimum number of frames between two keyframes''', - value=12, + value=1, range=(1, 100, 1), uid=[0], ), @@ -156,7 +156,7 @@ class KeyframeSelection(desc.CommandLineNode): name='maxFrameStep', label='Max Frame Step', description='''maximum number of frames after which a keyframe can be taken''', - value=36, + value=2, range=(2, 1000, 1), uid=[0], ), From 881a3af8fab033251caf219fc2557747b6aa22d9 Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Wed, 2 Dec 2020 16:58:25 +0100 Subject: [PATCH 0468/1093] [nodes] add color checker detection (crashtest) --- meshroom/aliceVision/ColorCheckerDetection.py | 316 ++++++++++++++++++ 1 file changed, 316 insertions(+) create mode 100644 meshroom/aliceVision/ColorCheckerDetection.py diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py new file mode 100644 index 0000000000..d357effbca --- /dev/null +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -0,0 +1,316 @@ +__version__ = "3.0" + +from meshroom.core import desc + +import os.path + + +class ColorCheckerDetection(desc.CommandLineNode): + commandLine = 'aliceVision_utils_colorCheckerDetection {allParams}' + size = desc.DynamicNodeSize('input') + # parallelization = desc.Parallelization(blockSize=40) + # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + documentation = ''' + TODO +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="inputFolder", + label="input Folder", + description="", + value="", + uid=[0], + ), + name="inputFolders", + label="Images input Folders", + description='Use images from specific folder(s).', + ), + desc.ListAttribute( + elementDesc=desc.StringParam( + name="metadataFolder", + label="Metadata Folder", + description="", + value="", + uid=[0], + ), + name="metadataFolders", + label="Metadata input Folders", + description='Use images metadata from specific folder(s).', + ), + desc.ChoiceParam( + name='extension', + label='Output File Extension', + description='Output Image File Extension.', + value='', + values=['', 'exr', 'jpg', 'tiff', 'png'], + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name='reconstructedViewsOnly', + label='Only Reconstructed Views', + description='Process Only Reconstructed Views', + value=False, + uid=[0], + ), + desc.BoolParam( + name='fixNonFinite', + label='Fix Non-Finite', + description='Fix non-finite pixels based on neighboring pixels average.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='exposureCompensation', + label='Exposure Compensation', + description='Exposure Compensation', + value=False, + uid=[0], + ), + desc.FloatParam( + name='scaleFactor', + label='ScaleFactor', + description='Scale Factor.', + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.FloatParam( + name='contrast', + label='Contrast', + description='Contrast.', + value=1.0, + range=(0.0, 100.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='medianFilter', + label='Median Filter', + description='Median Filter.', + value=0, + range=(0, 10, 1), + uid=[0], + ), + desc.BoolParam( + name='fillHoles', + label='Fill Holes', + description='Fill holes based on the alpha channel.\n' + 'Note: It will enable fixNonFinite, as it is required for the image pyramid construction used to fill holes.', + value=False, + uid=[0], + ), + desc.GroupAttribute(name="sharpenFilter", label="Sharpen Filter", description="Sharpen Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='sharpenFilterEnabled', + label='Enable', + description='Use sharpen.', + value=False, + uid=[0], + ), + desc.IntParam( + name='width', + label='Width', + description='Sharpen Width.', + value=3, + range=(1, 9, 2), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + desc.FloatParam( + name='contrast', + label='Contrast', + description='Sharpen Contrast.', + value=1.0, + range=(0.0, 100.0, 0.1), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + desc.FloatParam( + name='threshold', + label='Threshold', + description='Sharpen Threshold.', + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + ]), + desc.GroupAttribute(name="bilateralFilter", label="Bilateral Filter", description="Bilateral Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='bilateralFilterEnabled', + label='Enable', + description='Bilateral Filter.', + value=False, + uid=[0], + ), + desc.IntParam( + name='bilateralFilterDistance', + label='Distance', + description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', + value=0, + range=(0, 9, 1), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + desc.FloatParam( + name='bilateralFilterSigmaSpace', + label='Sigma Coordinate Space', + description='Bilateral Filter sigma in the coordinate space.', + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + desc.FloatParam( + name='bilateralFilterSigmaColor', + label='Sigma Color Space', + description='Bilateral Filter sigma in the color space.', + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + ]), + desc.GroupAttribute(name="claheFilter", label="Clahe Filter", description="Clahe Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='claheEnabled', + label='Enable', + description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', + value=False, + uid=[0], + ), + desc.FloatParam( + name='claheClipLimit', + label='Clip Limit', + description='Sets Threshold For Contrast Limiting.', + value=4.0, + range=(0.0, 8.0, 1.0), + uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, + ), + desc.IntParam( + name='claheTileGridSize', + label='Tile Grid Size', + description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', + value=8, + range=(4, 64, 4), + uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, + ), + ]), + desc.GroupAttribute(name="noiseFilter", label="Noise Filter", description="Noise Filtering Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='noiseEnabled', + label='Enable', + description='Add Noise.', + value=False, + uid=[0], + ), + desc.ChoiceParam( + name='noiseMethod', + label='Method', + description=" * method: There are several noise types to choose from:\n" + " * uniform: adds noise values uninformly distributed on range [A,B).\n" + " * gaussian: adds Gaussian (normal distribution) noise values with mean value A and standard deviation B.\n" + " * salt: changes to value A a portion of pixels given by B.\n", + value='uniform', + values=['uniform', 'gaussian', 'salt'], + exclusive=True, + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.FloatParam( + name='noiseA', + label='A', + description='Parameter that have a different interpretation depending on the method chosen.', + value=0.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.FloatParam( + name='noiseB', + label='B', + description='Parameter that have a different interpretation depending on the method chosen.', + value=1.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.BoolParam( + name='noiseMono', + label='Mono', + description='If is Checked, a single noise value will be applied to all channels otherwise a separate noise value will be computed for each channel.', + value=True, + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + ]), + desc.ChoiceParam( + name='outputFormat', + label='Output Image Format', + description='Allows you to choose the format of the output image.', + value='rgba', + values=['rgba', 'rgb', 'grayscale'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='storageDataType', + label='Storage Data Type for EXR output', + description='Storage image data type:\n' + ' * float: Use full floating point (32 bits per channel)\n' + ' * half: Use half float (16 bits per channel)\n' + ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' + ' * auto: Use half float if all values can fit, else use full float\n', + value='float', + values=['float', 'half', 'halfFinite', 'auto'], + exclusive=True, + 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='outSfMData', + label='Output sfmData', + description='Output sfmData.', + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + uid=[], + group='', # do not export on the command line + ), + desc.File( + name='output', + label='Output Folder', + description='Output Images Folder.', + value=desc.Node.internalFolder, + uid=[], + ), + desc.File( + name='outputImages', + label='Output Images', + description='Output Image Files.', + value= outputImagesValueFunct, + group='', # do not export on the command line + uid=[], + ), + ] From 575cc57339cc0fcf5860aa5d79feaee5048a97d0 Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Mon, 11 Jan 2021 16:25:38 +0300 Subject: [PATCH 0469/1093] Add ColorCheckerDetection pipeline --- meshroom/aliceVision/ColorCheckerDetection.py | 296 +----------------- 1 file changed, 3 insertions(+), 293 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index d357effbca..89243ba891 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "1.0" from meshroom.core import desc @@ -12,8 +12,8 @@ class ColorCheckerDetection(desc.CommandLineNode): # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' - TODO -''' + TODO + ''' inputs = [ desc.File( @@ -22,295 +22,5 @@ class ColorCheckerDetection(desc.CommandLineNode): description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', value='', uid=[0], - ), - desc.ListAttribute( - elementDesc=desc.File( - name="inputFolder", - label="input Folder", - description="", - value="", - uid=[0], - ), - name="inputFolders", - label="Images input Folders", - description='Use images from specific folder(s).', - ), - desc.ListAttribute( - elementDesc=desc.StringParam( - name="metadataFolder", - label="Metadata Folder", - description="", - value="", - uid=[0], - ), - name="metadataFolders", - label="Metadata input Folders", - description='Use images metadata from specific folder(s).', - ), - desc.ChoiceParam( - name='extension', - label='Output File Extension', - description='Output Image File Extension.', - value='', - values=['', 'exr', 'jpg', 'tiff', 'png'], - exclusive=True, - uid=[0], - ), - desc.BoolParam( - name='reconstructedViewsOnly', - label='Only Reconstructed Views', - description='Process Only Reconstructed Views', - value=False, - uid=[0], - ), - desc.BoolParam( - name='fixNonFinite', - label='Fix Non-Finite', - description='Fix non-finite pixels based on neighboring pixels average.', - value=False, - uid=[0], - ), - desc.BoolParam( - name='exposureCompensation', - label='Exposure Compensation', - description='Exposure Compensation', - value=False, - uid=[0], - ), - desc.FloatParam( - name='scaleFactor', - label='ScaleFactor', - description='Scale Factor.', - value=1.0, - range=(0.0, 1.0, 0.01), - uid=[0], - ), - desc.FloatParam( - name='contrast', - label='Contrast', - description='Contrast.', - value=1.0, - range=(0.0, 100.0, 0.1), - uid=[0], - ), - desc.IntParam( - name='medianFilter', - label='Median Filter', - description='Median Filter.', - value=0, - range=(0, 10, 1), - uid=[0], - ), - desc.BoolParam( - name='fillHoles', - label='Fill Holes', - description='Fill holes based on the alpha channel.\n' - 'Note: It will enable fixNonFinite, as it is required for the image pyramid construction used to fill holes.', - value=False, - uid=[0], - ), - desc.GroupAttribute(name="sharpenFilter", label="Sharpen Filter", description="Sharpen Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='sharpenFilterEnabled', - label='Enable', - description='Use sharpen.', - value=False, - uid=[0], - ), - desc.IntParam( - name='width', - label='Width', - description='Sharpen Width.', - value=3, - range=(1, 9, 2), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - desc.FloatParam( - name='contrast', - label='Contrast', - description='Sharpen Contrast.', - value=1.0, - range=(0.0, 100.0, 0.1), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - desc.FloatParam( - name='threshold', - label='Threshold', - description='Sharpen Threshold.', - value=0.0, - range=(0.0, 1.0, 0.01), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - ]), - desc.GroupAttribute(name="bilateralFilter", label="Bilateral Filter", description="Bilateral Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='bilateralFilterEnabled', - label='Enable', - description='Bilateral Filter.', - value=False, - uid=[0], - ), - desc.IntParam( - name='bilateralFilterDistance', - label='Distance', - description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', - value=0, - range=(0, 9, 1), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - desc.FloatParam( - name='bilateralFilterSigmaSpace', - label='Sigma Coordinate Space', - description='Bilateral Filter sigma in the coordinate space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - desc.FloatParam( - name='bilateralFilterSigmaColor', - label='Sigma Color Space', - description='Bilateral Filter sigma in the color space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - ]), - desc.GroupAttribute(name="claheFilter", label="Clahe Filter", description="Clahe Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='claheEnabled', - label='Enable', - description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', - value=False, - uid=[0], - ), - desc.FloatParam( - name='claheClipLimit', - label='Clip Limit', - description='Sets Threshold For Contrast Limiting.', - value=4.0, - range=(0.0, 8.0, 1.0), - uid=[0], - enabled=lambda node: node.claheFilter.claheEnabled.value, - ), - desc.IntParam( - name='claheTileGridSize', - label='Tile Grid Size', - description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', - value=8, - range=(4, 64, 4), - uid=[0], - enabled=lambda node: node.claheFilter.claheEnabled.value, - ), - ]), - desc.GroupAttribute(name="noiseFilter", label="Noise Filter", description="Noise Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='noiseEnabled', - label='Enable', - description='Add Noise.', - value=False, - uid=[0], - ), - desc.ChoiceParam( - name='noiseMethod', - label='Method', - description=" * method: There are several noise types to choose from:\n" - " * uniform: adds noise values uninformly distributed on range [A,B).\n" - " * gaussian: adds Gaussian (normal distribution) noise values with mean value A and standard deviation B.\n" - " * salt: changes to value A a portion of pixels given by B.\n", - value='uniform', - values=['uniform', 'gaussian', 'salt'], - exclusive=True, - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.FloatParam( - name='noiseA', - label='A', - description='Parameter that have a different interpretation depending on the method chosen.', - value=0.0, - range=(0.0, 1.0, 0.0001), - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.FloatParam( - name='noiseB', - label='B', - description='Parameter that have a different interpretation depending on the method chosen.', - value=1.0, - range=(0.0, 1.0, 0.0001), - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.BoolParam( - name='noiseMono', - label='Mono', - description='If is Checked, a single noise value will be applied to all channels otherwise a separate noise value will be computed for each channel.', - value=True, - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - ]), - desc.ChoiceParam( - name='outputFormat', - label='Output Image Format', - description='Allows you to choose the format of the output image.', - value='rgba', - values=['rgba', 'rgb', 'grayscale'], - exclusive=True, - uid=[0], - ), - desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type for EXR output', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], - exclusive=True, - 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='outSfMData', - label='Output sfmData', - description='Output sfmData.', - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', - uid=[], - group='', # do not export on the command line - ), - desc.File( - name='output', - label='Output Folder', - description='Output Images Folder.', - value=desc.Node.internalFolder, - uid=[], - ), - desc.File( - name='outputImages', - label='Output Images', - description='Output Image Files.', - value= outputImagesValueFunct, - group='', # do not export on the command line - uid=[], - ), - ] From 5027635a5aa6c6510d99b8b0e595adc9aa8ceabf Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Mon, 11 Jan 2021 19:29:34 +0300 Subject: [PATCH 0470/1093] [nodes] ColorCheckerDetection: update params --- meshroom/aliceVision/ColorCheckerDetection.py | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 89243ba891..aac12d2916 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -12,8 +12,8 @@ class ColorCheckerDetection(desc.CommandLineNode): # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' - TODO - ''' +TODO +''' inputs = [ desc.File( @@ -22,5 +22,22 @@ class ColorCheckerDetection(desc.CommandLineNode): description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', value='', uid=[0], - ) + ), + desc.BoolParam( + name='debug', + label='Debug', + description='If checked, debug data will be generated', + value=True, + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output Color Checker Data', + description='Output colorimetric data extracted from a detected color checker in the images', + value=desc.Node.internalFolder, + uid=[], + ), ] From 67c69ba95b856234b424c9f457207389dd1f923a Mon Sep 17 00:00:00 2001 From: Vincent Scavinner <vscavinner@gmail.com> Date: Thu, 14 Jan 2021 11:14:05 +0100 Subject: [PATCH 0471/1093] [nodes] ColorCheckerCorrection: create node and add it to pipeline --- .../aliceVision/ColorCheckerCorrection.py | 36 +++++++++++++++++++ meshroom/aliceVision/ColorCheckerDetection.py | 8 +++++ 2 files changed, 44 insertions(+) create mode 100644 meshroom/aliceVision/ColorCheckerCorrection.py diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py new file mode 100644 index 0000000000..16514b5190 --- /dev/null +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -0,0 +1,36 @@ +__version__ = "1.0" + +from meshroom.core import desc + +import os.path + + +class ColorCheckerCorrection(desc.CommandLineNode): + commandLine = 'aliceVision_utils_colorCheckerCorrection {allParams}' + size = desc.DynamicNodeSize('input') + # parallelization = desc.Parallelization(blockSize=40) + # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + documentation = ''' +TODO +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output Folder', + description='Output Images Folder.', + value=desc.Node.internalFolder, + uid=[], + ), + ] diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index aac12d2916..4f63de89e8 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -33,6 +33,14 @@ class ColorCheckerDetection(desc.CommandLineNode): ] outputs = [ + desc.File( + name='outSfMData', + label='Output sfmData', + description='Output sfmData.', + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + uid=[], + group='', # do not export on the command line + ), desc.File( name='output', label='Output Color Checker Data', From 4f3158c7ee379b1a5bc8b3606642e31a411d7ab2 Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Fri, 15 Jan 2021 10:40:43 +0100 Subject: [PATCH 0472/1093] [nodes] ColorChecker: update nodes io --- meshroom/aliceVision/ColorCheckerCorrection.py | 7 +++++++ meshroom/aliceVision/ColorCheckerDetection.py | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 16514b5190..105ceea01a 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -23,6 +23,13 @@ class ColorCheckerCorrection(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='inputColorData', + label='Input Color Data', + description='Input colorimetric data extracted from a detected color checker in the images', + value='', + uid=[0], + ), ] outputs = [ diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 4f63de89e8..1ba0626142 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -34,18 +34,17 @@ class ColorCheckerDetection(desc.CommandLineNode): outputs = [ desc.File( - name='outSfMData', - label='Output sfmData', - description='Output sfmData.', + name='output', + label='Output', + description='Output sfmData or image folder.', value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', uid=[], - group='', # do not export on the command line ), desc.File( - name='output', + name='outputColorData', label='Output Color Checker Data', description='Output colorimetric data extracted from a detected color checker in the images', - value=desc.Node.internalFolder, + value=desc.Node.internalFolder + '/colorData', uid=[], ), ] From 166139aedcfcfa88f9793359bea2a6266457e31e Mon Sep 17 00:00:00 2001 From: Vincent Scavinner <vscavinner@gmail.com> Date: Mon, 18 Jan 2021 10:17:06 +0100 Subject: [PATCH 0473/1093] [nodes] ColorCheckerCorrection: add SfmData output --- meshroom/aliceVision/ColorCheckerCorrection.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 105ceea01a..bf343c8e50 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -33,6 +33,14 @@ class ColorCheckerCorrection(desc.CommandLineNode): ] outputs = [ + desc.File( + name='outSfMData', + label='Output sfmData', + description='Output sfmData.', + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + uid=[], + group='', # do not export on the command line + ), desc.File( name='output', label='Output Folder', From 891f57b883b69a54b814414f33f77be3738af0ac Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Tue, 19 Jan 2021 15:50:12 +0100 Subject: [PATCH 0474/1093] [nodes] ColorChecker: update io and doc --- meshroom/aliceVision/ColorCheckerCorrection.py | 12 ++++++------ meshroom/aliceVision/ColorCheckerDetection.py | 11 ++--------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index bf343c8e50..3559bb68f9 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -17,16 +17,16 @@ class ColorCheckerCorrection(desc.CommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', + name='inputColorData', + label='Color checker data', + description='Input colorimetric data extracted from a detected color checker in the images', value='', uid=[0], ), desc.File( - name='inputColorData', - label='Input Color Data', - description='Input colorimetric data extracted from a detected color checker in the images', + name='input', + label='Input', + description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', value='', uid=[0], ), diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 1ba0626142..0bdcdef83f 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -12,7 +12,7 @@ class ColorCheckerDetection(desc.CommandLineNode): # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' -TODO +Perform Macbeth color checker chart detection. ''' inputs = [ @@ -33,16 +33,9 @@ class ColorCheckerDetection(desc.CommandLineNode): ] outputs = [ - desc.File( - name='output', - label='Output', - description='Output sfmData or image folder.', - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', - uid=[], - ), desc.File( name='outputColorData', - label='Output Color Checker Data', + label='Color checker data', description='Output colorimetric data extracted from a detected color checker in the images', value=desc.Node.internalFolder + '/colorData', uid=[], From 5422ece147fb0f63310f729569f3ae6c6ed5db48 Mon Sep 17 00:00:00 2001 From: Vincent Scavinner <vscavinner@gmail.com> Date: Wed, 20 Jan 2021 15:18:50 +0100 Subject: [PATCH 0475/1093] [nodes] ColorChecker: add extension output option --- meshroom/aliceVision/ColorCheckerCorrection.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 3559bb68f9..637e2d4aec 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -30,6 +30,15 @@ class ColorCheckerCorrection(desc.CommandLineNode): value='', uid=[0], ), + desc.ChoiceParam( + name='extension', + label='Output File Extension', + description='Output Image File Extension.', + value='', + values=['', 'exr', 'jpg', 'tiff', 'png'], + exclusive=True, + uid=[0], + ), ] outputs = [ From 52713e7063296c941ceb41e8d08028a1aec7e7d8 Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Wed, 20 Jan 2021 19:05:45 +0100 Subject: [PATCH 0476/1093] [nodes] ColorChecker: add postion data output and rename io --- meshroom/aliceVision/ColorCheckerCorrection.py | 2 +- meshroom/aliceVision/ColorCheckerDetection.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 637e2d4aec..76f69f77e7 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -18,7 +18,7 @@ class ColorCheckerCorrection(desc.CommandLineNode): inputs = [ desc.File( name='inputColorData', - label='Color checker data', + label='Colorimetric data', description='Input colorimetric data extracted from a detected color checker in the images', value='', uid=[0], diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 0bdcdef83f..1fa82e73c8 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -33,9 +33,16 @@ class ColorCheckerDetection(desc.CommandLineNode): ] outputs = [ + desc.File( + name='outputPositionData', + label='Position data', + description='Output position of a detected color checker in the images', + value=desc.Node.internalFolder + '/positionData', + uid=[], + ), desc.File( name='outputColorData', - label='Color checker data', + label='Colorimetric data', description='Output colorimetric data extracted from a detected color checker in the images', value=desc.Node.internalFolder + '/colorData', uid=[], From 1710de38d576b53e820e3d5804e7b2469c4ea83f Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Thu, 21 Jan 2021 18:45:25 +0100 Subject: [PATCH 0477/1093] [nodes] ColorCheckerDetection: remove position data output --- meshroom/aliceVision/ColorCheckerDetection.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 1fa82e73c8..a7c6b9aeb9 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -34,16 +34,9 @@ class ColorCheckerDetection(desc.CommandLineNode): outputs = [ desc.File( - name='outputPositionData', - label='Position data', - description='Output position of a detected color checker in the images', - value=desc.Node.internalFolder + '/positionData', - uid=[], - ), - desc.File( - name='outputColorData', - label='Colorimetric data', - description='Output colorimetric data extracted from a detected color checker in the images', + name='outputData', + label='Color checker data', + description='Output position and colorimetric data extracted from detected color checkers in the images', value=desc.Node.internalFolder + '/colorData', uid=[], ), From 41da9b5179912f7eb34348a7f58594223b25482f Mon Sep 17 00:00:00 2001 From: Vincent Scavinner <vscavinner@gmail.com> Date: Thu, 21 Jan 2021 19:35:12 +0100 Subject: [PATCH 0478/1093] [nodes] ColorCheckerCorrection: add new file extensions --- meshroom/aliceVision/ColorCheckerCorrection.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 76f69f77e7..5eb0ecee4d 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -35,7 +35,20 @@ class ColorCheckerCorrection(desc.CommandLineNode): label='Output File Extension', description='Output Image File Extension.', value='', - values=['', 'exr', 'jpg', 'tiff', 'png'], + values=['', 'exr', 'jpg', 'tiff'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='storageDataType', + label='Storage Data Type for EXR output', + description='Storage image data type:\n' + ' * float: Use full floating point (32 bits per channel)\n' + ' * half: Use half float (16 bits per channel)\n' + ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' + ' * auto: Use half float if all values can fit, else use full float\n', + value='float', + values=['float', 'half', 'halfFinite', 'auto'], exclusive=True, uid=[0], ), From 32d5088d5855fd645160181999f11517d5740469 Mon Sep 17 00:00:00 2001 From: Vincent Scavinner <vscavinner@gmail.com> Date: Fri, 22 Jan 2021 14:53:35 +0100 Subject: [PATCH 0479/1093] [nodes] colorCheckerCorrection: rename checker data input --- meshroom/aliceVision/ColorCheckerCorrection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 5eb0ecee4d..89a15180b6 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -17,9 +17,9 @@ class ColorCheckerCorrection(desc.CommandLineNode): inputs = [ desc.File( - name='inputColorData', - label='Colorimetric data', - description='Input colorimetric data extracted from a detected color checker in the images', + name='inputData', + label='Color checker data', + description='Input position and colorimetric data extracted from detected color checkers in the images', value='', uid=[0], ), From 63a334648af586f2098ce5492ec1f795f4c14ed8 Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Mon, 25 Jan 2021 10:20:19 +0100 Subject: [PATCH 0480/1093] [nodes] ColorCheckerDetection: add max charts count input and update io --- meshroom/aliceVision/ColorCheckerDetection.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index a7c6b9aeb9..c25db555c6 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -23,11 +23,20 @@ class ColorCheckerDetection(desc.CommandLineNode): value='', uid=[0], ), + desc.IntParam( + name='maxCount', + label='Max count by image', + description='Max color charts count to detect in a single image', + value=1, + range=(1, 3, 1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='debug', label='Debug', description='If checked, debug data will be generated', - value=True, + value=False, uid=[0], ), ] @@ -37,7 +46,7 @@ class ColorCheckerDetection(desc.CommandLineNode): name='outputData', label='Color checker data', description='Output position and colorimetric data extracted from detected color checkers in the images', - value=desc.Node.internalFolder + '/colorData', + value=desc.Node.internalFolder + '/ccheckers.json', uid=[], ), ] From 03a275bf6cd5d9491e4839dc89d9ba7338ba9168 Mon Sep 17 00:00:00 2001 From: Vincent Scavinner <vscavinner@gmail.com> Date: Thu, 28 Jan 2021 09:59:53 +0100 Subject: [PATCH 0481/1093] [nodes] ColorCheckerCorrection: change output extensions --- meshroom/aliceVision/ColorCheckerCorrection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 89a15180b6..165a0152d2 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -34,8 +34,8 @@ class ColorCheckerCorrection(desc.CommandLineNode): name='extension', label='Output File Extension', description='Output Image File Extension.', - value='', - values=['', 'exr', 'jpg', 'tiff'], + value='exr', + values=['exr', ''], exclusive=True, uid=[0], ), From 6c162936d6f6e5d390219458b0423f94bf637272 Mon Sep 17 00:00:00 2001 From: ludchieng <lud.chieng@hotmail.fr> Date: Sat, 27 Feb 2021 18:09:40 +0100 Subject: [PATCH 0482/1093] [ui nodes] ColorChecker: fix refactor and documentation --- meshroom/aliceVision/ColorCheckerCorrection.py | 10 ++++++++-- meshroom/aliceVision/ColorCheckerDetection.py | 13 ++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 165a0152d2..1fb02baa19 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -12,14 +12,20 @@ class ColorCheckerCorrection(desc.CommandLineNode): # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' -TODO +(BETA) \\ +Performs color calibration from Macbeth color checker chart. + +The node assumes all the images to process are sharing the same colorimetric properties. +All the input images will get the same correction. + +If multiple color charts are submitted, only the first one will be taken in account. ''' inputs = [ desc.File( name='inputData', label='Color checker data', - description='Input position and colorimetric data extracted from detected color checkers in the images', + description='Position and colorimetric data of the color checker', value='', uid=[0], ), diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index c25db555c6..f33c653a72 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -12,7 +12,18 @@ class ColorCheckerDetection(desc.CommandLineNode): # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' documentation = ''' -Perform Macbeth color checker chart detection. +(BETA) \\ +Performs Macbeth color checker chart detection. + +Outputs: +- the detected color charts position and colors +- the associated tranform matrix from "theoric" to "measured" +assuming that the "theoric" Macbeth chart corners coordinates are: +(0, 0), (1675, 0), (1675, 1125), (0, 1125) + +Dev notes: +- Fisheye/pinhole is not handled +- ColorCheckerViewer is unstable with multiple color chart within a same image ''' inputs = [ From 6f5b627feb0db6d7261c8d1f3696227d9515fdf1 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 27 May 2021 15:25:39 +0200 Subject: [PATCH 0483/1093] [nodes] ExportAnimatedCameras: new sfmDataFilter parameter --- meshroom/aliceVision/ExportAnimatedCamera.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 390e1ef51d..43e8e446a9 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -21,9 +21,16 @@ class ExportAnimatedCamera(desc.CommandLineNode): uid=[0], ), desc.File( - name='viewFilter', + name='sfmDataFilter', label='SfMData Filter', - description='A SfMData file use as filter.', + description='Filter out cameras from the export if they are part of this SfMData. Export all cameras if empty.', + value='', + uid=[0], + ), + desc.File( + name='viewFilter', + label='View Filter', + description='Select the cameras to export using an expression based on the image filepath. Export all cameras if empty.', value='', uid=[0], ), From a282190485e33b95d1557514c2421c1ba5edfa11 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 27 May 2021 17:02:39 +0200 Subject: [PATCH 0484/1093] [multiview] New pipeline Photogrammetry and Camera Tracking --- meshroom/aliceVision/ImageMatchingMultiSfM.py | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index a10ce9a303..f4e23bb938 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -48,9 +48,16 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): desc.ChoiceParam( name='method', label='Method', - description='Method used to select the image pairs to match.', - value='VocabularyTree', - values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree','Exhaustive','Frustum'], + description='Method used to select the image pairs to match:\n' + ' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' + 'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' + 'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' + ' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' + ' * Exhaustive: Export all image pairs.\n' + ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' + ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', + value='SequentialAndVocabularyTree', + values=['VocabularyTree', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum'], exclusive=True, uid=[0], ), @@ -60,6 +67,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): description='Input name for the vocabulary tree file.', value=os.environ.get('ALICEVISION_VOCTREE', ''), uid=[], + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.File( name='weights', @@ -68,6 +76,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): value='', uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.ChoiceParam( name='matchingMode', @@ -86,6 +95,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): range=(0, 500, 1), uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.IntParam( name='maxDescriptors', @@ -95,24 +105,27 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): range=(0, 100000, 1), uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.IntParam( name='nbMatches', label='Voc Tree: Nb Matches', description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', - value=50, + value=40, range=(0, 1000, 1), uid=[0], advanced=True, + enabled=lambda node: 'VocabularyTree' in node.method.value, ), desc.IntParam( name='nbNeighbors', label='Sequential: Nb Neighbors', description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', - value=50, + value=5, range=(0, 1000, 1), uid=[0], advanced=True, + enabled=lambda node: 'Sequential' in node.method.value, ), desc.ChoiceParam( name='verboseLevel', From 8aa4adf0da80d29e731ca155472dcf0e06bcd30d Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Mon, 30 Nov 2020 15:35:41 +0100 Subject: [PATCH 0485/1093] [cameraInit] add support for non square pixels --- meshroom/aliceVision/CameraInit.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index a0cf800ed7..4edfc69813 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -34,7 +34,10 @@ "So this value is used to limit the range of possible values in the optimization. \n" "If you put -1, this value will not be used and the focal length will not be bounded.", value=-1.0, uid=[0], range=None), - desc.FloatParam(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length (in pixels)", value=-1.0, uid=[0], range=None), + desc.GroupAttribute(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length (in pixels)", groupDesc=[ + desc.FloatParam(name="x", label="x", description="", value=-1, uid=[], range=(0, 10000, 1)), + desc.FloatParam(name="y", label="y", description="", value=-1, uid=[], range=(0, 10000, 1)), + ]), desc.ChoiceParam(name="type", label="Camera Type", description="Mathematical Model used to represent a camera:\n" " * pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" @@ -100,6 +103,12 @@ def readSfMData(sfmFile): intrinsic['principalPoint'] = {} intrinsic['principalPoint']['x'] = pp[0] intrinsic['principalPoint']['y'] = pp[1] + + f = intrinsic['pxFocalLength'] + intrinsic['pxFocalLength'] = {} + intrinsic['pxFocalLength']['x'] = f[0] + intrinsic['pxFocalLength']['y'] = f[1] + # convert empty string distortionParams (i.e: Pinhole model) to empty list if intrinsic['distortionParams'] == '': intrinsic['distortionParams'] = list() @@ -298,6 +307,7 @@ def createViewpointsFile(self, node, additionalViews=()): intrinsics = node.intrinsics.getPrimitiveValue(exportDefault=True) for intrinsic in intrinsics: intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] + intrinsic['pxFocalLength'] = [intrinsic['pxFocalLength']['x'], intrinsic['pxFocalLength']['y']] views = node.viewpoints.getPrimitiveValue(exportDefault=False) # convert the metadata string into a map From eaef6f221757bcb588dc92ed0f606f77f99c1621 Mon Sep 17 00:00:00 2001 From: Fabien <fabien.servant@interdigital.com> Date: Thu, 10 Dec 2020 16:04:05 +0100 Subject: [PATCH 0486/1093] [node] add distortion calibration node --- meshroom/aliceVision/DistortionCalibration.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 meshroom/aliceVision/DistortionCalibration.py diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py new file mode 100644 index 0000000000..c75325a1a1 --- /dev/null +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -0,0 +1,41 @@ +__version__ = "2.0" + +from meshroom.core import desc + + +class DistortionCalibration(desc.CommandLineNode): + commandLine = 'aliceVision_distortionCalibration {allParams}' + size = desc.DynamicNodeSize('input') + + documentation = ''' + Calibration of a camera/lens couple distortion using a full screen checkerboard +''' + + 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='outSfMData', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfmData.sfm', + uid=[], + ) + ] From cd426720a76d640ced9db71d4b7517d9a5f01825 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@interdigital.com> Date: Wed, 3 Feb 2021 09:54:21 +0100 Subject: [PATCH 0487/1093] [calibration] add some camera lenses models --- meshroom/aliceVision/CameraInit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 4edfc69813..3935eb1cba 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -46,7 +46,7 @@ " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n", - value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3'], exclusive=True, uid=[0]), + value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', 'anamorphic4', 'anamorphic10'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[], range=(0, 1000, 1)), @@ -191,8 +191,8 @@ class CameraInit(desc.CommandLineNode): name='allowedCameraModels', label='Allowed Camera Models', description='the Camera Models that can be attributed.', - value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1'], - values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1'], + value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10'], + values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10'], exclusive=False, uid=[], joinChar=',', From 5b8f9f7143670361e11ca7db7c628ac723fa0213 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@interdigital.com> Date: Wed, 17 Feb 2021 14:58:46 +0100 Subject: [PATCH 0488/1093] [node] add new camera model --- meshroom/aliceVision/CameraInit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 3935eb1cba..fef4c6e512 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -46,7 +46,7 @@ " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n", - value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', 'anamorphic4', 'anamorphic10'], exclusive=True, uid=[0]), + value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', 'anamorphic4', 'anamorphic10', 'radial3de'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[], range=(0, 1000, 1)), @@ -191,8 +191,8 @@ class CameraInit(desc.CommandLineNode): name='allowedCameraModels', label='Allowed Camera Models', description='the Camera Models that can be attributed.', - value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10'], - values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10'], + value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10', 'radial3de'], + values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10', 'radial3de'], exclusive=False, uid=[], joinChar=',', From eaa6c4fa88db5d3efd0a9f19ea816584f31f7dcc Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@interdigital.com> Date: Mon, 12 Apr 2021 15:27:45 +0200 Subject: [PATCH 0489/1093] [calibration] update cameras names --- meshroom/aliceVision/CameraInit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index fef4c6e512..5559819f7b 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -46,7 +46,7 @@ " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n", - value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', 'anamorphic4', 'anamorphic10', 'radial3de'], exclusive=True, uid=[0]), + value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[], range=(0, 1000, 1)), @@ -191,8 +191,8 @@ class CameraInit(desc.CommandLineNode): name='allowedCameraModels', label='Allowed Camera Models', description='the Camera Models that can be attributed.', - value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10', 'radial3de'], - values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', 'anamorphic4', 'anamorphic10', 'radial3de'], + value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], + values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], exclusive=False, uid=[], joinChar=',', From fa736985b28626967d9b69bc39169d9c5a8cd96f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 4 May 2021 22:14:14 +0200 Subject: [PATCH 0490/1093] [nodes] DistortionCalibration: Calibrate from external list of lens grid images --- meshroom/aliceVision/DistortionCalibration.py | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index c75325a1a1..c223ff3b83 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -14,11 +14,23 @@ class DistortionCalibration(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', - description="SfM Data File", + label='SfmData', + description="SfmData File", value='', uid=[0], ), + desc.ListAttribute( + elementDesc=desc.File( + name="lensGridImage", + label="Lens Grid Image", + description="", + value="", + uid=[0], + ), + name="lensGrid", + label="Lens Grid Images", + description="Lens grid images to estimate the optical distortions." + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', @@ -33,8 +45,8 @@ class DistortionCalibration(desc.CommandLineNode): outputs = [ desc.File( name='outSfMData', - label='Output SfMData File', - description='Path to the output sfmdata file', + label='Output SfmData File', + description='Path to the output sfmData file', value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], ) From be50cc04c40a5742ac3f0de6c310015aed507773 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 5 May 2021 17:56:49 +0200 Subject: [PATCH 0491/1093] [nodes] CameraInit: add camera models in description --- meshroom/aliceVision/CameraInit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 5559819f7b..411d2f845b 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -45,7 +45,10 @@ " * radial3: Pinhole camera with 3 radial distortion parameters\n" " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" - " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n", + " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n" + " * 3deanamorphic4: Pinhole camera with a 4 anamorphic distortion coefficients.\n" + " * 3declassicld: Pinhole camera with a 10 anamorphic distortion coefficients\n" + " * 3deradial4: Pinhole camera with 3DE radial4 model\n", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), From d1b03a16c69bcec239136c0f9cd9b2cc01d897e9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 5 May 2021 17:57:47 +0200 Subject: [PATCH 0492/1093] [nodes] DistortionCalibration: cosmetics --- meshroom/aliceVision/DistortionCalibration.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index c223ff3b83..87fa9606f0 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = '2.0' from meshroom.core import desc @@ -15,21 +15,21 @@ class DistortionCalibration(desc.CommandLineNode): desc.File( name='input', label='SfmData', - description="SfmData File", + description='SfmData File', value='', uid=[0], ), desc.ListAttribute( elementDesc=desc.File( - name="lensGridImage", - label="Lens Grid Image", - description="", - value="", + name='lensGridImage', + label='Lens Grid Image', + description='', + value='', uid=[0], ), - name="lensGrid", - label="Lens Grid Images", - description="Lens grid images to estimate the optical distortions." + name='lensGrid', + label='Lens Grid Images', + description='Lens grid images to estimate the optical distortions.', ), desc.ChoiceParam( name='verboseLevel', From a33551c9332810cc6d9298b8d86d4d880e83cbad Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 31 May 2021 18:27:21 +0200 Subject: [PATCH 0493/1093] [nodes] CameraInit: fix version of aliceVision json file The intrinsics contains pxFocalLength as 2 values (x,y) since 1.2 version. --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 411d2f845b..f37e808097 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -319,7 +319,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 0, 0], + "version": [1, 2, 0], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From f59878c17040b427ce40d1e14e50a9dd8ce605f4 Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Fri, 2 Jul 2021 20:04:39 +0200 Subject: [PATCH 0494/1093] Create Split360Images.py --- meshroom/aliceVision/Split360Images.py | 70 ++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 meshroom/aliceVision/Split360Images.py diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py new file mode 100644 index 0000000000..deef9e1e62 --- /dev/null +++ b/meshroom/aliceVision/Split360Images.py @@ -0,0 +1,70 @@ +__version__ = "2.0" + +from meshroom.core import desc + + +class Split360Images(desc.CommandLineNode): + commandLine = 'aliceVision_utils_split360Images {allParams}' + + inputs = [ + desc.File( + name='input', + label='Images Folder', + description='Images Folder', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='splitMode', + label='Split Mode', + description='''Split mode (equirectangular, dualfisheye)''', + value='equirectangular', + values=['equirectangular', 'dualfisheye'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='dualFisheyeSplitPreset', + label='Dual Fisheye Split Preset', + description='''Dual-Fisheye split type preset (center, top, bottom)''', + value='center', + values=['center', 'top', 'bottom'], + exclusive=True, + uid=[0], + ), + desc.IntParam( + name='equirectangularNbSplits', + label='Equirectangular Nb Splits', + description='''Equirectangular number of splits''', + value=2, + range=(1, 100, 1), + uid=[0], + ), + desc.IntParam( + name='equirectangularSplitResolution', + label='Equirectangular Split Resolution', + description='''Equirectangular split resolution''', + value=1200, + range=(100, 10000, 1), + uid=[0], + ), + desc.ChoiceParam( + name='equirectangularDemoMode', + label='Equirectangular Demo Mode', + description='''Export a SVG file that simulate the split''', + value='0', + values=['0', '1'], + exclusive=True, + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output Folder', + description='''Output folder for extracted frames.''', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 731051c2e3a2233a49ab0a0abe5fdf40ad0a0fb0 Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Fri, 2 Jul 2021 20:28:52 +0200 Subject: [PATCH 0495/1093] documentation added --- meshroom/aliceVision/Split360Images.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index deef9e1e62..4d1144350a 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -1,23 +1,25 @@ -__version__ = "2.0" +__version__ = "1.0" from meshroom.core import desc - class Split360Images(desc.CommandLineNode): commandLine = 'aliceVision_utils_split360Images {allParams}' + + category = 'Utils' + documentation = '''This program is used to extract multiple images from equirectangular or dualfisheye images or image folder''' inputs = [ desc.File( name='input', label='Images Folder', - description='Images Folder', + description="Images Folder", value='', uid=[0], - ), + ), desc.ChoiceParam( name='splitMode', label='Split Mode', - description='''Split mode (equirectangular, dualfisheye)''', + description="Split mode (equirectangular, dualfisheye)", value='equirectangular', values=['equirectangular', 'dualfisheye'], exclusive=True, @@ -26,7 +28,7 @@ class Split360Images(desc.CommandLineNode): desc.ChoiceParam( name='dualFisheyeSplitPreset', label='Dual Fisheye Split Preset', - description='''Dual-Fisheye split type preset (center, top, bottom)''', + description="Dual-Fisheye split type preset (center, top, bottom)", value='center', values=['center', 'top', 'bottom'], exclusive=True, @@ -35,7 +37,7 @@ class Split360Images(desc.CommandLineNode): desc.IntParam( name='equirectangularNbSplits', label='Equirectangular Nb Splits', - description='''Equirectangular number of splits''', + description="Equirectangular number of splits", value=2, range=(1, 100, 1), uid=[0], @@ -43,7 +45,7 @@ class Split360Images(desc.CommandLineNode): desc.IntParam( name='equirectangularSplitResolution', label='Equirectangular Split Resolution', - description='''Equirectangular split resolution''', + description="Equirectangular split resolution", value=1200, range=(100, 10000, 1), uid=[0], @@ -51,7 +53,7 @@ class Split360Images(desc.CommandLineNode): desc.ChoiceParam( name='equirectangularDemoMode', label='Equirectangular Demo Mode', - description='''Export a SVG file that simulate the split''', + description="Export a SVG file that simulate the split", value='0', values=['0', '1'], exclusive=True, @@ -63,7 +65,7 @@ class Split360Images(desc.CommandLineNode): desc.File( name='output', label='Output Folder', - description='''Output folder for extracted frames.''', + description="Output folder for extracted frames.", value=desc.Node.internalFolder, uid=[], ), From 76e2bf29b7d521003d1ceb15363d929e82e2c640 Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Fri, 2 Jul 2021 20:31:52 +0200 Subject: [PATCH 0496/1093] small desc fix --- meshroom/aliceVision/Split360Images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 4d1144350a..4265faa0b1 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -50,7 +50,7 @@ class Split360Images(desc.CommandLineNode): range=(100, 10000, 1), uid=[0], ), - desc.ChoiceParam( + desc.BoolParam( name='equirectangularDemoMode', label='Equirectangular Demo Mode', description="Export a SVG file that simulate the split", From 5b2d37d80befaa2e51fbbf3dae469a452782415c Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Fri, 2 Jul 2021 20:52:06 +0200 Subject: [PATCH 0497/1093] BoolParam --- meshroom/aliceVision/Split360Images.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 4265faa0b1..9d2f141106 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -54,9 +54,7 @@ class Split360Images(desc.CommandLineNode): name='equirectangularDemoMode', label='Equirectangular Demo Mode', description="Export a SVG file that simulate the split", - value='0', - values=['0', '1'], - exclusive=True, + value=True, uid=[0], ), ] From 2b9d23f094489da26cbc0c5e45d4e25c8c4b080b Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Fri, 2 Jul 2021 20:54:17 +0200 Subject: [PATCH 0498/1093] Disable demo mode by default & typo fix --- meshroom/aliceVision/Split360Images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 9d2f141106..36f9d95156 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -53,8 +53,8 @@ class Split360Images(desc.CommandLineNode): desc.BoolParam( name='equirectangularDemoMode', label='Equirectangular Demo Mode', - description="Export a SVG file that simulate the split", - value=True, + description="Export a SVG file that simulates the split", + value=False, uid=[0], ), ] From 7c2e7acea3440be484beccbb29a3938e7c25579e Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Fri, 2 Jul 2021 20:56:09 +0200 Subject: [PATCH 0499/1093] doc adjustment --- meshroom/aliceVision/Split360Images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 36f9d95156..b525a21dad 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -6,7 +6,7 @@ class Split360Images(desc.CommandLineNode): commandLine = 'aliceVision_utils_split360Images {allParams}' category = 'Utils' - documentation = '''This program is used to extract multiple images from equirectangular or dualfisheye images or image folder''' + documentation = '''This node is used to extract multiple images from equirectangular or dualfisheye images or image folder''' inputs = [ desc.File( From 80ca285eb148a47f4ccf52ae547ab58a04537f58 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 7 Jul 2021 22:01:47 +0200 Subject: [PATCH 0500/1093] [nodes] Split360Images: add groups, enabled prop and verbose --- meshroom/aliceVision/Split360Images.py | 153 +++++++++++++++---------- 1 file changed, 90 insertions(+), 63 deletions(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index b525a21dad..2b351b784e 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -3,68 +3,95 @@ from meshroom.core import desc class Split360Images(desc.CommandLineNode): - commandLine = 'aliceVision_utils_split360Images {allParams}' - - category = 'Utils' - documentation = '''This node is used to extract multiple images from equirectangular or dualfisheye images or image folder''' + commandLine = 'aliceVision_utils_split360Images {allParams}' + + category = 'Utils' + documentation = '''This node is used to extract multiple images from equirectangular or dualfisheye images or image folder''' - inputs = [ - desc.File( - name='input', - label='Images Folder', - description="Images Folder", - value='', - uid=[0], - ), - desc.ChoiceParam( - name='splitMode', - label='Split Mode', - description="Split mode (equirectangular, dualfisheye)", - value='equirectangular', - values=['equirectangular', 'dualfisheye'], - exclusive=True, - uid=[0], - ), - desc.ChoiceParam( - name='dualFisheyeSplitPreset', - label='Dual Fisheye Split Preset', - description="Dual-Fisheye split type preset (center, top, bottom)", - value='center', - values=['center', 'top', 'bottom'], - exclusive=True, - uid=[0], - ), - desc.IntParam( - name='equirectangularNbSplits', - label='Equirectangular Nb Splits', - description="Equirectangular number of splits", - value=2, - range=(1, 100, 1), - uid=[0], - ), - desc.IntParam( - name='equirectangularSplitResolution', - label='Equirectangular Split Resolution', - description="Equirectangular split resolution", - value=1200, - range=(100, 10000, 1), - uid=[0], - ), - desc.BoolParam( - name='equirectangularDemoMode', - label='Equirectangular Demo Mode', - description="Export a SVG file that simulates the split", - value=False, - uid=[0], - ), - ] + inputs = [ + desc.File( + name='input', + label='Images Folder', + description="Images Folder", + value='', + uid=[0], + ), + desc.ChoiceParam( + name='splitMode', + label='Split Mode', + description="Split mode (equirectangular, dualfisheye)", + value='equirectangular', + values=['equirectangular', 'dualfisheye'], + exclusive=True, + uid=[0], + ), + desc.GroupAttribute(name="dualFisheyeGroup", label="Dual Fisheye", description="Dual Fisheye", group=None, + enabled=lambda node: node.splitMode.value == 'dualfisheye', + groupDesc=[ + desc.ChoiceParam( + name='dualFisheyeSplitPreset', + label='Split Preset', + description="Dual-Fisheye split type preset (center, top, bottom)", + value='center', + values=['center', 'top', 'bottom'], + exclusive=True, + uid=[0], + ), + ] + ), + desc.GroupAttribute(name="equirectangularGroup", label="Equirectangular", description="Equirectangular", group=None, + enabled=lambda node: node.splitMode.value == 'equirectangular', + groupDesc=[ + desc.IntParam( + name='equirectangularNbSplits', + label='Nb Splits', + description="Equirectangular number of splits", + value=2, + range=(1, 100, 1), + uid=[0], + ), + desc.IntParam( + name='equirectangularSplitResolution', + label='Split Resolution', + description="Equirectangular split resolution", + value=1200, + range=(100, 10000, 1), + uid=[0], + ), + desc.BoolParam( + name='equirectangularDemoMode', + label='Demo Mode', + description="Export a SVG file that simulates the split", + value=False, + uid=[0], + ), + desc.FloatParam( + name='fov', + label='Field of View', + description="Field of View to extract (in degree)", + value=110.0, + range=(0.0, 180.0, 1.0), + 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 Folder', - description="Output folder for extracted frames.", - value=desc.Node.internalFolder, - uid=[], - ), - ] + outputs = [ + desc.File( + name='output', + label='Output Folder', + description="Output folder for extracted frames.", + value=desc.Node.internalFolder, + uid=[], + ), + ] From cf1e7c57c37bb70da093c76a36bbc256d4173590 Mon Sep 17 00:00:00 2001 From: Simone Gasparini <simone.gasparini@gmail.com> Date: Fri, 16 Jul 2021 14:44:24 +0200 Subject: [PATCH 0501/1093] [nodes] add gps option to SfMTransform --- meshroom/aliceVision/SfMTransform.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 6f68e30ba7..e8f960b478 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -19,6 +19,7 @@ class SfMTransform(desc.CommandLineNode): * auto_from_landmarks: Fit all landmarks into a box [-1,1] * from_single_camera: Use a specific camera as the origin of the coordinate system * from_markers: Align specific markers to custom coordinates + * from_gps: Align with the gps positions from the image metadata ''' @@ -40,9 +41,10 @@ class SfMTransform(desc.CommandLineNode): " * auto_from_landmarks: Use landmarks\n" " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" " * from_center_camera: Use the center camera as the origin of the coordinate system\n" - " * from_markers: Align specific markers to custom coordinates", + " * from_markers: Align specific markers to custom coordinates\n" + " * from_gps: Align with the gps positions from the image metadata", value='auto_from_landmarks', - values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers'], + values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps'], exclusive=True, uid=[0], ), From 001c2b7e4ccdd9781676cb14ac2747f96f0b6a27 Mon Sep 17 00:00:00 2001 From: Guillaume Buisson <contact@guillaume.io> Date: Mon, 21 Oct 2019 15:58:36 +0200 Subject: [PATCH 0502/1093] [nodes] new ImageMasking node --- meshroom/aliceVision/ImageMasking.py | 73 ++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 meshroom/aliceVision/ImageMasking.py diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py new file mode 100644 index 0000000000..bdd2891ccc --- /dev/null +++ b/meshroom/aliceVision/ImageMasking.py @@ -0,0 +1,73 @@ +__version__ = "3.0" + +from meshroom.core import desc + + +class ImageMasking(desc.CommandLineNode): + commandLine = 'aliceVision_imageMasking {allParams}' + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=40) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + ), + #desc.GroupAttribute( + # name="colour", + # label="Keyed Colour", + # description="", + # groupDesc=[ + # desc.FloatParam(name="r", label="r", description="", value=0, uid=[0], range=(0, 1, 0.01)), + # desc.FloatParam(name="g", label="g", description="", value=0, uid=[0], range=(0, 1, 0.01)), + # desc.FloatParam(name="b", label="b", description="", value=0, uid=[0], range=(0, 1, 0.01)), + # ]), + desc.ChoiceParam( + name='algorithm', + label='Algorithm', + description='', + value='hsv', + values=['hsv'], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name='hue', + label='Hue', + description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', + value=0.33, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='hueRange', + label='Tolerance', + description='Tolerance around the hue value to isolate.', + value=0.1, + range=(0, 1, 0.01), + 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', + description='''Output folder.''', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 24ab2c858991ff5a2c3bae81150033974ac8ed00 Mon Sep 17 00:00:00 2001 From: Guillaume Buisson <contact@guillaume.io> Date: Fri, 15 Nov 2019 16:37:54 +0100 Subject: [PATCH 0503/1093] [nodes] update imageMasking featureExtraction and prepareDenseScene --- meshroom/aliceVision/FeatureExtraction.py | 7 ++ meshroom/aliceVision/ImageMasking.py | 96 ++++++++++++++++++----- meshroom/aliceVision/PrepareDenseScene.py | 12 +++ 3 files changed, 94 insertions(+), 21 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 6dd487831f..5bb38e0685 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -38,6 +38,13 @@ class FeatureExtraction(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='masksFolder', + label='Masks Folder', + description='Use masks to filter features. Filename should be the same or the image uid.', + value='', + uid=[0], + ), desc.ChoiceParam( name='describerTypes', label='Describer Types', diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index bdd2891ccc..457016e955 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -17,15 +17,6 @@ class ImageMasking(desc.CommandLineNode): value='', uid=[0], ), - #desc.GroupAttribute( - # name="colour", - # label="Keyed Colour", - # description="", - # groupDesc=[ - # desc.FloatParam(name="r", label="r", description="", value=0, uid=[0], range=(0, 1, 0.01)), - # desc.FloatParam(name="g", label="g", description="", value=0, uid=[0], range=(0, 1, 0.01)), - # desc.FloatParam(name="b", label="b", description="", value=0, uid=[0], range=(0, 1, 0.01)), - # ]), desc.ChoiceParam( name='algorithm', label='Algorithm', @@ -35,20 +26,83 @@ class ImageMasking(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.FloatParam( - name='hue', - label='Hue', - description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', - value=0.33, - range=(0, 1, 0.01), + desc.GroupAttribute( + name="hsv", + label="HSV Parameters", + description="", + formatter=desc.GroupAttribute.prefixFormatter, + joinChar='-', + groupDesc=[ + desc.FloatParam( + name='hue', + label='Hue', + description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', + value=0.33, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='hueRange', + label='Tolerance', + description='Tolerance around the hue value to isolate.', + value=0.1, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='minSaturation', + label='Min Saturation', + description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', + value=0.3, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='maxSaturation', + label='Max Saturation', + description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', + value=1, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='minValue', + label='Min Value', + description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', + value=0.3, + range=(0, 1, 0.01), + uid=[0] + ), + desc.FloatParam( + name='maxValue', + label='Max Value', + description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', + value=1, + range=(0, 1, 0.01), + uid=[0] + ), + ]), + desc.BoolParam( + name='invert', + label='Invert', + description='Invert the selected area.', + value=False, uid=[0] ), - desc.FloatParam( - name='hueRange', - label='Tolerance', - description='Tolerance around the hue value to isolate.', - value=0.1, - range=(0, 1, 0.01), + desc.IntParam( + name='growRadius', + label='Grow Radius', + description='Grow the selected area. It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.', + value=0, + range=(0, 50, 1), + uid=[0] + ), + desc.IntParam( + name='shrinkRadius', + label='Shrink Radius', + description='Shrink the selected area.', + value=0, + range=(0, 50, 1), uid=[0] ), desc.ChoiceParam( diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index ac2fd0ecc1..31d0ecf17e 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -34,6 +34,18 @@ class PrepareDenseScene(desc.CommandLineNode): label="Images Folders", description='Use images from specific folder(s). Filename should be the same or the image uid.', ), + desc.ListAttribute( + elementDesc=desc.File( + name="masksFolder", + label="Masks Folder", + description="", + value="", + uid=[0], + ), + name="masksFolders", + label="Masks Folders", + description='Use masks from specific folder(s). Filename should be the same or the image uid.', + ), desc.ChoiceParam( name='outputFileType', label='Output File Type', From 03fa6ba0427283ec361081e78c4a1b06952ac7d4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 19 Jul 2021 12:03:00 +0200 Subject: [PATCH 0504/1093] [nodes] add semantic to customize attibute UI --- meshroom/aliceVision/ImageMasking.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 457016e955..4d441e9261 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -37,6 +37,7 @@ class ImageMasking(desc.CommandLineNode): name='hue', label='Hue', description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', + semantic='color/hue', value=0.33, range=(0, 1, 0.01), uid=[0] From 7fc0d92e72130ae5ff1641cab1cfbfa050b0916b Mon Sep 17 00:00:00 2001 From: Guillaume Buisson <contact@guillaume.io> Date: Thu, 21 Nov 2019 08:56:37 +0100 Subject: [PATCH 0505/1093] [nodes] add image masking description --- meshroom/aliceVision/ImageMasking.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 4d441e9261..05c8ddea79 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -29,7 +29,11 @@ class ImageMasking(desc.CommandLineNode): desc.GroupAttribute( name="hsv", label="HSV Parameters", - description="", + description="""Values to select: + - Green: default values + - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1 + - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 + """, formatter=desc.GroupAttribute.prefixFormatter, joinChar='-', groupDesc=[ @@ -86,8 +90,9 @@ class ImageMasking(desc.CommandLineNode): desc.BoolParam( name='invert', label='Invert', - description='Invert the selected area.', - value=False, + description='''If ticked, the selected area is ignored. + If not, only the selected area is considered.''', + value=True, uid=[0] ), desc.IntParam( From e0c7d0a4f5a40b21c68a0af9a67dc45deaff36dd Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 19 Jul 2021 12:04:47 +0200 Subject: [PATCH 0506/1093] fix imagemasking node --- meshroom/aliceVision/ImageMasking.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 05c8ddea79..1dadab4f1b 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -34,11 +34,10 @@ class ImageMasking(desc.CommandLineNode): - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1 - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 """, - formatter=desc.GroupAttribute.prefixFormatter, - joinChar='-', + group='', groupDesc=[ desc.FloatParam( - name='hue', + name='hsv-hue', label='Hue', description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', semantic='color/hue', @@ -47,7 +46,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='hueRange', + name='hsv-hueRange', label='Tolerance', description='Tolerance around the hue value to isolate.', value=0.1, @@ -55,7 +54,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='minSaturation', + name='hsv-minSaturation', label='Min Saturation', description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', value=0.3, @@ -63,7 +62,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='maxSaturation', + name='hsv-maxSaturation', label='Max Saturation', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', value=1, @@ -71,7 +70,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='minValue', + name='hsv-minValue', label='Min Value', description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', value=0.3, @@ -79,7 +78,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='maxValue', + name='hsv-maxValue', label='Max Value', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', value=1, From abdf3008975a920e3c0e5124aea64d1457e02071 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 20 Jul 2021 16:20:11 +0200 Subject: [PATCH 0507/1093] [nodes] ImageMasking: update params names --- meshroom/aliceVision/ImageMasking.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 1dadab4f1b..a3a9348b7d 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -34,10 +34,10 @@ class ImageMasking(desc.CommandLineNode): - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1 - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 """, - group='', + group=None, groupDesc=[ desc.FloatParam( - name='hsv-hue', + name='hsvHue', label='Hue', description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', semantic='color/hue', @@ -46,7 +46,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='hsv-hueRange', + name='hsvHueRange', label='Tolerance', description='Tolerance around the hue value to isolate.', value=0.1, @@ -54,7 +54,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='hsv-minSaturation', + name='hsvMinSaturation', label='Min Saturation', description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', value=0.3, @@ -62,7 +62,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='hsv-maxSaturation', + name='hsvMaxSaturation', label='Max Saturation', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', value=1, @@ -70,7 +70,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='hsv-minValue', + name='hsvMinValue', label='Min Value', description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', value=0.3, @@ -78,7 +78,7 @@ class ImageMasking(desc.CommandLineNode): uid=[0] ), desc.FloatParam( - name='hsv-maxValue', + name='hsvMaxValue', label='Max Value', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', value=1, From c3965eb855742ed3c41f04a5d30b5bff4bf59fd6 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 5 Nov 2019 11:58:18 +0100 Subject: [PATCH 0508/1093] [nodes] add new node SfMDistances --- meshroom/aliceVision/SfMDistances.py | 67 ++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 meshroom/aliceVision/SfMDistances.py diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py new file mode 100644 index 0000000000..24ab23542d --- /dev/null +++ b/meshroom/aliceVision/SfMDistances.py @@ -0,0 +1,67 @@ +__version__ = "3.0" + +from meshroom.core import desc + + +class SfMDistances(desc.CommandLineNode): + commandLine = 'aliceVision_utils_sfmDistances {allParams}' + size = desc.DynamicNodeSize('input') + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='objectType', + label='Type', + description='', + value='landmarks', + values=['landmarks', 'cameras'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='landmarksDescriberTypes', + label='Describer Types', + description='Describer types used to describe an image (only used when using "landmarks").', + value=['cctag3'], + values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.StringParam( + name='A', + label='A IDs', + description='It will display the distances between A and B elements.\n' + 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' + 'It will list all elements if empty.', + value='', + uid=[0], + ), + desc.StringParam( + name='B', + label='B IDs', + description='It will display the distances between A and B elements.\n' + 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' + 'It will list all elements if empty.', + 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 = [ + ] From e9fd9d424fa45901b3fcf2099004324337339175 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 5 Nov 2019 11:58:59 +0100 Subject: [PATCH 0509/1093] [nodes] SfMTransform: update param tooltip --- meshroom/aliceVision/SfMTransform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 6f68e30ba7..3e4ee7dfa3 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -51,7 +51,7 @@ class SfMTransform(desc.CommandLineNode): label='Transformation', description="Required only for 'transformation' and 'from_single_camera' methods:\n" " * transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" - " * from_single_camera: Camera UID or image filename", + " * from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg')", value='', uid=[0], enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera", From 250f97ad09315c42f5404fa78b1d438a5f4ee8f4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 21 Jul 2021 11:03:35 +0200 Subject: [PATCH 0510/1093] [nodes] StructureFromMotion: expose new parameters minNbCamerasToRefinePrincipalPoint and rigMinNbCamerasForCalibration --- meshroom/aliceVision/StructureFromMotion.py | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 2a3926932a..09914ac0b9 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -270,15 +270,36 @@ class StructureFromMotion(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='rigMinNbCamerasForCalibration', + label='Min Nb Cameras For Rig Calibration', + description='Minimal number of cameras to start the calibration of the rig', + value=20, + range=(1, 50, 1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters.', + label='Force Lock of All Intrinsic Camera Parameters', description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' 'principal point, distortion if any) during the reconstruction.\n' 'This may be helpful if the input cameras are already fully calibrated.', value=False, uid=[0], ), + desc.IntParam( + name='minNbCamerasToRefinePrincipalPoint', + label='Min Nb Cameras To Refine Principal Point', + description='Minimal number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera). ' + 'If we do not have enough cameras, the principal point in consider is considered in the center of the image. ' + 'If minNbCamerasToRefinePrincipalPoint<=0, the principal point is never refined. ' + 'If minNbCamerasToRefinePrincipalPoint==1, the principal point is always refined.', + value=3, + range=(0, 20, 1), + uid=[0], + advanced=True, + ), desc.BoolParam( name='filterTrackForks', label='Filter Track Forks', From 2db8efb0d824f6a90788b0faf48799a7be999abd Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 5 Nov 2019 11:58:18 +0100 Subject: [PATCH 0511/1093] [nodes] add new node SfMDistances From 8844560db4543a09ac2269b30a7911015b9691ad Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 5 Nov 2019 11:58:59 +0100 Subject: [PATCH 0512/1093] [nodes] SfMTransform: update param tooltip From 999fd4f73e51fe4c962c5c6274f949a4decd9a16 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 17 Dec 2019 22:35:58 +0100 Subject: [PATCH 0513/1093] [nodes] ImageMasking: add AutoGrayscaleThreshold algorithm and depthMap inputs --- meshroom/aliceVision/ImageMasking.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index a3a9348b7d..1feb9fee9f 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -21,8 +21,8 @@ class ImageMasking(desc.CommandLineNode): name='algorithm', label='Algorithm', description='', - value='hsv', - values=['hsv'], + value='HSV', + values=['HSV', 'AutoGrayscaleThreshold'], exclusive=True, uid=[0], ), @@ -110,6 +110,20 @@ class ImageMasking(desc.CommandLineNode): range=(0, 50, 1), uid=[0] ), + desc.File( + name='depthMapFolder', + label='Depth Mask Folder', + description='''Depth Mask Folder''', + value='', + uid=[0], + ), + desc.File( + name='depthMapExp', + label='Depth Mask Expression', + description='''Depth Mask Expression, like "{inputFolder}/{stem}-depth.{ext}".''', + value='', + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From aebd89e633ebf8efc7677aad4832d14f39d96a92 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Dec 2019 09:33:23 +0100 Subject: [PATCH 0514/1093] [nodes] ImageMasking: use StringParam instead of FileParam for depthMapExp --- meshroom/aliceVision/ImageMasking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 1feb9fee9f..9ba1226698 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -117,7 +117,7 @@ class ImageMasking(desc.CommandLineNode): value='', uid=[0], ), - desc.File( + desc.StringParam( name='depthMapExp', label='Depth Mask Expression', description='''Depth Mask Expression, like "{inputFolder}/{stem}-depth.{ext}".''', From eb4b466e7c8d4fb6311a6e2b7c168d533093e01d Mon Sep 17 00:00:00 2001 From: GuillaumeDev <contact@guillaume.dev> Date: Mon, 14 Jun 2021 17:44:54 +0200 Subject: [PATCH 0515/1093] [nodes] new MeshMasking node --- meshroom/aliceVision/MeshMasking.py | 75 +++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 meshroom/aliceVision/MeshMasking.py diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py new file mode 100644 index 0000000000..9d4d9bffb9 --- /dev/null +++ b/meshroom/aliceVision/MeshMasking.py @@ -0,0 +1,75 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class MeshMasking(desc.CommandLineNode): + commandLine = 'aliceVision_meshMasking {allParams}' + category = 'Mesh Post-Processing' + documentation = ''' +Decimate triangles based on image masks. +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData file.''', + value='', + uid=[0], + ), + desc.File( + name='inputMesh', + label='Input Mesh', + description='''Input Mesh (OBJ file format).''', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="masksFolder", + label="Masks Folder", + description="", + value="", + uid=[0], + ), + name="masksFolders", + label="Masks Folders", + description='Use masks from specific folder(s). Filename should be the same or the image uid.', + ), + desc.IntParam( + name='threshold', + label='Threshold', + description='The minimum number of visibility to keep a vertex.', + value=1, + range=(1, 100, 1), + uid=[0] + ), + desc.BoolParam( + name='invert', + label='Invert', + description='''If ticked, the selected area is ignored. + If not, only the selected area is considered.''', + value=False, + 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='outputMesh', + label='Output Mesh', + description='''Output mesh (OBJ file format).''', + value=desc.Node.internalFolder + 'mesh.obj', + uid=[], + ), + ] From 743b0191c7fbeab91a821446e86f807c3de5a039 Mon Sep 17 00:00:00 2001 From: GuillaumeDev <contact@guillaume.dev> Date: Mon, 21 Jun 2021 15:54:13 +0200 Subject: [PATCH 0516/1093] [nodes] add "smooth" option for MeshMasking --- meshroom/aliceVision/MeshMasking.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 9d4d9bffb9..3dad506ea3 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -45,6 +45,13 @@ class MeshMasking(desc.CommandLineNode): range=(1, 100, 1), uid=[0] ), + desc.BoolParam( + name='smoothBoundary', + label='Smooth Boundary', + description='Modify the triangles at the boundary to fit the masks.', + value=False, + uid=[0] + ), desc.BoolParam( name='invert', label='Invert', From 330d0e7b0d36ded471f8e08d5397b84b494d40cd Mon Sep 17 00:00:00 2001 From: GuillaumeDev <contact@guillaume.dev> Date: Thu, 8 Jul 2021 17:51:21 +0200 Subject: [PATCH 0517/1093] [nodes] add "undistortMasks" option for MeshMasking --- meshroom/aliceVision/MeshMasking.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 3dad506ea3..8a582d6a4a 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -60,6 +60,14 @@ class MeshMasking(desc.CommandLineNode): value=False, uid=[0] ), + desc.BoolParam( + name='undistortMasks', + label='Undistort Masks', + description='''Undistort the masks with the same parameters as the matching image. + Tick it if the masks are drawn on the original images.''', + value=False, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 9c6d546bf5e42dd9b208a832fb6ca7baa5cf6d4d Mon Sep 17 00:00:00 2001 From: GuillaumeDev <contact@guillaume.dev> Date: Tue, 13 Jul 2021 09:56:37 +0200 Subject: [PATCH 0518/1093] [nodes] add "usePointsVisibilities" and rename "input" option for MeshMasking --- meshroom/aliceVision/MeshMasking.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 8a582d6a4a..8ae6811163 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -13,8 +13,8 @@ class MeshMasking(desc.CommandLineNode): inputs = [ desc.File( name='input', - label='Input', - description='''SfMData file.''', + label='Dense SfMData', + description='SfMData file.', value='', uid=[0], ), @@ -68,6 +68,14 @@ class MeshMasking(desc.CommandLineNode): value=False, uid=[0] ), + desc.BoolParam( + name='usePointsVisibilities', + label='Use points visibilities', + description='''Use the points visibilities from the meshing to filter triangles. + Example: when they are occluded, back-face, etc.''', + value=False, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 5301f14bffa2f37756e38186d99a1ddeab0294c1 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 23 Jul 2021 00:07:04 +0200 Subject: [PATCH 0519/1093] [nodes] ImageMasking: enable hsv params only for hvs algorithm --- meshroom/aliceVision/ImageMasking.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 9ba1226698..93a8540d8b 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -35,6 +35,7 @@ class ImageMasking(desc.CommandLineNode): - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 """, group=None, + enabled=lambda node: node.algorithm.value == 'HSV', groupDesc=[ desc.FloatParam( name='hsvHue', From 146e2bf96d17cf943befff4cdcc5045bd223d57d Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Fri, 25 Jun 2021 11:04:41 +0200 Subject: [PATCH 0520/1093] [nodes] New node ImportKnownPoses --- meshroom/aliceVision/ImportKnownPoses.py | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 meshroom/aliceVision/ImportKnownPoses.py diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py new file mode 100644 index 0000000000..d0cd8656ce --- /dev/null +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -0,0 +1,40 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class ImportKnownPoses(desc.CommandLineNode): + commandLine = 'aliceVision_importKnownPoses {allParams}' + size = desc.DynamicNodeSize('sfmData') + + documentation = ''' + Import known poses from various file formats like xmp or json. + ''' + + inputs = [ + desc.File( + name='sfmData', + label='SfmData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name='knownPosesData', + label='KnownPosesData', + description='KnownPoses data in the json or xmp format', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Output', + description='Path to the output smfData file.', + value=desc.Node.internalFolder + "/sfmData.abc", + uid=[], + ), + ] + From 429a9027c63bb0969ebd3482bd35121f3044cfdf Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 30 Jun 2021 10:04:59 +0200 Subject: [PATCH 0521/1093] [nodes] Texturing: add new visibility remapping method --- meshroom/aliceVision/Texturing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index cc8308da47..c9f1dd5048 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -189,9 +189,9 @@ class Texturing(desc.CommandLineNode): desc.ChoiceParam( name='visibilityRemappingMethod', label='Visibility Remapping Method', - description='''Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush).''', + description='''Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).''', value='PullPush', - values=['Pull', 'Push', 'PullPush'], + values=['Pull', 'Push', 'PullPush', 'MeshItself'], exclusive=True, uid=[0], advanced=True, From 75991226cc0fdd0a6c60a3d61d1be494ea5c27a0 Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Mon, 26 Apr 2021 18:02:08 +0200 Subject: [PATCH 0522/1093] [nodes] adding new node for Animated Camera Rendering (no errors but not functional yet) --- meshroom/blender/RenderAnimatedCamera.py | 59 ++++++++++++++ meshroom/blender/__init__.py | 0 meshroom/blender/scripts/camera_support.py | 92 ++++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 meshroom/blender/RenderAnimatedCamera.py create mode 100644 meshroom/blender/__init__.py create mode 100644 meshroom/blender/scripts/camera_support.py diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py new file mode 100644 index 0000000000..5f85aa842a --- /dev/null +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -0,0 +1,59 @@ +__version__ = "1.0" + +from meshroom.core import desc +import os.path + +currentDir = os.path.dirname(os.path.abspath(__file__)) + +class RenderAnimatedCamera(desc.CommandLineNode): + commandLine = '{blenderPathValue} -b --python {scriptPathValue} -- {allParams}' + + inputs = [ + desc.File( + name='blenderPath', + label='Blender Path', + description='''Path to blender binary.''', + value=os.environ.get('BLENDER',"C:/Program Files/Blender Foundation/Blender 2.91/blender.exe"), + uid=[], + group='', + ), + desc.File( + name='scriptPath', + label='Script Path', + description='''Path to blender binary.''', + value=os.path.join(currentDir, 'scripts' ,'camera_support.py'), + uid=[], + group='', + ), + desc.File( + name='sfMCameraPath', + label='Camera Path', + description='''Input Camera path from the sfm.''', + value='', + uid=[0], + ), + desc.File( + name='sfMData', + label='SFM Data', + description='''Input the previously used SFM Data.''', + value='', + uid=[0], + ), + desc.File( + name='undistortedImages', + label='Images Folder', + description='''Input the processed images.''', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='outputPath', + label='Output Video', + description='''Output folder.''', + value=desc.Node.internalFolder, # PLACE HOLDER TO CHANGE + uid=[], + ) + ] \ No newline at end of file diff --git a/meshroom/blender/__init__.py b/meshroom/blender/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py new file mode 100644 index 0000000000..f5ec4d20c1 --- /dev/null +++ b/meshroom/blender/scripts/camera_support.py @@ -0,0 +1,92 @@ +import bpy +import bmesh +import os +import mathutils +import math +import sys # to get command line args +import argparse # to parse options for us and print a nice help message +from math import radians + +def main(): + argv = sys.argv + + if "--" not in argv: + argv = [] # as if no args are passed + else: + argv = argv[argv.index("--") + 1:] # get all args after "--" + + # When --help or no args are given, print this help + usage_text = ( + "Run blender in background mode with this script:" + " blender --background --python " + __file__ + " -- [options]" + ) + + parser = argparse.ArgumentParser(description=usage_text) + + parser.add_argument( + "--sfMData", dest="SFM_Data", metavar='FILE', required=True, + help="These info carry the cloud point we need.", + ) + + parser.add_argument( + "--sfMCameraPath", dest="SFM_cam_path", metavar='FILE', required=True, + help="This text will be used to render an image", + ) + + parser.add_argument( + "--undistortedImages", dest="undisto_images", metavar='FILE', required=True, + help="Save the generated file to the specified path", + ) + + parser.add_argument( + "--outputPath", dest="output_path", metavar='FILE', required=True, + help="Render an image to the specified path", + ) + + args = parser.parse_args(argv) + + if not argv: + parser.print_help() + return + + if not args.SFM_cam_path: + print("Error: --SFM_cam_path argument not given, aborting.") + parser.print_help() + return + + if not args.undisto_images: + print("Error: --undisto_images argument not given, aborting.") + parser.print_help() + return + + if not args.output_path: + print("Error: --output_path argument not given, aborting.") + parser.print_help() + return + + print(args.SFM_cam_path) + + #import abd + try: + bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) + animated_cams = bpy.context.selected_editable_objects[:] #Contains ['animxform_RJBframe_SONY_ILCE-7M3', 'mvgCameras', 'mvgCamerasUndefined', 'mvgPointCloud', 'mvgCloud', 'mvgRoot'] + animated_cam = animated_cams[0] + + except: + print("Error: while importing the alembic file.") + + # import Undistorted Images + + undis_imgs = [] + try: + files = os.listdir(args.undisto_images) + for f in files : + if f.endswith(".exr") : + undis_imgs.append(bpy.ops.image.open(filepath=args.undisto_images + '/' + f)) + except: + print("Error: while importing the undistorted images.") + + #bpy.ops.render.render(animation=True) + +if __name__ == "__main__": + main() \ No newline at end of file From b234d390d39836b0a258630b71f6fcf8da426a48 Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Thu, 29 Apr 2021 16:20:50 +0200 Subject: [PATCH 0523/1093] [nodes] Animated Camera Rendering (can't see cloud of point on render) The node is almost functional. The animated camera works but the imported cloud of point isn't visible is rendering... I'll need to find a way to make display it. (For now there is a cube as a placeholder in the scene to show the movement of the camera) --- meshroom/blender/scripts/camera_support.py | 62 ++++++++++++++++++++-- 1 file changed, 57 insertions(+), 5 deletions(-) diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py index f5ec4d20c1..7696ab68fa 100644 --- a/meshroom/blender/scripts/camera_support.py +++ b/meshroom/blender/scripts/camera_support.py @@ -66,14 +66,50 @@ def main(): print(args.SFM_cam_path) - #import abd + + #Clear Current Scene + try: + print(bpy.data.objects[0]) + print(bpy.data.objects[1]) + print(bpy.data.objects[2]) + for objects in bpy.data.objects: + bpy.data.objects.remove(objects) + print(bpy.data.objects) + except: + print("Error: While clearing current scene") + + + #import abc (Animated Camera) + try: bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) animated_cams = bpy.context.selected_editable_objects[:] #Contains ['animxform_RJBframe_SONY_ILCE-7M3', 'mvgCameras', 'mvgCamerasUndefined', 'mvgPointCloud', 'mvgCloud', 'mvgRoot'] - animated_cam = animated_cams[0] + animated_cam_obj = animated_cams[1] ## scene.object + animated_cam_RJB = animated_cams[0] + for obj in animated_cams: + if obj.data and obj.data.type == 'PERSP': + bpy.context.scene.collection.objects.link(obj) + bpy.context.scene.camera = obj + + except: + print("Error: while importing the alembic file (Animated Camera).") + + + + #import abc (Cloud Point) + + try: + bpy.ops.wm.alembic_import(filepath=args.SFM_Data) + all_abc_info = bpy.context.selected_editable_objects[:] #Contains ['mvgCameras', 'mvgCamerasUndefined', 'mvgPointCloud', 'mvgCloud', 'mvgRoot'] + pointCloud = all_abc_info[len(all_abc_info) - 3] + for obj in all_abc_info: + if obj.name == 'mvgPointCloud.001': + bpy.context.scene.collection.objects.link(obj) except: - print("Error: while importing the alembic file.") + print("Error: while importing the alembic file (sfm Data).") + + # import Undistorted Images @@ -85,8 +121,24 @@ def main(): undis_imgs.append(bpy.ops.image.open(filepath=args.undisto_images + '/' + f)) except: print("Error: while importing the undistorted images.") - - #bpy.ops.render.render(animation=True) + + + cube = bpy.data.meshes['Cube'] + objects = bpy.data.objects.new(name="Cube", object_data=cube) + bpy.context.scene.collection.objects.link(objects) + + + ## Starts the rendering and launchs it with a blender animator player + + try: + bpy.context.scene.render.image_settings.file_format = 'FFMPEG' # Changes to video + bpy.context.scene.render.filepath = args.output_path + '/render.mkv' + bpy.ops.render.render(animation=True) + bpy.ops.render.play_rendered_anim() + except: + print("Error: while rendering the scene.") + + if __name__ == "__main__": main() \ No newline at end of file From 5348fe347edd3a68c6cd41de7f85974f4a852b81 Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Wed, 5 May 2021 20:45:21 +0200 Subject: [PATCH 0524/1093] [nodes] Change in export animated cams and improving blender node The returns in ExportAnimatedCamera didn't include the path toward the undistorted images so I added it. The Blender Rendition nodes can now (among other things) diplay cloud of points. The code is cleaned up and only the background image sequence remains to be implemented... --- meshroom/aliceVision/ExportAnimatedCamera.py | 8 +++ meshroom/blender/scripts/camera_support.py | 71 +++++++++++--------- 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 43e8e446a9..4eb378d866 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -100,5 +100,13 @@ class ExportAnimatedCamera(desc.CommandLineNode): group='', # exclude from command line uid=[], ), + desc.File( + name='outputUndistorted', + label='Output Undistorted images Filepath', + description='Output Undistorted images.', + value=desc.Node.internalFolder + 'undistort', + group='', # exclude from command line + uid=[], + ), ] diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py index 7696ab68fa..d6fd585ff4 100644 --- a/meshroom/blender/scripts/camera_support.py +++ b/meshroom/blender/scripts/camera_support.py @@ -69,27 +69,45 @@ def main(): #Clear Current Scene try: - print(bpy.data.objects[0]) - print(bpy.data.objects[1]) - print(bpy.data.objects[2]) for objects in bpy.data.objects: bpy.data.objects.remove(objects) - print(bpy.data.objects) except: print("Error: While clearing current scene") - #import abc (Animated Camera) + #Place the particle cube + + cube = bpy.data.meshes['Cube'] + objectsCube = bpy.data.objects.new(name="Cube", object_data=cube) + + objectsCube.scale = mathutils.Vector((0.3, 0.3, 0.3)) + objectsCube.location = mathutils.Vector((0, -2.0, -1000)) + bpy.context.scene.collection.objects.link(objectsCube) + + # import Undistorted Images + + undis_imgs = [] + try: + files = os.listdir(args.undisto_images) + for f in files : + if f.endswith(".exr") : + undis_imgs.append({"name":f}) + except: + print("Error: while importing the undistorted images.") + #import abc (Animated Camera) + cam_name = "" try: bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) animated_cams = bpy.context.selected_editable_objects[:] #Contains ['animxform_RJBframe_SONY_ILCE-7M3', 'mvgCameras', 'mvgCamerasUndefined', 'mvgPointCloud', 'mvgCloud', 'mvgRoot'] - animated_cam_obj = animated_cams[1] ## scene.object - animated_cam_RJB = animated_cams[0] for obj in animated_cams: - if obj.data and obj.data.type == 'PERSP': + if obj.data and obj.data.type == 'PERSP': bpy.context.scene.collection.objects.link(obj) + bpy.context.view_layer.objects.active = obj bpy.context.scene.camera = obj + #bpy.ops.image.open(directory=args.undisto_images, files=undis_imgs, show_multiview=False) + obj.data.show_background_images = True + except: print("Error: while importing the alembic file (Animated Camera).") @@ -101,37 +119,28 @@ def main(): try: bpy.ops.wm.alembic_import(filepath=args.SFM_Data) all_abc_info = bpy.context.selected_editable_objects[:] #Contains ['mvgCameras', 'mvgCamerasUndefined', 'mvgPointCloud', 'mvgCloud', 'mvgRoot'] - pointCloud = all_abc_info[len(all_abc_info) - 3] for obj in all_abc_info: if obj.name == 'mvgPointCloud.001': bpy.context.scene.collection.objects.link(obj) - + bpy.context.view_layer.objects.active = obj + obj.modifiers.new("ParticleSystem", "PARTICLE_SYSTEM") + particle_system = bpy.data.particles["ParticleSystem"] + particle_system.render_type = 'OBJECT' + particle_system.instance_object = bpy.data.objects["Cube"] + particle_system.emit_from = 'VERT' + particle_system.count = 4000 #Modulation of numbers in the node + particle_system.frame_end = 1.0 + particle_system.use_emit_random = False + particle_system.particle_size = 0.02 + particle_system.physics_type = 'NO' + except: - print("Error: while importing the alembic file (sfm Data).") - - - - # import Undistorted Images - - undis_imgs = [] - try: - files = os.listdir(args.undisto_images) - for f in files : - if f.endswith(".exr") : - undis_imgs.append(bpy.ops.image.open(filepath=args.undisto_images + '/' + f)) - except: - print("Error: while importing the undistorted images.") - - - cube = bpy.data.meshes['Cube'] - objects = bpy.data.objects.new(name="Cube", object_data=cube) - bpy.context.scene.collection.objects.link(objects) - + print("Error: while importing the alembic file (Cloud Point).") ## Starts the rendering and launchs it with a blender animator player try: - bpy.context.scene.render.image_settings.file_format = 'FFMPEG' # Changes to video + bpy.context.scene.render.image_settings.file_format = 'FFMPEG' bpy.context.scene.render.filepath = args.output_path + '/render.mkv' bpy.ops.render.render(animation=True) bpy.ops.render.play_rendered_anim() From 8ff467601dce9e6a42857a2b0a54f1463eb482fc Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Fri, 7 May 2021 13:24:11 +0200 Subject: [PATCH 0525/1093] [node] Adding a density factor to the render node Added a numeral scale to the node to make the density rendering of the cloud of point more customisable... --- meshroom/blender/RenderAnimatedCamera.py | 8 ++++++++ meshroom/blender/scripts/camera_support.py | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index 5f85aa842a..b14dd4bb78 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -39,6 +39,14 @@ class RenderAnimatedCamera(desc.CommandLineNode): value='', uid=[0], ), + desc.FloatParam( + name='cloudPointDensity', + label='Cloud Point Density', + description='''Number of point from the cloud rendered''', + value=0.50, + range=(0.01, 0.75, 0.01), + uid=[0], + ), desc.File( name='undistortedImages', label='Images Folder', diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py index d6fd585ff4..2188d44b36 100644 --- a/meshroom/blender/scripts/camera_support.py +++ b/meshroom/blender/scripts/camera_support.py @@ -32,7 +32,12 @@ def main(): "--sfMCameraPath", dest="SFM_cam_path", metavar='FILE', required=True, help="This text will be used to render an image", ) - + + parser.add_argument( + "--cloudPointDensity", dest="Cloud_Point_Density", type=float, required=True, + help="Number of point from the cloud rendered", + ) + parser.add_argument( "--undistortedImages", dest="undisto_images", metavar='FILE', required=True, help="Save the generated file to the specified path", @@ -58,6 +63,11 @@ def main(): print("Error: --undisto_images argument not given, aborting.") parser.print_help() return + + if not args.Cloud_Point_Density: + print("Error: --Cloud_Point_Density argument not given, aborting.") + parser.print_help() + return if not args.output_path: print("Error: --output_path argument not given, aborting.") @@ -106,6 +116,7 @@ def main(): bpy.context.view_layer.objects.active = obj bpy.context.scene.camera = obj #bpy.ops.image.open(directory=args.undisto_images, files=undis_imgs, show_multiview=False) + bpy.ops.image.open(filepath=args.undisto_images + "985078214_RJB05565.exr", directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) obj.data.show_background_images = True @@ -126,9 +137,10 @@ def main(): obj.modifiers.new("ParticleSystem", "PARTICLE_SYSTEM") particle_system = bpy.data.particles["ParticleSystem"] particle_system.render_type = 'OBJECT' + particle_system.instance_object = bpy.data.objects["Cube"] particle_system.emit_from = 'VERT' - particle_system.count = 4000 #Modulation of numbers in the node + particle_system.count = 4000#args.Cloud_Point_Density * len(obj.vertices.values()) particle_system.frame_end = 1.0 particle_system.use_emit_random = False particle_system.particle_size = 0.02 From cc556e54377977dfd651341f10d19291c75b8358 Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Fri, 14 May 2021 12:41:23 +0200 Subject: [PATCH 0526/1093] [node] Adding the rendering of the background image among other I had to use the graphe node to render the image in the back. I also made the node much more adaptable. I'll verify if it works with another set of image. --- meshroom/blender/RenderAnimatedCamera.py | 4 +- meshroom/blender/scripts/camera_support.py | 62 ++++++++++++++++++---- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index b14dd4bb78..c4f46592f3 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -43,8 +43,8 @@ class RenderAnimatedCamera(desc.CommandLineNode): name='cloudPointDensity', label='Cloud Point Density', description='''Number of point from the cloud rendered''', - value=0.50, - range=(0.01, 0.75, 0.01), + value=0.25, + range=(0.01, 0.5, 0.01), uid=[0], ), desc.File( diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py index 2188d44b36..2fad05d120 100644 --- a/meshroom/blender/scripts/camera_support.py +++ b/meshroom/blender/scripts/camera_support.py @@ -1,6 +1,7 @@ import bpy import bmesh import os +import re import mathutils import math import sys # to get command line args @@ -93,33 +94,45 @@ def main(): objectsCube.scale = mathutils.Vector((0.3, 0.3, 0.3)) objectsCube.location = mathutils.Vector((0, -2.0, -1000)) bpy.context.scene.collection.objects.link(objectsCube) + bpy.data.objects['Cube'].hide_set(True) # import Undistorted Images undis_imgs = [] + #Some of these info will be very useful in the next steps keep them in mind + number_of_frame = 0 + offset = 0 + image_name = "" try: files = os.listdir(args.undisto_images) for f in files : - if f.endswith(".exr") : + if f.endswith(".exr") and not f.__contains__("UVMap"): undis_imgs.append({"name":f}) + number_of_frame = len(undis_imgs) + image_name = undis_imgs[0]['name'] + offset = int(re.search("_(.*).exr", image_name).group(1)[3:]) - 1 + except: print("Error: while importing the undistorted images.") #import abc (Animated Camera) - cam_name = "" try: bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) - animated_cams = bpy.context.selected_editable_objects[:] #Contains ['animxform_RJBframe_SONY_ILCE-7M3', 'mvgCameras', 'mvgCamerasUndefined', 'mvgPointCloud', 'mvgCloud', 'mvgRoot'] + animated_cams = bpy.context.selected_editable_objects[:] for obj in animated_cams: - if obj.data and obj.data.type == 'PERSP': + if obj.data and obj.data.type == 'PERSP' and "anim" in obj.data.name: bpy.context.scene.collection.objects.link(obj) bpy.context.view_layer.objects.active = obj bpy.context.scene.camera = obj - #bpy.ops.image.open(directory=args.undisto_images, files=undis_imgs, show_multiview=False) - bpy.ops.image.open(filepath=args.undisto_images + "985078214_RJB05565.exr", directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) - obj.data.show_background_images = True - - + bpy.ops.image.open(filepath=args.undisto_images + "/" + image_name, directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) + bpy.data.cameras[obj.data.name].background_images.new() + bpy.data.cameras[obj.data.name].show_background_images = True + bpy.data.cameras[obj.data.name].background_images[0].image = bpy.data.images[image_name] + bpy.data.cameras[obj.data.name].background_images[0].frame_method = 'CROP' + bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_offset = offset + bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_duration = number_of_frame + bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_start = 1 + bpy.context.scene.render.film_transparent = True except: print("Error: while importing the alembic file (Animated Camera).") @@ -129,7 +142,7 @@ def main(): try: bpy.ops.wm.alembic_import(filepath=args.SFM_Data) - all_abc_info = bpy.context.selected_editable_objects[:] #Contains ['mvgCameras', 'mvgCamerasUndefined', 'mvgPointCloud', 'mvgCloud', 'mvgRoot'] + all_abc_info = bpy.context.selected_editable_objects[:] for obj in all_abc_info: if obj.name == 'mvgPointCloud.001': bpy.context.scene.collection.objects.link(obj) @@ -140,7 +153,8 @@ def main(): particle_system.instance_object = bpy.data.objects["Cube"] particle_system.emit_from = 'VERT' - particle_system.count = 4000#args.Cloud_Point_Density * len(obj.vertices.values()) + + particle_system.count = int(args.Cloud_Point_Density * len(obj.data.vertices.values())) particle_system.frame_end = 1.0 particle_system.use_emit_random = False particle_system.particle_size = 0.02 @@ -149,6 +163,32 @@ def main(): except: print("Error: while importing the alembic file (Cloud Point).") + + #WE HAVE TO USE THE GRAPH TO MAKE THE BACKGROUND IMAGE VISIBLE (For some reason) All explained in https://www.youtube.com/watch?v=3PoEVlObMv0 + try: + bpy.context.scene.use_nodes = True + + #CREATE ALL NODES WE NEED (Color.AlphaOver, Input.Image, Distort.Scale) + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeScale") + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") + + #SET THEM UP CORRECTLY + bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_duration = number_of_frame + bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_offset = offset + bpy.data.scenes["Scene"].node_tree.nodes["Scale"].space = 'RENDER_SIZE' + bpy.data.scenes["Scene"].node_tree.nodes["Scale"].frame_method = 'CROP' + bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[image_name] + + #LINKS THE NODES THAT NEEDS TO BE LINKED + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) + #Two Inputs of AlphaOver are named "Image" so we'll use index instead + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[2]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[1]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) + except: + print("Error: while composing the compositing graph.") + ## Starts the rendering and launchs it with a blender animator player try: From 2e3333b23d727573fbdb66531e389d5b133f7290 Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Mon, 17 May 2021 20:45:23 +0200 Subject: [PATCH 0527/1093] [node] Adding working background and several other feat. Almost complete version of the node, I added a background that can render with eevee and changed the cubes used as particles by a plane that always follows the camera. The one of the only thing left is the option to change the color of the particle (among other things). --- meshroom/blender/RenderAnimatedCamera.py | 18 +++++++ meshroom/blender/scripts/camera_support.py | 61 +++++++++++++++++----- 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index c4f46592f3..53f140fb11 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -47,6 +47,24 @@ class RenderAnimatedCamera(desc.CommandLineNode): range=(0.01, 0.5, 0.01), uid=[0], ), + desc.FloatParam( + name='particleSize', + label='Particle Size', + description='''Scale of every particle used to show the cloud of point''', + value=0.25, + range=(0.01, 1, 0.01), + uid=[0], + ), + desc.ChoiceParam( + name='particleColor', + label='Particle Color', + description='''Color of every particle used to show the cloud of point''', + value=['Grey'], + values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + exclusive=True, + uid=[0], + joinChar=',', + ), desc.File( name='undistortedImages', label='Images Folder', diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py index 2fad05d120..4e6bca0053 100644 --- a/meshroom/blender/scripts/camera_support.py +++ b/meshroom/blender/scripts/camera_support.py @@ -39,6 +39,11 @@ def main(): help="Number of point from the cloud rendered", ) + parser.add_argument( + "--particleSize", dest="Particle_Size", type=float, required=True, + help="Scale of every particle used to show the cloud of point", + ) + parser.add_argument( "--undistortedImages", dest="undisto_images", metavar='FILE', required=True, help="Save the generated file to the specified path", @@ -49,6 +54,11 @@ def main(): help="Render an image to the specified path", ) + parser.add_argument( + "--particleColor", dest="Particle_Color", metavar=str, required=True, + help="Color of every particle used to show the cloud of point", + ) + args = parser.parse_args(argv) if not argv: @@ -70,11 +80,21 @@ def main(): parser.print_help() return + if not args.Particle_Size: + print("Error: --Particle_Size argument not given, aborting.") + parser.print_help() + return + if not args.output_path: print("Error: --output_path argument not given, aborting.") parser.print_help() return + if not args.Particle_Color: + print("Error: --Particle_Color argument not given, aborting.") + parser.print_help() + return + print(args.SFM_cam_path) @@ -85,17 +105,6 @@ def main(): except: print("Error: While clearing current scene") - - #Place the particle cube - - cube = bpy.data.meshes['Cube'] - objectsCube = bpy.data.objects.new(name="Cube", object_data=cube) - - objectsCube.scale = mathutils.Vector((0.3, 0.3, 0.3)) - objectsCube.location = mathutils.Vector((0, -2.0, -1000)) - bpy.context.scene.collection.objects.link(objectsCube) - bpy.data.objects['Cube'].hide_set(True) - # import Undistorted Images undis_imgs = [] @@ -116,14 +125,21 @@ def main(): print("Error: while importing the undistorted images.") #import abc (Animated Camera) + try: bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) animated_cams = bpy.context.selected_editable_objects[:] + cam_scale = mathutils.Vector((0, 0, 0)) + cam_location = mathutils.Vector((0, 0, 0)) + cam_obj = None for obj in animated_cams: if obj.data and obj.data.type == 'PERSP' and "anim" in obj.data.name: bpy.context.scene.collection.objects.link(obj) bpy.context.view_layer.objects.active = obj bpy.context.scene.camera = obj + cam_scale = obj.scale + cam_location = obj.location + cam_obj = obj bpy.ops.image.open(filepath=args.undisto_images + "/" + image_name, directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) bpy.data.cameras[obj.data.name].background_images.new() bpy.data.cameras[obj.data.name].show_background_images = True @@ -136,7 +152,21 @@ def main(): except: print("Error: while importing the alembic file (Animated Camera).") - + #Place the particle plane + try: + plane = bpy.data.meshes.new('Plane') + objectsPlane = bpy.data.objects.new(name="Plane", object_data=plane) + bm = bmesh.new() + bmesh.ops.create_grid(bm, x_segments = 1, y_segments = 1, size = 1.0) + bm.to_mesh(plane) + bm.free() + objectsPlane.scale = mathutils.Vector((args.Particle_Size, args.Particle_Size, args.Particle_Size)) + cam_location.y += -2.0 + objectsPlane.location = cam_location + bpy.context.scene.collection.objects.link(objectsPlane) + bpy.data.objects['Plane'].parent = cam_obj + except: + print("Error: while setting up the particle model.") #import abc (Cloud Point) @@ -151,7 +181,7 @@ def main(): particle_system = bpy.data.particles["ParticleSystem"] particle_system.render_type = 'OBJECT' - particle_system.instance_object = bpy.data.objects["Cube"] + particle_system.instance_object = bpy.data.objects["Plane"] particle_system.emit_from = 'VERT' particle_system.count = int(args.Cloud_Point_Density * len(obj.data.vertices.values())) @@ -159,12 +189,15 @@ def main(): particle_system.use_emit_random = False particle_system.particle_size = 0.02 particle_system.physics_type = 'NO' + particle_system.use_rotations = True + particle_system.use_rotation_instance = True + particle_system.rotation_mode = 'GLOB_X' except: print("Error: while importing the alembic file (Cloud Point).") - #WE HAVE TO USE THE GRAPH TO MAKE THE BACKGROUND IMAGE VISIBLE (For some reason) All explained in https://www.youtube.com/watch?v=3PoEVlObMv0 + #WE HAVE TO USE THE GRAPH TO MAKE THE BACKGROUND IMAGE VISIBLE try: bpy.context.scene.use_nodes = True From 83ae1a8232c43bd652896359bee3b87a8b57c2cc Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Fri, 21 May 2021 21:36:46 +0200 Subject: [PATCH 0528/1093] [node] Adding color particle changes and a lot of comments Many minor bug fixes and added the possibility to change the particle color of the rendering to let the user chose the clearest color in their case. Commented a lot of my code to make it readable to someone else that myself. --- meshroom/blender/scripts/camera_support.py | 148 +++++++++++++++------ 1 file changed, 111 insertions(+), 37 deletions(-) diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py index 4e6bca0053..7299ce55c4 100644 --- a/meshroom/blender/scripts/camera_support.py +++ b/meshroom/blender/scripts/camera_support.py @@ -95,9 +95,6 @@ def main(): parser.print_help() return - print(args.SFM_cam_path) - - #Clear Current Scene try: for objects in bpy.data.objects: @@ -111,15 +108,21 @@ def main(): #Some of these info will be very useful in the next steps keep them in mind number_of_frame = 0 offset = 0 - image_name = "" + first_image_name = "" try: + # In this part of the code we take the undistorted images and we process some info about them + # undis_imgs is the list of the images' names + # first_image_name says it all in the name + # The offset is important, it corresponds to the last part of the name of the first frame + # In most case it will hopefully be 0 but the sequence may start from another frame + files = os.listdir(args.undisto_images) for f in files : if f.endswith(".exr") and not f.__contains__("UVMap"): undis_imgs.append({"name":f}) number_of_frame = len(undis_imgs) - image_name = undis_imgs[0]['name'] - offset = int(re.search("_(.*).exr", image_name).group(1)[3:]) - 1 + first_image_name = undis_imgs[0]['name'] + offset = int(re.findall(r'\d+', first_image_name)[-1]) - 1 except: print("Error: while importing the undistorted images.") @@ -127,9 +130,23 @@ def main(): #import abc (Animated Camera) try: + + # In this part of the code we import the alembic in the cam_path to get the animated camera + # We use cam_location and cam_obj to store information about this camera + # We look for a camera (of type 'Persp') with the name 'anim' (not to confuse them with previously imported cams) + # Such hard code is not a problem in this case because all imported cams come from previous nodes and are named specificaly + + # Once the cam has been found we select is make it the main camera of the scene + # The rest of the code is setting up the display of the background image, + # Since it's not a simple image but an image Sequence, we have to use the offset and the number of frame + # Information taken from the previous block of code. + # The frame method is the one that align with the Cloud of Point althought this may change + # so feel free to try out the two other settings if something changes on previous nodes. + # We also have to make the scene render film transparent because we want to be able to display + # our background afterward in the next block of code + bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) animated_cams = bpy.context.selected_editable_objects[:] - cam_scale = mathutils.Vector((0, 0, 0)) cam_location = mathutils.Vector((0, 0, 0)) cam_obj = None for obj in animated_cams: @@ -137,13 +154,12 @@ def main(): bpy.context.scene.collection.objects.link(obj) bpy.context.view_layer.objects.active = obj bpy.context.scene.camera = obj - cam_scale = obj.scale cam_location = obj.location cam_obj = obj - bpy.ops.image.open(filepath=args.undisto_images + "/" + image_name, directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) + bpy.ops.image.open(filepath=args.undisto_images + "/" + first_image_name, directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) bpy.data.cameras[obj.data.name].background_images.new() bpy.data.cameras[obj.data.name].show_background_images = True - bpy.data.cameras[obj.data.name].background_images[0].image = bpy.data.images[image_name] + bpy.data.cameras[obj.data.name].background_images[0].image = bpy.data.images[first_image_name] bpy.data.cameras[obj.data.name].background_images[0].frame_method = 'CROP' bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_offset = offset bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_duration = number_of_frame @@ -154,6 +170,23 @@ def main(): #Place the particle plane try: + + # This is a key step if you are displaying a cloud point. + # We are using a particle system later in the code to display the cloud point. + # To make it so, we need a model for the particle, a object that will be repeated a lot to make a shape. + # In order to do that we need a plane (one face only for optimisation purpose) that always face the camera. + # So we made a plane and made it a child (in the parenting system) of the camera. That way whenever the cam + # moves, the plane moves and turn accordingly. + + # Bmesh creates the plane and put it into the mesh. We change the size of the plane according to + # the scale given in arguments. We need to adjust the plane's location because putting it at the + # exact location of the camera blocks the view. Then, the switcher give a RGBA color according to + # the given argument... This is where it gets harder. We have to use a material that uses 'Emission' + # otherwise the particle is going to react to lights and we don't really need that (the color wouldn't be clear). + # To do that we have to use the shader 'node_tree' we clear all links between nodes, create the emission node + # and connects it to the 'Material Output' node (which is what we will see in render). + # Finally we use the switcher to color the model. + plane = bpy.data.meshes.new('Plane') objectsPlane = bpy.data.objects.new(name="Plane", object_data=plane) bm = bmesh.new() @@ -165,36 +198,74 @@ def main(): objectsPlane.location = cam_location bpy.context.scene.collection.objects.link(objectsPlane) bpy.data.objects['Plane'].parent = cam_obj + bpy.context.view_layer.objects.active = objectsPlane + + + switcher={ + 'Grey':(0.2, 0.2, 0.2, 1), + 'White':(1, 1, 1, 1), + 'Red':(0.5, 0, 0, 1), + 'Green':(0, 0.5, 0, 1), + 'Magenta':(1.0, 0, 0.75, 1) + } + + col = bpy.data.materials.new('Color') + objectsPlane.active_material = col + objectsPlane.active_material.use_nodes = True + objectsPlane.active_material.node_tree.links.clear() + objectsPlane.active_material.node_tree.nodes.new(type='ShaderNodeEmission') + objectsPlane.active_material.node_tree.links.new(objectsPlane.active_material.node_tree.nodes['Emission'].outputs['Emission'], objectsPlane.active_material.node_tree.nodes['Material Output'].inputs['Surface']) + objectsPlane.active_material.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.Particle_Color, 'Invalid Color') + except: print("Error: while setting up the particle model.") - #import abc (Cloud Point) + if (args.SFM_Data.endswith('.abc')): + # This part is all about importing the Cloud Point and setting up the Particle System to make a good render + # After importing the alembic we look for a specific meshe in the file. Again the hard coded name would be a + # problem if the previous nodes hadn't name it specificaly that (.001 because a meshe with the same name has + # been imported with the animated camera). + + # Once the cloud point has been found. We make it the active object (important for the node_tree later). + # Then, we create a particle system on it. Render_type set to object and the said object is the plane, + # thanks to that the particle format is set to repeat the plane. Emit_from 'vert' so the points of the + # cloud of point are the one rendering the particle. + # The count is the number of particle repeated on the cloud of point. We use the rate given as arguments + # to give a number. Most of the following settings are just formalities except use_rotation and use_rotation_instance + # those two make sure to use the same roation as the model which is vital to have the particle always facing the camera. + + #import abc (Cloud Point) + try: + bpy.ops.wm.alembic_import(filepath=args.SFM_Data) + all_abc_info = bpy.context.selected_editable_objects[:] + for obj in all_abc_info: + if obj.name == 'mvgPointCloud.001': #May have a problem with such hard code + bpy.context.scene.collection.objects.link(obj) + bpy.context.view_layer.objects.active = obj + obj.modifiers.new("ParticleSystem", "PARTICLE_SYSTEM") + particle_system = bpy.data.particles["ParticleSystem"] + particle_system.render_type = 'OBJECT' + + particle_system.instance_object = bpy.data.objects["Plane"] + particle_system.emit_from = 'VERT' + + particle_system.count = int(args.Cloud_Point_Density * len(obj.data.vertices.values())) + particle_system.frame_end = 1.0 + particle_system.use_emit_random = False + particle_system.particle_size = 0.02 + particle_system.physics_type = 'NO' + particle_system.use_rotations = True + particle_system.use_rotation_instance = True + particle_system.rotation_mode = 'GLOB_X' + + except: + print("Error: while importing the alembic file (Cloud Point).") + #Or import obj directly + elif (args.SFM_Data.endswith('.obj')): + bpy.ops.import_scene.obj(filepath=args.SFM_Data) + else: + print("SFM_Data isn't in the right format, alembics(.abc) and object(.obj) only are supported") - try: - bpy.ops.wm.alembic_import(filepath=args.SFM_Data) - all_abc_info = bpy.context.selected_editable_objects[:] - for obj in all_abc_info: - if obj.name == 'mvgPointCloud.001': - bpy.context.scene.collection.objects.link(obj) - bpy.context.view_layer.objects.active = obj - obj.modifiers.new("ParticleSystem", "PARTICLE_SYSTEM") - particle_system = bpy.data.particles["ParticleSystem"] - particle_system.render_type = 'OBJECT' - - particle_system.instance_object = bpy.data.objects["Plane"] - particle_system.emit_from = 'VERT' - - particle_system.count = int(args.Cloud_Point_Density * len(obj.data.vertices.values())) - particle_system.frame_end = 1.0 - particle_system.use_emit_random = False - particle_system.particle_size = 0.02 - particle_system.physics_type = 'NO' - particle_system.use_rotations = True - particle_system.use_rotation_instance = True - particle_system.rotation_mode = 'GLOB_X' - - except: - print("Error: while importing the alembic file (Cloud Point).") #WE HAVE TO USE THE GRAPH TO MAKE THE BACKGROUND IMAGE VISIBLE @@ -211,7 +282,7 @@ def main(): bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_offset = offset bpy.data.scenes["Scene"].node_tree.nodes["Scale"].space = 'RENDER_SIZE' bpy.data.scenes["Scene"].node_tree.nodes["Scale"].frame_method = 'CROP' - bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[image_name] + bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] #LINKS THE NODES THAT NEEDS TO BE LINKED bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) @@ -225,9 +296,12 @@ def main(): ## Starts the rendering and launchs it with a blender animator player try: + # Setup the render format and filepath bpy.context.scene.render.image_settings.file_format = 'FFMPEG' bpy.context.scene.render.filepath = args.output_path + '/render.mkv' + # Render everything on to the filepath bpy.ops.render.render(animation=True) + # Starts a player automatically to play the output bpy.ops.render.play_rendered_anim() except: print("Error: while rendering the scene.") From a7ff94a71027294d90f52e64c4c0ec3b8ed31a65 Mon Sep 17 00:00:00 2001 From: Solal Depardieu <solaldep@hotmail.fr> Date: Wed, 2 Jun 2021 17:33:53 +0200 Subject: [PATCH 0529/1093] [nodes] Adding mesh render with edge detection and changes on the args Added the possibility of rendering the output of the meshing node into a edge detection render of the obj. Added the activation and deactivation of the background images as an option. Improving the way the arguments are shown with a conditionnal display of some arguments. --- meshroom/blender/RenderAnimatedCamera.py | 121 ++++-- meshroom/blender/scripts/camera_support.py | 312 -------------- .../scripts/renderAnimatedCameraInBlender.py | 405 ++++++++++++++++++ 3 files changed, 494 insertions(+), 344 deletions(-) delete mode 100644 meshroom/blender/scripts/camera_support.py create mode 100644 meshroom/blender/scripts/renderAnimatedCameraInBlender.py diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index 53f140fb11..2d5d9b20fe 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -8,6 +8,27 @@ class RenderAnimatedCamera(desc.CommandLineNode): commandLine = '{blenderPathValue} -b --python {scriptPathValue} -- {allParams}' + category = 'Rendition' + documentation = ''' + The goal of this node is to make a render of the sfmData a Blender scene using Blender's API. + It supports both Point Clouds (.abc) and Meshes (.obj) and can use a background image of you use undistorted images. + We have several inputs: + **blenderPath points to the blender executable + **scriptPath point to the script containing the code. + **sfMCameraPath point to the AnimatedCamera we are going to be tracking. + **useBackground determines if you want to use images as a background. + **undistortedImages path toward the images you can use as background. + **sfMData the data you want to render. + (point cloud) + **pointCloudDensity changes the density of the point cloud rendered. + **particleSize changes the size of each point in the point cloud rendered. + **particleColor changes the color of each point in the point cloud rendered. + (Mesh) + **edgeColor is the color of the outline of the mesh rendered. + **outputFormat is the video format we want to export of rendition in. + **outputPath point to where is video is going to be saved. + ''' + inputs = [ desc.File( name='blenderPath', @@ -20,8 +41,8 @@ class RenderAnimatedCamera(desc.CommandLineNode): desc.File( name='scriptPath', label='Script Path', - description='''Path to blender binary.''', - value=os.path.join(currentDir, 'scripts' ,'camera_support.py'), + description='''Path to the script in the project.''', + value=os.path.join(currentDir, 'scripts' ,'renderAnimatedCameraInBlender.py'), uid=[], group='', ), @@ -32,6 +53,21 @@ class RenderAnimatedCamera(desc.CommandLineNode): value='', uid=[0], ), + desc.BoolParam( + name='useBackground', + label='Display Background', + description='Tick if you want to use original image dataset as background', + value=True, + uid=[0], + ), + desc.File( + name='undistortedImages', + label='Images Folder', + description='''Input the processed images.''', + value='', + uid=[0], + enabled=lambda node: node.displayBackground.useBackground.value, + ), desc.File( name='sfMData', label='SFM Data', @@ -39,47 +75,68 @@ class RenderAnimatedCamera(desc.CommandLineNode): value='', uid=[0], ), - desc.FloatParam( - name='cloudPointDensity', - label='Cloud Point Density', - description='''Number of point from the cloud rendered''', - value=0.25, - range=(0.01, 0.5, 0.01), - uid=[0], - ), - desc.FloatParam( - name='particleSize', - label='Particle Size', - description='''Scale of every particle used to show the cloud of point''', - value=0.25, - range=(0.01, 1, 0.01), - uid=[0], - ), + desc.GroupAttribute(name="isCloudPoint", label="Point Cloud Settings", group=None, enabled=lambda node: node.sfMData.value.endswith('.abc'), description="Setting of the render if we use a Point Cloud. (SFM Data is .abc)", groupDesc=[ + desc.FloatParam( + name='pointCloudDensity', + label='Point Cloud Density', + description='''Number of point from the point cloud rendered''', + value=0.25, + range=(0.01, 0.5, 0.01), + uid=[0], + enabled=lambda node: node.sfMData.value.endswith('.abc'), + ), + desc.FloatParam( + name='particleSize', + label='Particle Size', + description='''Scale of every particle used to show the point cloud''', + value=0.25, + range=(0.01, 1, 0.01), + uid=[0], + enabled=lambda node: node.sfMData.value.endswith('.abc'), + ), + desc.ChoiceParam( + name='particleColor', + label='Particle Color', + description='''Color of every particle used to show the point cloud (SFM Data is .abc)''', + value='Red', + values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + exclusive=True, + uid=[0], + joinChar=',', + enabled=lambda node: node.sfMData.value.endswith('.abc'), + ), + ]), + desc.GroupAttribute(name="isMesh", label="Mesh Settings", group=None, enabled=lambda node: node.sfMData.value.endswith('.obj'), description="Setting of the render if we use a Mesh. (SFM Data is .obj)", groupDesc=[ + desc.ChoiceParam( + name='edgeColor', + label='Edge Color', + description='''Color of the edges of the rendered object (SFM Data is .obj)''', + value='Red', + values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + exclusive=True, + uid=[0], + joinChar=',', + enabled=lambda node: node.sfMData.value.endswith('.obj'), + ), + ]), desc.ChoiceParam( - name='particleColor', - label='Particle Color', - description='''Color of every particle used to show the cloud of point''', - value=['Grey'], - values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + name='outputFormat', + label='Output Format', + description='''Choose the format of the output among this list of supported format''', + value='mkv', + values=['mkv', 'mp4', 'mov', 'avi'], exclusive=True, uid=[0], joinChar=',', ), - desc.File( - name='undistortedImages', - label='Images Folder', - description='''Input the processed images.''', - value='', - uid=[0], - ), ] outputs = [ desc.File( name='outputPath', - label='Output Video', + label='Output Path', description='''Output folder.''', - value=desc.Node.internalFolder, # PLACE HOLDER TO CHANGE + value=desc.Node.internalFolder, uid=[], ) ] \ No newline at end of file diff --git a/meshroom/blender/scripts/camera_support.py b/meshroom/blender/scripts/camera_support.py deleted file mode 100644 index 7299ce55c4..0000000000 --- a/meshroom/blender/scripts/camera_support.py +++ /dev/null @@ -1,312 +0,0 @@ -import bpy -import bmesh -import os -import re -import mathutils -import math -import sys # to get command line args -import argparse # to parse options for us and print a nice help message -from math import radians - -def main(): - argv = sys.argv - - if "--" not in argv: - argv = [] # as if no args are passed - else: - argv = argv[argv.index("--") + 1:] # get all args after "--" - - # When --help or no args are given, print this help - usage_text = ( - "Run blender in background mode with this script:" - " blender --background --python " + __file__ + " -- [options]" - ) - - parser = argparse.ArgumentParser(description=usage_text) - - parser.add_argument( - "--sfMData", dest="SFM_Data", metavar='FILE', required=True, - help="These info carry the cloud point we need.", - ) - - parser.add_argument( - "--sfMCameraPath", dest="SFM_cam_path", metavar='FILE', required=True, - help="This text will be used to render an image", - ) - - parser.add_argument( - "--cloudPointDensity", dest="Cloud_Point_Density", type=float, required=True, - help="Number of point from the cloud rendered", - ) - - parser.add_argument( - "--particleSize", dest="Particle_Size", type=float, required=True, - help="Scale of every particle used to show the cloud of point", - ) - - parser.add_argument( - "--undistortedImages", dest="undisto_images", metavar='FILE', required=True, - help="Save the generated file to the specified path", - ) - - parser.add_argument( - "--outputPath", dest="output_path", metavar='FILE', required=True, - help="Render an image to the specified path", - ) - - parser.add_argument( - "--particleColor", dest="Particle_Color", metavar=str, required=True, - help="Color of every particle used to show the cloud of point", - ) - - args = parser.parse_args(argv) - - if not argv: - parser.print_help() - return - - if not args.SFM_cam_path: - print("Error: --SFM_cam_path argument not given, aborting.") - parser.print_help() - return - - if not args.undisto_images: - print("Error: --undisto_images argument not given, aborting.") - parser.print_help() - return - - if not args.Cloud_Point_Density: - print("Error: --Cloud_Point_Density argument not given, aborting.") - parser.print_help() - return - - if not args.Particle_Size: - print("Error: --Particle_Size argument not given, aborting.") - parser.print_help() - return - - if not args.output_path: - print("Error: --output_path argument not given, aborting.") - parser.print_help() - return - - if not args.Particle_Color: - print("Error: --Particle_Color argument not given, aborting.") - parser.print_help() - return - - #Clear Current Scene - try: - for objects in bpy.data.objects: - bpy.data.objects.remove(objects) - except: - print("Error: While clearing current scene") - - # import Undistorted Images - - undis_imgs = [] - #Some of these info will be very useful in the next steps keep them in mind - number_of_frame = 0 - offset = 0 - first_image_name = "" - try: - # In this part of the code we take the undistorted images and we process some info about them - # undis_imgs is the list of the images' names - # first_image_name says it all in the name - # The offset is important, it corresponds to the last part of the name of the first frame - # In most case it will hopefully be 0 but the sequence may start from another frame - - files = os.listdir(args.undisto_images) - for f in files : - if f.endswith(".exr") and not f.__contains__("UVMap"): - undis_imgs.append({"name":f}) - number_of_frame = len(undis_imgs) - first_image_name = undis_imgs[0]['name'] - offset = int(re.findall(r'\d+', first_image_name)[-1]) - 1 - - except: - print("Error: while importing the undistorted images.") - - #import abc (Animated Camera) - - try: - - # In this part of the code we import the alembic in the cam_path to get the animated camera - # We use cam_location and cam_obj to store information about this camera - # We look for a camera (of type 'Persp') with the name 'anim' (not to confuse them with previously imported cams) - # Such hard code is not a problem in this case because all imported cams come from previous nodes and are named specificaly - - # Once the cam has been found we select is make it the main camera of the scene - # The rest of the code is setting up the display of the background image, - # Since it's not a simple image but an image Sequence, we have to use the offset and the number of frame - # Information taken from the previous block of code. - # The frame method is the one that align with the Cloud of Point althought this may change - # so feel free to try out the two other settings if something changes on previous nodes. - # We also have to make the scene render film transparent because we want to be able to display - # our background afterward in the next block of code - - bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) - animated_cams = bpy.context.selected_editable_objects[:] - cam_location = mathutils.Vector((0, 0, 0)) - cam_obj = None - for obj in animated_cams: - if obj.data and obj.data.type == 'PERSP' and "anim" in obj.data.name: - bpy.context.scene.collection.objects.link(obj) - bpy.context.view_layer.objects.active = obj - bpy.context.scene.camera = obj - cam_location = obj.location - cam_obj = obj - bpy.ops.image.open(filepath=args.undisto_images + "/" + first_image_name, directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) - bpy.data.cameras[obj.data.name].background_images.new() - bpy.data.cameras[obj.data.name].show_background_images = True - bpy.data.cameras[obj.data.name].background_images[0].image = bpy.data.images[first_image_name] - bpy.data.cameras[obj.data.name].background_images[0].frame_method = 'CROP' - bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_offset = offset - bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_duration = number_of_frame - bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_start = 1 - bpy.context.scene.render.film_transparent = True - except: - print("Error: while importing the alembic file (Animated Camera).") - - #Place the particle plane - try: - - # This is a key step if you are displaying a cloud point. - # We are using a particle system later in the code to display the cloud point. - # To make it so, we need a model for the particle, a object that will be repeated a lot to make a shape. - # In order to do that we need a plane (one face only for optimisation purpose) that always face the camera. - # So we made a plane and made it a child (in the parenting system) of the camera. That way whenever the cam - # moves, the plane moves and turn accordingly. - - # Bmesh creates the plane and put it into the mesh. We change the size of the plane according to - # the scale given in arguments. We need to adjust the plane's location because putting it at the - # exact location of the camera blocks the view. Then, the switcher give a RGBA color according to - # the given argument... This is where it gets harder. We have to use a material that uses 'Emission' - # otherwise the particle is going to react to lights and we don't really need that (the color wouldn't be clear). - # To do that we have to use the shader 'node_tree' we clear all links between nodes, create the emission node - # and connects it to the 'Material Output' node (which is what we will see in render). - # Finally we use the switcher to color the model. - - plane = bpy.data.meshes.new('Plane') - objectsPlane = bpy.data.objects.new(name="Plane", object_data=plane) - bm = bmesh.new() - bmesh.ops.create_grid(bm, x_segments = 1, y_segments = 1, size = 1.0) - bm.to_mesh(plane) - bm.free() - objectsPlane.scale = mathutils.Vector((args.Particle_Size, args.Particle_Size, args.Particle_Size)) - cam_location.y += -2.0 - objectsPlane.location = cam_location - bpy.context.scene.collection.objects.link(objectsPlane) - bpy.data.objects['Plane'].parent = cam_obj - bpy.context.view_layer.objects.active = objectsPlane - - - switcher={ - 'Grey':(0.2, 0.2, 0.2, 1), - 'White':(1, 1, 1, 1), - 'Red':(0.5, 0, 0, 1), - 'Green':(0, 0.5, 0, 1), - 'Magenta':(1.0, 0, 0.75, 1) - } - - col = bpy.data.materials.new('Color') - objectsPlane.active_material = col - objectsPlane.active_material.use_nodes = True - objectsPlane.active_material.node_tree.links.clear() - objectsPlane.active_material.node_tree.nodes.new(type='ShaderNodeEmission') - objectsPlane.active_material.node_tree.links.new(objectsPlane.active_material.node_tree.nodes['Emission'].outputs['Emission'], objectsPlane.active_material.node_tree.nodes['Material Output'].inputs['Surface']) - objectsPlane.active_material.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.Particle_Color, 'Invalid Color') - - except: - print("Error: while setting up the particle model.") - - if (args.SFM_Data.endswith('.abc')): - # This part is all about importing the Cloud Point and setting up the Particle System to make a good render - # After importing the alembic we look for a specific meshe in the file. Again the hard coded name would be a - # problem if the previous nodes hadn't name it specificaly that (.001 because a meshe with the same name has - # been imported with the animated camera). - - # Once the cloud point has been found. We make it the active object (important for the node_tree later). - # Then, we create a particle system on it. Render_type set to object and the said object is the plane, - # thanks to that the particle format is set to repeat the plane. Emit_from 'vert' so the points of the - # cloud of point are the one rendering the particle. - # The count is the number of particle repeated on the cloud of point. We use the rate given as arguments - # to give a number. Most of the following settings are just formalities except use_rotation and use_rotation_instance - # those two make sure to use the same roation as the model which is vital to have the particle always facing the camera. - - #import abc (Cloud Point) - try: - bpy.ops.wm.alembic_import(filepath=args.SFM_Data) - all_abc_info = bpy.context.selected_editable_objects[:] - for obj in all_abc_info: - if obj.name == 'mvgPointCloud.001': #May have a problem with such hard code - bpy.context.scene.collection.objects.link(obj) - bpy.context.view_layer.objects.active = obj - obj.modifiers.new("ParticleSystem", "PARTICLE_SYSTEM") - particle_system = bpy.data.particles["ParticleSystem"] - particle_system.render_type = 'OBJECT' - - particle_system.instance_object = bpy.data.objects["Plane"] - particle_system.emit_from = 'VERT' - - particle_system.count = int(args.Cloud_Point_Density * len(obj.data.vertices.values())) - particle_system.frame_end = 1.0 - particle_system.use_emit_random = False - particle_system.particle_size = 0.02 - particle_system.physics_type = 'NO' - particle_system.use_rotations = True - particle_system.use_rotation_instance = True - particle_system.rotation_mode = 'GLOB_X' - - except: - print("Error: while importing the alembic file (Cloud Point).") - #Or import obj directly - elif (args.SFM_Data.endswith('.obj')): - bpy.ops.import_scene.obj(filepath=args.SFM_Data) - else: - print("SFM_Data isn't in the right format, alembics(.abc) and object(.obj) only are supported") - - - - #WE HAVE TO USE THE GRAPH TO MAKE THE BACKGROUND IMAGE VISIBLE - try: - bpy.context.scene.use_nodes = True - - #CREATE ALL NODES WE NEED (Color.AlphaOver, Input.Image, Distort.Scale) - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeScale") - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") - - #SET THEM UP CORRECTLY - bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_duration = number_of_frame - bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_offset = offset - bpy.data.scenes["Scene"].node_tree.nodes["Scale"].space = 'RENDER_SIZE' - bpy.data.scenes["Scene"].node_tree.nodes["Scale"].frame_method = 'CROP' - bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] - - #LINKS THE NODES THAT NEEDS TO BE LINKED - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - #Two Inputs of AlphaOver are named "Image" so we'll use index instead - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[2]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[1]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) - except: - print("Error: while composing the compositing graph.") - - ## Starts the rendering and launchs it with a blender animator player - - try: - # Setup the render format and filepath - bpy.context.scene.render.image_settings.file_format = 'FFMPEG' - bpy.context.scene.render.filepath = args.output_path + '/render.mkv' - # Render everything on to the filepath - bpy.ops.render.render(animation=True) - # Starts a player automatically to play the output - bpy.ops.render.play_rendered_anim() - except: - print("Error: while rendering the scene.") - - - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py new file mode 100644 index 0000000000..1cfce3ce85 --- /dev/null +++ b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py @@ -0,0 +1,405 @@ +import bpy +import bmesh +import os +import re +import mathutils +import sys # to get command line args +import argparse # to parse options for us and print a nice help message +from distutils.util import strtobool + +def main(): + argv = sys.argv + + if "--" not in argv: + argv = [] # as if no args are passed + else: + argv = argv[argv.index("--") + 1:] # get all args after "--" + + # When --help or no args are given, print this help + usage_text = ( + "Run blender in background mode with this script:" + " blender --background --python " + __file__ + " -- [options]" + ) + + parser = argparse.ArgumentParser(description=usage_text) + + + parser.add_argument( + "--sfMCameraPath", dest="SFM_cam_path", metavar='FILE', required=True, + help="This text will be used to render an image", + ) + + parser.add_argument( + "--useBackground", dest="Use_Background", type=strtobool, required=True, + help="Diplay the background image or not.", + ) + + parser.add_argument( + "--undistortedImages", dest="undisto_images", metavar='FILE', required=False, + help="Save the generated file to the specified path", + ) + + parser.add_argument( + "--sfMData", dest="SFM_Data", metavar='FILE', required=True, + help="These info carry the Point Cloud or mesh we need.", + ) + + #Point Cloud Arguments (When SFM Data is .abc) + + parser.add_argument( + "--pointCloudDensity", dest="Point_Cloud_Density", type=float, required=False, + help="Number of point from the cloud rendered", + ) + + parser.add_argument( + "--particleSize", dest="Particle_Size", type=float, required=False, + help="Scale of every particle used to show the point cloud", + ) + + parser.add_argument( + "--particleColor", dest="Particle_Color", type=str, required=False, + help="Color of every particle used to show the point cloud (SFM Data is .abc)", + ) + + #Mesh Arguments (When SFM Data is .obj) + + parser.add_argument( + "--edgeColor", dest="Edge_Color", type=str, required=False, + help="Color of the edges of the rendered object (SFM Data is .obj)", + ) + + + #Output Arguments + + parser.add_argument( + "--outputFormat", dest="Output_Format", type=str, required=True, + help="Format of the video output", + ) + + parser.add_argument( + "--outputPath", dest="output_path", metavar='FILE', required=True, + help="Render an image to the specified path", + ) + + + args = parser.parse_args(argv) + + if not argv: + parser.print_help() + return + + if not args.undisto_images and args.Use_Background : + print("Error: --undisto_images argument not given, aborting.") + parser.print_help() + return + + if not args.Point_Cloud_Density and args.SFM_Data.endswith('.abc'): + print("Error: --Point_Cloud_Density argument not given, aborting.") + parser.print_help() + return + + if not args.Particle_Size and args.SFM_Data.endswith('.abc'): + print("Error: --Particle_Size argument not given, aborting.") + parser.print_help() + return + + if not args.Particle_Color and args.SFM_Data.endswith('.abc'): + print("Error: --Particle_Color argument not given, aborting.") + parser.print_help() + return + + if not args.Edge_Color and args.SFM_Data.endswith('.obj'): + print("Error: --Edge_Color argument not given, aborting.") + parser.print_help() + return + + #Clear Current Scene + try: + for objects in bpy.data.objects: + bpy.data.objects.remove(objects) + except RuntimeError: + print("Error: While clearing current scene") + + #The Switcher is the setting for most of the colors (if you want to add some, do it here and in the arguments of the node) + # Keep in mind that we use the same switcher for both the Edge Color and the Particle Color settings. + # So if you add a color to one of them in the node, might has well add it to the other. + + switcher={ + 'Grey':(0.2, 0.2, 0.2, 1), + 'White':(1, 1, 1, 1), + 'Red':(0.5, 0, 0, 1), + 'Green':(0, 0.5, 0, 1), + 'Magenta':(1.0, 0, 0.75, 1) + } + + # import Undistorted Images + + undis_imgs = [] + #Some of these variable will be very useful in the next steps keep them in mind + number_of_frame = 0 + offset = 0 + first_image_name = "" + try: + # In this part of the code we take the undistorted images and we process some info about them + # undis_imgs is the list of the images' names + # first_image_name says it all in the name + # The offset is important, it corresponds to the last part of the name of the first frame + # In most case it will hopefully be 0 but the sequence may start from a more advanced frame + if args.Use_Background : + files = os.listdir(args.undisto_images) + for f in files : + if f.endswith(".exr") and not f.__contains__("UVMap"): + undis_imgs.append({"name":f}) + number_of_frame = len(undis_imgs) + first_image_name = undis_imgs[0]['name'] + offset = int(re.findall(r'\d+', first_image_name)[-1]) - 1 + + except RuntimeError: + print("Error: while importing the undistorted images.") + + #import abc (Animated Camera) + + try: + + # In this part of the code we import the alembic in the cam_path to get the animated camera + # We use cam_location and cam_obj to store information about this camera + # We look for a camera (of type 'Persp') with the name 'anim' (not to confuse them with previously imported cams) + + # Once the cam has been found we select the main camera of the scene. + # The rest of the code is setting up the display of the background image, + # Since it's not a simple image but an image Sequence, we have to use the offset and the number of frame + # Information taken from the previous block of code. + # The frame method is the one that align with the Point Cloud althought this may change, + # so feel free to try out the two other settings if something changes on previous nodes. + # We also have to make the scene render film transparent because we want to be able to display + # our background afterward in the next block of code + + bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) + animated_cams = bpy.context.selected_editable_objects[:] + cam_location = mathutils.Vector((0, 0, 0)) + cam_obj = None + for obj in animated_cams: + if obj.data and obj.data.type == 'PERSP' and "anim" in obj.data.name: + bpy.context.scene.collection.objects.link(obj) + bpy.context.view_layer.objects.active = obj + bpy.context.scene.camera = obj + cam_location = obj.location + cam_obj = obj + if args.Use_Background : + bpy.ops.image.open(filepath=args.undisto_images + "/" + first_image_name, directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) + bpy.data.cameras[obj.data.name].background_images.new() + bpy.data.cameras[obj.data.name].show_background_images = True + bpy.data.cameras[obj.data.name].background_images[0].image = bpy.data.images[first_image_name] + bpy.data.cameras[obj.data.name].background_images[0].frame_method = 'CROP' + bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_offset = offset + bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_duration = number_of_frame + bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_start = 1 + bpy.context.scene.render.film_transparent = True + except RuntimeError: + print("Error: while importing the alembic file (Animated Camera).") + + #Place the particle plane + try: + + # This is a key step if you are displaying a Point Cloud. + # We are using a particle system later in the code to display the Point Cloud. + # To make it so, we need a model for the particle, a object that will be repeated a lot to make a shape. + # In order to do that we need a plane (one face only for optimisation purpose) that always face the camera. + # So we made a plane and made it a child (in the parenting system) of the camera. That way whenever the cam + # moves, the plane moves and turn accordingly. + + # Bmesh creates the plane and put it into the mesh. We change the size of the plane according to + # the scale given in arguments. We need to adjust the plane's location because putting it at the + # exact location of the camera blocks the view. Then, the switcher gives a RGBA color according to + # the given argument. We have to use a material that uses 'Emission' + # otherwise the particle is going to react to lights and we don't really need that (the color wouldn't be clear). + # To do that we have to use the shader 'node_tree' we clear all links between nodes, create the emission node + # and connect it to the 'Material Output' node (which is what we will see in render). + # Finally we use the switcher to color the model. + + plane = bpy.data.meshes.new('Plane') + objectsPlane = bpy.data.objects.new(name="Plane", object_data=plane) + bm = bmesh.new() + bmesh.ops.create_grid(bm, x_segments = 1, y_segments = 1, size = 1.0) + bm.to_mesh(plane) + bm.free() + if (args.SFM_Data.endswith('.abc')): + objectsPlane.scale = mathutils.Vector((args.Particle_Size, args.Particle_Size, args.Particle_Size)) + cam_location.y += -2.0 + objectsPlane.location = cam_location + bpy.context.scene.collection.objects.link(objectsPlane) + bpy.data.objects['Plane'].parent = cam_obj + bpy.context.view_layer.objects.active = objectsPlane + + col = bpy.data.materials.new('Color') + objectsPlane.active_material = col + objectsPlane.active_material.use_nodes = True + objectsPlane.active_material.node_tree.links.clear() + objectsPlane.active_material.node_tree.nodes.new(type='ShaderNodeEmission') + objectsPlane.active_material.node_tree.links.new(objectsPlane.active_material.node_tree.nodes['Emission'].outputs['Emission'], objectsPlane.active_material.node_tree.nodes['Material Output'].inputs['Surface']) + if (args.SFM_Data.endswith('.abc')): + objectsPlane.active_material.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.Particle_Color, 'Invalid Color') + + except RuntimeError: + print("Error: while setting up the particle model.") + + if (args.SFM_Data.endswith('.abc')): + # This part is all about importing the Point Cloud and setting up the Particle System. + # After importing the alembic, we look for a specific mesh in the file. Again the hardcoded name would be a + # problem if the previous nodes hadn't name it specificaly that (.001 because a mesh with the same name has + # been imported with the animated camera). + + # Once the Point Cloud has been found. We make it the active object (important for the node_tree later). + # Then, we create a particle system on it. Render_type set to object and the said object is the plane, + # thanks to that the particle format is set to repeat the plane. Emit_from 'vert' so the points of the + # point cloud are the one rendering the particle. + # The count is the number of particle repeated on the point cloud. We use the rate given as arguments + # to give a number. Most of the following settings are just formalities but use_rotation and use_rotation_instance, + # those two make sure to use the same rotaion than the model (which is needed to have the particle always facing the camera). + + #import abc (Point Cloud) + try: + bpy.ops.wm.alembic_import(filepath=args.SFM_Data) + all_abc_info = bpy.context.selected_editable_objects[:] + for obj in all_abc_info: + if obj.name == 'mvgPointCloud.001': #May have a problem with such hard code + bpy.context.scene.collection.objects.link(obj) + bpy.context.view_layer.objects.active = obj + obj.modifiers.new("ParticleSystem", "PARTICLE_SYSTEM") + particle_system = bpy.data.particles["ParticleSystem"] + particle_system.render_type = 'OBJECT' + + particle_system.instance_object = bpy.data.objects["Plane"] + particle_system.emit_from = 'VERT' + + if (args.SFM_Data.endswith('.abc')): + particle_system.count = int(args.Point_Cloud_Density * len(obj.data.vertices.values())) + particle_system.frame_end = 1.0 + particle_system.use_emit_random = False + particle_system.particle_size = 0.02 + particle_system.physics_type = 'NO' + particle_system.use_rotations = True + particle_system.use_rotation_instance = True + particle_system.rotation_mode = 'GLOB_X' + + except RuntimeError: + print("Error: while importing the alembic file (Point Cloud).") + #Or import obj directly + + # The import via obj needs a bit of work too. For showing an outline of the object, we need to add two materials to the mesh : + # Center and Edge, we are using a method that consists in having a "bold" effect on the Edge Material so we can see it + # around the Center material. We do that by using a Solidify Modifier on which we flip normals and reduce Thickness to bellow zero. + # The more the thickness get bellow zero, the more the egde will be largely revealed. + elif (args.SFM_Data.endswith('.obj')): + bpy.ops.import_scene.obj(filepath=args.SFM_Data) + + center = bpy.data.materials.new('Center') + center.use_nodes = True + center.node_tree.links.clear() + center.node_tree.nodes.new(type='ShaderNodeEmission') + center.node_tree.links.new(center.node_tree.nodes['Emission'].outputs['Emission'], center.node_tree.nodes['Material Output'].inputs['Surface']) + center.node_tree.nodes['Emission'].inputs[0].default_value = (0,0,0,0) + + if not args.Use_Background and args.SFM_Data.endswith('.obj'): + center.node_tree.nodes['Emission'].inputs[0].default_value = (0.05, 0.05, 0.05, 1) #Same Color as the no background color in blender + + + edge = bpy.data.materials.new('Edge') + + edge.use_nodes = True + edge.node_tree.links.clear() + edge.node_tree.nodes.new(type='ShaderNodeEmission') + edge.use_backface_culling = True + edge.node_tree.links.new(edge.node_tree.nodes['Emission'].outputs['Emission'], edge.node_tree.nodes['Material Output'].inputs['Surface']) + edge.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.Edge_Color, 'Invalid Color') + + bpy.data.meshes['mesh'].materials.clear() + bpy.data.meshes['mesh'].materials.append(bpy.data.materials['Center']) + bpy.data.meshes['mesh'].materials.append(bpy.data.materials['Edge']) + + print(bpy.data.meshes['mesh'].materials.values()) + + bpy.data.objects['mesh'].modifiers.new('New', type='SOLIDIFY') + bpy.data.objects['mesh'].modifiers["New"].thickness = -0.01 + bpy.data.objects['mesh'].modifiers["New"].use_rim = False + bpy.data.objects['mesh'].modifiers["New"].use_flip_normals = True + bpy.data.objects['mesh'].modifiers["New"].material_offset = 1 + else: + print("SFM_Data isn't in the right format, alembics(.abc) and object(.obj) only are supported") + + #WE HAVE TO USE THE COMPOSITING GRAPH TO MAKE THE BACKGROUND IMAGE VISIBLE + # We setup all the nodes in the first place, even if we don't need them in our configuration. We put the setting in all of them. + # Only after having done that we can control which of the node we link in the graph according to the option we were given. + # If the SFM Data is a Mesh, its extension is .obj so we have to build the graph accordingly. If the Background image setting was activated, + # we need to include it in our node tree through the "Image" and Scale node. + try: + bpy.context.scene.use_nodes = True + + #CREATE ALL NODES WE NEED (regardless of the options) + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeScale") + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") + + bpy.context.scene.node_tree.nodes.new(type="CompositorNodePremulKey") + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeMixRGB") + + #SET THEM UP CORRECTLY (still regardless of the option) + bpy.data.scenes["Scene"].node_tree.nodes["Mix"].blend_type = 'LIGHTEN' + bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_duration = number_of_frame + bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_offset = offset + bpy.data.scenes["Scene"].node_tree.nodes["Scale"].space = 'RENDER_SIZE' + bpy.data.scenes["Scene"].node_tree.nodes["Scale"].frame_method = 'CROP' + + #LINKS THE NODES THAT NEEDS TO BE LINKED + if args.Use_Background : + if args.SFM_Data.endswith('.obj'): + bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Mix'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) + #Two Inputs of AlphaOver are named "Image" so we'll use index instead + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Convert'].inputs['Image']) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Convert'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[2]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[1]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) + else: + bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) + #Two Inputs of AlphaOver are named "Image" so we'll use index instead + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[2]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[1]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) + else: + if args.SFM_Data.endswith('.obj'): + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Mix'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) + #Two Inputs of AlphaOver are named "Image" so we'll use index instead + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Convert'].inputs['Image']) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Convert'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[2]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[1]) + bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) + except RuntimeError: + print("Error: while composing the compositing graph.") + + ## Starts the rendering and launchs it with a blender animator player + + try: + # Setup the render format and filepath + bpy.context.scene.render.image_settings.file_format = 'FFMPEG' + if args.Output_Format == 'mkv': + bpy.context.scene.render.ffmpeg.format = 'MKV' + elif args.Output_Format == 'avi': + bpy.context.scene.render.ffmpeg.format = 'AVI' + elif args.Output_Format == 'mov': + bpy.context.scene.render.ffmpeg.format = 'QUICKTIME' + else: + bpy.context.scene.render.ffmpeg.format = 'MPEG4' + bpy.context.scene.render.filepath = args.output_path + '/render.' + args.Output_Format + # Render everything on to the filepath + bpy.ops.render.render(animation=True) + # Starts a player automatically to play the output (Usefull for developpers to see what they do but it doesn't really have its place in a software) + # bpy.ops.render.play_rendered_anim() + except RuntimeError: + print("Error: while rendering the scene.") + + + +if __name__ == "__main__": + main() \ No newline at end of file From 3391e29a0986628f5d2678f6d8845036ff8e408f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 23 Jul 2021 16:23:10 +0200 Subject: [PATCH 0530/1093] [nodes] RenderAnimatedCamera: clean up --- meshroom/blender/RenderAnimatedCamera.py | 156 ++++++----- .../scripts/renderAnimatedCameraInBlender.py | 254 +++++++++--------- 2 files changed, 195 insertions(+), 215 deletions(-) diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index 2d5d9b20fe..803fdac6c0 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -8,32 +8,17 @@ class RenderAnimatedCamera(desc.CommandLineNode): commandLine = '{blenderPathValue} -b --python {scriptPathValue} -- {allParams}' - category = 'Rendition' + category = 'Export' documentation = ''' - The goal of this node is to make a render of the sfmData a Blender scene using Blender's API. - It supports both Point Clouds (.abc) and Meshes (.obj) and can use a background image of you use undistorted images. - We have several inputs: - **blenderPath points to the blender executable - **scriptPath point to the script containing the code. - **sfMCameraPath point to the AnimatedCamera we are going to be tracking. - **useBackground determines if you want to use images as a background. - **undistortedImages path toward the images you can use as background. - **sfMData the data you want to render. - (point cloud) - **pointCloudDensity changes the density of the point cloud rendered. - **particleSize changes the size of each point in the point cloud rendered. - **particleColor changes the color of each point in the point cloud rendered. - (Mesh) - **edgeColor is the color of the outline of the mesh rendered. - **outputFormat is the video format we want to export of rendition in. - **outputPath point to where is video is going to be saved. + This node makes a rendering of the sfmData scene through an animated camera using the Blender rendering engine. + It supports both Point Clouds (.abc) and Meshes (.obj). ''' inputs = [ desc.File( name='blenderPath', label='Blender Path', - description='''Path to blender binary.''', + description='''Path to blender executable''', value=os.environ.get('BLENDER',"C:/Program Files/Blender Foundation/Blender 2.91/blender.exe"), uid=[], group='', @@ -41,93 +26,102 @@ class RenderAnimatedCamera(desc.CommandLineNode): desc.File( name='scriptPath', label='Script Path', - description='''Path to the script in the project.''', + description='''Path to the internal script for rendering in Blender''', value=os.path.join(currentDir, 'scripts' ,'renderAnimatedCameraInBlender.py'), uid=[], group='', ), desc.File( - name='sfMCameraPath', - label='Camera Path', - description='''Input Camera path from the sfm.''', + name='sfmCameraPath', + label='SfmData with Animated Camera', + description='''SfmData with the animated camera to render''', + value='', + uid=[0], + ), + desc.File( + name='model', + label='Model', + description='Point Cloud or Mesh used in the rendering', value='', uid=[0], ), desc.BoolParam( name='useBackground', label='Display Background', - description='Tick if you want to use original image dataset as background', + description='Use the undistorted images as background', value=True, uid=[0], ), desc.File( name='undistortedImages', - label='Images Folder', - description='''Input the processed images.''', + label='Undistorted Images Folder', + description='''Input folder with the undistorted images''', value='', uid=[0], - enabled=lambda node: node.displayBackground.useBackground.value, + enabled=lambda node: node.useBackground.value, ), - desc.File( - name='sfMData', - label='SFM Data', - description='''Input the previously used SFM Data.''', - value='', - uid=[0], + desc.GroupAttribute( + name="pointCloudParams", + label="Point Cloud Settings", + group=None, + enabled=lambda node: node.model.value.lower().endswith('.abc'), + description="Setting of the render if we use a Point Cloud", + groupDesc=[ + desc.FloatParam( + name='pointCloudDensity', + label='Density', + description='''Reduce the points density for the point cloud rendering''', + value=0.25, + range=(0.01, 0.5, 0.01), + uid=[0], + ), + desc.FloatParam( + name='particleSize', + label='Particle Size', + description='''Scale of particles used to show the point cloud''', + value=0.1, + range=(0.01, 1, 0.01), + uid=[0], + ), + desc.ChoiceParam( + name='particleColor', + label='Particle Color', + description='''Color of particles used to show the point cloud''', + value='Red', + values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + exclusive=True, + uid=[0], + joinChar=',', + ), + ] + ), + desc.GroupAttribute( + name="meshParams", + label="Mesh Settings", + group=None, + enabled=lambda node: node.model.value.lower().endswith('.obj'), + description="Setting of the render if we use a Mesh", + groupDesc=[ + desc.ChoiceParam( + name='edgeColor', + label='Edge Color', + description='''Color of the edges of the rendered object''', + value='Red', + values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + exclusive=True, + uid=[0], + joinChar=',', + ), + ] ), - desc.GroupAttribute(name="isCloudPoint", label="Point Cloud Settings", group=None, enabled=lambda node: node.sfMData.value.endswith('.abc'), description="Setting of the render if we use a Point Cloud. (SFM Data is .abc)", groupDesc=[ - desc.FloatParam( - name='pointCloudDensity', - label='Point Cloud Density', - description='''Number of point from the point cloud rendered''', - value=0.25, - range=(0.01, 0.5, 0.01), - uid=[0], - enabled=lambda node: node.sfMData.value.endswith('.abc'), - ), - desc.FloatParam( - name='particleSize', - label='Particle Size', - description='''Scale of every particle used to show the point cloud''', - value=0.25, - range=(0.01, 1, 0.01), - uid=[0], - enabled=lambda node: node.sfMData.value.endswith('.abc'), - ), - desc.ChoiceParam( - name='particleColor', - label='Particle Color', - description='''Color of every particle used to show the point cloud (SFM Data is .abc)''', - value='Red', - values=['Grey', 'White', 'Red', 'Green', 'Magenta'], - exclusive=True, - uid=[0], - joinChar=',', - enabled=lambda node: node.sfMData.value.endswith('.abc'), - ), - ]), - desc.GroupAttribute(name="isMesh", label="Mesh Settings", group=None, enabled=lambda node: node.sfMData.value.endswith('.obj'), description="Setting of the render if we use a Mesh. (SFM Data is .obj)", groupDesc=[ - desc.ChoiceParam( - name='edgeColor', - label='Edge Color', - description='''Color of the edges of the rendered object (SFM Data is .obj)''', - value='Red', - values=['Grey', 'White', 'Red', 'Green', 'Magenta'], - exclusive=True, - uid=[0], - joinChar=',', - enabled=lambda node: node.sfMData.value.endswith('.obj'), - ), - ]), desc.ChoiceParam( - name='outputFormat', - label='Output Format', + name='videoFormat', + label='Video Format', description='''Choose the format of the output among this list of supported format''', value='mkv', values=['mkv', 'mp4', 'mov', 'avi'], exclusive=True, uid=[0], - joinChar=',', ), ] @@ -135,7 +129,7 @@ class RenderAnimatedCamera(desc.CommandLineNode): desc.File( name='outputPath', label='Output Path', - description='''Output folder.''', + description='''Output Folder''', value=desc.Node.internalFolder, uid=[], ) diff --git a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py index 1cfce3ce85..7549c9906f 100644 --- a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py +++ b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py @@ -7,6 +7,7 @@ import argparse # to parse options for us and print a nice help message from distutils.util import strtobool + def main(): argv = sys.argv @@ -23,104 +24,82 @@ def main(): parser = argparse.ArgumentParser(description=usage_text) - parser.add_argument( - "--sfMCameraPath", dest="SFM_cam_path", metavar='FILE', required=True, - help="This text will be used to render an image", + "--sfmCameraPath", metavar='FILE', required=True, + help="sfmData with the animated camera.", ) parser.add_argument( - "--useBackground", dest="Use_Background", type=strtobool, required=True, + "--useBackground", type=strtobool, required=True, help="Diplay the background image or not.", ) parser.add_argument( - "--undistortedImages", dest="undisto_images", metavar='FILE', required=False, + "--undistortedImages", metavar='FILE', required=False, help="Save the generated file to the specified path", ) parser.add_argument( - "--sfMData", dest="SFM_Data", metavar='FILE', required=True, - help="These info carry the Point Cloud or mesh we need.", + "--model", metavar='FILE', required=True, + help="Point Cloud or Mesh used in the rendering.", ) - #Point Cloud Arguments (When SFM Data is .abc) + # Point Cloud Arguments (when SFM Data is .abc) parser.add_argument( - "--pointCloudDensity", dest="Point_Cloud_Density", type=float, required=False, + "--pointCloudDensity", type=float, required=False, help="Number of point from the cloud rendered", ) parser.add_argument( - "--particleSize", dest="Particle_Size", type=float, required=False, - help="Scale of every particle used to show the point cloud", + "--particleSize", type=float, required=False, + help="Scale of particles used to show the point cloud", ) parser.add_argument( - "--particleColor", dest="Particle_Color", type=str, required=False, - help="Color of every particle used to show the point cloud (SFM Data is .abc)", + "--particleColor", type=str, required=False, + help="Color of particles used to show the point cloud (SFM Data is .abc)", ) - #Mesh Arguments (When SFM Data is .obj) + # Mesh Arguments (when SFM Data is .obj) parser.add_argument( - "--edgeColor", dest="Edge_Color", type=str, required=False, + "--edgeColor", type=str, required=False, help="Color of the edges of the rendered object (SFM Data is .obj)", ) - - #Output Arguments + # Output Arguments parser.add_argument( - "--outputFormat", dest="Output_Format", type=str, required=True, + "--videoFormat", type=str, required=True, help="Format of the video output", ) parser.add_argument( - "--outputPath", dest="output_path", metavar='FILE', required=True, + "--outputPath", metavar='FILE', required=True, help="Render an image to the specified path", ) - args = parser.parse_args(argv) if not argv: parser.print_help() - return - - if not args.undisto_images and args.Use_Background : - print("Error: --undisto_images argument not given, aborting.") - parser.print_help() - return - - if not args.Point_Cloud_Density and args.SFM_Data.endswith('.abc'): - print("Error: --Point_Cloud_Density argument not given, aborting.") - parser.print_help() - return + return -1 - if not args.Particle_Size and args.SFM_Data.endswith('.abc'): - print("Error: --Particle_Size argument not given, aborting.") + if not args.undistortedImages and args.useBackground: + print("Error: --undistortedImages argument not given, aborting.") parser.print_help() - return + return -1 - if not args.Particle_Color and args.SFM_Data.endswith('.abc'): - print("Error: --Particle_Color argument not given, aborting.") - parser.print_help() - return - - if not args.Edge_Color and args.SFM_Data.endswith('.obj'): - print("Error: --Edge_Color argument not given, aborting.") - parser.print_help() - return - - #Clear Current Scene + # Clear Current Scene try: for objects in bpy.data.objects: bpy.data.objects.remove(objects) except RuntimeError: - print("Error: While clearing current scene") + print("Error while clearing current scene") + raise - #The Switcher is the setting for most of the colors (if you want to add some, do it here and in the arguments of the node) + # The Switcher is the setting for most of the colors (if you want to add some, do it here and in the arguments of the node) # Keep in mind that we use the same switcher for both the Edge Color and the Particle Color settings. # So if you add a color to one of them in the node, might has well add it to the other. @@ -132,10 +111,10 @@ def main(): 'Magenta':(1.0, 0, 0.75, 1) } - # import Undistorted Images + print("Import Undistorted Images") undis_imgs = [] - #Some of these variable will be very useful in the next steps keep them in mind + # Some of these variable will be very useful in the next steps keep them in mind number_of_frame = 0 offset = 0 first_image_name = "" @@ -143,21 +122,23 @@ def main(): # In this part of the code we take the undistorted images and we process some info about them # undis_imgs is the list of the images' names # first_image_name says it all in the name - # The offset is important, it corresponds to the last part of the name of the first frame - # In most case it will hopefully be 0 but the sequence may start from a more advanced frame - if args.Use_Background : - files = os.listdir(args.undisto_images) + # The offset is important, it corresponds to the last part of the name of the first frame. + # In most case, it will be 0 but the sequence may start from a more advanced frame. + if args.useBackground: + files = os.listdir(args.undistortedImages) for f in files : if f.endswith(".exr") and not f.__contains__("UVMap"): undis_imgs.append({"name":f}) number_of_frame = len(undis_imgs) + print("undis_imgs: " + str(undis_imgs)) first_image_name = undis_imgs[0]['name'] offset = int(re.findall(r'\d+', first_image_name)[-1]) - 1 except RuntimeError: - print("Error: while importing the undistorted images.") + print("Error while importing the undistorted images.") + raise - #import abc (Animated Camera) + print("Import Animated Camera") try: @@ -167,14 +148,12 @@ def main(): # Once the cam has been found we select the main camera of the scene. # The rest of the code is setting up the display of the background image, - # Since it's not a simple image but an image Sequence, we have to use the offset and the number of frame - # Information taken from the previous block of code. - # The frame method is the one that align with the Point Cloud althought this may change, - # so feel free to try out the two other settings if something changes on previous nodes. + # As it is not a simple image but an image Sequence, we have to use the offset and the number of frames. + # We also have to make the scene render film transparent because we want to be able to display - # our background afterward in the next block of code + # our background afterwards. - bpy.ops.wm.alembic_import(filepath=args.SFM_cam_path) + bpy.ops.wm.alembic_import(filepath=args.sfmCameraPath) animated_cams = bpy.context.selected_editable_objects[:] cam_location = mathutils.Vector((0, 0, 0)) cam_obj = None @@ -185,8 +164,8 @@ def main(): bpy.context.scene.camera = obj cam_location = obj.location cam_obj = obj - if args.Use_Background : - bpy.ops.image.open(filepath=args.undisto_images + "/" + first_image_name, directory=args.undisto_images, files=undis_imgs, relative_path=True, show_multiview=False) + if args.useBackground : + bpy.ops.image.open(filepath=args.undistortedImages + "/" + first_image_name, directory=args.undistortedImages, files=undis_imgs, relative_path=True, show_multiview=False) bpy.data.cameras[obj.data.name].background_images.new() bpy.data.cameras[obj.data.name].show_background_images = True bpy.data.cameras[obj.data.name].background_images[0].image = bpy.data.images[first_image_name] @@ -196,26 +175,20 @@ def main(): bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_start = 1 bpy.context.scene.render.film_transparent = True except RuntimeError: - print("Error: while importing the alembic file (Animated Camera).") + print("Error while importing the alembic file (Animated Camera): " + args.sfmCameraPath) + raise + + print("Create the particle plane") - #Place the particle plane try: - # This is a key step if you are displaying a Point Cloud. # We are using a particle system later in the code to display the Point Cloud. - # To make it so, we need a model for the particle, a object that will be repeated a lot to make a shape. - # In order to do that we need a plane (one face only for optimisation purpose) that always face the camera. - # So we made a plane and made it a child (in the parenting system) of the camera. That way whenever the cam - # moves, the plane moves and turn accordingly. - - # Bmesh creates the plane and put it into the mesh. We change the size of the plane according to - # the scale given in arguments. We need to adjust the plane's location because putting it at the - # exact location of the camera blocks the view. Then, the switcher gives a RGBA color according to - # the given argument. We have to use a material that uses 'Emission' - # otherwise the particle is going to react to lights and we don't really need that (the color wouldn't be clear). + # We need to setup a model for the particle, a plane that always face the camera. + # It is declared as a child of the camera in the parenting system, so when the camera moves, the plane moves accordingly. + + # We use an 'Emission' material so it does not react to lights. # To do that we have to use the shader 'node_tree' we clear all links between nodes, create the emission node - # and connect it to the 'Material Output' node (which is what we will see in render). - # Finally we use the switcher to color the model. + # and connect it to the 'Material Output' node. plane = bpy.data.meshes.new('Plane') objectsPlane = bpy.data.objects.new(name="Plane", object_data=plane) @@ -223,8 +196,8 @@ def main(): bmesh.ops.create_grid(bm, x_segments = 1, y_segments = 1, size = 1.0) bm.to_mesh(plane) bm.free() - if (args.SFM_Data.endswith('.abc')): - objectsPlane.scale = mathutils.Vector((args.Particle_Size, args.Particle_Size, args.Particle_Size)) + if args.model.lower().endswith('.abc'): + objectsPlane.scale = mathutils.Vector((args.particleSize, args.particleSize, args.particleSize)) cam_location.y += -2.0 objectsPlane.location = cam_location bpy.context.scene.collection.objects.link(objectsPlane) @@ -237,29 +210,29 @@ def main(): objectsPlane.active_material.node_tree.links.clear() objectsPlane.active_material.node_tree.nodes.new(type='ShaderNodeEmission') objectsPlane.active_material.node_tree.links.new(objectsPlane.active_material.node_tree.nodes['Emission'].outputs['Emission'], objectsPlane.active_material.node_tree.nodes['Material Output'].inputs['Surface']) - if (args.SFM_Data.endswith('.abc')): - objectsPlane.active_material.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.Particle_Color, 'Invalid Color') + if args.model.lower().endswith('.abc'): + objectsPlane.active_material.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.particleColor, 'Invalid Color') except RuntimeError: print("Error: while setting up the particle model.") + raise + - if (args.SFM_Data.endswith('.abc')): - # This part is all about importing the Point Cloud and setting up the Particle System. - # After importing the alembic, we look for a specific mesh in the file. Again the hardcoded name would be a - # problem if the previous nodes hadn't name it specificaly that (.001 because a mesh with the same name has - # been imported with the animated camera). - - # Once the Point Cloud has been found. We make it the active object (important for the node_tree later). - # Then, we create a particle system on it. Render_type set to object and the said object is the plane, - # thanks to that the particle format is set to repeat the plane. Emit_from 'vert' so the points of the - # point cloud are the one rendering the particle. - # The count is the number of particle repeated on the point cloud. We use the rate given as arguments - # to give a number. Most of the following settings are just formalities but use_rotation and use_rotation_instance, - # those two make sure to use the same rotaion than the model (which is needed to have the particle always facing the camera). - - #import abc (Point Cloud) + if args.model.lower().endswith('.abc'): + + print("Import ABC Point Cloud") + + # After importing the alembic, we look for a specific Point Cloud in the file. + # We make it the active object (important for the node_tree later). + # Then, we create a particle system on it. Render_type set to object and the said object is the plane. + # Emit_from 'vert' so the points of the point cloud are the one rendering the particle. + # The count is the number of particles repeated on the point cloud. We use the rate given as arguments + # to give a number. + # use_rotation and use_rotation_instance ensure that we use the same rotation than the model (which is needed to have the particle always facing the camera). + + # Import Point Cloud try: - bpy.ops.wm.alembic_import(filepath=args.SFM_Data) + bpy.ops.wm.alembic_import(filepath=args.model) all_abc_info = bpy.context.selected_editable_objects[:] for obj in all_abc_info: if obj.name == 'mvgPointCloud.001': #May have a problem with such hard code @@ -272,8 +245,8 @@ def main(): particle_system.instance_object = bpy.data.objects["Plane"] particle_system.emit_from = 'VERT' - if (args.SFM_Data.endswith('.abc')): - particle_system.count = int(args.Point_Cloud_Density * len(obj.data.vertices.values())) + if args.model.lower().endswith('.abc'): + particle_system.count = int(args.pointCloudDensity * len(obj.data.vertices.values())) particle_system.frame_end = 1.0 particle_system.use_emit_random = False particle_system.particle_size = 0.02 @@ -283,15 +256,18 @@ def main(): particle_system.rotation_mode = 'GLOB_X' except RuntimeError: - print("Error: while importing the alembic file (Point Cloud).") - #Or import obj directly + print("Error while importing the alembic file (Point Cloud): " + args.model) + raise + - # The import via obj needs a bit of work too. For showing an outline of the object, we need to add two materials to the mesh : + # For showing an outline of the object, we need to add two materials to the mesh: # Center and Edge, we are using a method that consists in having a "bold" effect on the Edge Material so we can see it - # around the Center material. We do that by using a Solidify Modifier on which we flip normals and reduce Thickness to bellow zero. + # around the Center material. We use a Solidify Modifier on which we flip normals and reduce Thickness to bellow zero. # The more the thickness get bellow zero, the more the egde will be largely revealed. - elif (args.SFM_Data.endswith('.obj')): - bpy.ops.import_scene.obj(filepath=args.SFM_Data) + elif args.model.lower().endswith('.obj'): + print("Import OBJ") + + bpy.ops.import_scene.obj(filepath=args.model) center = bpy.data.materials.new('Center') center.use_nodes = True @@ -300,10 +276,9 @@ def main(): center.node_tree.links.new(center.node_tree.nodes['Emission'].outputs['Emission'], center.node_tree.nodes['Material Output'].inputs['Surface']) center.node_tree.nodes['Emission'].inputs[0].default_value = (0,0,0,0) - if not args.Use_Background and args.SFM_Data.endswith('.obj'): + if not args.useBackground and args.model.lower().endswith('.obj'): center.node_tree.nodes['Emission'].inputs[0].default_value = (0.05, 0.05, 0.05, 1) #Same Color as the no background color in blender - edge = bpy.data.materials.new('Edge') edge.use_nodes = True @@ -311,8 +286,8 @@ def main(): edge.node_tree.nodes.new(type='ShaderNodeEmission') edge.use_backface_culling = True edge.node_tree.links.new(edge.node_tree.nodes['Emission'].outputs['Emission'], edge.node_tree.nodes['Material Output'].inputs['Surface']) - edge.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.Edge_Color, 'Invalid Color') - + edge.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.edgeColor, 'Invalid Color') + bpy.data.meshes['mesh'].materials.clear() bpy.data.meshes['mesh'].materials.append(bpy.data.materials['Center']) bpy.data.meshes['mesh'].materials.append(bpy.data.materials['Edge']) @@ -325,17 +300,17 @@ def main(): bpy.data.objects['mesh'].modifiers["New"].use_flip_normals = True bpy.data.objects['mesh'].modifiers["New"].material_offset = 1 else: - print("SFM_Data isn't in the right format, alembics(.abc) and object(.obj) only are supported") + raise ValueError("sfmData: unknown file format, only alembic (.abc) and object (.obj) are supported: " + args.model) - #WE HAVE TO USE THE COMPOSITING GRAPH TO MAKE THE BACKGROUND IMAGE VISIBLE - # We setup all the nodes in the first place, even if we don't need them in our configuration. We put the setting in all of them. - # Only after having done that we can control which of the node we link in the graph according to the option we were given. + print("Create compositing graph") + + # We use the compositing graph to add the background image. # If the SFM Data is a Mesh, its extension is .obj so we have to build the graph accordingly. If the Background image setting was activated, # we need to include it in our node tree through the "Image" and Scale node. try: bpy.context.scene.use_nodes = True - #CREATE ALL NODES WE NEED (regardless of the options) + # Create all the nodes that we could need bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") bpy.context.scene.node_tree.nodes.new(type="CompositorNodeScale") bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") @@ -343,19 +318,18 @@ def main(): bpy.context.scene.node_tree.nodes.new(type="CompositorNodePremulKey") bpy.context.scene.node_tree.nodes.new(type="CompositorNodeMixRGB") - #SET THEM UP CORRECTLY (still regardless of the option) bpy.data.scenes["Scene"].node_tree.nodes["Mix"].blend_type = 'LIGHTEN' bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_duration = number_of_frame bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_offset = offset bpy.data.scenes["Scene"].node_tree.nodes["Scale"].space = 'RENDER_SIZE' bpy.data.scenes["Scene"].node_tree.nodes["Scale"].frame_method = 'CROP' - #LINKS THE NODES THAT NEEDS TO BE LINKED - if args.Use_Background : - if args.SFM_Data.endswith('.obj'): + # create links between nodes + if args.useBackground : + if args.model.lower().endswith('.obj'): bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Mix'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - #Two Inputs of AlphaOver are named "Image" so we'll use index instead + # Two Inputs of AlphaOver are named "Image" so we use indexes instead bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Convert'].inputs['Image']) bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Convert'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[2]) bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[1]) @@ -363,43 +337,55 @@ def main(): else: bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - #Two Inputs of AlphaOver are named "Image" so we'll use index instead + # Two Inputs of AlphaOver are named "Image" so we use indexes instead bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[2]) bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[1]) bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) else: - if args.SFM_Data.endswith('.obj'): + if args.model.lower().endswith('.obj'): bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Mix'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - #Two Inputs of AlphaOver are named "Image" so we'll use index instead + # Two Inputs of AlphaOver are named "Image" so we use indexes instead bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Convert'].inputs['Image']) bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Convert'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[2]) bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[1]) bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) except RuntimeError: - print("Error: while composing the compositing graph.") - - ## Starts the rendering and launchs it with a blender animator player + print("Error while creating the compositing graph.") + raise try: # Setup the render format and filepath bpy.context.scene.render.image_settings.file_format = 'FFMPEG' - if args.Output_Format == 'mkv': + if args.videoFormat == 'mkv': bpy.context.scene.render.ffmpeg.format = 'MKV' - elif args.Output_Format == 'avi': + elif args.videoFormat == 'avi': bpy.context.scene.render.ffmpeg.format = 'AVI' - elif args.Output_Format == 'mov': + elif args.videoFormat == 'mov': bpy.context.scene.render.ffmpeg.format = 'QUICKTIME' else: bpy.context.scene.render.ffmpeg.format = 'MPEG4' - bpy.context.scene.render.filepath = args.output_path + '/render.' + args.Output_Format + bpy.context.scene.render.filepath = args.outputPath + '/render.' + args.videoFormat + + print("Start Rendering") # Render everything on to the filepath bpy.ops.render.render(animation=True) - # Starts a player automatically to play the output (Usefull for developpers to see what they do but it doesn't really have its place in a software) + print("Rendering Done") + # Starts a player automatically to play the output # bpy.ops.render.play_rendered_anim() except RuntimeError: - print("Error: while rendering the scene.") - + print("Error while rendering the scene") + raise + + return 0 if __name__ == "__main__": - main() \ No newline at end of file + + err = 1 + try: + err = main() + except Exception as e: + print("\n" + str(e)) + sys.exit(err) + sys.exit(err) + From 31904fde0f9babb511cec50f24d489357492c22d Mon Sep 17 00:00:00 2001 From: elektrokokke <elektrokokke@gmail.com> Date: Fri, 23 Jul 2021 16:36:02 +0200 Subject: [PATCH 0531/1093] Integration of AprilTag library according to issue #1179 and AliceVision pull request #950 (#1180) * According to Meshroom issue #1179 (https://github.com/alicevision/meshroom/issues/1179), add the describer type "tag16h5" to the following modules: - ConvertSfmFormat (e.g., to be able to export the 3D AprilTag positions in a human-readable format as .sfm, or to see only the AprilTag marker positions in the 3D view via .abc) - FeatureExtraction (to be able to detect AprilTag markers from the tag16h5 family) - FeatureMatching (to be able to match AprilTag markers) - SfmTransform (to be able to use AprilTag markers, e.g., for the auto_from_markers transform) - StructureFromMotion (to be able to compute the 3D positions of AprilTag markers) * Added a new input to sfmTransform: markerDistances, which is a pair of marker IDs associated with the distance between them. Added a corresponding new transform: from_marker_distances, which scales the model according to the given distances between pairs of markers. Added another transform: auto_from_markers, which uses the existing markers parameter (ignoring their x,y,z positions) and applies the auto_from_... function only based on these given markers. The latter transform can, e.g., be used to align a set of markers with the ground plane. * Revert "Added a new input to sfmTransform: markerDistances, which is a pair of marker IDs associated with the distance between them." This reverts commit ed87c68f39b9f144c0a424e1aafc02135b70ab7d. Co-authored-by: jarne <jarne@ieee.org> Co-authored-by: Fabien Castan <fabcastan@gmail.com> --- meshroom/aliceVision/ConvertSfMFormat.py | 2 +- meshroom/aliceVision/FeatureExtraction.py | 2 +- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/SfMTransform.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index a5c71aa7ca..1c859ea382 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -36,7 +36,7 @@ class ConvertSfMFormat(desc.CommandLineNode): label='Describer Types', description='Describer types to keep.', value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'unknown'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5', 'unknown'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 5bb38e0685..b05b21a3dd 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -50,7 +50,7 @@ class FeatureExtraction(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index bef82041ec..fdd4f634ae 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -64,7 +64,7 @@ class FeatureMatching(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index ad602c6de7..e8caf7e8cd 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -132,7 +132,7 @@ class SfMTransform(desc.CommandLineNode): label='Landmarks Describer Types', description='Image describer types used to compute the mean of the point cloud. (only for "landmarks" method).', value=['sift', 'dspsift', 'akaze'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'unknown'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5', 'unknown'], exclusive=False, uid=[0], joinChar=',', diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 09914ac0b9..d029656d77 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -98,7 +98,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Describer Types', description='Describer types used to describe an image.', value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], exclusive=False, uid=[0], joinChar=',', From 791828f8cb1c3c28e62541ba566abae456c40f0a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 13 Aug 2021 12:00:33 +0200 Subject: [PATCH 0532/1093] [core] Improve project files upgrade - upgrade groups with changes in params - new upgradeAttributeValues per node --- meshroom/aliceVision/CameraInit.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index f37e808097..ba46d8eb25 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "4.0" +__version__ = "5.0" import os import json @@ -7,7 +7,7 @@ import tempfile import logging -from meshroom.core import desc +from meshroom.core import desc, Version Viewpoint = [ @@ -254,6 +254,15 @@ class CameraInit(desc.CommandLineNode): ), ] + def upgradeAttributeValues(self, attrValues, fromVersion): + if fromVersion <= Version(4, 0): + for intrinsic in attrValues['intrinsics']: + # focal length is now split on x and y + pxFocalLength = intrinsic['pxFocalLength'] + if not isinstance(pxFocalLength, dict): + intrinsic['pxFocalLength'] = {"x": pxFocalLength, "y": pxFocalLength} + return attrValues + def readSfMData(self, sfmFile): return readSfMData(sfmFile) From e9d1fb2ff01d3b7b95ce4fdc48aaf2eee3a19d75 Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Fri, 23 Jul 2021 14:18:16 +0200 Subject: [PATCH 0533/1093] [nodes] Texturing: add refMesh and Normal / Height Map file type --- meshroom/aliceVision/Texturing.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index c9f1dd5048..5590f00548 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -44,6 +44,13 @@ class Texturing(desc.CommandLineNode): value='', uid=[0], ), + desc.File( + name='inputRefMesh', + label='Ref Mesh', + description='Optional input mesh to compute height maps and normal maps. If not provided, no additional maps with geometric information will be generated.', + value='', + uid=[0], + ), desc.ChoiceParam( name='textureSide', label='Texture Side', @@ -71,6 +78,24 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='outputNormalMapFileType', + label='NormalMap File Type', + description='NormalMap Texture File Type', + value='png', + values=('jpg', 'png', 'tiff', 'exr'), + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='outputHeightMapFileType', + label='HeightMap File Type', + description='HeightMap Texture File Type', + value='png', + values=('jpg', 'png', 'tiff', 'exr'), + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='unwrapMethod', label='Unwrap Method', From c4bd8ddee57879f7207d29ea32371a8637eb6f29 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 18 Aug 2021 22:30:01 +0200 Subject: [PATCH 0534/1093] [nodes] CameraInit: Principal Point is now relative to the image center The principal point is no more relative to the top-left corner of the image. Linked to the AliceVision sfmData IO change in file version 1.2.1. --- meshroom/aliceVision/CameraInit.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index ba46d8eb25..9663bf1b23 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "5.0" +__version__ = "6.0" import os import json @@ -255,12 +255,22 @@ class CameraInit(desc.CommandLineNode): ] def upgradeAttributeValues(self, attrValues, fromVersion): - if fromVersion <= Version(4, 0): + # Starting with version 5, the focal length is now split on x and y + if fromVersion < Version(5, 0): for intrinsic in attrValues['intrinsics']: - # focal length is now split on x and y pxFocalLength = intrinsic['pxFocalLength'] if not isinstance(pxFocalLength, dict): intrinsic['pxFocalLength'] = {"x": pxFocalLength, "y": pxFocalLength} + + # Starting with version 6, the principal point is now relative to the image center + if fromVersion < Version(6, 0): + for intrinsic in attrValues['intrinsics']: + principalPoint = intrinsic['principalPoint'] + intrinsic['principalPoint'] = { + "x": int(principalPoint["x"] - 0.5 * intrinsic['width']), + "y": int(principalPoint["y"] - 0.5 * intrinsic['height']) + } + return attrValues def readSfMData(self, sfmFile): @@ -328,7 +338,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 0], + "version": [1, 2, 1], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From 2c1e85d692d31aeb46b3304b0c0dad08cbbdf313 Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Thu, 29 Jul 2021 14:49:04 +0200 Subject: [PATCH 0535/1093] [nodes] add empty value for file type --- meshroom/aliceVision/Texturing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 5590f00548..20adeb3665 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -74,7 +74,7 @@ class Texturing(desc.CommandLineNode): label='Texture File Type', description='Texture File Type', value='png', - values=('jpg', 'png', 'tiff', 'exr'), + values=('', 'jpg', 'png', 'tiff', 'exr'), exclusive=True, uid=[0], ), @@ -83,7 +83,7 @@ class Texturing(desc.CommandLineNode): label='NormalMap File Type', description='NormalMap Texture File Type', value='png', - values=('jpg', 'png', 'tiff', 'exr'), + values=('', 'jpg', 'png', 'tiff', 'exr'), exclusive=True, uid=[0], ), @@ -92,7 +92,7 @@ class Texturing(desc.CommandLineNode): label='HeightMap File Type', description='HeightMap Texture File Type', value='png', - values=('jpg', 'png', 'tiff', 'exr'), + values=('', 'jpg', 'png', 'tiff', 'exr'), exclusive=True, uid=[0], ), From 07c5ee661091bf2a4d9d42753f9b96fc7a8f2dfe Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Tue, 3 Aug 2021 12:50:29 +0200 Subject: [PATCH 0536/1093] [nodes] export heightmaps only in .exr --- meshroom/aliceVision/Texturing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 20adeb3665..b2cc4479f3 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -91,8 +91,8 @@ class Texturing(desc.CommandLineNode): name='outputHeightMapFileType', label='HeightMap File Type', description='HeightMap Texture File Type', - value='png', - values=('', 'jpg', 'png', 'tiff', 'exr'), + value='exr', + values=('', 'exr'), exclusive=True, uid=[0], ), From 6ca9c068619f43e597fb126b5b23082b6e7d7e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Zorroch=C3=A9?= <thomas.zorroche@gmail.com> Date: Mon, 9 Aug 2021 19:01:00 +0200 Subject: [PATCH 0537/1093] [nodes] add group attribute for textures parameters --- meshroom/aliceVision/Texturing.py | 105 +++++++++++++++++++++++------- 1 file changed, 80 insertions(+), 25 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index b2cc4479f3..836347c3f3 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -69,32 +69,87 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.ChoiceParam( - name='outputTextureFileType', - label='Texture File Type', - description='Texture File Type', - value='png', - values=('', 'jpg', 'png', 'tiff', 'exr'), - exclusive=True, - uid=[0], + desc.GroupAttribute(name="colorMap", label="Color Map", description="Color Map Parameters", + enabled=lambda node: (node.imagesFolder.value != ''), + group=None, + groupDesc=[ + desc.BoolParam( + name='enable', + label='Enable', + description='Generate Textures', + value=True, + uid=[], + group=None, + ), + desc.ChoiceParam( + name='outputTextureFileType', + label='File Type', + description='Texture File Type', + value='exr', + values=('jpg', 'png', 'tiff', 'exr'), + exclusive=True, + uid=[0], + enabled=lambda node: node.colorMap.enable.value, + ), + ], ), - desc.ChoiceParam( - name='outputNormalMapFileType', - label='NormalMap File Type', - description='NormalMap Texture File Type', - value='png', - values=('', 'jpg', 'png', 'tiff', 'exr'), - exclusive=True, - uid=[0], + desc.GroupAttribute(name="normalMap", label="Normal Map", description="Normal Map Parameters", + enabled=lambda node: (node.inputRefMesh.value != ''), + group=None, + groupDesc=[ + desc.BoolParam( + name='enable', + label='Enable', + description='Generate Normal Maps', + value=True, + uid=[], + group=None, + ), + desc.ChoiceParam( + name='outputNormalMapFileType', + label='File Type', + description='NormalMap Texture File Type', + value='exr', + values=('jpg', 'png', 'tiff', 'exr'), + exclusive=True, + uid=[0], + enabled=lambda node: node.normalMap.enable.value, + ), + ], ), - desc.ChoiceParam( - name='outputHeightMapFileType', - label='HeightMap File Type', - description='HeightMap Texture File Type', - value='exr', - values=('', 'exr'), - exclusive=True, - uid=[0], + desc.GroupAttribute(name="heightMap", label="Height Map", description="Height Map Parameters", + enabled=lambda node: (node.inputRefMesh.value != ''), + group=None, + groupDesc=[ + desc.BoolParam( + name='enable', + label='Enable', + description='Generate Height Maps', + value=True, + uid=[], + group=None, + ), + desc.ChoiceParam( + name='outputHeightMapFileType', + label='File Type', + description='HeightMap Texture File Type', + value='exr', + values=('exr',), + exclusive=True, + uid=[0], + enabled=lambda node: node.heightMap.enable.value, + ), + desc.ChoiceParam( + name='heightMapUsage', + label='Usage', + description='Use HeightMap for displacement or bump mapping', + value='displacement', + values=('displacement', 'bump'), + exclusive=True, + uid=[0], + enabled=lambda node: node.heightMap.enable.value, + ), + ], ), desc.ChoiceParam( name='unwrapMethod', @@ -270,7 +325,7 @@ class Texturing(desc.CommandLineNode): name='outputTextures', label='Textures', description='Output Texture files.', - value=desc.Node.internalFolder + 'texture_*.{outputTextureFileTypeValue}', + value=desc.Node.internalFolder + 'texture_*.exr', #{outputTextureFileTypeValue}', uid=[], group='', ), From d301a03f31bb417c46bbd381e650d3ec60b5fdcb Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Tue, 10 Aug 2021 16:53:55 +0200 Subject: [PATCH 0538/1093] [nodes] add mesh file type option --- meshroom/aliceVision/Texturing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 836347c3f3..ac7d14034d 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -69,6 +69,15 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='outputMeshFileType', + label='Mesh File Type', + description='File Type', + value='gltf2', + values=('obj', 'gltf2', 'fbx', 'stl'), + exclusive=True, + uid=[0], + ), desc.GroupAttribute(name="colorMap", label="Color Map", description="Color Map Parameters", enabled=lambda node: (node.imagesFolder.value != ''), group=None, From 57fec076b64dfa92df2825b98e072b110c941d0e Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Fri, 13 Aug 2021 10:21:33 +0200 Subject: [PATCH 0539/1093] [nodes] add output mesh file type for Meshing and Mesh Filtering --- meshroom/aliceVision/MeshFiltering.py | 15 ++++++++++++--- meshroom/aliceVision/Meshing.py | 13 +++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 9327a3b041..41d84d45ed 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -15,10 +15,19 @@ class MeshFiltering(desc.CommandLineNode): desc.File( name='inputMesh', label='Mesh', - description='''Input Mesh (OBJ file format).''', + description='''Input Mesh''', value='', uid=[0], ), + desc.ChoiceParam( + name='outputMeshFileType', + label='File Type', + description='Output Mesh File Type', + value='gltf', + values=('gltf', 'obj', 'fbx', 'stl'), + exclusive=True, + uid=[0], + ), desc.BoolParam( name='keepLargestMeshOnly', label='Keep Only the Largest Mesh', @@ -113,8 +122,8 @@ class MeshFiltering(desc.CommandLineNode): desc.File( name='outputMesh', label='Mesh', - description='''Output mesh (OBJ file format).''', - value=desc.Node.internalFolder + 'mesh.obj', + description='''Output mesh.''', + value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}', uid=[], ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 49d423f29c..f14b68b9b1 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -36,6 +36,15 @@ class Meshing(desc.CommandLineNode): value='', uid=[0], ), + desc.ChoiceParam( + name='outputMeshFileType', + label='File Type', + description='Output Mesh File Type', + value='gltf', + values=('gltf', 'obj', 'fbx', 'stl'), + exclusive=True, + uid=[0], + ), desc.BoolParam( name='useBoundingBox', label='Custom Bounding Box', @@ -496,8 +505,8 @@ class Meshing(desc.CommandLineNode): desc.File( name="outputMesh", label="Mesh", - description="Output mesh (OBJ file format).", - value="{cache}/{nodeType}/{uid0}/mesh.obj", + description="Output mesh", + value="{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}", uid=[], ), desc.File( From 9fdc8784ddb0b16afc129fcee7830190e50fe75e Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Fri, 13 Aug 2021 10:26:22 +0200 Subject: [PATCH 0540/1093] [nodes] outputMeshFileType: rename gltf2 into gltf --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index ac7d14034d..92bc2a66e6 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -74,7 +74,7 @@ class Texturing(desc.CommandLineNode): label='Mesh File Type', description='File Type', value='gltf2', - values=('obj', 'gltf2', 'fbx', 'stl'), + values=('obj', 'gltf', 'fbx', 'stl'), exclusive=True, uid=[0], ), From bde6170d4a5e64cee97254643f03de078720448a Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Fri, 13 Aug 2021 17:09:56 +0200 Subject: [PATCH 0541/1093] [nodes] ConvertMesh: add out mesh file type parameter --- meshroom/aliceVision/ConvertMesh.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 1a59cc8b0a..04e1229c5a 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -18,14 +18,13 @@ class ConvertMesh(desc.CommandLineNode): uid=[0], ), desc.ChoiceParam( - name='outputMeshFormat', - label='Output Mesh Format', - description='''Output Mesh Format (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', - value='obj', - values=['obj', 'mesh', 'meshb', 'ply', 'off','stl'], + name='outputMeshFileType', + label='File Type', + description='''Output Mesh Format (*.obj, *.gltf, *.fbx, *.stl).''', + value='gltf', + values=('gltf', 'obj', 'fbx', 'stl'), exclusive=True, uid=[0], - group='', ), desc.ChoiceParam( name='verboseLevel', @@ -43,7 +42,7 @@ class ConvertMesh(desc.CommandLineNode): name='output', label='Output Mesh', description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', - value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFormatValue}', + value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFileTypeValue}', uid=[], ), ] From a3c10081938e44e555e19cc4492625860352121a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Zorroch=C3=A9?= <thomas.zorroche@gmail.com> Date: Mon, 16 Aug 2021 14:27:47 +0200 Subject: [PATCH 0542/1093] [texturing] fix export filename --- meshroom/aliceVision/Texturing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 92bc2a66e6..0962a5a17f 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -73,7 +73,7 @@ class Texturing(desc.CommandLineNode): name='outputMeshFileType', label='Mesh File Type', description='File Type', - value='gltf2', + value='gltf', values=('obj', 'gltf', 'fbx', 'stl'), exclusive=True, uid=[0], @@ -318,7 +318,7 @@ class Texturing(desc.CommandLineNode): name='outputMesh', label='Mesh', description='Output Mesh file.', - value=desc.Node.internalFolder + 'texturedMesh.obj', + value=desc.Node.internalFolder + 'texturedMesh.{outputMeshFileTypeValue}', uid=[], group='', ), From fc0d44d6748d60c8eb439d8f840c6cd6df5fc74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Zorroch=C3=A9?= <thomas.zorroche@gmail.com> Date: Mon, 16 Aug 2021 18:52:30 +0200 Subject: [PATCH 0543/1093] [nodes] change texture mapping parameters --- meshroom/aliceVision/Texturing.py | 47 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 0962a5a17f..6fac7123c7 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -78,7 +78,7 @@ class Texturing(desc.CommandLineNode): exclusive=True, uid=[0], ), - desc.GroupAttribute(name="colorMap", label="Color Map", description="Color Map Parameters", + desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color Map Parameters", enabled=lambda node: (node.imagesFolder.value != ''), group=None, groupDesc=[ @@ -91,72 +91,73 @@ class Texturing(desc.CommandLineNode): group=None, ), desc.ChoiceParam( - name='outputTextureFileType', + name='colorMappingFileType', label='File Type', description='Texture File Type', value='exr', - values=('jpg', 'png', 'tiff', 'exr'), + values=('exr', 'png', 'tiff', 'jpg'), exclusive=True, uid=[0], - enabled=lambda node: node.colorMap.enable.value, + enabled=lambda node: node.colorMapping.enable.value, ), ], ), - desc.GroupAttribute(name="normalMap", label="Normal Map", description="Normal Map Parameters", + desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump Mapping Parameters", enabled=lambda node: (node.inputRefMesh.value != ''), group=None, groupDesc=[ desc.BoolParam( name='enable', label='Enable', - description='Generate Normal Maps', + description='Generate Normal / Bump Maps', value=True, uid=[], group=None, ), desc.ChoiceParam( - name='outputNormalMapFileType', + name='bumpType', + label='Bump Type', + description='Export Normal Map or Height Map', + value='Normal', + values=('Height', 'Normal'), + exclusive=True, + uid=[0], + enabled=lambda node: node.bumpMapping.enable.value, + ), + desc.ChoiceParam( + name='bumpMappingFileType', label='File Type', description='NormalMap Texture File Type', value='exr', - values=('jpg', 'png', 'tiff', 'exr'), + #values= lambda node: ('exr', 'png', 'tiff', 'jpg') if node.bumpType.value == "Normal" else ('exr',), + values = ('exr', 'png', 'tiff', 'jpg'), exclusive=True, uid=[0], - enabled=lambda node: node.normalMap.enable.value, + enabled=lambda node: node.bumpMapping.enable.value, ), ], ), - desc.GroupAttribute(name="heightMap", label="Height Map", description="Height Map Parameters", + desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement Mapping Parameters", enabled=lambda node: (node.inputRefMesh.value != ''), group=None, groupDesc=[ desc.BoolParam( name='enable', label='Enable', - description='Generate Height Maps', + description='Generate Height Maps for Displacement', value=True, uid=[], group=None, ), desc.ChoiceParam( - name='outputHeightMapFileType', + name='displacementMappingFileType', label='File Type', description='HeightMap Texture File Type', value='exr', values=('exr',), exclusive=True, uid=[0], - enabled=lambda node: node.heightMap.enable.value, - ), - desc.ChoiceParam( - name='heightMapUsage', - label='Usage', - description='Use HeightMap for displacement or bump mapping', - value='displacement', - values=('displacement', 'bump'), - exclusive=True, - uid=[0], - enabled=lambda node: node.heightMap.enable.value, + enabled=lambda node: node.displacementMapping.enable.value, ), ], ), From 6955b00f1df8e9d727d7dd17cec90f6c69e45988 Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Tue, 17 Aug 2021 16:15:56 +0200 Subject: [PATCH 0544/1093] [nodes] add lambda for Textures output value --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 6fac7123c7..d47a6b6fb3 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -335,7 +335,7 @@ class Texturing(desc.CommandLineNode): name='outputTextures', label='Textures', description='Output Texture files.', - value=desc.Node.internalFolder + 'texture_*.exr', #{outputTextureFileTypeValue}', + value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '', uid=[], group='', ), From b0ddc9c6f34d744d394bb3dd3822f613ad3e932f Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Tue, 17 Aug 2021 16:36:42 +0200 Subject: [PATCH 0545/1093] [nodes] separate choice parameter for bump mapping file type One for Normal, one for Height --- meshroom/aliceVision/Texturing.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index d47a6b6fb3..504fcff88a 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -125,15 +125,24 @@ class Texturing(desc.CommandLineNode): enabled=lambda node: node.bumpMapping.enable.value, ), desc.ChoiceParam( - name='bumpMappingFileType', + name='normalFileType', label='File Type', description='NormalMap Texture File Type', value='exr', - #values= lambda node: ('exr', 'png', 'tiff', 'jpg') if node.bumpType.value == "Normal" else ('exr',), values = ('exr', 'png', 'tiff', 'jpg'), exclusive=True, uid=[0], - enabled=lambda node: node.bumpMapping.enable.value, + enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal", + ), + desc.ChoiceParam( + name='heightFileType', + label='File Type', + description='HeightMap Texture File Type', + value='exr', + values=('exr',), + exclusive=True, + uid=[0], + enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height", ), ], ), From c67ddcc6dd02f55f16d75c24af807349946bab20 Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Tue, 17 Aug 2021 16:51:54 +0200 Subject: [PATCH 0546/1093] [nodes] upgrade Texturing version to 6.0 --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 504fcff88a..69eac6b3ff 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,4 +1,4 @@ -__version__ = "5.0" +__version__ = "6.0" from meshroom.core import desc From f2a6f7e016d0e2a762bd760ba88eb4199709458c Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Wed, 18 Aug 2021 11:30:14 +0200 Subject: [PATCH 0547/1093] [nodes] display material output only for .obj --- meshroom/aliceVision/Texturing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 69eac6b3ff..8de833d013 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -334,6 +334,7 @@ class Texturing(desc.CommandLineNode): ), desc.File( name='outputMaterial', + enabled= lambda node: node.outputMeshFileType.value == "obj", label='Material', description='Output Material file.', value=desc.Node.internalFolder + 'texturedMesh.mtl', From c743e516faac15e6851b4b2a70dc1a05f3caaecd Mon Sep 17 00:00:00 2001 From: Thomas Zorroche <thomas.zorroche@gmail.com> Date: Wed, 18 Aug 2021 15:54:01 +0200 Subject: [PATCH 0548/1093] [nodes] add outputMeshFileType parameter for meshMasking --- meshroom/aliceVision/MeshMasking.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 8ae6811163..d380d447d4 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -21,10 +21,19 @@ class MeshMasking(desc.CommandLineNode): desc.File( name='inputMesh', label='Input Mesh', - description='''Input Mesh (OBJ file format).''', + description='''Input Mesh''', value='', uid=[0], ), + desc.ChoiceParam( + name='outputMeshFileType', + label='Output File Type', + description='File Type', + value='gltf', + values=('obj', 'gltf', 'fbx', 'stl'), + exclusive=True, + uid=[0], + ), desc.ListAttribute( elementDesc=desc.File( name="masksFolder", @@ -91,8 +100,8 @@ class MeshMasking(desc.CommandLineNode): desc.File( name='outputMesh', label='Output Mesh', - description='''Output mesh (OBJ file format).''', - value=desc.Node.internalFolder + 'mesh.obj', + description='''Output mesh.''', + value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}', uid=[], ), ] From 34f84cf8169668b1ad317c5ce4617bfe5d099d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Zorroch=C3=A9?= <thomas.zorroche@gmail.com> Date: Fri, 27 Aug 2021 18:21:22 +0200 Subject: [PATCH 0549/1093] [nodes] change default mesh format to obj --- meshroom/aliceVision/ConvertMesh.py | 2 +- meshroom/aliceVision/MeshFiltering.py | 2 +- meshroom/aliceVision/MeshMasking.py | 2 +- meshroom/aliceVision/Meshing.py | 2 +- meshroom/aliceVision/Texturing.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 04e1229c5a..2f039006a2 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -21,7 +21,7 @@ class ConvertMesh(desc.CommandLineNode): name='outputMeshFileType', label='File Type', description='''Output Mesh Format (*.obj, *.gltf, *.fbx, *.stl).''', - value='gltf', + value='obj', values=('gltf', 'obj', 'fbx', 'stl'), exclusive=True, uid=[0], diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 41d84d45ed..a8e9ce961d 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -23,7 +23,7 @@ class MeshFiltering(desc.CommandLineNode): name='outputMeshFileType', label='File Type', description='Output Mesh File Type', - value='gltf', + value='obj', values=('gltf', 'obj', 'fbx', 'stl'), exclusive=True, uid=[0], diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index d380d447d4..0024d724b1 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -29,7 +29,7 @@ class MeshMasking(desc.CommandLineNode): name='outputMeshFileType', label='Output File Type', description='File Type', - value='gltf', + value='obj', values=('obj', 'gltf', 'fbx', 'stl'), exclusive=True, uid=[0], diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index f14b68b9b1..222f48d973 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -40,7 +40,7 @@ class Meshing(desc.CommandLineNode): name='outputMeshFileType', label='File Type', description='Output Mesh File Type', - value='gltf', + value='obj', values=('gltf', 'obj', 'fbx', 'stl'), exclusive=True, uid=[0], diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 8de833d013..55743bf2f7 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -73,7 +73,7 @@ class Texturing(desc.CommandLineNode): name='outputMeshFileType', label='Mesh File Type', description='File Type', - value='gltf', + value='obj', values=('obj', 'gltf', 'fbx', 'stl'), exclusive=True, uid=[0], From 16b1b77625d2a3fe9967a50d1518d99b0634ae91 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 2 Sep 2021 18:57:06 +0200 Subject: [PATCH 0550/1093] [nodes] Texturing: add upgrade code for colorMappingFileType --- meshroom/aliceVision/Texturing.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 55743bf2f7..894e6a2b8a 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,6 +1,7 @@ __version__ = "6.0" -from meshroom.core import desc +from meshroom.core import desc, Version, pyCompatibility +import logging class Texturing(desc.CommandLineNode): @@ -350,3 +351,11 @@ class Texturing(desc.CommandLineNode): group='', ), ] + + def upgradeAttributeValues(self, attrValues, fromVersion): + if fromVersion < Version(6, 0): + outputTextureFileType = attrValues['outputTextureFileType'] + if isinstance(outputTextureFileType, pyCompatibility.basestring): + attrValues['colorMapping'] = {} + attrValues['colorMapping']['colorMappingFileType'] = outputTextureFileType + return attrValues From 06a068da151ffa4fe7ea2392edb2bb01c98bb8fd Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 2 Sep 2021 22:43:30 +0200 Subject: [PATCH 0551/1093] [nodes] ConvertMesh: output file type is no more a command line argument --- meshroom/aliceVision/ConvertMesh.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 2f039006a2..55dac2dcd6 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -25,6 +25,7 @@ class ConvertMesh(desc.CommandLineNode): values=('gltf', 'obj', 'fbx', 'stl'), exclusive=True, uid=[0], + group='', ), desc.ChoiceParam( name='verboseLevel', From 74aa35dbc0e7348e4639365a5f12d3365943717a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 6 Sep 2021 12:05:52 +0200 Subject: [PATCH 0552/1093] [nodes] Mesh*: use file extension to choose the file format --- meshroom/aliceVision/MeshFiltering.py | 1 + meshroom/aliceVision/MeshMasking.py | 1 + meshroom/aliceVision/Meshing.py | 1 + 3 files changed, 3 insertions(+) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index a8e9ce961d..6c65bda0bb 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -27,6 +27,7 @@ class MeshFiltering(desc.CommandLineNode): values=('gltf', 'obj', 'fbx', 'stl'), exclusive=True, uid=[0], + group='', ), desc.BoolParam( name='keepLargestMeshOnly', diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 0024d724b1..9188072b4f 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -33,6 +33,7 @@ class MeshMasking(desc.CommandLineNode): values=('obj', 'gltf', 'fbx', 'stl'), exclusive=True, uid=[0], + group='', ), desc.ListAttribute( elementDesc=desc.File( diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 222f48d973..c1a085edf0 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -44,6 +44,7 @@ class Meshing(desc.CommandLineNode): values=('gltf', 'obj', 'fbx', 'stl'), exclusive=True, uid=[0], + group='', ), desc.BoolParam( name='useBoundingBox', From c7e5449cc5c686e01d66c421d8d35a42e6b9f06c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 2 Sep 2021 13:51:53 +0200 Subject: [PATCH 0553/1093] [nodes] CameraInit: use os.path.join --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 9663bf1b23..a5fcb8fc81 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -344,7 +344,7 @@ def createViewpointsFile(self, node, additionalViews=()): "featureFolder": "", "matchingFolder": "", } - node.viewpointsFile = (node.nodeDesc.internalFolder + '/viewpoints.sfm').format(**node._cmdVars) + node.viewpointsFile = os.path.join(node.nodeDesc.internalFolder, 'viewpoints.sfm').format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: json.dump(sfmData, f, indent=4) From 6eda8c33b4083162cdbaa8ec792ad352eb47420e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 15 Nov 2021 17:10:45 +0100 Subject: [PATCH 0554/1093] [nodes] DepthMap: Change P2 default value to 100 --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index a3f46bd9ac..dbccfe6655 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -144,7 +144,7 @@ class DepthMap(desc.CommandLineNode): name='sgmP2', label='SGM: P2', description='Semi Global Matching: P2 weight.', - value=20.0, + value=100.0, range=(-255.0, 255.0, 0.5), uid=[0], advanced=True, From f787016d5128ab040987c38578b1114bb313cd1c Mon Sep 17 00:00:00 2001 From: Simon <natowi@users.noreply.github.com> Date: Tue, 14 Dec 2021 21:20:39 +0100 Subject: [PATCH 0555/1093] minor doc text improvement --- meshroom/aliceVision/Split360Images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 2b351b784e..daee459826 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -6,7 +6,7 @@ class Split360Images(desc.CommandLineNode): commandLine = 'aliceVision_utils_split360Images {allParams}' category = 'Utils' - documentation = '''This node is used to extract multiple images from equirectangular or dualfisheye images or image folder''' + documentation = "This node is used to extract multiple images from equirectangular or dualfisheye images." inputs = [ desc.File( From e8ac529df1a0d29a9976e823ff8ae98d3d5aea8d Mon Sep 17 00:00:00 2001 From: luz paz <luzpaz@users.noreply.github.com> Date: Sat, 22 Jan 2022 07:39:05 -0500 Subject: [PATCH 0556/1093] Fix various typos in the source code ## Description Fix various typos in the source code. This includes user facing code, documentation, and source comments. This PR has not been tested. Closes #1605 --- meshroom/aliceVision/ColorCheckerDetection.py | 2 +- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/PanoramaSeams.py | 2 +- meshroom/aliceVision/SketchfabUpload.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- meshroom/aliceVision/Texturing.py | 2 +- meshroom/blender/scripts/renderAnimatedCameraInBlender.py | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index f33c653a72..f3109cfe74 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -17,7 +17,7 @@ class ColorCheckerDetection(desc.CommandLineNode): Outputs: - the detected color charts position and colors -- the associated tranform matrix from "theoric" to "measured" +- the associated transform matrix from "theoric" to "measured" assuming that the "theoric" Macbeth chart corners coordinates are: (0, 0), (1675, 0), (1675, 1125), (0, 1125) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index fdd4f634ae..831dda2db7 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -170,7 +170,7 @@ class FeatureMatching(desc.CommandLineNode): desc.BoolParam( name='crossMatching', label='Cross Matching', - description='Make sure that the matching process is symmetric (same matches for I->J than fo J->I)', + description='Make sure that the matching process is symmetric (same matches for I->J than for J->I)', value=False, uid=[0], ), diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 326d795949..c36beb9252 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -43,7 +43,7 @@ class PanoramaSeams(desc.CommandLineNode): desc.BoolParam( name='useGraphCut', label='Use Smart Seams', - description='Use a graphcut algorithm to optmize seams for better transitions between images.', + description='Use a graphcut algorithm to optimize seams for better transitions between images.', value=True, uid=[0], ), diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 2d980e4d7a..69d75aa26b 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -200,7 +200,7 @@ def upload(self, apiToken, modelFile, data, chunk): modelEndpoint, **{'data': body, 'headers': headers}) chunk.logManager.completeProgressBar() except requests.exceptions.RequestException as e: - chunk.logger.error(u'An error occured: {}'.format(e)) + chunk.logger.error(u'An error occurred: {}'.format(e)) raise RuntimeError() if r.status_code != requests.codes.created: chunk.logger.error(u'Upload failed with error: {}'.format(r.json())) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index d029656d77..2db4aeb4e4 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -116,7 +116,7 @@ class StructureFromMotion(desc.CommandLineNode): desc.ChoiceParam( name='observationConstraint', label='Observation Constraint', - description='Observation contraint mode used in the optimization:\n' + description='Observation constraint mode used in the optimization:\n' ' * Basic: Use standard reprojection error in pixel coordinates\n' ' * Scale: Use reprojection error in pixel coordinates but relative to the feature scale', value='Scale', diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 894e6a2b8a..34ed45d42d 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -273,7 +273,7 @@ class Texturing(desc.CommandLineNode): desc.BoolParam( name='forceVisibleByAllVertices', label='Force Visible By All Vertices', - description='''Triangle visibility is based on the union of vertices visiblity.''', + description='''Triangle visibility is based on the union of vertices visibility.''', value=False, uid=[0], advanced=True, diff --git a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py index 7549c9906f..e580aac3d6 100644 --- a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py +++ b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py @@ -31,7 +31,7 @@ def main(): parser.add_argument( "--useBackground", type=strtobool, required=True, - help="Diplay the background image or not.", + help="Display the background image or not.", ) parser.add_argument( @@ -262,8 +262,8 @@ def main(): # For showing an outline of the object, we need to add two materials to the mesh: # Center and Edge, we are using a method that consists in having a "bold" effect on the Edge Material so we can see it - # around the Center material. We use a Solidify Modifier on which we flip normals and reduce Thickness to bellow zero. - # The more the thickness get bellow zero, the more the egde will be largely revealed. + # around the Center material. We use a Solidify Modifier on which we flip normals and reduce Thickness to below zero. + # The more the thickness get below zero, the more the edge will be largely revealed. elif args.model.lower().endswith('.obj'): print("Import OBJ") From 2ce7b5f3365164a57fcfed66e9a05d0bfe48ea9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 1 Mar 2022 01:36:59 +0100 Subject: [PATCH 0557/1093] [nodes] StructureFromMotion: add option computeStructureColor --- meshroom/aliceVision/StructureFromMotion.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 2db4aeb4e4..03b35ad150 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -308,6 +308,13 @@ class StructureFromMotion(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='computeStructureColor', + label='Compute Structure Color', + description='Enable/Disable color computation of each 3D point.', + value=True, + uid=[0], + ), desc.File( name='initialPairA', label='Initial Pair A', From 13699d1a2259080beee17651af568ddf0b2f4b7a Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@technicolor.com> Date: Fri, 25 Mar 2022 11:00:52 +0100 Subject: [PATCH 0558/1093] [camerainit] update parameters to use focal in mm --- meshroom/aliceVision/CameraInit.py | 41 ++++++++++++++++-------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index a5fcb8fc81..ea5d5bc8d7 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "6.0" +__version__ = "7.0" import os import json @@ -28,16 +28,17 @@ Intrinsic = [ desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=None), - desc.FloatParam(name="pxInitialFocalLength", label="Initial Focal Length", + desc.FloatParam(name="initialFocalLength", label="Initial Focal Length", description="Initial Guess on the Focal Length (in pixels). \n" "When we have an initial value from EXIF, this value is not accurate but cannot be wrong. \n" "So this value is used to limit the range of possible values in the optimization. \n" "If you put -1, this value will not be used and the focal length will not be bounded.", value=-1.0, uid=[0], range=None), - desc.GroupAttribute(name="pxFocalLength", label="Focal Length", description="Known/Calibrated Focal Length (in pixels)", groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=-1, uid=[], range=(0, 10000, 1)), - desc.FloatParam(name="y", label="y", description="", value=-1, uid=[], range=(0, 10000, 1)), - ]), + desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000, uid=[], range=(0, 10000, 1)), + desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1, uid=[], range=(0, 10, 0.1)), + desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', + description='the pixelRatio value is locked for estimation', + value=False, uid=[0]), desc.ChoiceParam(name="type", label="Camera Type", description="Mathematical Model used to represent a camera:\n" " * pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" @@ -107,11 +108,6 @@ def readSfMData(sfmFile): intrinsic['principalPoint']['x'] = pp[0] intrinsic['principalPoint']['y'] = pp[1] - f = intrinsic['pxFocalLength'] - intrinsic['pxFocalLength'] = {} - intrinsic['pxFocalLength']['x'] = f[0] - intrinsic['pxFocalLength']['y'] = f[1] - # convert empty string distortionParams (i.e: Pinhole model) to empty list if intrinsic['distortionParams'] == '': intrinsic['distortionParams'] = list() @@ -255,12 +251,6 @@ class CameraInit(desc.CommandLineNode): ] def upgradeAttributeValues(self, attrValues, fromVersion): - # Starting with version 5, the focal length is now split on x and y - if fromVersion < Version(5, 0): - for intrinsic in attrValues['intrinsics']: - pxFocalLength = intrinsic['pxFocalLength'] - if not isinstance(pxFocalLength, dict): - intrinsic['pxFocalLength'] = {"x": pxFocalLength, "y": pxFocalLength} # Starting with version 6, the principal point is now relative to the image center if fromVersion < Version(6, 0): @@ -271,6 +261,20 @@ def upgradeAttributeValues(self, attrValues, fromVersion): "y": int(principalPoint["y"] - 0.5 * intrinsic['height']) } + # Starting with version 7, the focal length is now in mm + if fromVersion < Version(7, 0): + for intrinsic in attrValues['intrinsics']: + pxInitialFocalLength = intrinsic['pxInitialFocalLength'] + pxFocalLength = intrinsic['pxFocalLength'] + sensorWidth = intrinsic['sensorWidth'] + width = intrinsic['width'] + focalLength = (pxFocalLength / width) * sensorWidth + initialFocalLength = (pxInitialFocalLength / width) * sensorWidth + intrinsic['initialFocalLength'] = initialFocalLength + intrinsic['focalLength'] = focalLength + intrinsic['pixelRatio'] = 1.0 + intrinsic['pixelRatioLocked'] = False + return attrValues def readSfMData(self, sfmFile): @@ -329,7 +333,6 @@ def createViewpointsFile(self, node, additionalViews=()): intrinsics = node.intrinsics.getPrimitiveValue(exportDefault=True) for intrinsic in intrinsics: intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] - intrinsic['pxFocalLength'] = [intrinsic['pxFocalLength']['x'], intrinsic['pxFocalLength']['y']] views = node.viewpoints.getPrimitiveValue(exportDefault=False) # convert the metadata string into a map @@ -338,7 +341,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 1], + "version": [1, 2, 2], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From b13db95c518a2abe1d50b8b095f94a1fddf042eb Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 11 Apr 2022 17:01:38 +0200 Subject: [PATCH 0559/1093] [nodes] CameraInit: pixelRatioLocked True by default --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index ea5d5bc8d7..91cf5fefab 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -38,7 +38,7 @@ desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1, uid=[], range=(0, 10, 0.1)), desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', description='the pixelRatio value is locked for estimation', - value=False, uid=[0]), + value=True, uid=[0]), desc.ChoiceParam(name="type", label="Camera Type", description="Mathematical Model used to represent a camera:\n" " * pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" From de1c0734300b98a100e52eb834565d28ec4b30b0 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 21 Apr 2022 18:40:45 +0200 Subject: [PATCH 0560/1093] Update ImageProcessing node adding ACES and ACEScg in output color space menu. --- meshroom/aliceVision/ImageProcessing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index f2079f2bb4..e276c3658a 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -289,6 +289,15 @@ class ImageProcessing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='outputColorSpace', + label='Output Color Space', + description='Allows you to choose the color space of the output image.', + value='AUTO', + values=['AUTO', 'sRGB', 'Linear', 'ACES', 'ACEScg'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='storageDataType', label='Storage Data Type for EXR output', From 6832dbaf4a7573f28d72e5c4dbd7eabd87de4b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 12 Jul 2022 11:22:57 +0200 Subject: [PATCH 0561/1093] Do not evaluate variables of string parameters in the nodes' description Set the value of the string parameters in the nodes' description as the unevaluated variable instead of the evaluated variable. The evaluation will be made later, when the nodes with such parameters will be computed. --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/CameraLocalization.py | 2 +- meshroom/aliceVision/CameraRigCalibration.py | 2 +- meshroom/aliceVision/CameraRigLocalization.py | 2 +- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/ImageMatchingMultiSfM.py | 2 +- meshroom/aliceVision/KeyframeSelection.py | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 91cf5fefab..9ff8a83457 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -159,7 +159,7 @@ class CameraInit(desc.CommandLineNode): name='sensorDatabase', label='Sensor Database', description='''Camera sensor width database path.''', - value=os.environ.get('ALICEVISION_SENSOR_DB', ''), + value='${ALICEVISION_SENSOR_DB}', uid=[], ), desc.FloatParam( diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 3afe30709a..d8aabe9aa8 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -125,7 +125,7 @@ class CameraLocalization(desc.CommandLineNode): name='voctree', label='Voctree', description='''[voctree] Filename for the vocabulary tree''', - value=os.environ.get('ALICEVISION_VOCTREE', ''), + value='${ALICEVISION_VOCTREE}', uid=[0], ), desc.File( diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 9b5eecc61c..117457c35f 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -109,7 +109,7 @@ class CameraRigCalibration(desc.CommandLineNode): name='voctree', label='Voctree', description='''[voctree] Filename for the vocabulary tree''', - value=os.environ.get('ALICEVISION_VOCTREE', ''), + value='${ALICEVISION_VOCTREE}', uid=[0], ), desc.File( diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index e5a4dd37c7..6cff2d31c3 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -116,7 +116,7 @@ class CameraRigLocalization(desc.CommandLineNode): name='voctree', label='Voctree', description='''[voctree] Filename for the vocabulary tree''', - value=os.environ.get('ALICEVISION_VOCTREE', ''), + value='${ALICEVISION_VOCTREE}', uid=[0], ), desc.File( diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index c09c701d9d..f2ac0d94d5 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -74,7 +74,7 @@ class ImageMatching(desc.CommandLineNode): name='tree', label='Voc Tree: Tree', description='Input name for the vocabulary tree file.', - value=os.environ.get('ALICEVISION_VOCTREE', ''), + value='${ALICEVISION_VOCTREE}', uid=[], enabled=lambda node: 'VocabularyTree' in node.method.value, ), diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index f4e23bb938..313534b1d5 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -65,7 +65,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): name='tree', label='Voc Tree: Tree', description='Input name for the vocabulary tree file.', - value=os.environ.get('ALICEVISION_VOCTREE', ''), + value='${ALICEVISION_VOCTREE}', uid=[], enabled=lambda node: 'VocabularyTree' in node.method.value, ), diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index c8635a8c6b..c855cce317 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -95,14 +95,14 @@ class KeyframeSelection(desc.CommandLineNode): name='sensorDbPath', label='Sensor Db Path', description='''Camera sensor width database path.''', - value=os.environ.get('ALICEVISION_SENSOR_DB', ''), + value='${ALICEVISION_SENSOR_DB}', uid=[0], ), desc.File( name='voctreePath', label='Voctree Path', description='''Vocabulary tree path.''', - value=os.environ.get('ALICEVISION_VOCTREE', ''), + value='${ALICEVISION_VOCTREE}', uid=[0], ), desc.BoolParam( From 9080e467acffb32bb936a65ee5238316aec0e15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 12 Jul 2022 11:50:34 +0200 Subject: [PATCH 0562/1093] Add support for external pipelines using project files - Support loading external pipelines as templates with project files - Add template files for some standard pipelines - Remove the hard-coded generation of new pipelines - Update multiviewPipeline test: the multiviewPipeline test relied on the hard-coded generation of pipelines. --- meshroom/cameraTracking.mg | 278 +++++++++ meshroom/panoramaFisheyeHdr.mg | 591 ++++++++++++++++++++ meshroom/panoramaHdr.mg | 591 ++++++++++++++++++++ meshroom/photogrammetry.mg | 523 +++++++++++++++++ meshroom/photogrammetryAndCameraTracking.mg | 486 ++++++++++++++++ meshroom/photogrammetryDraft.mg | 404 +++++++++++++ 6 files changed, 2873 insertions(+) create mode 100644 meshroom/cameraTracking.mg create mode 100644 meshroom/panoramaFisheyeHdr.mg create mode 100644 meshroom/panoramaHdr.mg create mode 100644 meshroom/photogrammetry.mg create mode 100644 meshroom/photogrammetryAndCameraTracking.mg create mode 100644 meshroom/photogrammetryDraft.mg diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg new file mode 100644 index 0000000000..ccbdafd245 --- /dev/null +++ b/meshroom/cameraTracking.mg @@ -0,0 +1,278 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2021.1.0", + "fileVersion": "1.1", + "nodesVersions": { + "ExportAnimatedCamera": "2.0", + "FeatureMatching": "2.0", + "DistortionCalibration": "2.0", + "CameraInit": "7.0", + "ImageMatching": "2.0", + "FeatureExtraction": "1.1", + "StructureFromMotion": "2.0" + } + }, + "graph": { + "DistortionCalibration_1": { + "inputs": { + "verboseLevel": "info", + "input": "{CameraInit_1.output}", + "lensGrid": [] + }, + "nodeType": "DistortionCalibration", + "uids": { + "0": "8afea9d171904cdb6ba1c0b116cb60de3ccb6fb4" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" + }, + "position": [ + 200, + 160 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageMatching_1": { + "inputs": { + "minNbImages": 200, + "nbNeighbors": 10, + "tree": "${ALICEVISION_VOCTREE}", + "maxDescriptors": 500, + "verboseLevel": "info", + "weights": "", + "nbMatches": 5, + "input": "{FeatureExtraction_1.input}", + "method": "SequentialAndVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + }, + "nodeType": "ImageMatching", + "uids": { + "0": "832b744de5fa804d7d63ea255419b1afaf24f723" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" + }, + "position": [ + 400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureExtraction_1": { + "inputs": { + "verboseLevel": "info", + "maxThreads": 0, + "describerTypes": [ + "dspsift" + ], + "maxNbFeatures": 0, + "relativePeakThreshold": 0.01, + "forceCpuExtraction": true, + "masksFolder": "", + "contrastFiltering": "GridSort", + "describerQuality": "normal", + "gridFiltering": true, + "input": "{CameraInit_1.output}", + "describerPreset": "normal" + }, + "nodeType": "FeatureExtraction", + "uids": { + "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "StructureFromMotion_1": { + "inputs": { + "localizerEstimatorMaxIterations": 4096, + "minAngleForLandmark": 0.5, + "filterTrackForks": false, + "minNumberOfObservationsForTriangulation": 3, + "maxAngleInitialPair": 40.0, + "observationConstraint": "Scale", + "maxNumberOfMatches": 0, + "localizerEstimator": "acransac", + "describerTypes": "{FeatureMatching_1.describerTypes}", + "lockScenePreviouslyReconstructed": false, + "localBAGraphDistance": 1, + "minNbCamerasToRefinePrincipalPoint": 3, + "lockAllIntrinsics": false, + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "useRigConstraint": true, + "rigMinNbCamerasForCalibration": 20, + "initialPairA": "", + "initialPairB": "", + "interFileExtension": ".abc", + "useLocalBA": true, + "computeStructureColor": true, + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "minInputTrackLength": 5, + "useOnlyMatchesFromInputFolder": false, + "verboseLevel": "info", + "minAngleForTriangulation": 1.0, + "maxReprojectionError": 4.0, + "minAngleInitialPair": 5.0, + "minNumberOfMatches": 0, + "localizerEstimatorError": 0.0 + }, + "nodeType": "StructureFromMotion", + "uids": { + "0": "4d198974784fd71f5a1c189e10c2914e56523585" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/sfm.abc", + "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ExportAnimatedCamera_1": { + "inputs": { + "exportFullROD": false, + "undistortedImageType": "exr", + "exportUVMaps": true, + "verboseLevel": "info", + "sfmDataFilter": "", + "exportUndistortedImages": false, + "input": "{StructureFromMotion_1.output}", + "viewFilter": "", + "correctPrincipalPoint": true + }, + "nodeType": "ExportAnimatedCamera", + "uids": { + "0": "31413f19e51b239874733f13f9628286fd185c18" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputUndistorted": "{cache}/{nodeType}/{uid0}/undistort", + "outputCamera": "{cache}/{nodeType}/{uid0}/camera.abc" + }, + "position": [ + 1000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_1": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye4", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 0, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureMatching_1": { + "inputs": { + "verboseLevel": "info", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "exportDebugFiles": false, + "crossMatching": false, + "geometricError": 0.0, + "maxMatches": 0, + "matchFromKnownCameraPoses": false, + "savePutativeMatches": false, + "guidedMatching": false, + "imagePairsList": "{ImageMatching_1.output}", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "maxIteration": 2048, + "distanceRatio": 0.8, + "input": "{DistortionCalibration_1.outSfMData}", + "photometricMatchingMethod": "ANN_L2", + "knownPosesGeometricErrorMax": 5.0, + "featuresFolders": "{ImageMatching_1.featuresFolders}" + }, + "nodeType": "FeatureMatching", + "uids": { + "0": "8386c096445d6988ea7d14f1ae3192978a4dd2e8" + }, + "parallelization": { + "blockSize": 20, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + } + } +} \ No newline at end of file diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg new file mode 100644 index 0000000000..b49093b99e --- /dev/null +++ b/meshroom/panoramaFisheyeHdr.mg @@ -0,0 +1,591 @@ +{ + "header": { + "nodesVersions": { + "PanoramaSeams": "2.0", + "FeatureMatching": "2.0", + "ImageProcessing": "3.0", + "PanoramaCompositing": "2.0", + "LdrToHdrMerge": "4.0", + "LdrToHdrSampling": "4.0", + "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", + "PanoramaInit": "2.0", + "PanoramaMerging": "1.0", + "SfMTransform": "3.0", + "CameraInit": "7.0", + "ImageMatching": "2.0", + "FeatureExtraction": "1.1", + "PanoramaPrepareImages": "1.1", + "PanoramaWarping": "1.0" + }, + "releaseVersion": "2021.1.0", + "fileVersion": "1.1" + }, + "graph": { + "LdrToHdrMerge_1": { + "inputs": { + "verboseLevel": "info", + "fusionWeight": "gaussian", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", + "nbBrackets": 0, + "enableHighlight": false, + "offsetRefBracketIndex": 1, + "storageDataType": "float", + "highlightTargetLux": 120000.0, + "byPass": "{LdrToHdrCalibration_1.byPass}", + "highlightCorrectionFactor": 1.0, + "input": "{LdrToHdrCalibration_1.input}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "response": "{LdrToHdrCalibration_1.response}" + }, + "nodeType": "LdrToHdrMerge", + "uids": { + "0": "9b90e3b468adc487fe2905e0cc78328216966317" + }, + "parallelization": { + "blockSize": 2, + "split": 0, + "size": 0 + }, + "outputs": { + "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" + }, + "position": [ + 800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageProcessing_1": { + "inputs": { + "outputFormat": "rgba", + "sharpenFilter": { + "threshold": 0.0, + "width": 3, + "sharpenFilterEnabled": false, + "contrast": 1.0 + }, + "extension": "exr", + "exposureCompensation": false, + "storageDataType": "float", + "inputFolders": [], + "verboseLevel": "info", + "metadataFolders": [], + "claheFilter": { + "claheClipLimit": 4.0, + "claheTileGridSize": 8, + "claheEnabled": false + }, + "medianFilter": 0, + "fillHoles": true, + "reconstructedViewsOnly": false, + "input": "{PanoramaMerging_1.outputPanorama}", + "noiseFilter": { + "noiseEnabled": false, + "noiseMethod": "uniform", + "noiseB": 1.0, + "noiseMono": true, + "noiseA": 0.0 + }, + "scaleFactor": 1.0, + "bilateralFilter": { + "bilateralFilterDistance": 0, + "bilateralFilterSigmaColor": 0.0, + "bilateralFilterSigmaSpace": 0.0, + "bilateralFilterEnabled": false + }, + "contrast": 1.0, + "fixNonFinite": true + }, + "nodeType": "ImageProcessing", + "uids": { + "0": "494b97af203ddbe4767c922a6c5795297cf53eef" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr", + "outSfMData": "" + }, + "position": [ + 3000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaWarping_1": { + "inputs": { + "panoramaWidth": 10000, + "maxPanoramaWidth": 70000, + "verboseLevel": "info", + "percentUpscale": 50, + "input": "{SfMTransform_1.output}", + "storageDataType": "float", + "estimateResolution": true + }, + "nodeType": "PanoramaWarping", + "uids": { + "0": "45cca14aba2a8c4f68c79a15d3fbc48f30ae9d66" + }, + "parallelization": { + "blockSize": 5, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 2200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "LdrToHdrCalibration_1": { + "inputs": { + "samples": "{LdrToHdrSampling_1.output}", + "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", + "maxTotalPoints": 1000000, + "nbBrackets": 0, + "calibrationMethod": "debevec", + "calibrationWeight": "default", + "verboseLevel": "info", + "byPass": "{LdrToHdrSampling_1.byPass}", + "input": "{LdrToHdrSampling_1.input}", + "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" + }, + "nodeType": "LdrToHdrCalibration", + "uids": { + "0": "9225abd943d28be4387a8a8902711d0b7c604a2a" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "response": "{cache}/{nodeType}/{uid0}/response.csv" + }, + "position": [ + 600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "LdrToHdrSampling_1": { + "inputs": { + "blockSize": 256, + "nbBrackets": 0, + "verboseLevel": "info", + "radius": 5, + "byPass": false, + "channelQuantizationPower": 10, + "debug": false, + "input": "{PanoramaPrepareImages_1.output}", + "maxCountSample": 200, + "userNbBrackets": 0 + }, + "nodeType": "LdrToHdrSampling", + "uids": { + "0": "af67674ecc8524592fe2b217259c241167e28dcd" + }, + "parallelization": { + "blockSize": 2, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageMatching_1": { + "inputs": { + "minNbImages": 200, + "nbNeighbors": 5, + "tree": "${ALICEVISION_VOCTREE}", + "maxDescriptors": 500, + "verboseLevel": "info", + "weights": "", + "nbMatches": 40, + "input": "{PanoramaInit_1.outSfMData}", + "method": "FrustumOrVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + }, + "nodeType": "ImageMatching", + "uids": { + "0": "a076f9e959d62b3a6f63d3f6493527b857eab8d6" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" + }, + "position": [ + 1400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureExtraction_1": { + "inputs": { + "verboseLevel": "info", + "maxThreads": 0, + "describerTypes": [ + "sift" + ], + "maxNbFeatures": 0, + "relativePeakThreshold": 0.01, + "forceCpuExtraction": true, + "masksFolder": "", + "contrastFiltering": "GridSort", + "describerQuality": "high", + "gridFiltering": true, + "input": "{LdrToHdrMerge_1.outSfMData}", + "describerPreset": "high" + }, + "nodeType": "FeatureExtraction", + "uids": { + "0": "04f8824c2e2f206b47f05edaf76def15fa91446b" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaSeams_1": { + "inputs": { + "verboseLevel": "info", + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}", + "maxWidth": 5000, + "useGraphCut": true + }, + "nodeType": "PanoramaSeams", + "uids": { + "0": "dd02562c5c3b1e18e42561d99590cbf4ff5ba35a" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/labels.exr" + }, + "position": [ + 2400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaCompositing_1": { + "inputs": { + "warpingFolder": "{PanoramaSeams_1.warpingFolder}", + "maxThreads": 4, + "labels": "{PanoramaSeams_1.output}", + "verboseLevel": "info", + "overlayType": "none", + "compositerType": "multiband", + "input": "{PanoramaSeams_1.input}", + "storageDataType": "float" + }, + "nodeType": "PanoramaCompositing", + "uids": { + "0": "1f1e629021e2280291046226e009a52dbb7809c1" + }, + "parallelization": { + "blockSize": 5, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 2600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_1": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 0, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaPrepareImages_1": { + "inputs": { + "verboseLevel": "info", + "input": "{CameraInit_1.output}" + }, + "nodeType": "PanoramaPrepareImages", + "uids": { + "0": "6956c52a8d18cb4cdb7ceb0db68f4deb84a37aee" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "SfMTransform_1": { + "inputs": { + "applyScale": true, + "scale": 1.0, + "applyTranslation": true, + "landmarksDescriberTypes": [ + "sift", + "dspsift", + "akaze" + ], + "markers": [], + "method": "manual", + "verboseLevel": "info", + "input": "{PanoramaEstimation_1.output}", + "applyRotation": true, + "manualTransform": { + "manualTranslation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + }, + "manualRotation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + }, + "manualScale": 1.0 + }, + "transformation": "" + }, + "nodeType": "SfMTransform", + "uids": { + "0": "b8568fb40b68b42ac80c18df2dcdf600744fe3e1" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/panorama.abc", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 2000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaMerging_1": { + "inputs": { + "verboseLevel": "info", + "compositingFolder": "{PanoramaCompositing_1.output}", + "outputFileType": "exr", + "storageDataType": "float", + "input": "{PanoramaCompositing_1.input}" + }, + "nodeType": "PanoramaMerging", + "uids": { + "0": "70edd7fe8194bf35dcb0b221141cd4abd2354547" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" + }, + "position": [ + 2800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaEstimation_1": { + "inputs": { + "intermediateRefineWithFocalDist": false, + "offsetLongitude": 0.0, + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "filterMatches": false, + "rotationAveragingWeighting": true, + "offsetLatitude": 0.0, + "verboseLevel": "info", + "maxAngularError": 100.0, + "lockAllIntrinsics": false, + "refine": true, + "input": "{FeatureMatching_1.input}", + "intermediateRefineWithFocal": false, + "describerTypes": "{FeatureMatching_1.describerTypes}", + "relativeRotation": "rotation_matrix", + "maxAngleToPrior": 20.0, + "rotationAveraging": "L2_minimization", + "featuresFolders": "{FeatureMatching_1.featuresFolders}" + }, + "nodeType": "PanoramaEstimation", + "uids": { + "0": "47b0976fc98eefcbc0342bbb63e7d27ef3e0d4de" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/panorama.abc", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 1800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaInit_1": { + "inputs": { + "useFisheye": true, + "fisheyeCenterOffset": { + "fisheyeCenterOffset_y": 0.0, + "fisheyeCenterOffset_x": 0.0 + }, + "initializeCameras": "No", + "nbViewsPerLine": [], + "debugFisheyeCircleEstimation": false, + "verboseLevel": "info", + "dependency": [ + "{FeatureExtraction_1.output}" + ], + "estimateFisheyeCircle": true, + "input": "{FeatureExtraction_1.input}", + "yawCW": 1, + "config": "", + "fisheyeRadius": 96.0, + "inputAngle": "None" + }, + "nodeType": "PanoramaInit", + "uids": { + "0": "2fd95a957eb42ffc8fb1c24d2666afcd859ba079" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" + }, + "position": [ + 1200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureMatching_1": { + "inputs": { + "verboseLevel": "info", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "exportDebugFiles": false, + "crossMatching": false, + "geometricError": 0.0, + "maxMatches": 0, + "matchFromKnownCameraPoses": false, + "savePutativeMatches": false, + "guidedMatching": false, + "imagePairsList": "{ImageMatching_1.output}", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "maxIteration": 2048, + "distanceRatio": 0.8, + "input": "{ImageMatching_1.input}", + "photometricMatchingMethod": "ANN_L2", + "knownPosesGeometricErrorMax": 5.0, + "featuresFolders": "{ImageMatching_1.featuresFolders}" + }, + "nodeType": "FeatureMatching", + "uids": { + "0": "c0fbe0b12fe47ada6a1ca8f74d266e99c1cc548c" + }, + "parallelization": { + "blockSize": 20, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + } + } +} \ No newline at end of file diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg new file mode 100644 index 0000000000..5ca4c8458e --- /dev/null +++ b/meshroom/panoramaHdr.mg @@ -0,0 +1,591 @@ +{ + "header": { + "nodesVersions": { + "PanoramaSeams": "2.0", + "FeatureMatching": "2.0", + "ImageProcessing": "3.0", + "PanoramaCompositing": "2.0", + "LdrToHdrMerge": "4.0", + "LdrToHdrSampling": "4.0", + "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", + "PanoramaInit": "2.0", + "PanoramaMerging": "1.0", + "SfMTransform": "3.0", + "CameraInit": "7.0", + "ImageMatching": "2.0", + "FeatureExtraction": "1.1", + "PanoramaPrepareImages": "1.1", + "PanoramaWarping": "1.0" + }, + "releaseVersion": "2021.1.0", + "fileVersion": "1.1" + }, + "graph": { + "LdrToHdrMerge_1": { + "inputs": { + "verboseLevel": "info", + "fusionWeight": "gaussian", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", + "nbBrackets": 0, + "enableHighlight": false, + "offsetRefBracketIndex": 1, + "storageDataType": "float", + "highlightTargetLux": 120000.0, + "byPass": "{LdrToHdrCalibration_1.byPass}", + "highlightCorrectionFactor": 1.0, + "input": "{LdrToHdrCalibration_1.input}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "response": "{LdrToHdrCalibration_1.response}" + }, + "nodeType": "LdrToHdrMerge", + "uids": { + "0": "9b90e3b468adc487fe2905e0cc78328216966317" + }, + "parallelization": { + "blockSize": 2, + "split": 0, + "size": 0 + }, + "outputs": { + "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" + }, + "position": [ + 800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageProcessing_1": { + "inputs": { + "outputFormat": "rgba", + "sharpenFilter": { + "threshold": 0.0, + "width": 3, + "sharpenFilterEnabled": false, + "contrast": 1.0 + }, + "extension": "exr", + "exposureCompensation": false, + "storageDataType": "float", + "inputFolders": [], + "verboseLevel": "info", + "metadataFolders": [], + "claheFilter": { + "claheClipLimit": 4.0, + "claheTileGridSize": 8, + "claheEnabled": false + }, + "medianFilter": 0, + "fillHoles": true, + "reconstructedViewsOnly": false, + "input": "{PanoramaMerging_1.outputPanorama}", + "noiseFilter": { + "noiseEnabled": false, + "noiseMethod": "uniform", + "noiseB": 1.0, + "noiseMono": true, + "noiseA": 0.0 + }, + "scaleFactor": 1.0, + "bilateralFilter": { + "bilateralFilterDistance": 0, + "bilateralFilterSigmaColor": 0.0, + "bilateralFilterSigmaSpace": 0.0, + "bilateralFilterEnabled": false + }, + "contrast": 1.0, + "fixNonFinite": true + }, + "nodeType": "ImageProcessing", + "uids": { + "0": "d7845b276d97c3489223cce16a1e9d581d98a832" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr", + "outSfMData": "" + }, + "position": [ + 3000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaWarping_1": { + "inputs": { + "panoramaWidth": 10000, + "maxPanoramaWidth": 70000, + "verboseLevel": "info", + "percentUpscale": 50, + "input": "{SfMTransform_1.output}", + "storageDataType": "float", + "estimateResolution": true + }, + "nodeType": "PanoramaWarping", + "uids": { + "0": "f2971d0c73b15fa99cbccbc9515de346ca141a1e" + }, + "parallelization": { + "blockSize": 5, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 2200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "LdrToHdrCalibration_1": { + "inputs": { + "samples": "{LdrToHdrSampling_1.output}", + "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", + "maxTotalPoints": 1000000, + "nbBrackets": 0, + "calibrationMethod": "debevec", + "calibrationWeight": "default", + "verboseLevel": "info", + "byPass": "{LdrToHdrSampling_1.byPass}", + "input": "{LdrToHdrSampling_1.input}", + "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" + }, + "nodeType": "LdrToHdrCalibration", + "uids": { + "0": "9225abd943d28be4387a8a8902711d0b7c604a2a" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "response": "{cache}/{nodeType}/{uid0}/response.csv" + }, + "position": [ + 600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "LdrToHdrSampling_1": { + "inputs": { + "blockSize": 256, + "nbBrackets": 0, + "verboseLevel": "info", + "radius": 5, + "byPass": false, + "channelQuantizationPower": 10, + "debug": false, + "input": "{PanoramaPrepareImages_1.output}", + "maxCountSample": 200, + "userNbBrackets": 0 + }, + "nodeType": "LdrToHdrSampling", + "uids": { + "0": "af67674ecc8524592fe2b217259c241167e28dcd" + }, + "parallelization": { + "blockSize": 2, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageMatching_1": { + "inputs": { + "minNbImages": 200, + "nbNeighbors": 5, + "tree": "${ALICEVISION_VOCTREE}", + "maxDescriptors": 500, + "verboseLevel": "info", + "weights": "", + "nbMatches": 40, + "input": "{PanoramaInit_1.outSfMData}", + "method": "FrustumOrVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + }, + "nodeType": "ImageMatching", + "uids": { + "0": "7efc9cd43585003fc6eec0776a704e358f0a15de" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" + }, + "position": [ + 1400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureExtraction_1": { + "inputs": { + "verboseLevel": "info", + "maxThreads": 0, + "describerTypes": [ + "dspsift" + ], + "maxNbFeatures": 0, + "relativePeakThreshold": 0.01, + "forceCpuExtraction": true, + "masksFolder": "", + "contrastFiltering": "GridSort", + "describerQuality": "high", + "gridFiltering": true, + "input": "{LdrToHdrMerge_1.outSfMData}", + "describerPreset": "normal" + }, + "nodeType": "FeatureExtraction", + "uids": { + "0": "1863cc0989ab0fd910d4fe293074ff94c4e586a1" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaSeams_1": { + "inputs": { + "verboseLevel": "info", + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}", + "maxWidth": 5000, + "useGraphCut": true + }, + "nodeType": "PanoramaSeams", + "uids": { + "0": "0ee6da171bd684358b7c64dcc631f81ba743e1fa" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/labels.exr" + }, + "position": [ + 2400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaCompositing_1": { + "inputs": { + "warpingFolder": "{PanoramaSeams_1.warpingFolder}", + "maxThreads": 4, + "labels": "{PanoramaSeams_1.output}", + "verboseLevel": "info", + "overlayType": "none", + "compositerType": "multiband", + "input": "{PanoramaSeams_1.input}", + "storageDataType": "float" + }, + "nodeType": "PanoramaCompositing", + "uids": { + "0": "8aba78572808d012e0bb376503c2016df943b3f0" + }, + "parallelization": { + "blockSize": 5, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 2600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_1": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 0, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaPrepareImages_1": { + "inputs": { + "verboseLevel": "info", + "input": "{CameraInit_1.output}" + }, + "nodeType": "PanoramaPrepareImages", + "uids": { + "0": "6956c52a8d18cb4cdb7ceb0db68f4deb84a37aee" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "SfMTransform_1": { + "inputs": { + "applyScale": true, + "scale": 1.0, + "applyTranslation": true, + "landmarksDescriberTypes": [ + "sift", + "dspsift", + "akaze" + ], + "markers": [], + "method": "manual", + "verboseLevel": "info", + "input": "{PanoramaEstimation_1.output}", + "applyRotation": true, + "manualTransform": { + "manualTranslation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + }, + "manualRotation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + }, + "manualScale": 1.0 + }, + "transformation": "" + }, + "nodeType": "SfMTransform", + "uids": { + "0": "c72641a2cca50759bcf5283ae6e0b6f7abc3fe4a" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/panorama.abc", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 2000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaMerging_1": { + "inputs": { + "verboseLevel": "info", + "compositingFolder": "{PanoramaCompositing_1.output}", + "outputFileType": "exr", + "storageDataType": "float", + "input": "{PanoramaCompositing_1.input}" + }, + "nodeType": "PanoramaMerging", + "uids": { + "0": "e007a4eb5fc5937b320638eba667cea183c0c642" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" + }, + "position": [ + 2800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaEstimation_1": { + "inputs": { + "intermediateRefineWithFocalDist": false, + "offsetLongitude": 0.0, + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "filterMatches": false, + "rotationAveragingWeighting": true, + "offsetLatitude": 0.0, + "verboseLevel": "info", + "maxAngularError": 100.0, + "lockAllIntrinsics": false, + "refine": true, + "input": "{FeatureMatching_1.input}", + "intermediateRefineWithFocal": false, + "describerTypes": "{FeatureMatching_1.describerTypes}", + "relativeRotation": "rotation_matrix", + "maxAngleToPrior": 20.0, + "rotationAveraging": "L2_minimization", + "featuresFolders": "{FeatureMatching_1.featuresFolders}" + }, + "nodeType": "PanoramaEstimation", + "uids": { + "0": "de946a7c1080873d15c9eb8a0523b544cf548719" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/panorama.abc", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 1800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PanoramaInit_1": { + "inputs": { + "useFisheye": false, + "fisheyeCenterOffset": { + "fisheyeCenterOffset_y": 0.0, + "fisheyeCenterOffset_x": 0.0 + }, + "initializeCameras": "No", + "nbViewsPerLine": [], + "debugFisheyeCircleEstimation": false, + "verboseLevel": "info", + "dependency": [ + "{FeatureExtraction_1.output}" + ], + "estimateFisheyeCircle": true, + "input": "{FeatureExtraction_1.input}", + "yawCW": 1, + "config": "", + "fisheyeRadius": 96.0, + "inputAngle": "None" + }, + "nodeType": "PanoramaInit", + "uids": { + "0": "702d6b973342e9203b50afea1470b4c01eb90174" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" + }, + "position": [ + 1200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureMatching_1": { + "inputs": { + "verboseLevel": "info", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "exportDebugFiles": false, + "crossMatching": false, + "geometricError": 0.0, + "maxMatches": 0, + "matchFromKnownCameraPoses": false, + "savePutativeMatches": false, + "guidedMatching": false, + "imagePairsList": "{ImageMatching_1.output}", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "maxIteration": 2048, + "distanceRatio": 0.8, + "input": "{ImageMatching_1.input}", + "photometricMatchingMethod": "ANN_L2", + "knownPosesGeometricErrorMax": 5.0, + "featuresFolders": "{ImageMatching_1.featuresFolders}" + }, + "nodeType": "FeatureMatching", + "uids": { + "0": "cec6da6e894230ab66683c2e959bc9581ea5430e" + }, + "parallelization": { + "blockSize": 20, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + } + } +} \ No newline at end of file diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg new file mode 100644 index 0000000000..32419169d2 --- /dev/null +++ b/meshroom/photogrammetry.mg @@ -0,0 +1,523 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2021.1.0", + "fileVersion": "1.1", + "nodesVersions": { + "FeatureMatching": "2.0", + "MeshFiltering": "3.0", + "Texturing": "6.0", + "PrepareDenseScene": "3.0", + "DepthMap": "2.0", + "Meshing": "7.0", + "CameraInit": "7.0", + "ImageMatching": "2.0", + "FeatureExtraction": "1.1", + "StructureFromMotion": "2.0", + "DepthMapFilter": "3.0" + } + }, + "graph": { + "Texturing_1": { + "inputs": { + "imagesFolder": "{DepthMap_1.imagesFolder}", + "downscale": 2, + "bumpMapping": { + "normalFileType": "exr", + "enable": true, + "bumpType": "Normal", + "heightFileType": "exr" + }, + "forceVisibleByAllVertices": false, + "fillHoles": false, + "multiBandDownscale": 4, + "useScore": true, + "displacementMapping": { + "displacementMappingFileType": "exr", + "enable": true + }, + "outputMeshFileType": "obj", + "angleHardThreshold": 90.0, + "textureSide": 8192, + "processColorspace": "sRGB", + "input": "{Meshing_1.output}", + "useUDIM": true, + "subdivisionTargetRatio": 0.8, + "padding": 5, + "inputRefMesh": "", + "correctEV": false, + "visibilityRemappingMethod": "PullPush", + "inputMesh": "{MeshFiltering_1.outputMesh}", + "verboseLevel": "info", + "colorMapping": { + "enable": true, + "colorMappingFileType": "exr" + }, + "bestScoreThreshold": 0.1, + "unwrapMethod": "Basic", + "multiBandNbContrib": { + "high": 1, + "midHigh": 5, + "low": 0, + "midLow": 10 + }, + "flipNormals": false + }, + "nodeType": "Texturing", + "uids": { + "0": "09f72f6745c6b13aae56fc3876e6541fbeaa557d" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr", + "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", + "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 2000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "Meshing_1": { + "inputs": { + "exportDebugTetrahedralization": false, + "useBoundingBox": false, + "maxInputPoints": 50000000, + "repartition": "multiResolution", + "helperPointsGridSize": 10, + "seed": 0, + "voteFilteringForWeaklySupportedSurfaces": true, + "verboseLevel": "info", + "outputMeshFileType": "obj", + "simGaussianSizeInit": 10.0, + "nPixelSizeBehind": 4.0, + "fullWeight": 1.0, + "depthMapsFolder": "{DepthMapFilter_1.output}", + "densify": false, + "simFactor": 15.0, + "maskHelperPointsWeight": 1.0, + "densifyScale": 20.0, + "input": "{DepthMapFilter_1.input}", + "addLandmarksToTheDensePointCloud": false, + "voteMarginFactor": 4.0, + "saveRawDensePointCloud": false, + "contributeMarginFactor": 2.0, + "estimateSpaceMinObservationAngle": 10, + "nbSolidAngleFilteringIterations": 2, + "minStep": 2, + "colorizeOutput": false, + "pixSizeMarginFinalCoef": 4.0, + "densifyNbFront": 1, + "boundingBox": { + "bboxScale": { + "y": 1.0, + "x": 1.0, + "z": 1.0 + }, + "bboxTranslation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + }, + "bboxRotation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + } + }, + "minSolidAngleRatio": 0.2, + "maxPoints": 5000000, + "addMaskHelperPoints": false, + "maxPointsPerVoxel": 1000000, + "angleFactor": 15.0, + "partitioning": "singleBlock", + "estimateSpaceFromSfM": true, + "minAngleThreshold": 1.0, + "pixSizeMarginInitCoef": 2.0, + "refineFuse": true, + "maxNbConnectedHelperPoints": 50, + "estimateSpaceMinObservations": 3, + "invertTetrahedronBasedOnNeighborsNbIterations": 10, + "maskBorderSize": 4, + "simGaussianSize": 10.0, + "densifyNbBack": 1 + }, + "nodeType": "Meshing", + "uids": { + "0": "aeb66fceaacd37ecd5bae8364bd9e87ccff2a84c" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/densePointCloud.abc", + "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" + }, + "position": [ + 1600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "DepthMapFilter_1": { + "inputs": { + "minNumOfConsistentCamsWithLowSimilarity": 4, + "computeNormalMaps": false, + "minNumOfConsistentCams": 3, + "depthMapsFolder": "{DepthMap_1.output}", + "verboseLevel": "info", + "nNearestCams": 10, + "pixSizeBallWithLowSimilarity": 0, + "pixToleranceFactor": 2.0, + "pixSizeBall": 0, + "minViewAngle": 2.0, + "maxViewAngle": 70.0, + "input": "{DepthMap_1.input}" + }, + "nodeType": "DepthMapFilter", + "uids": { + "0": "4de4649a857d7bd4f7fdfb27470a5087625ff8c9" + }, + "parallelization": { + "blockSize": 10, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageMatching_1": { + "inputs": { + "minNbImages": 200, + "nbNeighbors": 5, + "tree": "${ALICEVISION_VOCTREE}", + "maxDescriptors": 500, + "verboseLevel": "info", + "weights": "", + "nbMatches": 40, + "input": "{FeatureExtraction_1.input}", + "method": "SequentialAndVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + }, + "nodeType": "ImageMatching", + "uids": { + "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" + }, + "position": [ + 400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureExtraction_1": { + "inputs": { + "verboseLevel": "info", + "maxThreads": 0, + "describerTypes": [ + "dspsift" + ], + "maxNbFeatures": 0, + "relativePeakThreshold": 0.01, + "forceCpuExtraction": true, + "masksFolder": "", + "contrastFiltering": "GridSort", + "describerQuality": "normal", + "gridFiltering": true, + "input": "{CameraInit_1.output}", + "describerPreset": "normal" + }, + "nodeType": "FeatureExtraction", + "uids": { + "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "StructureFromMotion_1": { + "inputs": { + "localizerEstimatorMaxIterations": 4096, + "minAngleForLandmark": 2.0, + "filterTrackForks": false, + "minNumberOfObservationsForTriangulation": 2, + "maxAngleInitialPair": 40.0, + "observationConstraint": "Scale", + "maxNumberOfMatches": 0, + "localizerEstimator": "acransac", + "describerTypes": "{FeatureMatching_1.describerTypes}", + "lockScenePreviouslyReconstructed": false, + "localBAGraphDistance": 1, + "minNbCamerasToRefinePrincipalPoint": 3, + "lockAllIntrinsics": false, + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "useRigConstraint": true, + "rigMinNbCamerasForCalibration": 20, + "initialPairA": "", + "initialPairB": "", + "interFileExtension": ".abc", + "useLocalBA": true, + "computeStructureColor": true, + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "minInputTrackLength": 2, + "useOnlyMatchesFromInputFolder": false, + "verboseLevel": "info", + "minAngleForTriangulation": 3.0, + "maxReprojectionError": 4.0, + "minAngleInitialPair": 5.0, + "minNumberOfMatches": 0, + "localizerEstimatorError": 0.0 + }, + "nodeType": "StructureFromMotion", + "uids": { + "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/sfm.abc", + "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "PrepareDenseScene_1": { + "inputs": { + "imagesFolders": [], + "masksFolders": [], + "outputFileType": "exr", + "verboseLevel": "info", + "saveMatricesTxtFiles": false, + "saveMetadata": true, + "input": "{StructureFromMotion_1.output}", + "evCorrection": false + }, + "nodeType": "PrepareDenseScene", + "uids": { + "0": "894725f62ffeead1307d9d91852b07d7c8453625" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputUndistorted": "{cache}/{nodeType}/{uid0}/*.{outputFileTypeValue}" + }, + "position": [ + 1000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_1": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye4", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 0, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "DepthMap_1": { + "inputs": { + "sgmMaxDepthsPerTc": 1500, + "sgmP2": 100.0, + "imagesFolder": "{PrepareDenseScene_1.output}", + "downscale": 2, + "refineMaxTCams": 6, + "exportIntermediateResults": false, + "nbGPUs": 0, + "refineNiters": 100, + "refineGammaP": 8.0, + "refineGammaC": 15.5, + "sgmMaxDepths": 3000, + "sgmUseSfmSeeds": true, + "input": "{PrepareDenseScene_1.input}", + "refineWSH": 3, + "sgmP1": 10.0, + "sgmFilteringAxes": "YX", + "sgmMaxTCams": 10, + "refineSigma": 15, + "sgmScale": -1, + "minViewAngle": 2.0, + "maxViewAngle": 70.0, + "sgmGammaC": 5.5, + "sgmWSH": 4, + "refineNSamplesHalf": 150, + "sgmMaxSideXY": 700, + "refineUseTcOrRcPixSize": false, + "verboseLevel": "info", + "sgmGammaP": 8.0, + "sgmStepXY": -1, + "refineNDepthsToRefine": 31, + "sgmStepZ": -1 + }, + "nodeType": "DepthMap", + "uids": { + "0": "f5ef2fd13dad8f48fcb87e2364e1e821a9db7d2d" + }, + "parallelization": { + "blockSize": 3, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "MeshFiltering_1": { + "inputs": { + "filteringSubset": "all", + "outputMeshFileType": "obj", + "inputMesh": "{Meshing_1.outputMesh}", + "filterTrianglesRatio": 0.0, + "smoothingSubset": "all", + "verboseLevel": "info", + "smoothingIterations": 5, + "filterLargeTrianglesFactor": 60.0, + "keepLargestMeshOnly": false, + "smoothingBoundariesNeighbours": 0, + "smoothingLambda": 1.0, + "filteringIterations": 1 + }, + "nodeType": "MeshFiltering", + "uids": { + "0": "febb162c4fbce195f6d312bbb80697720a2f52b9" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" + }, + "position": [ + 1800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureMatching_1": { + "inputs": { + "verboseLevel": "info", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "exportDebugFiles": false, + "crossMatching": false, + "geometricError": 0.0, + "maxMatches": 0, + "matchFromKnownCameraPoses": false, + "savePutativeMatches": false, + "guidedMatching": false, + "imagePairsList": "{ImageMatching_1.output}", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "maxIteration": 2048, + "distanceRatio": 0.8, + "input": "{ImageMatching_1.input}", + "photometricMatchingMethod": "ANN_L2", + "knownPosesGeometricErrorMax": 5.0, + "featuresFolders": "{ImageMatching_1.featuresFolders}" + }, + "nodeType": "FeatureMatching", + "uids": { + "0": "3b1f2c3fcfe0b94c65627c397a2671ba7594827d" + }, + "parallelization": { + "blockSize": 20, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + } + } +} \ No newline at end of file diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg new file mode 100644 index 0000000000..f01f7ffd09 --- /dev/null +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -0,0 +1,486 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2021.1.0", + "fileVersion": "1.1", + "nodesVersions": { + "ExportAnimatedCamera": "2.0", + "FeatureMatching": "2.0", + "DistortionCalibration": "2.0", + "CameraInit": "7.0", + "ImageMatchingMultiSfM": "1.0", + "ImageMatching": "2.0", + "FeatureExtraction": "1.1", + "StructureFromMotion": "2.0" + } + }, + "graph": { + "DistortionCalibration_1": { + "inputs": { + "verboseLevel": "info", + "input": "{CameraInit_2.output}", + "lensGrid": [] + }, + "nodeType": "DistortionCalibration", + "uids": { + "0": "8afea9d171904cdb6ba1c0b116cb60de3ccb6fb4" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" + }, + "position": [ + 200, + 320 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "StructureFromMotion_1": { + "inputs": { + "localizerEstimatorMaxIterations": 4096, + "minAngleForLandmark": 2.0, + "filterTrackForks": false, + "minNumberOfObservationsForTriangulation": 2, + "maxAngleInitialPair": 40.0, + "observationConstraint": "Scale", + "maxNumberOfMatches": 0, + "localizerEstimator": "acransac", + "describerTypes": "{FeatureMatching_1.describerTypes}", + "lockScenePreviouslyReconstructed": false, + "localBAGraphDistance": 1, + "minNbCamerasToRefinePrincipalPoint": 3, + "lockAllIntrinsics": false, + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "useRigConstraint": true, + "rigMinNbCamerasForCalibration": 20, + "initialPairA": "", + "initialPairB": "", + "interFileExtension": ".abc", + "useLocalBA": true, + "computeStructureColor": true, + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "minInputTrackLength": 2, + "useOnlyMatchesFromInputFolder": false, + "verboseLevel": "info", + "minAngleForTriangulation": 3.0, + "maxReprojectionError": 4.0, + "minAngleInitialPair": 5.0, + "minNumberOfMatches": 0, + "localizerEstimatorError": 0.0 + }, + "nodeType": "StructureFromMotion", + "uids": { + "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/sfm.abc", + "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureExtraction_1": { + "inputs": { + "verboseLevel": "info", + "maxThreads": 0, + "describerTypes": [ + "dspsift" + ], + "maxNbFeatures": 0, + "relativePeakThreshold": 0.01, + "forceCpuExtraction": true, + "masksFolder": "", + "contrastFiltering": "GridSort", + "describerQuality": "normal", + "gridFiltering": true, + "input": "{CameraInit_1.output}", + "describerPreset": "normal" + }, + "nodeType": "FeatureExtraction", + "uids": { + "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_2": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye4", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 0, + 160 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ExportAnimatedCamera_1": { + "inputs": { + "exportFullROD": false, + "undistortedImageType": "exr", + "exportUVMaps": true, + "verboseLevel": "info", + "sfmDataFilter": "{StructureFromMotion_1.output}", + "exportUndistortedImages": false, + "input": "{StructureFromMotion_2.output}", + "viewFilter": "", + "correctPrincipalPoint": true + }, + "nodeType": "ExportAnimatedCamera", + "uids": { + "0": "6f482ab9e161bd79341c5cd4a43ab9f8e39aec1f" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputUndistorted": "{cache}/{nodeType}/{uid0}/undistort", + "outputCamera": "{cache}/{nodeType}/{uid0}/camera.abc" + }, + "position": [ + 1600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_1": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye4", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 0, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageMatchingMultiSfM_1": { + "inputs": { + "minNbImages": 200, + "matchingMode": "a/a+a/b", + "nbNeighbors": 10, + "tree": "${ALICEVISION_VOCTREE}", + "nbMatches": 5, + "verboseLevel": "info", + "weights": "", + "maxDescriptors": 500, + "input": "{FeatureExtraction_2.input}", + "inputB": "{StructureFromMotion_1.output}", + "method": "SequentialAndVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_2.output}" + ] + }, + "nodeType": "ImageMatchingMultiSfM", + "uids": { + "0": "ef147c1bc069c7689863c7e14cdbbaca86af4006" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt", + "outputCombinedSfM": "{cache}/{nodeType}/{uid0}/combineSfM.sfm" + }, + "position": [ + 1000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureExtraction_2": { + "inputs": { + "verboseLevel": "info", + "maxThreads": 0, + "describerTypes": [ + "dspsift" + ], + "maxNbFeatures": 0, + "relativePeakThreshold": 0.01, + "forceCpuExtraction": true, + "masksFolder": "", + "contrastFiltering": "GridSort", + "describerQuality": "normal", + "gridFiltering": true, + "input": "{CameraInit_2.output}", + "describerPreset": "normal" + }, + "nodeType": "FeatureExtraction", + "uids": { + "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 200, + 160 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageMatching_1": { + "inputs": { + "minNbImages": 200, + "nbNeighbors": 5, + "tree": "${ALICEVISION_VOCTREE}", + "maxDescriptors": 500, + "verboseLevel": "info", + "weights": "", + "nbMatches": 40, + "input": "{FeatureExtraction_1.input}", + "method": "SequentialAndVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + }, + "nodeType": "ImageMatching", + "uids": { + "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" + }, + "position": [ + 400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureMatching_2": { + "inputs": { + "verboseLevel": "info", + "describerTypes": "{FeatureExtraction_2.describerTypes}", + "exportDebugFiles": false, + "crossMatching": false, + "geometricError": 0.0, + "maxMatches": 0, + "matchFromKnownCameraPoses": false, + "savePutativeMatches": false, + "guidedMatching": false, + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "maxIteration": 2048, + "distanceRatio": 0.8, + "input": "{DistortionCalibration_1.outSfMData}", + "photometricMatchingMethod": "ANN_L2", + "knownPosesGeometricErrorMax": 5.0, + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}" + }, + "nodeType": "FeatureMatching", + "uids": { + "0": "7bb42f40b3f607da7e9f5f432409ddf6ef9c5951" + }, + "parallelization": { + "blockSize": 20, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureMatching_1": { + "inputs": { + "verboseLevel": "info", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "exportDebugFiles": false, + "crossMatching": false, + "geometricError": 0.0, + "maxMatches": 0, + "matchFromKnownCameraPoses": false, + "savePutativeMatches": false, + "guidedMatching": false, + "imagePairsList": "{ImageMatching_1.output}", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "maxIteration": 2048, + "distanceRatio": 0.8, + "input": "{ImageMatching_1.input}", + "photometricMatchingMethod": "ANN_L2", + "knownPosesGeometricErrorMax": 5.0, + "featuresFolders": "{ImageMatching_1.featuresFolders}" + }, + "nodeType": "FeatureMatching", + "uids": { + "0": "3b1f2c3fcfe0b94c65627c397a2671ba7594827d" + }, + "parallelization": { + "blockSize": 20, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "StructureFromMotion_2": { + "inputs": { + "localizerEstimatorMaxIterations": 4096, + "minAngleForLandmark": 0.5, + "filterTrackForks": false, + "minNumberOfObservationsForTriangulation": 3, + "maxAngleInitialPair": 40.0, + "observationConstraint": "Scale", + "maxNumberOfMatches": 0, + "localizerEstimator": "acransac", + "describerTypes": "{FeatureMatching_2.describerTypes}", + "lockScenePreviouslyReconstructed": false, + "localBAGraphDistance": 1, + "minNbCamerasToRefinePrincipalPoint": 3, + "lockAllIntrinsics": false, + "input": "{FeatureMatching_2.input}", + "featuresFolders": "{FeatureMatching_2.featuresFolders}", + "useRigConstraint": true, + "rigMinNbCamerasForCalibration": 20, + "initialPairA": "", + "initialPairB": "", + "interFileExtension": ".abc", + "useLocalBA": true, + "computeStructureColor": true, + "matchesFolders": [ + "{FeatureMatching_2.output}" + ], + "minInputTrackLength": 5, + "useOnlyMatchesFromInputFolder": false, + "verboseLevel": "info", + "minAngleForTriangulation": 1.0, + "maxReprojectionError": 4.0, + "minAngleInitialPair": 5.0, + "minNumberOfMatches": 0, + "localizerEstimatorError": 0.0 + }, + "nodeType": "StructureFromMotion", + "uids": { + "0": "4bc466c45bc7b430553752d1eb1640c581c43e36" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/sfm.abc", + "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 1400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + } + } +} \ No newline at end of file diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg new file mode 100644 index 0000000000..4f37896d4c --- /dev/null +++ b/meshroom/photogrammetryDraft.mg @@ -0,0 +1,404 @@ +{ + "header": { + "nodesVersions": { + "FeatureMatching": "2.0", + "MeshFiltering": "3.0", + "Texturing": "6.0", + "Meshing": "7.0", + "CameraInit": "7.0", + "ImageMatching": "2.0", + "FeatureExtraction": "1.1", + "StructureFromMotion": "2.0" + }, + "releaseVersion": "2021.1.0", + "fileVersion": "1.1" + }, + "graph": { + "Texturing_1": { + "inputs": { + "imagesFolder": "", + "downscale": 2, + "bumpMapping": { + "normalFileType": "exr", + "enable": true, + "bumpType": "Normal", + "heightFileType": "exr" + }, + "forceVisibleByAllVertices": false, + "fillHoles": false, + "multiBandDownscale": 4, + "useScore": true, + "displacementMapping": { + "displacementMappingFileType": "exr", + "enable": true + }, + "outputMeshFileType": "obj", + "angleHardThreshold": 90.0, + "textureSide": 8192, + "processColorspace": "sRGB", + "input": "{Meshing_1.output}", + "useUDIM": true, + "subdivisionTargetRatio": 0.8, + "padding": 5, + "inputRefMesh": "", + "correctEV": false, + "visibilityRemappingMethod": "PullPush", + "inputMesh": "{MeshFiltering_1.outputMesh}", + "verboseLevel": "info", + "colorMapping": { + "enable": true, + "colorMappingFileType": "exr" + }, + "bestScoreThreshold": 0.1, + "unwrapMethod": "Basic", + "multiBandNbContrib": { + "high": 1, + "midHigh": 5, + "low": 0, + "midLow": 10 + }, + "flipNormals": false + }, + "nodeType": "Texturing", + "uids": { + "0": "1ed1516bf83493071547e69146be3f1218012e25" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr", + "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", + "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 1400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "Meshing_1": { + "inputs": { + "exportDebugTetrahedralization": false, + "useBoundingBox": false, + "maxInputPoints": 50000000, + "repartition": "multiResolution", + "helperPointsGridSize": 10, + "seed": 0, + "voteFilteringForWeaklySupportedSurfaces": true, + "verboseLevel": "info", + "outputMeshFileType": "obj", + "simGaussianSizeInit": 10.0, + "nPixelSizeBehind": 4.0, + "fullWeight": 1.0, + "depthMapsFolder": "", + "densify": false, + "simFactor": 15.0, + "maskHelperPointsWeight": 1.0, + "densifyScale": 20.0, + "input": "{StructureFromMotion_1.output}", + "addLandmarksToTheDensePointCloud": false, + "voteMarginFactor": 4.0, + "saveRawDensePointCloud": false, + "contributeMarginFactor": 2.0, + "estimateSpaceMinObservationAngle": 10, + "nbSolidAngleFilteringIterations": 2, + "minStep": 2, + "colorizeOutput": false, + "pixSizeMarginFinalCoef": 4.0, + "densifyNbFront": 1, + "boundingBox": { + "bboxScale": { + "y": 1.0, + "x": 1.0, + "z": 1.0 + }, + "bboxTranslation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + }, + "bboxRotation": { + "y": 0.0, + "x": 0.0, + "z": 0.0 + } + }, + "minSolidAngleRatio": 0.2, + "maxPoints": 5000000, + "addMaskHelperPoints": false, + "maxPointsPerVoxel": 1000000, + "angleFactor": 15.0, + "partitioning": "singleBlock", + "estimateSpaceFromSfM": true, + "minAngleThreshold": 1.0, + "pixSizeMarginInitCoef": 2.0, + "refineFuse": true, + "maxNbConnectedHelperPoints": 50, + "estimateSpaceMinObservations": 3, + "invertTetrahedronBasedOnNeighborsNbIterations": 10, + "maskBorderSize": 4, + "simGaussianSize": 10.0, + "densifyNbBack": 1 + }, + "nodeType": "Meshing", + "uids": { + "0": "dc3d06f150a2601334a44174aa8e5523d3055468" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/densePointCloud.abc", + "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" + }, + "position": [ + 1000, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "ImageMatching_1": { + "inputs": { + "minNbImages": 200, + "nbNeighbors": 5, + "tree": "${ALICEVISION_VOCTREE}", + "maxDescriptors": 500, + "verboseLevel": "info", + "weights": "", + "nbMatches": 40, + "input": "{FeatureExtraction_1.input}", + "method": "SequentialAndVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + }, + "nodeType": "ImageMatching", + "uids": { + "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" + }, + "position": [ + 400, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureExtraction_1": { + "inputs": { + "verboseLevel": "info", + "maxThreads": 0, + "describerTypes": [ + "dspsift" + ], + "maxNbFeatures": 0, + "relativePeakThreshold": 0.01, + "forceCpuExtraction": true, + "masksFolder": "", + "contrastFiltering": "GridSort", + "describerQuality": "normal", + "gridFiltering": true, + "input": "{CameraInit_1.output}", + "describerPreset": "normal" + }, + "nodeType": "FeatureExtraction", + "uids": { + "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" + }, + "parallelization": { + "blockSize": 40, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "StructureFromMotion_1": { + "inputs": { + "localizerEstimatorMaxIterations": 4096, + "minAngleForLandmark": 2.0, + "filterTrackForks": false, + "minNumberOfObservationsForTriangulation": 2, + "maxAngleInitialPair": 40.0, + "observationConstraint": "Scale", + "maxNumberOfMatches": 0, + "localizerEstimator": "acransac", + "describerTypes": "{FeatureMatching_1.describerTypes}", + "lockScenePreviouslyReconstructed": false, + "localBAGraphDistance": 1, + "minNbCamerasToRefinePrincipalPoint": 3, + "lockAllIntrinsics": false, + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "useRigConstraint": true, + "rigMinNbCamerasForCalibration": 20, + "initialPairA": "", + "initialPairB": "", + "interFileExtension": ".abc", + "useLocalBA": true, + "computeStructureColor": true, + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "minInputTrackLength": 2, + "useOnlyMatchesFromInputFolder": false, + "verboseLevel": "info", + "minAngleForTriangulation": 3.0, + "maxReprojectionError": 4.0, + "minAngleInitialPair": 5.0, + "minNumberOfMatches": 0, + "localizerEstimatorError": 0.0 + }, + "nodeType": "StructureFromMotion", + "uids": { + "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/sfm.abc", + "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + }, + "position": [ + 800, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_1": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye4", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + 0, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "MeshFiltering_1": { + "inputs": { + "filteringSubset": "all", + "outputMeshFileType": "obj", + "inputMesh": "{Meshing_1.outputMesh}", + "filterTrianglesRatio": 0.0, + "smoothingSubset": "all", + "verboseLevel": "info", + "smoothingIterations": 5, + "filterLargeTrianglesFactor": 60.0, + "keepLargestMeshOnly": false, + "smoothingBoundariesNeighbours": 0, + "smoothingLambda": 1.0, + "filteringIterations": 1 + }, + "nodeType": "MeshFiltering", + "uids": { + "0": "057d1647de39a617f79aad02a721938e5625ff64" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 1 + }, + "outputs": { + "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" + }, + "position": [ + 1200, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "FeatureMatching_1": { + "inputs": { + "verboseLevel": "info", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "exportDebugFiles": false, + "crossMatching": false, + "geometricError": 0.0, + "maxMatches": 0, + "matchFromKnownCameraPoses": false, + "savePutativeMatches": false, + "guidedMatching": false, + "imagePairsList": "{ImageMatching_1.output}", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "maxIteration": 2048, + "distanceRatio": 0.8, + "input": "{ImageMatching_1.input}", + "photometricMatchingMethod": "ANN_L2", + "knownPosesGeometricErrorMax": 5.0, + "featuresFolders": "{ImageMatching_1.featuresFolders}" + }, + "nodeType": "FeatureMatching", + "uids": { + "0": "3b1f2c3fcfe0b94c65627c397a2671ba7594827d" + }, + "parallelization": { + "blockSize": 20, + "split": 0, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + }, + "position": [ + 600, + 0 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + } + } +} \ No newline at end of file From 5720e70827826aa21a2e10318e3801f649c07011 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 25 Jul 2022 19:17:53 +0200 Subject: [PATCH 0563/1093] [pipelines] photogAndTracking: nodes ui alignment --- meshroom/photogrammetryAndCameraTracking.mg | 216 ++++++++++---------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index f01f7ffd09..bf418dbbbc 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -34,50 +34,29 @@ "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" }, "position": [ - 200, - 320 + 1024, + 393 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, - "StructureFromMotion_1": { + "ImageMatching_1": { "inputs": { - "localizerEstimatorMaxIterations": 4096, - "minAngleForLandmark": 2.0, - "filterTrackForks": false, - "minNumberOfObservationsForTriangulation": 2, - "maxAngleInitialPair": 40.0, - "observationConstraint": "Scale", - "maxNumberOfMatches": 0, - "localizerEstimator": "acransac", - "describerTypes": "{FeatureMatching_1.describerTypes}", - "lockScenePreviouslyReconstructed": false, - "localBAGraphDistance": 1, - "minNbCamerasToRefinePrincipalPoint": 3, - "lockAllIntrinsics": false, - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "useRigConstraint": true, - "rigMinNbCamerasForCalibration": 20, - "initialPairA": "", - "initialPairB": "", - "interFileExtension": ".abc", - "useLocalBA": true, - "computeStructureColor": true, - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "minInputTrackLength": 2, - "useOnlyMatchesFromInputFolder": false, + "minNbImages": 200, + "nbNeighbors": 5, + "tree": "${ALICEVISION_VOCTREE}", + "maxDescriptors": 500, "verboseLevel": "info", - "minAngleForTriangulation": 3.0, - "maxReprojectionError": 4.0, - "minAngleInitialPair": 5.0, - "minNumberOfMatches": 0, - "localizerEstimatorError": 0.0 + "weights": "", + "nbMatches": 40, + "input": "{FeatureExtraction_1.input}", + "method": "SequentialAndVocabularyTree", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] }, - "nodeType": "StructureFromMotion", + "nodeType": "ImageMatching", "uids": { - "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" + "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" }, "parallelization": { "blockSize": 0, @@ -85,12 +64,10 @@ "size": 0 }, "outputs": { - "output": "{cache}/{nodeType}/{uid0}/sfm.abc", - "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" }, "position": [ - 800, + 400, 0 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" @@ -130,32 +107,45 @@ ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, - "CameraInit_2": { + "StructureFromMotion_1": { "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye4", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" + "localizerEstimatorMaxIterations": 4096, + "minAngleForLandmark": 2.0, + "filterTrackForks": false, + "minNumberOfObservationsForTriangulation": 2, + "maxAngleInitialPair": 40.0, + "observationConstraint": "Scale", + "maxNumberOfMatches": 0, + "localizerEstimator": "acransac", + "describerTypes": "{FeatureMatching_1.describerTypes}", + "lockScenePreviouslyReconstructed": false, + "localBAGraphDistance": 1, + "minNbCamerasToRefinePrincipalPoint": 3, + "lockAllIntrinsics": false, + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "useRigConstraint": true, + "rigMinNbCamerasForCalibration": 20, + "initialPairA": "", + "initialPairB": "", + "interFileExtension": ".abc", + "useLocalBA": true, + "computeStructureColor": true, + "matchesFolders": [ + "{FeatureMatching_1.output}" ], + "minInputTrackLength": 2, + "useOnlyMatchesFromInputFolder": false, "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + "minAngleForTriangulation": 3.0, + "maxReprojectionError": 4.0, + "minAngleInitialPair": 5.0, + "minNumberOfMatches": 0, + "localizerEstimatorError": 0.0 }, - "nodeType": "CameraInit", + "nodeType": "StructureFromMotion", "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" }, "parallelization": { "blockSize": 0, @@ -163,11 +153,13 @@ "size": 0 }, "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + "output": "{cache}/{nodeType}/{uid0}/sfm.abc", + "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" }, "position": [ - 0, - 160 + 800, + 0 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, @@ -198,8 +190,8 @@ "outputCamera": "{cache}/{nodeType}/{uid0}/camera.abc" }, "position": [ - 1600, - 0 + 1629, + 212 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, @@ -275,8 +267,49 @@ "outputCombinedSfM": "{cache}/{nodeType}/{uid0}/combineSfM.sfm" }, "position": [ - 1000, - 0 + 1029, + 212 + ], + "internalFolder": "{cache}/{nodeType}/{uid0}/" + }, + "CameraInit_2": { + "inputs": { + "groupCameraFallback": "folder", + "intrinsics": [], + "viewIdRegex": ".*?(\\d+)", + "defaultFieldOfView": 45.0, + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye4", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ], + "verboseLevel": "info", + "viewIdMethod": "metadata", + "viewpoints": [], + "useInternalWhiteBalance": true, + "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + }, + "nodeType": "CameraInit", + "uids": { + "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" + }, + "parallelization": { + "blockSize": 0, + "split": 1, + "size": 0 + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + }, + "position": [ + -2, + 223 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, @@ -310,41 +343,8 @@ "output": "{cache}/{nodeType}/{uid0}/" }, "position": [ - 200, - 160 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" - }, - "ImageMatching_1": { - "inputs": { - "minNbImages": 200, - "nbNeighbors": 5, - "tree": "${ALICEVISION_VOCTREE}", - "maxDescriptors": 500, - "verboseLevel": "info", - "weights": "", - "nbMatches": 40, - "input": "{FeatureExtraction_1.input}", - "method": "SequentialAndVocabularyTree", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ] - }, - "nodeType": "ImageMatching", - "uids": { - "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" - }, - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - }, - "position": [ - 400, - 0 + 198, + 223 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, @@ -382,8 +382,8 @@ "output": "{cache}/{nodeType}/{uid0}/" }, "position": [ - 1200, - 0 + 1229, + 212 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, @@ -477,8 +477,8 @@ "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" }, "position": [ - 1400, - 0 + 1429, + 212 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" } From 54c2b311073580de6e82267c30be0cda8fc3358c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 4 Aug 2022 17:59:38 +0200 Subject: [PATCH 0564/1093] Add abstract InitNode InitNode is an abstract class which is meant to be inherited by all the initialization nodes (such as CameraInit), included those that might be created by the user. InitNode contains methods that can be reimplemented by the children classes if necessary. This abstract class allows to keep on using scripts such as meshroom_batch without having to modify them specifically or being limited to using a CameraInit node. --- meshroom/aliceVision/CameraInit.py | 34 ++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 9ff8a83457..dcc8182b6c 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -8,7 +8,7 @@ import logging from meshroom.core import desc, Version - +from meshroom.multiview import FilesByType, findFilesByTypeInFolder Viewpoint = [ desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=None), @@ -119,7 +119,8 @@ def readSfMData(sfmFile): return views, intrinsics -class CameraInit(desc.CommandLineNode): + +class CameraInit(desc.CommandLineNode, desc.InitNode): commandLine = 'aliceVision_cameraInit {allParams} --allowSingleView 1' # don't throw an error if there is only one image size = desc.DynamicNodeSize('viewpoints') @@ -250,6 +251,35 @@ class CameraInit(desc.CommandLineNode): ), ] + def __init__(self): + super(CameraInit, self).__init__() + + def initialize(self, node, inputs, recursiveInputs): + # Reset graph inputs + self.resetAttributes(node, ["viewpoints", "intrinsics"]) + + filesByType = FilesByType() + searchedForImages = False + + if recursiveInputs: + filesByType.extend(findFilesByTypeInFolder(recursiveInputs, recursive=True)) + searchedForImages = True + + # Add views and intrinsics from a file if it was provided, or look for the images + if len(inputs) == 1 and os.path.isfile(inputs[0]) and os.path.splitext(inputs[0])[-1] in ('.json', '.sfm'): + views, intrinsics = readSfMData(inputs[0]) + self.extendAttributes(node, {"viewpoints": views, "intrinsics": intrinsics}) + else: + filesByType.extend(findFilesByTypeInFolder(inputs, recursive=False)) + searchedForImages = True + + # If there was no input file, check that the directories do contain images + if searchedForImages and not filesByType.images: + raise ValueError("No valid input file or no image in the provided directories") + + views, intrinsics = self.buildIntrinsics(node, filesByType.images) + self.setAttributes(node, {"viewpoints": views, "intrinsics": intrinsics}) + def upgradeAttributeValues(self, attrValues, fromVersion): # Starting with version 6, the principal point is now relative to the image center From 43a2e5f7239eb336a957082a3f2e1b1580277e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 16 Aug 2022 18:40:24 +0200 Subject: [PATCH 0565/1093] [pipelines] Update all templates with "minimal" mode --- meshroom/cameraTracking.mg | 98 +------- meshroom/panoramaFisheyeHdr.mg | 219 +++-------------- meshroom/panoramaHdr.mg | 226 +++-------------- meshroom/photogrammetry.mg | 259 +------------------- meshroom/photogrammetryAndCameraTracking.mg | 187 +------------- meshroom/photogrammetryDraft.mg | 213 +--------------- 6 files changed, 93 insertions(+), 1109 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index ccbdafd245..361881d44a 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -3,6 +3,7 @@ "pipelineVersion": "2.2", "releaseVersion": "2021.1.0", "fileVersion": "1.1", + "template": true, "nodesVersions": { "ExportAnimatedCamera": "2.0", "FeatureMatching": "2.0", @@ -16,9 +17,7 @@ "graph": { "DistortionCalibration_1": { "inputs": { - "verboseLevel": "info", - "input": "{CameraInit_1.output}", - "lensGrid": [] + "input": "{CameraInit_1.output}" }, "nodeType": "DistortionCalibration", "uids": { @@ -40,15 +39,9 @@ }, "ImageMatching_1": { "inputs": { - "minNbImages": 200, "nbNeighbors": 10, - "tree": "${ALICEVISION_VOCTREE}", - "maxDescriptors": 500, - "verboseLevel": "info", - "weights": "", "nbMatches": 5, "input": "{FeatureExtraction_1.input}", - "method": "SequentialAndVocabularyTree", "featuresFolders": [ "{FeatureExtraction_1.output}" ] @@ -73,20 +66,7 @@ }, "FeatureExtraction_1": { "inputs": { - "verboseLevel": "info", - "maxThreads": 0, - "describerTypes": [ - "dspsift" - ], - "maxNbFeatures": 0, - "relativePeakThreshold": 0.01, - "forceCpuExtraction": true, - "masksFolder": "", - "contrastFiltering": "GridSort", - "describerQuality": "normal", - "gridFiltering": true, - "input": "{CameraInit_1.output}", - "describerPreset": "normal" + "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", "uids": { @@ -108,39 +88,16 @@ }, "StructureFromMotion_1": { "inputs": { - "localizerEstimatorMaxIterations": 4096, "minAngleForLandmark": 0.5, - "filterTrackForks": false, "minNumberOfObservationsForTriangulation": 3, - "maxAngleInitialPair": 40.0, - "observationConstraint": "Scale", - "maxNumberOfMatches": 0, - "localizerEstimator": "acransac", "describerTypes": "{FeatureMatching_1.describerTypes}", - "lockScenePreviouslyReconstructed": false, - "localBAGraphDistance": 1, - "minNbCamerasToRefinePrincipalPoint": 3, - "lockAllIntrinsics": false, "input": "{FeatureMatching_1.input}", "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "useRigConstraint": true, - "rigMinNbCamerasForCalibration": 20, - "initialPairA": "", - "initialPairB": "", - "interFileExtension": ".abc", - "useLocalBA": true, - "computeStructureColor": true, "matchesFolders": [ "{FeatureMatching_1.output}" ], "minInputTrackLength": 5, - "useOnlyMatchesFromInputFolder": false, - "verboseLevel": "info", - "minAngleForTriangulation": 1.0, - "maxReprojectionError": 4.0, - "minAngleInitialPair": 5.0, - "minNumberOfMatches": 0, - "localizerEstimatorError": 0.0 + "minAngleForTriangulation": 1.0 }, "nodeType": "StructureFromMotion", "uids": { @@ -164,15 +121,7 @@ }, "ExportAnimatedCamera_1": { "inputs": { - "exportFullROD": false, - "undistortedImageType": "exr", - "exportUVMaps": true, - "verboseLevel": "info", - "sfmDataFilter": "", - "exportUndistortedImages": false, - "input": "{StructureFromMotion_1.output}", - "viewFilter": "", - "correctPrincipalPoint": true + "input": "{StructureFromMotion_1.output}" }, "nodeType": "ExportAnimatedCamera", "uids": { @@ -195,28 +144,7 @@ "internalFolder": "{cache}/{nodeType}/{uid0}/" }, "CameraInit_1": { - "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye4", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ], - "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" - }, + "inputs": {}, "nodeType": "CameraInit", "uids": { "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" @@ -237,23 +165,9 @@ }, "FeatureMatching_1": { "inputs": { - "verboseLevel": "info", "describerTypes": "{FeatureExtraction_1.describerTypes}", - "exportDebugFiles": false, - "crossMatching": false, - "geometricError": 0.0, - "maxMatches": 0, - "matchFromKnownCameraPoses": false, - "savePutativeMatches": false, - "guidedMatching": false, "imagePairsList": "{ImageMatching_1.output}", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "maxIteration": 2048, - "distanceRatio": 0.8, "input": "{DistortionCalibration_1.outSfMData}", - "photometricMatchingMethod": "ANN_L2", - "knownPosesGeometricErrorMax": 5.0, "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index b49093b99e..40e7c793bd 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -6,34 +6,27 @@ "ImageProcessing": "3.0", "PanoramaCompositing": "2.0", "LdrToHdrMerge": "4.0", - "LdrToHdrSampling": "4.0", - "LdrToHdrCalibration": "3.0", "PanoramaEstimation": "1.0", + "LdrToHdrCalibration": "3.0", + "LdrToHdrSampling": "4.0", "PanoramaInit": "2.0", - "PanoramaMerging": "1.0", - "SfMTransform": "3.0", "CameraInit": "7.0", + "SfMTransform": "3.0", + "PanoramaMerging": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", "PanoramaWarping": "1.0" }, "releaseVersion": "2021.1.0", - "fileVersion": "1.1" + "fileVersion": "1.1", + "template": true }, "graph": { "LdrToHdrMerge_1": { "inputs": { - "verboseLevel": "info", - "fusionWeight": "gaussian", "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", - "nbBrackets": 0, - "enableHighlight": false, - "offsetRefBracketIndex": 1, - "storageDataType": "float", - "highlightTargetLux": 120000.0, "byPass": "{LdrToHdrCalibration_1.byPass}", - "highlightCorrectionFactor": 1.0, "input": "{LdrToHdrCalibration_1.input}", "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", "response": "{LdrToHdrCalibration_1.response}" @@ -58,48 +51,14 @@ }, "ImageProcessing_1": { "inputs": { - "outputFormat": "rgba", - "sharpenFilter": { - "threshold": 0.0, - "width": 3, - "sharpenFilterEnabled": false, - "contrast": 1.0 - }, "extension": "exr", - "exposureCompensation": false, - "storageDataType": "float", - "inputFolders": [], - "verboseLevel": "info", - "metadataFolders": [], - "claheFilter": { - "claheClipLimit": 4.0, - "claheTileGridSize": 8, - "claheEnabled": false - }, - "medianFilter": 0, "fillHoles": true, - "reconstructedViewsOnly": false, "input": "{PanoramaMerging_1.outputPanorama}", - "noiseFilter": { - "noiseEnabled": false, - "noiseMethod": "uniform", - "noiseB": 1.0, - "noiseMono": true, - "noiseA": 0.0 - }, - "scaleFactor": 1.0, - "bilateralFilter": { - "bilateralFilterDistance": 0, - "bilateralFilterSigmaColor": 0.0, - "bilateralFilterSigmaSpace": 0.0, - "bilateralFilterEnabled": false - }, - "contrast": 1.0, "fixNonFinite": true }, "nodeType": "ImageProcessing", "uids": { - "0": "494b97af203ddbe4767c922a6c5795297cf53eef" + "0": "3b8b39e478a30aa0ef1871576665b2914204a919" }, "parallelization": { "blockSize": 0, @@ -108,8 +67,7 @@ }, "outputs": { "output": "{cache}/{nodeType}/{uid0}/", - "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr", - "outSfMData": "" + "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr" }, "position": [ 3000, @@ -119,13 +77,7 @@ }, "PanoramaWarping_1": { "inputs": { - "panoramaWidth": 10000, - "maxPanoramaWidth": 70000, - "verboseLevel": "info", - "percentUpscale": 50, - "input": "{SfMTransform_1.output}", - "storageDataType": "float", - "estimateResolution": true + "input": "{SfMTransform_1.output}" }, "nodeType": "PanoramaWarping", "uids": { @@ -149,11 +101,6 @@ "inputs": { "samples": "{LdrToHdrSampling_1.output}", "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", - "maxTotalPoints": 1000000, - "nbBrackets": 0, - "calibrationMethod": "debevec", - "calibrationWeight": "default", - "verboseLevel": "info", "byPass": "{LdrToHdrSampling_1.byPass}", "input": "{LdrToHdrSampling_1.input}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" @@ -178,16 +125,7 @@ }, "LdrToHdrSampling_1": { "inputs": { - "blockSize": 256, - "nbBrackets": 0, - "verboseLevel": "info", - "radius": 5, - "byPass": false, - "channelQuantizationPower": 10, - "debug": false, - "input": "{PanoramaPrepareImages_1.output}", - "maxCountSample": 200, - "userNbBrackets": 0 + "input": "{PanoramaPrepareImages_1.output}" }, "nodeType": "LdrToHdrSampling", "uids": { @@ -209,13 +147,6 @@ }, "ImageMatching_1": { "inputs": { - "minNbImages": 200, - "nbNeighbors": 5, - "tree": "${ALICEVISION_VOCTREE}", - "maxDescriptors": 500, - "verboseLevel": "info", - "weights": "", - "nbMatches": 40, "input": "{PanoramaInit_1.outSfMData}", "method": "FrustumOrVocabularyTree", "featuresFolders": [ @@ -242,18 +173,10 @@ }, "FeatureExtraction_1": { "inputs": { - "verboseLevel": "info", - "maxThreads": 0, "describerTypes": [ "sift" ], - "maxNbFeatures": 0, - "relativePeakThreshold": 0.01, - "forceCpuExtraction": true, - "masksFolder": "", - "contrastFiltering": "GridSort", "describerQuality": "high", - "gridFiltering": true, "input": "{LdrToHdrMerge_1.outSfMData}", "describerPreset": "high" }, @@ -275,17 +198,14 @@ ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, - "PanoramaSeams_1": { + "PanoramaMerging_1": { "inputs": { - "verboseLevel": "info", - "input": "{PanoramaWarping_1.input}", - "warpingFolder": "{PanoramaWarping_1.output}", - "maxWidth": 5000, - "useGraphCut": true + "compositingFolder": "{PanoramaCompositing_1.output}", + "input": "{PanoramaCompositing_1.input}" }, - "nodeType": "PanoramaSeams", + "nodeType": "PanoramaMerging", "uids": { - "0": "dd02562c5c3b1e18e42561d99590cbf4ff5ba35a" + "0": "70edd7fe8194bf35dcb0b221141cd4abd2354547" }, "parallelization": { "blockSize": 0, @@ -293,10 +213,10 @@ "size": 0 }, "outputs": { - "output": "{cache}/{nodeType}/{uid0}/labels.exr" + "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" }, "position": [ - 2400, + 2800, 0 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" @@ -304,13 +224,8 @@ "PanoramaCompositing_1": { "inputs": { "warpingFolder": "{PanoramaSeams_1.warpingFolder}", - "maxThreads": 4, "labels": "{PanoramaSeams_1.output}", - "verboseLevel": "info", - "overlayType": "none", - "compositerType": "multiband", - "input": "{PanoramaSeams_1.input}", - "storageDataType": "float" + "input": "{PanoramaSeams_1.input}" }, "nodeType": "PanoramaCompositing", "uids": { @@ -332,10 +247,6 @@ }, "CameraInit_1": { "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, "allowedCameraModels": [ "pinhole", "radial1", @@ -345,12 +256,7 @@ "3deanamorphic4", "3deradial4", "3declassicld" - ], - "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + ] }, "nodeType": "CameraInit", "uids": { @@ -372,7 +278,6 @@ }, "PanoramaPrepareImages_1": { "inputs": { - "verboseLevel": "info", "input": "{CameraInit_1.output}" }, "nodeType": "PanoramaPrepareImages", @@ -395,33 +300,8 @@ }, "SfMTransform_1": { "inputs": { - "applyScale": true, - "scale": 1.0, - "applyTranslation": true, - "landmarksDescriberTypes": [ - "sift", - "dspsift", - "akaze" - ], - "markers": [], "method": "manual", - "verboseLevel": "info", - "input": "{PanoramaEstimation_1.output}", - "applyRotation": true, - "manualTransform": { - "manualTranslation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - }, - "manualRotation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - }, - "manualScale": 1.0 - }, - "transformation": "" + "input": "{PanoramaEstimation_1.output}" }, "nodeType": "SfMTransform", "uids": { @@ -442,17 +322,14 @@ ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, - "PanoramaMerging_1": { + "PanoramaSeams_1": { "inputs": { - "verboseLevel": "info", - "compositingFolder": "{PanoramaCompositing_1.output}", - "outputFileType": "exr", - "storageDataType": "float", - "input": "{PanoramaCompositing_1.input}" + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}" }, - "nodeType": "PanoramaMerging", + "nodeType": "PanoramaSeams", "uids": { - "0": "70edd7fe8194bf35dcb0b221141cd4abd2354547" + "0": "dd02562c5c3b1e18e42561d99590cbf4ff5ba35a" }, "parallelization": { "blockSize": 0, @@ -460,34 +337,21 @@ "size": 0 }, "outputs": { - "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" + "output": "{cache}/{nodeType}/{uid0}/labels.exr" }, "position": [ - 2800, + 2400, 0 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, "PanoramaEstimation_1": { "inputs": { - "intermediateRefineWithFocalDist": false, - "offsetLongitude": 0.0, "matchesFolders": [ "{FeatureMatching_1.output}" ], - "filterMatches": false, - "rotationAveragingWeighting": true, - "offsetLatitude": 0.0, - "verboseLevel": "info", - "maxAngularError": 100.0, - "lockAllIntrinsics": false, - "refine": true, "input": "{FeatureMatching_1.input}", - "intermediateRefineWithFocal": false, "describerTypes": "{FeatureMatching_1.describerTypes}", - "relativeRotation": "rotation_matrix", - "maxAngleToPrior": 20.0, - "rotationAveraging": "L2_minimization", "featuresFolders": "{FeatureMatching_1.featuresFolders}" }, "nodeType": "PanoramaEstimation", @@ -512,23 +376,10 @@ "PanoramaInit_1": { "inputs": { "useFisheye": true, - "fisheyeCenterOffset": { - "fisheyeCenterOffset_y": 0.0, - "fisheyeCenterOffset_x": 0.0 - }, - "initializeCameras": "No", - "nbViewsPerLine": [], - "debugFisheyeCircleEstimation": false, - "verboseLevel": "info", "dependency": [ "{FeatureExtraction_1.output}" ], - "estimateFisheyeCircle": true, - "input": "{FeatureExtraction_1.input}", - "yawCW": 1, - "config": "", - "fisheyeRadius": 96.0, - "inputAngle": "None" + "input": "{FeatureExtraction_1.input}" }, "nodeType": "PanoramaInit", "uids": { @@ -550,23 +401,9 @@ }, "FeatureMatching_1": { "inputs": { - "verboseLevel": "info", "describerTypes": "{FeatureExtraction_1.describerTypes}", - "exportDebugFiles": false, - "crossMatching": false, - "geometricError": 0.0, - "maxMatches": 0, - "matchFromKnownCameraPoses": false, - "savePutativeMatches": false, - "guidedMatching": false, "imagePairsList": "{ImageMatching_1.output}", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "maxIteration": 2048, - "distanceRatio": 0.8, "input": "{ImageMatching_1.input}", - "photometricMatchingMethod": "ANN_L2", - "knownPosesGeometricErrorMax": 5.0, "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 5ca4c8458e..7de6e8700d 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -6,34 +6,27 @@ "ImageProcessing": "3.0", "PanoramaCompositing": "2.0", "LdrToHdrMerge": "4.0", - "LdrToHdrSampling": "4.0", - "LdrToHdrCalibration": "3.0", "PanoramaEstimation": "1.0", + "LdrToHdrCalibration": "3.0", + "LdrToHdrSampling": "4.0", "PanoramaInit": "2.0", - "PanoramaMerging": "1.0", - "SfMTransform": "3.0", "CameraInit": "7.0", + "SfMTransform": "3.0", + "PanoramaMerging": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", "PanoramaWarping": "1.0" }, "releaseVersion": "2021.1.0", - "fileVersion": "1.1" + "fileVersion": "1.1", + "template": true }, "graph": { "LdrToHdrMerge_1": { "inputs": { - "verboseLevel": "info", - "fusionWeight": "gaussian", "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", - "nbBrackets": 0, - "enableHighlight": false, - "offsetRefBracketIndex": 1, - "storageDataType": "float", - "highlightTargetLux": 120000.0, "byPass": "{LdrToHdrCalibration_1.byPass}", - "highlightCorrectionFactor": 1.0, "input": "{LdrToHdrCalibration_1.input}", "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", "response": "{LdrToHdrCalibration_1.response}" @@ -58,48 +51,14 @@ }, "ImageProcessing_1": { "inputs": { - "outputFormat": "rgba", - "sharpenFilter": { - "threshold": 0.0, - "width": 3, - "sharpenFilterEnabled": false, - "contrast": 1.0 - }, "extension": "exr", - "exposureCompensation": false, - "storageDataType": "float", - "inputFolders": [], - "verboseLevel": "info", - "metadataFolders": [], - "claheFilter": { - "claheClipLimit": 4.0, - "claheTileGridSize": 8, - "claheEnabled": false - }, - "medianFilter": 0, "fillHoles": true, - "reconstructedViewsOnly": false, "input": "{PanoramaMerging_1.outputPanorama}", - "noiseFilter": { - "noiseEnabled": false, - "noiseMethod": "uniform", - "noiseB": 1.0, - "noiseMono": true, - "noiseA": 0.0 - }, - "scaleFactor": 1.0, - "bilateralFilter": { - "bilateralFilterDistance": 0, - "bilateralFilterSigmaColor": 0.0, - "bilateralFilterSigmaSpace": 0.0, - "bilateralFilterEnabled": false - }, - "contrast": 1.0, "fixNonFinite": true }, "nodeType": "ImageProcessing", "uids": { - "0": "d7845b276d97c3489223cce16a1e9d581d98a832" + "0": "a6d1b7d35fd36828f678e4547e9e267d84586f20" }, "parallelization": { "blockSize": 0, @@ -108,8 +67,7 @@ }, "outputs": { "output": "{cache}/{nodeType}/{uid0}/", - "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr", - "outSfMData": "" + "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr" }, "position": [ 3000, @@ -119,13 +77,7 @@ }, "PanoramaWarping_1": { "inputs": { - "panoramaWidth": 10000, - "maxPanoramaWidth": 70000, - "verboseLevel": "info", - "percentUpscale": 50, - "input": "{SfMTransform_1.output}", - "storageDataType": "float", - "estimateResolution": true + "input": "{SfMTransform_1.output}" }, "nodeType": "PanoramaWarping", "uids": { @@ -149,11 +101,6 @@ "inputs": { "samples": "{LdrToHdrSampling_1.output}", "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", - "maxTotalPoints": 1000000, - "nbBrackets": 0, - "calibrationMethod": "debevec", - "calibrationWeight": "default", - "verboseLevel": "info", "byPass": "{LdrToHdrSampling_1.byPass}", "input": "{LdrToHdrSampling_1.input}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" @@ -178,16 +125,7 @@ }, "LdrToHdrSampling_1": { "inputs": { - "blockSize": 256, - "nbBrackets": 0, - "verboseLevel": "info", - "radius": 5, - "byPass": false, - "channelQuantizationPower": 10, - "debug": false, - "input": "{PanoramaPrepareImages_1.output}", - "maxCountSample": 200, - "userNbBrackets": 0 + "input": "{PanoramaPrepareImages_1.output}" }, "nodeType": "LdrToHdrSampling", "uids": { @@ -209,13 +147,6 @@ }, "ImageMatching_1": { "inputs": { - "minNbImages": 200, - "nbNeighbors": 5, - "tree": "${ALICEVISION_VOCTREE}", - "maxDescriptors": 500, - "verboseLevel": "info", - "weights": "", - "nbMatches": 40, "input": "{PanoramaInit_1.outSfMData}", "method": "FrustumOrVocabularyTree", "featuresFolders": [ @@ -242,20 +173,8 @@ }, "FeatureExtraction_1": { "inputs": { - "verboseLevel": "info", - "maxThreads": 0, - "describerTypes": [ - "dspsift" - ], - "maxNbFeatures": 0, - "relativePeakThreshold": 0.01, - "forceCpuExtraction": true, - "masksFolder": "", - "contrastFiltering": "GridSort", "describerQuality": "high", - "gridFiltering": true, - "input": "{LdrToHdrMerge_1.outSfMData}", - "describerPreset": "normal" + "input": "{LdrToHdrMerge_1.outSfMData}" }, "nodeType": "FeatureExtraction", "uids": { @@ -275,17 +194,14 @@ ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, - "PanoramaSeams_1": { + "PanoramaMerging_1": { "inputs": { - "verboseLevel": "info", - "input": "{PanoramaWarping_1.input}", - "warpingFolder": "{PanoramaWarping_1.output}", - "maxWidth": 5000, - "useGraphCut": true + "compositingFolder": "{PanoramaCompositing_1.output}", + "input": "{PanoramaCompositing_1.input}" }, - "nodeType": "PanoramaSeams", + "nodeType": "PanoramaMerging", "uids": { - "0": "0ee6da171bd684358b7c64dcc631f81ba743e1fa" + "0": "e007a4eb5fc5937b320638eba667cea183c0c642" }, "parallelization": { "blockSize": 0, @@ -293,10 +209,10 @@ "size": 0 }, "outputs": { - "output": "{cache}/{nodeType}/{uid0}/labels.exr" + "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" }, "position": [ - 2400, + 2800, 0 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" @@ -304,13 +220,8 @@ "PanoramaCompositing_1": { "inputs": { "warpingFolder": "{PanoramaSeams_1.warpingFolder}", - "maxThreads": 4, "labels": "{PanoramaSeams_1.output}", - "verboseLevel": "info", - "overlayType": "none", - "compositerType": "multiband", - "input": "{PanoramaSeams_1.input}", - "storageDataType": "float" + "input": "{PanoramaSeams_1.input}" }, "nodeType": "PanoramaCompositing", "uids": { @@ -332,10 +243,6 @@ }, "CameraInit_1": { "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, "allowedCameraModels": [ "pinhole", "radial1", @@ -345,12 +252,7 @@ "3deanamorphic4", "3deradial4", "3declassicld" - ], - "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" + ] }, "nodeType": "CameraInit", "uids": { @@ -372,7 +274,6 @@ }, "PanoramaPrepareImages_1": { "inputs": { - "verboseLevel": "info", "input": "{CameraInit_1.output}" }, "nodeType": "PanoramaPrepareImages", @@ -395,33 +296,8 @@ }, "SfMTransform_1": { "inputs": { - "applyScale": true, - "scale": 1.0, - "applyTranslation": true, - "landmarksDescriberTypes": [ - "sift", - "dspsift", - "akaze" - ], - "markers": [], "method": "manual", - "verboseLevel": "info", - "input": "{PanoramaEstimation_1.output}", - "applyRotation": true, - "manualTransform": { - "manualTranslation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - }, - "manualRotation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - }, - "manualScale": 1.0 - }, - "transformation": "" + "input": "{PanoramaEstimation_1.output}" }, "nodeType": "SfMTransform", "uids": { @@ -442,17 +318,14 @@ ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, - "PanoramaMerging_1": { + "PanoramaSeams_1": { "inputs": { - "verboseLevel": "info", - "compositingFolder": "{PanoramaCompositing_1.output}", - "outputFileType": "exr", - "storageDataType": "float", - "input": "{PanoramaCompositing_1.input}" + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}" }, - "nodeType": "PanoramaMerging", + "nodeType": "PanoramaSeams", "uids": { - "0": "e007a4eb5fc5937b320638eba667cea183c0c642" + "0": "0ee6da171bd684358b7c64dcc631f81ba743e1fa" }, "parallelization": { "blockSize": 0, @@ -460,34 +333,21 @@ "size": 0 }, "outputs": { - "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" + "output": "{cache}/{nodeType}/{uid0}/labels.exr" }, "position": [ - 2800, + 2400, 0 ], "internalFolder": "{cache}/{nodeType}/{uid0}/" }, "PanoramaEstimation_1": { "inputs": { - "intermediateRefineWithFocalDist": false, - "offsetLongitude": 0.0, "matchesFolders": [ "{FeatureMatching_1.output}" ], - "filterMatches": false, - "rotationAveragingWeighting": true, - "offsetLatitude": 0.0, - "verboseLevel": "info", - "maxAngularError": 100.0, - "lockAllIntrinsics": false, - "refine": true, "input": "{FeatureMatching_1.input}", - "intermediateRefineWithFocal": false, "describerTypes": "{FeatureMatching_1.describerTypes}", - "relativeRotation": "rotation_matrix", - "maxAngleToPrior": 20.0, - "rotationAveraging": "L2_minimization", "featuresFolders": "{FeatureMatching_1.featuresFolders}" }, "nodeType": "PanoramaEstimation", @@ -511,24 +371,10 @@ }, "PanoramaInit_1": { "inputs": { - "useFisheye": false, - "fisheyeCenterOffset": { - "fisheyeCenterOffset_y": 0.0, - "fisheyeCenterOffset_x": 0.0 - }, - "initializeCameras": "No", - "nbViewsPerLine": [], - "debugFisheyeCircleEstimation": false, - "verboseLevel": "info", "dependency": [ "{FeatureExtraction_1.output}" ], - "estimateFisheyeCircle": true, - "input": "{FeatureExtraction_1.input}", - "yawCW": 1, - "config": "", - "fisheyeRadius": 96.0, - "inputAngle": "None" + "input": "{FeatureExtraction_1.input}" }, "nodeType": "PanoramaInit", "uids": { @@ -550,23 +396,9 @@ }, "FeatureMatching_1": { "inputs": { - "verboseLevel": "info", "describerTypes": "{FeatureExtraction_1.describerTypes}", - "exportDebugFiles": false, - "crossMatching": false, - "geometricError": 0.0, - "maxMatches": 0, - "matchFromKnownCameraPoses": false, - "savePutativeMatches": false, - "guidedMatching": false, "imagePairsList": "{ImageMatching_1.output}", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "maxIteration": 2048, - "distanceRatio": 0.8, "input": "{ImageMatching_1.input}", - "photometricMatchingMethod": "ANN_L2", - "knownPosesGeometricErrorMax": 5.0, "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 32419169d2..b281dbda6e 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -3,17 +3,18 @@ "pipelineVersion": "2.2", "releaseVersion": "2021.1.0", "fileVersion": "1.1", + "template": true, "nodesVersions": { "FeatureMatching": "2.0", "MeshFiltering": "3.0", "Texturing": "6.0", "PrepareDenseScene": "3.0", "DepthMap": "2.0", - "Meshing": "7.0", + "StructureFromMotion": "2.0", "CameraInit": "7.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", - "StructureFromMotion": "2.0", + "Meshing": "7.0", "DepthMapFilter": "3.0" } }, @@ -21,47 +22,8 @@ "Texturing_1": { "inputs": { "imagesFolder": "{DepthMap_1.imagesFolder}", - "downscale": 2, - "bumpMapping": { - "normalFileType": "exr", - "enable": true, - "bumpType": "Normal", - "heightFileType": "exr" - }, - "forceVisibleByAllVertices": false, - "fillHoles": false, - "multiBandDownscale": 4, - "useScore": true, - "displacementMapping": { - "displacementMappingFileType": "exr", - "enable": true - }, - "outputMeshFileType": "obj", - "angleHardThreshold": 90.0, - "textureSide": 8192, - "processColorspace": "sRGB", "input": "{Meshing_1.output}", - "useUDIM": true, - "subdivisionTargetRatio": 0.8, - "padding": 5, - "inputRefMesh": "", - "correctEV": false, - "visibilityRemappingMethod": "PullPush", - "inputMesh": "{MeshFiltering_1.outputMesh}", - "verboseLevel": "info", - "colorMapping": { - "enable": true, - "colorMappingFileType": "exr" - }, - "bestScoreThreshold": 0.1, - "unwrapMethod": "Basic", - "multiBandNbContrib": { - "high": 1, - "midHigh": 5, - "low": 0, - "midLow": 10 - }, - "flipNormals": false + "inputMesh": "{MeshFiltering_1.outputMesh}" }, "nodeType": "Texturing", "uids": { @@ -86,67 +48,8 @@ }, "Meshing_1": { "inputs": { - "exportDebugTetrahedralization": false, - "useBoundingBox": false, - "maxInputPoints": 50000000, - "repartition": "multiResolution", - "helperPointsGridSize": 10, - "seed": 0, - "voteFilteringForWeaklySupportedSurfaces": true, - "verboseLevel": "info", - "outputMeshFileType": "obj", - "simGaussianSizeInit": 10.0, - "nPixelSizeBehind": 4.0, - "fullWeight": 1.0, "depthMapsFolder": "{DepthMapFilter_1.output}", - "densify": false, - "simFactor": 15.0, - "maskHelperPointsWeight": 1.0, - "densifyScale": 20.0, - "input": "{DepthMapFilter_1.input}", - "addLandmarksToTheDensePointCloud": false, - "voteMarginFactor": 4.0, - "saveRawDensePointCloud": false, - "contributeMarginFactor": 2.0, - "estimateSpaceMinObservationAngle": 10, - "nbSolidAngleFilteringIterations": 2, - "minStep": 2, - "colorizeOutput": false, - "pixSizeMarginFinalCoef": 4.0, - "densifyNbFront": 1, - "boundingBox": { - "bboxScale": { - "y": 1.0, - "x": 1.0, - "z": 1.0 - }, - "bboxTranslation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - }, - "bboxRotation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - } - }, - "minSolidAngleRatio": 0.2, - "maxPoints": 5000000, - "addMaskHelperPoints": false, - "maxPointsPerVoxel": 1000000, - "angleFactor": 15.0, - "partitioning": "singleBlock", - "estimateSpaceFromSfM": true, - "minAngleThreshold": 1.0, - "pixSizeMarginInitCoef": 2.0, - "refineFuse": true, - "maxNbConnectedHelperPoints": 50, - "estimateSpaceMinObservations": 3, - "invertTetrahedronBasedOnNeighborsNbIterations": 10, - "maskBorderSize": 4, - "simGaussianSize": 10.0, - "densifyNbBack": 1 + "input": "{DepthMapFilter_1.input}" }, "nodeType": "Meshing", "uids": { @@ -169,17 +72,7 @@ }, "DepthMapFilter_1": { "inputs": { - "minNumOfConsistentCamsWithLowSimilarity": 4, - "computeNormalMaps": false, - "minNumOfConsistentCams": 3, "depthMapsFolder": "{DepthMap_1.output}", - "verboseLevel": "info", - "nNearestCams": 10, - "pixSizeBallWithLowSimilarity": 0, - "pixToleranceFactor": 2.0, - "pixSizeBall": 0, - "minViewAngle": 2.0, - "maxViewAngle": 70.0, "input": "{DepthMap_1.input}" }, "nodeType": "DepthMapFilter", @@ -202,15 +95,7 @@ }, "ImageMatching_1": { "inputs": { - "minNbImages": 200, - "nbNeighbors": 5, - "tree": "${ALICEVISION_VOCTREE}", - "maxDescriptors": 500, - "verboseLevel": "info", - "weights": "", - "nbMatches": 40, "input": "{FeatureExtraction_1.input}", - "method": "SequentialAndVocabularyTree", "featuresFolders": [ "{FeatureExtraction_1.output}" ] @@ -235,20 +120,7 @@ }, "FeatureExtraction_1": { "inputs": { - "verboseLevel": "info", - "maxThreads": 0, - "describerTypes": [ - "dspsift" - ], - "maxNbFeatures": 0, - "relativePeakThreshold": 0.01, - "forceCpuExtraction": true, - "masksFolder": "", - "contrastFiltering": "GridSort", - "describerQuality": "normal", - "gridFiltering": true, - "input": "{CameraInit_1.output}", - "describerPreset": "normal" + "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", "uids": { @@ -270,39 +142,12 @@ }, "StructureFromMotion_1": { "inputs": { - "localizerEstimatorMaxIterations": 4096, - "minAngleForLandmark": 2.0, - "filterTrackForks": false, - "minNumberOfObservationsForTriangulation": 2, - "maxAngleInitialPair": 40.0, - "observationConstraint": "Scale", - "maxNumberOfMatches": 0, - "localizerEstimator": "acransac", "describerTypes": "{FeatureMatching_1.describerTypes}", - "lockScenePreviouslyReconstructed": false, - "localBAGraphDistance": 1, - "minNbCamerasToRefinePrincipalPoint": 3, - "lockAllIntrinsics": false, "input": "{FeatureMatching_1.input}", "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "useRigConstraint": true, - "rigMinNbCamerasForCalibration": 20, - "initialPairA": "", - "initialPairB": "", - "interFileExtension": ".abc", - "useLocalBA": true, - "computeStructureColor": true, "matchesFolders": [ "{FeatureMatching_1.output}" - ], - "minInputTrackLength": 2, - "useOnlyMatchesFromInputFolder": false, - "verboseLevel": "info", - "minAngleForTriangulation": 3.0, - "maxReprojectionError": 4.0, - "minAngleInitialPair": 5.0, - "minNumberOfMatches": 0, - "localizerEstimatorError": 0.0 + ] }, "nodeType": "StructureFromMotion", "uids": { @@ -326,14 +171,7 @@ }, "PrepareDenseScene_1": { "inputs": { - "imagesFolders": [], - "masksFolders": [], - "outputFileType": "exr", - "verboseLevel": "info", - "saveMatricesTxtFiles": false, - "saveMetadata": true, - "input": "{StructureFromMotion_1.output}", - "evCorrection": false + "input": "{StructureFromMotion_1.output}" }, "nodeType": "PrepareDenseScene", "uids": { @@ -355,28 +193,7 @@ "internalFolder": "{cache}/{nodeType}/{uid0}/" }, "CameraInit_1": { - "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye4", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ], - "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" - }, + "inputs": {}, "nodeType": "CameraInit", "uids": { "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" @@ -397,37 +214,8 @@ }, "DepthMap_1": { "inputs": { - "sgmMaxDepthsPerTc": 1500, - "sgmP2": 100.0, "imagesFolder": "{PrepareDenseScene_1.output}", - "downscale": 2, - "refineMaxTCams": 6, - "exportIntermediateResults": false, - "nbGPUs": 0, - "refineNiters": 100, - "refineGammaP": 8.0, - "refineGammaC": 15.5, - "sgmMaxDepths": 3000, - "sgmUseSfmSeeds": true, - "input": "{PrepareDenseScene_1.input}", - "refineWSH": 3, - "sgmP1": 10.0, - "sgmFilteringAxes": "YX", - "sgmMaxTCams": 10, - "refineSigma": 15, - "sgmScale": -1, - "minViewAngle": 2.0, - "maxViewAngle": 70.0, - "sgmGammaC": 5.5, - "sgmWSH": 4, - "refineNSamplesHalf": 150, - "sgmMaxSideXY": 700, - "refineUseTcOrRcPixSize": false, - "verboseLevel": "info", - "sgmGammaP": 8.0, - "sgmStepXY": -1, - "refineNDepthsToRefine": 31, - "sgmStepZ": -1 + "input": "{PrepareDenseScene_1.input}" }, "nodeType": "DepthMap", "uids": { @@ -449,18 +237,7 @@ }, "MeshFiltering_1": { "inputs": { - "filteringSubset": "all", - "outputMeshFileType": "obj", - "inputMesh": "{Meshing_1.outputMesh}", - "filterTrianglesRatio": 0.0, - "smoothingSubset": "all", - "verboseLevel": "info", - "smoothingIterations": 5, - "filterLargeTrianglesFactor": 60.0, - "keepLargestMeshOnly": false, - "smoothingBoundariesNeighbours": 0, - "smoothingLambda": 1.0, - "filteringIterations": 1 + "inputMesh": "{Meshing_1.outputMesh}" }, "nodeType": "MeshFiltering", "uids": { @@ -482,23 +259,9 @@ }, "FeatureMatching_1": { "inputs": { - "verboseLevel": "info", "describerTypes": "{FeatureExtraction_1.describerTypes}", - "exportDebugFiles": false, - "crossMatching": false, - "geometricError": 0.0, - "maxMatches": 0, - "matchFromKnownCameraPoses": false, - "savePutativeMatches": false, - "guidedMatching": false, "imagePairsList": "{ImageMatching_1.output}", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "maxIteration": 2048, - "distanceRatio": 0.8, "input": "{ImageMatching_1.input}", - "photometricMatchingMethod": "ANN_L2", - "knownPosesGeometricErrorMax": 5.0, "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index bf418dbbbc..a65feca724 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -3,6 +3,7 @@ "pipelineVersion": "2.2", "releaseVersion": "2021.1.0", "fileVersion": "1.1", + "template": true, "nodesVersions": { "ExportAnimatedCamera": "2.0", "FeatureMatching": "2.0", @@ -17,9 +18,7 @@ "graph": { "DistortionCalibration_1": { "inputs": { - "verboseLevel": "info", - "input": "{CameraInit_2.output}", - "lensGrid": [] + "input": "{CameraInit_2.output}" }, "nodeType": "DistortionCalibration", "uids": { @@ -41,15 +40,7 @@ }, "ImageMatching_1": { "inputs": { - "minNbImages": 200, - "nbNeighbors": 5, - "tree": "${ALICEVISION_VOCTREE}", - "maxDescriptors": 500, - "verboseLevel": "info", - "weights": "", - "nbMatches": 40, "input": "{FeatureExtraction_1.input}", - "method": "SequentialAndVocabularyTree", "featuresFolders": [ "{FeatureExtraction_1.output}" ] @@ -74,20 +65,7 @@ }, "FeatureExtraction_1": { "inputs": { - "verboseLevel": "info", - "maxThreads": 0, - "describerTypes": [ - "dspsift" - ], - "maxNbFeatures": 0, - "relativePeakThreshold": 0.01, - "forceCpuExtraction": true, - "masksFolder": "", - "contrastFiltering": "GridSort", - "describerQuality": "normal", - "gridFiltering": true, - "input": "{CameraInit_1.output}", - "describerPreset": "normal" + "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", "uids": { @@ -109,39 +87,12 @@ }, "StructureFromMotion_1": { "inputs": { - "localizerEstimatorMaxIterations": 4096, - "minAngleForLandmark": 2.0, - "filterTrackForks": false, - "minNumberOfObservationsForTriangulation": 2, - "maxAngleInitialPair": 40.0, - "observationConstraint": "Scale", - "maxNumberOfMatches": 0, - "localizerEstimator": "acransac", "describerTypes": "{FeatureMatching_1.describerTypes}", - "lockScenePreviouslyReconstructed": false, - "localBAGraphDistance": 1, - "minNbCamerasToRefinePrincipalPoint": 3, - "lockAllIntrinsics": false, "input": "{FeatureMatching_1.input}", "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "useRigConstraint": true, - "rigMinNbCamerasForCalibration": 20, - "initialPairA": "", - "initialPairB": "", - "interFileExtension": ".abc", - "useLocalBA": true, - "computeStructureColor": true, "matchesFolders": [ "{FeatureMatching_1.output}" - ], - "minInputTrackLength": 2, - "useOnlyMatchesFromInputFolder": false, - "verboseLevel": "info", - "minAngleForTriangulation": 3.0, - "maxReprojectionError": 4.0, - "minAngleInitialPair": 5.0, - "minNumberOfMatches": 0, - "localizerEstimatorError": 0.0 + ] }, "nodeType": "StructureFromMotion", "uids": { @@ -165,15 +116,8 @@ }, "ExportAnimatedCamera_1": { "inputs": { - "exportFullROD": false, - "undistortedImageType": "exr", - "exportUVMaps": true, - "verboseLevel": "info", "sfmDataFilter": "{StructureFromMotion_1.output}", - "exportUndistortedImages": false, - "input": "{StructureFromMotion_2.output}", - "viewFilter": "", - "correctPrincipalPoint": true + "input": "{StructureFromMotion_2.output}" }, "nodeType": "ExportAnimatedCamera", "uids": { @@ -196,28 +140,7 @@ "internalFolder": "{cache}/{nodeType}/{uid0}/" }, "CameraInit_1": { - "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye4", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ], - "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" - }, + "inputs": {}, "nodeType": "CameraInit", "uids": { "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" @@ -238,17 +161,10 @@ }, "ImageMatchingMultiSfM_1": { "inputs": { - "minNbImages": 200, - "matchingMode": "a/a+a/b", "nbNeighbors": 10, - "tree": "${ALICEVISION_VOCTREE}", "nbMatches": 5, - "verboseLevel": "info", - "weights": "", - "maxDescriptors": 500, "input": "{FeatureExtraction_2.input}", "inputB": "{StructureFromMotion_1.output}", - "method": "SequentialAndVocabularyTree", "featuresFolders": [ "{FeatureExtraction_2.output}" ] @@ -273,28 +189,7 @@ "internalFolder": "{cache}/{nodeType}/{uid0}/" }, "CameraInit_2": { - "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye4", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ], - "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" - }, + "inputs": {}, "nodeType": "CameraInit", "uids": { "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" @@ -315,20 +210,7 @@ }, "FeatureExtraction_2": { "inputs": { - "verboseLevel": "info", - "maxThreads": 0, - "describerTypes": [ - "dspsift" - ], - "maxNbFeatures": 0, - "relativePeakThreshold": 0.01, - "forceCpuExtraction": true, - "masksFolder": "", - "contrastFiltering": "GridSort", - "describerQuality": "normal", - "gridFiltering": true, - "input": "{CameraInit_2.output}", - "describerPreset": "normal" + "input": "{CameraInit_2.output}" }, "nodeType": "FeatureExtraction", "uids": { @@ -350,23 +232,9 @@ }, "FeatureMatching_2": { "inputs": { - "verboseLevel": "info", "describerTypes": "{FeatureExtraction_2.describerTypes}", - "exportDebugFiles": false, - "crossMatching": false, - "geometricError": 0.0, - "maxMatches": 0, - "matchFromKnownCameraPoses": false, - "savePutativeMatches": false, - "guidedMatching": false, "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "maxIteration": 2048, - "distanceRatio": 0.8, "input": "{DistortionCalibration_1.outSfMData}", - "photometricMatchingMethod": "ANN_L2", - "knownPosesGeometricErrorMax": 5.0, "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}" }, "nodeType": "FeatureMatching", @@ -389,23 +257,9 @@ }, "FeatureMatching_1": { "inputs": { - "verboseLevel": "info", "describerTypes": "{FeatureExtraction_1.describerTypes}", - "exportDebugFiles": false, - "crossMatching": false, - "geometricError": 0.0, - "maxMatches": 0, - "matchFromKnownCameraPoses": false, - "savePutativeMatches": false, - "guidedMatching": false, "imagePairsList": "{ImageMatching_1.output}", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "maxIteration": 2048, - "distanceRatio": 0.8, "input": "{ImageMatching_1.input}", - "photometricMatchingMethod": "ANN_L2", - "knownPosesGeometricErrorMax": 5.0, "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", @@ -428,39 +282,16 @@ }, "StructureFromMotion_2": { "inputs": { - "localizerEstimatorMaxIterations": 4096, "minAngleForLandmark": 0.5, - "filterTrackForks": false, "minNumberOfObservationsForTriangulation": 3, - "maxAngleInitialPair": 40.0, - "observationConstraint": "Scale", - "maxNumberOfMatches": 0, - "localizerEstimator": "acransac", "describerTypes": "{FeatureMatching_2.describerTypes}", - "lockScenePreviouslyReconstructed": false, - "localBAGraphDistance": 1, - "minNbCamerasToRefinePrincipalPoint": 3, - "lockAllIntrinsics": false, "input": "{FeatureMatching_2.input}", "featuresFolders": "{FeatureMatching_2.featuresFolders}", - "useRigConstraint": true, - "rigMinNbCamerasForCalibration": 20, - "initialPairA": "", - "initialPairB": "", - "interFileExtension": ".abc", - "useLocalBA": true, - "computeStructureColor": true, "matchesFolders": [ "{FeatureMatching_2.output}" ], "minInputTrackLength": 5, - "useOnlyMatchesFromInputFolder": false, - "verboseLevel": "info", - "minAngleForTriangulation": 1.0, - "maxReprojectionError": 4.0, - "minAngleInitialPair": 5.0, - "minNumberOfMatches": 0, - "localizerEstimatorError": 0.0 + "minAngleForTriangulation": 1.0 }, "nodeType": "StructureFromMotion", "uids": { diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 4f37896d4c..b7fa7d7edd 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -4,60 +4,21 @@ "FeatureMatching": "2.0", "MeshFiltering": "3.0", "Texturing": "6.0", - "Meshing": "7.0", + "StructureFromMotion": "2.0", "CameraInit": "7.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", - "StructureFromMotion": "2.0" + "Meshing": "7.0" }, "releaseVersion": "2021.1.0", - "fileVersion": "1.1" + "fileVersion": "1.1", + "template": true }, "graph": { "Texturing_1": { "inputs": { - "imagesFolder": "", - "downscale": 2, - "bumpMapping": { - "normalFileType": "exr", - "enable": true, - "bumpType": "Normal", - "heightFileType": "exr" - }, - "forceVisibleByAllVertices": false, - "fillHoles": false, - "multiBandDownscale": 4, - "useScore": true, - "displacementMapping": { - "displacementMappingFileType": "exr", - "enable": true - }, - "outputMeshFileType": "obj", - "angleHardThreshold": 90.0, - "textureSide": 8192, - "processColorspace": "sRGB", "input": "{Meshing_1.output}", - "useUDIM": true, - "subdivisionTargetRatio": 0.8, - "padding": 5, - "inputRefMesh": "", - "correctEV": false, - "visibilityRemappingMethod": "PullPush", - "inputMesh": "{MeshFiltering_1.outputMesh}", - "verboseLevel": "info", - "colorMapping": { - "enable": true, - "colorMappingFileType": "exr" - }, - "bestScoreThreshold": 0.1, - "unwrapMethod": "Basic", - "multiBandNbContrib": { - "high": 1, - "midHigh": 5, - "low": 0, - "midLow": 10 - }, - "flipNormals": false + "inputMesh": "{MeshFiltering_1.outputMesh}" }, "nodeType": "Texturing", "uids": { @@ -82,67 +43,7 @@ }, "Meshing_1": { "inputs": { - "exportDebugTetrahedralization": false, - "useBoundingBox": false, - "maxInputPoints": 50000000, - "repartition": "multiResolution", - "helperPointsGridSize": 10, - "seed": 0, - "voteFilteringForWeaklySupportedSurfaces": true, - "verboseLevel": "info", - "outputMeshFileType": "obj", - "simGaussianSizeInit": 10.0, - "nPixelSizeBehind": 4.0, - "fullWeight": 1.0, - "depthMapsFolder": "", - "densify": false, - "simFactor": 15.0, - "maskHelperPointsWeight": 1.0, - "densifyScale": 20.0, - "input": "{StructureFromMotion_1.output}", - "addLandmarksToTheDensePointCloud": false, - "voteMarginFactor": 4.0, - "saveRawDensePointCloud": false, - "contributeMarginFactor": 2.0, - "estimateSpaceMinObservationAngle": 10, - "nbSolidAngleFilteringIterations": 2, - "minStep": 2, - "colorizeOutput": false, - "pixSizeMarginFinalCoef": 4.0, - "densifyNbFront": 1, - "boundingBox": { - "bboxScale": { - "y": 1.0, - "x": 1.0, - "z": 1.0 - }, - "bboxTranslation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - }, - "bboxRotation": { - "y": 0.0, - "x": 0.0, - "z": 0.0 - } - }, - "minSolidAngleRatio": 0.2, - "maxPoints": 5000000, - "addMaskHelperPoints": false, - "maxPointsPerVoxel": 1000000, - "angleFactor": 15.0, - "partitioning": "singleBlock", - "estimateSpaceFromSfM": true, - "minAngleThreshold": 1.0, - "pixSizeMarginInitCoef": 2.0, - "refineFuse": true, - "maxNbConnectedHelperPoints": 50, - "estimateSpaceMinObservations": 3, - "invertTetrahedronBasedOnNeighborsNbIterations": 10, - "maskBorderSize": 4, - "simGaussianSize": 10.0, - "densifyNbBack": 1 + "input": "{StructureFromMotion_1.output}" }, "nodeType": "Meshing", "uids": { @@ -165,15 +66,7 @@ }, "ImageMatching_1": { "inputs": { - "minNbImages": 200, - "nbNeighbors": 5, - "tree": "${ALICEVISION_VOCTREE}", - "maxDescriptors": 500, - "verboseLevel": "info", - "weights": "", - "nbMatches": 40, "input": "{FeatureExtraction_1.input}", - "method": "SequentialAndVocabularyTree", "featuresFolders": [ "{FeatureExtraction_1.output}" ] @@ -198,20 +91,7 @@ }, "FeatureExtraction_1": { "inputs": { - "verboseLevel": "info", - "maxThreads": 0, - "describerTypes": [ - "dspsift" - ], - "maxNbFeatures": 0, - "relativePeakThreshold": 0.01, - "forceCpuExtraction": true, - "masksFolder": "", - "contrastFiltering": "GridSort", - "describerQuality": "normal", - "gridFiltering": true, - "input": "{CameraInit_1.output}", - "describerPreset": "normal" + "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", "uids": { @@ -233,39 +113,12 @@ }, "StructureFromMotion_1": { "inputs": { - "localizerEstimatorMaxIterations": 4096, - "minAngleForLandmark": 2.0, - "filterTrackForks": false, - "minNumberOfObservationsForTriangulation": 2, - "maxAngleInitialPair": 40.0, - "observationConstraint": "Scale", - "maxNumberOfMatches": 0, - "localizerEstimator": "acransac", "describerTypes": "{FeatureMatching_1.describerTypes}", - "lockScenePreviouslyReconstructed": false, - "localBAGraphDistance": 1, - "minNbCamerasToRefinePrincipalPoint": 3, - "lockAllIntrinsics": false, "input": "{FeatureMatching_1.input}", "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "useRigConstraint": true, - "rigMinNbCamerasForCalibration": 20, - "initialPairA": "", - "initialPairB": "", - "interFileExtension": ".abc", - "useLocalBA": true, - "computeStructureColor": true, "matchesFolders": [ "{FeatureMatching_1.output}" - ], - "minInputTrackLength": 2, - "useOnlyMatchesFromInputFolder": false, - "verboseLevel": "info", - "minAngleForTriangulation": 3.0, - "maxReprojectionError": 4.0, - "minAngleInitialPair": 5.0, - "minNumberOfMatches": 0, - "localizerEstimatorError": 0.0 + ] }, "nodeType": "StructureFromMotion", "uids": { @@ -288,28 +141,7 @@ "internalFolder": "{cache}/{nodeType}/{uid0}/" }, "CameraInit_1": { - "inputs": { - "groupCameraFallback": "folder", - "intrinsics": [], - "viewIdRegex": ".*?(\\d+)", - "defaultFieldOfView": 45.0, - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye4", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ], - "verboseLevel": "info", - "viewIdMethod": "metadata", - "viewpoints": [], - "useInternalWhiteBalance": true, - "sensorDatabase": "${ALICEVISION_SENSOR_DB}" - }, + "inputs": {}, "nodeType": "CameraInit", "uids": { "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" @@ -330,18 +162,7 @@ }, "MeshFiltering_1": { "inputs": { - "filteringSubset": "all", - "outputMeshFileType": "obj", - "inputMesh": "{Meshing_1.outputMesh}", - "filterTrianglesRatio": 0.0, - "smoothingSubset": "all", - "verboseLevel": "info", - "smoothingIterations": 5, - "filterLargeTrianglesFactor": 60.0, - "keepLargestMeshOnly": false, - "smoothingBoundariesNeighbours": 0, - "smoothingLambda": 1.0, - "filteringIterations": 1 + "inputMesh": "{Meshing_1.outputMesh}" }, "nodeType": "MeshFiltering", "uids": { @@ -363,23 +184,9 @@ }, "FeatureMatching_1": { "inputs": { - "verboseLevel": "info", "describerTypes": "{FeatureExtraction_1.describerTypes}", - "exportDebugFiles": false, - "crossMatching": false, - "geometricError": 0.0, - "maxMatches": 0, - "matchFromKnownCameraPoses": false, - "savePutativeMatches": false, - "guidedMatching": false, "imagePairsList": "{ImageMatching_1.output}", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "maxIteration": 2048, - "distanceRatio": 0.8, "input": "{ImageMatching_1.input}", - "photometricMatchingMethod": "ANN_L2", - "knownPosesGeometricErrorMax": 5.0, "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", From c5e703720546f5bbad39ab131301209077f4a11f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 21 Apr 2021 22:20:57 +0200 Subject: [PATCH 0566/1093] [nodes] SfMTransform: add auto_from_cameras_x_axis --- meshroom/aliceVision/SfMTransform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index e8caf7e8cd..ae4b5625ac 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -38,13 +38,14 @@ class SfMTransform(desc.CommandLineNode): " * transformation: Apply a given transformation\n" " * manual: Apply the gizmo transformation (show the transformed input)\n" " * auto_from_cameras: Use cameras\n" + " * auto_from_cameras_x_axis: Use X axis of all cameras\n" " * auto_from_landmarks: Use landmarks\n" " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" " * from_center_camera: Use the center camera as the origin of the coordinate system\n" " * from_markers: Align specific markers to custom coordinates\n" " * from_gps: Align with the gps positions from the image metadata", value='auto_from_landmarks', - values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps'], + values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps'], exclusive=True, uid=[0], ), From 4e6c66d87286795c4706a36fc2fb3ff6ddcef651 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 26 Jul 2022 16:15:57 +0200 Subject: [PATCH 0567/1093] [featurematching] add min required 2d motion parameter --- meshroom/aliceVision/FeatureMatching.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 831dda2db7..f3a6e78bdf 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -150,6 +150,15 @@ class FeatureMatching(desc.CommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='minRequired2DMotion', + label='required 2d motion', + description='A match is invalid if the 2d motion between the 2 points is less than a threshold (or -1 to disable this filter).', + value=-1.0, + range=(0.0, 10.0, 1.0), + uid=[0], + advanced=True, + ), desc.IntParam( name='maxMatches', label='Max Matches', From 1370fa376eeca4ed220c5650234fb0fc46540aa6 Mon Sep 17 00:00:00 2001 From: "Fabien Servant @ TCS" <100348063+servantftechnicolor@users.noreply.github.com> Date: Wed, 7 Sep 2022 11:49:39 +0200 Subject: [PATCH 0568/1093] [FeatureMatching] Change label and description of option Co-authored-by: Fabien Castan <fabcastan@gmail.com> --- meshroom/aliceVision/FeatureMatching.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index f3a6e78bdf..62c550a789 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -152,8 +152,8 @@ class FeatureMatching(desc.CommandLineNode): ), desc.FloatParam( name='minRequired2DMotion', - label='required 2d motion', - description='A match is invalid if the 2d motion between the 2 points is less than a threshold (or -1 to disable this filter).', + label='Minimal 2D Motion', + description='Filter out matches without enough 2D motion (threshold in pixels). Use -1 to disable this filter. Useful for filtering the background during acquisition with a turntable and a static camera.', value=-1.0, range=(0.0, 10.0, 1.0), uid=[0], From 325725c55a6dbbd64c8d8a786cef6f64982632ea Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 7 Sep 2022 13:15:32 +0200 Subject: [PATCH 0569/1093] [nodes] FeatureMatching: expose minRequired2DMotion --- meshroom/aliceVision/FeatureMatching.py | 1 - 1 file changed, 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 62c550a789..4c0fba1b18 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -157,7 +157,6 @@ class FeatureMatching(desc.CommandLineNode): value=-1.0, range=(0.0, 10.0, 1.0), uid=[0], - advanced=True, ), desc.IntParam( name='maxMatches', From ab58b27a2787c37b3ff2acd5635c810b920c2fd2 Mon Sep 17 00:00:00 2001 From: luz paz <luzpaz@pm.me> Date: Wed, 7 Sep 2022 10:51:41 -0400 Subject: [PATCH 0570/1093] Fix various typos Found via `codespell` --- meshroom/aliceVision/FeatureExtraction.py | 2 +- meshroom/aliceVision/FeatureRepeatability.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index b05b21a3dd..9c37f30333 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -105,7 +105,7 @@ class FeatureExtraction(desc.CommandLineNode): desc.FloatParam( name='relativePeakThreshold', label='Relative Peak Threshold', - description='Peak Threshold relative to median of gradiants.', + description='Peak Threshold relative to median of gradients.', value=0.01, range=(0.01, 1.0, 0.001), advanced=True, diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index 162fb455b2..12cd9012e7 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -71,7 +71,7 @@ class FeatureRepeatability(desc.CommandLineNode): desc.FloatParam( name='relativePeakThreshold', label='Relative Peak Threshold', - description='Peak Threshold relative to median of gradiants.', + description='Peak Threshold relative to median of gradients.', value=0.01, range=(0.01, 1.0, 0.001), advanced=True, From bd89f0682e39c274a9263f16a2ebad6cf542a12c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 3 Aug 2022 19:12:09 +0200 Subject: [PATCH 0571/1093] [nodes] CameraInit: all intrinsics parameters should invalidate --- meshroom/aliceVision/CameraInit.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index dcc8182b6c..148aa401e8 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -34,8 +34,8 @@ "So this value is used to limit the range of possible values in the optimization. \n" "If you put -1, this value will not be used and the focal length will not be bounded.", value=-1.0, uid=[0], range=None), - desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000, uid=[], range=(0, 10000, 1)), - desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1, uid=[], range=(0, 10, 0.1)), + desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1, uid=[0], range=(0, 10, 0.1)), desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', description='the pixelRatio value is locked for estimation', value=True, uid=[0]), @@ -51,14 +51,14 @@ " * 3declassicld: Pinhole camera with a 10 anamorphic distortion coefficients\n" " * 3deradial4: Pinhole camera with 3DE radial4 model\n", value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), - desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[], range=(0, 10000, 1)), - desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[], range=(0, 10000, 1)), - desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[], range=(0, 1000, 1)), - desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24, uid=[], range=(0, 1000, 1)), - desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[]), + desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)), + desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[0], range=(0, 1000, 1)), + desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24, uid=[0], range=(0, 1000, 1)), + desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]), desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=0, uid=[], range=(0, 10000, 1)), - desc.FloatParam(name="y", label="y", description="", value=0, uid=[], range=(0, 10000, 1)), + desc.FloatParam(name="x", label="x", description="", value=0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="y", label="y", description="", value=0, uid=[0], range=(0, 10000, 1)), ]), desc.ChoiceParam(name="initializationMode", label="Initialization Mode", @@ -70,7 +70,7 @@ values=("calibrated", "estimated", "unknown", "none"), value="none", exclusive=True, - uid=[], + uid=[0], advanced=True ), From e57fdff39244dd7048290b62e50f247c836fa73b Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 3 Aug 2022 20:49:44 +0200 Subject: [PATCH 0572/1093] [nodes] CameraInit: upgrade node version Change in uid should modify the node version and thus require a manual upgrade of the node when loading previous scenes. --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 148aa401e8..7e7bd38c45 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "7.0" +__version__ = "8.0" import os import json From f4eb94b6754538370381168e7a87bf35b20a7000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 26 Sep 2022 17:48:57 +0200 Subject: [PATCH 0573/1093] [nodes] CameraInit: set float default values for FloatParams Fix the parameters with default values that do not correspond to the parameters' types. For CameraInit, all the default values of FloatParams that are set with integers are replaced with actual float values. These default values with an erroneous type would cause changes in the CameraInit's UID when the intrinsics' default values were written (with values of the correct type) and when they were loaded (with values of the wrong type). --- meshroom/aliceVision/CameraInit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 7e7bd38c45..de703df05e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -34,8 +34,8 @@ "So this value is used to limit the range of possible values in the optimization. \n" "If you put -1, this value will not be used and the focal length will not be bounded.", value=-1.0, uid=[0], range=None), - desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1, uid=[0], range=(0, 10, 0.1)), + desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0, 10, 0.1)), desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', description='the pixelRatio value is locked for estimation', value=True, uid=[0]), @@ -53,12 +53,12 @@ value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36, uid=[0], range=(0, 1000, 1)), - desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24, uid=[0], range=(0, 1000, 1)), + desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0, 1000, 1)), + desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0, 1000, 1)), desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]), desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="y", label="y", description="", value=0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0, 10000, 1)), ]), desc.ChoiceParam(name="initializationMode", label="Initialization Mode", From 42215d9570073e2b12392f81c1bdd7a0c64172dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 26 Sep 2022 18:11:02 +0200 Subject: [PATCH 0574/1093] [nodes] Align all nodes' default values with their params' type Fix default values for: - DepthMap: refineSigma (FloatParam); use float instead of int - ImageMasking: hsvMaxSaturation (FloatParam); use float instead of int - ImageMasking: hsvMaxValue (FloatParam); use float instead of int - Meshing: estimateSpaceMinObservationAngle (FloatParam); use float instead of int - PanoramaInit: yawCW (BoolParam); use bool instead of int --- meshroom/aliceVision/DepthMap.py | 2 +- meshroom/aliceVision/ImageMasking.py | 4 ++-- meshroom/aliceVision/Meshing.py | 2 +- meshroom/aliceVision/PanoramaInit.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index dbccfe6655..a361e9eb17 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -231,7 +231,7 @@ class DepthMap(desc.CommandLineNode): name='refineSigma', label='Refine: Sigma', description='Refine: Sigma Threshold.', - value=15, + value=15.0, range=(0.0, 30.0, 0.5), uid=[0], advanced=True, diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 93a8540d8b..abd595698f 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -66,7 +66,7 @@ class ImageMasking(desc.CommandLineNode): name='hsvMaxSaturation', label='Max Saturation', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', - value=1, + value=1.0, range=(0, 1, 0.01), uid=[0] ), @@ -82,7 +82,7 @@ class ImageMasking(desc.CommandLineNode): name='hsvMaxValue', label='Max Value', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', - value=1, + value=1.0, range=(0, 1, 0.01), uid=[0] ), diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index c1a085edf0..edabdd9048 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -163,7 +163,7 @@ class Meshing(desc.CommandLineNode): name='estimateSpaceMinObservationAngle', label='Min Observations Angle For SfM Space Estimation', description='Minimum angle between two observations for SfM space estimation.', - value=10, + value=10.0, range=(0, 120, 1), uid=[0], enabled=lambda node: node.estimateSpaceFromSfM.value, diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 7b341b8fd8..947f092289 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -49,7 +49,7 @@ class PanoramaInit(desc.CommandLineNode): name='yawCW', label='Yaw CW', description="Yaw ClockWise or CounterClockWise", - value=1, + value=True, uid=[0], enabled=lambda node: ('Horizontal' in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), ), From be9c5066be0107e0157a6ed680c6b28f53c92bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 27 Sep 2022 12:08:54 +0200 Subject: [PATCH 0575/1093] [nodes] Align FloatParams' and IntParams' ranges with their params' type --- meshroom/aliceVision/CameraInit.py | 14 +++++++------- meshroom/aliceVision/DepthMap.py | 2 +- meshroom/aliceVision/DepthMapFilter.py | 2 +- meshroom/aliceVision/ImageMasking.py | 12 ++++++------ meshroom/aliceVision/KeyframeSelection.py | 2 +- meshroom/aliceVision/Meshing.py | 8 ++++---- meshroom/aliceVision/SfMTransform.py | 6 +++--- meshroom/aliceVision/StructureFromMotion.py | 10 +++++----- meshroom/blender/RenderAnimatedCamera.py | 2 +- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index de703df05e..9bc0e4e284 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -34,8 +34,8 @@ "So this value is used to limit the range of possible values in the optimization. \n" "If you put -1, this value will not be used and the focal length will not be bounded.", value=-1.0, uid=[0], range=None), - desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0, 10, 0.1)), + desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), + desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', description='the pixelRatio value is locked for estimation', value=True, uid=[0]), @@ -53,12 +53,12 @@ value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0, 1000, 1)), - desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0, 1000, 1)), + desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)), + desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)), desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]), desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), + desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), ]), desc.ChoiceParam(name="initializationMode", label="Initialization Mode", @@ -168,7 +168,7 @@ class CameraInit(desc.CommandLineNode, desc.InitNode): label='Default Field Of View', description='Empirical value for the field of view in degree.', value=45.0, - range=(0, 180.0, 1), + range=(0.0, 180.0, 1.0), uid=[], advanced=True, ), diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index a361e9eb17..e1d842252c 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -59,7 +59,7 @@ class DepthMap(desc.CommandLineNode): label='Max View Angle', description='Maximum angle between two views.', value=70.0, - range=(10.0, 120.0, 1), + range=(10.0, 120.0, 1.0), uid=[0], advanced=True, ), diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index f69de340e1..5043d074c0 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -45,7 +45,7 @@ class DepthMapFilter(desc.CommandLineNode): label='Max View Angle', description='Maximum angle between two views.', value=70.0, - range=(10.0, 120.0, 1), + range=(10.0, 120.0, 1.0), uid=[0], advanced=True, ), diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index abd595698f..eefe335f51 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -43,7 +43,7 @@ class ImageMasking(desc.CommandLineNode): description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', semantic='color/hue', value=0.33, - range=(0, 1, 0.01), + range=(0.0, 1.0, 0.01), uid=[0] ), desc.FloatParam( @@ -51,7 +51,7 @@ class ImageMasking(desc.CommandLineNode): label='Tolerance', description='Tolerance around the hue value to isolate.', value=0.1, - range=(0, 1, 0.01), + range=(0.0, 1.0, 0.01), uid=[0] ), desc.FloatParam( @@ -59,7 +59,7 @@ class ImageMasking(desc.CommandLineNode): label='Min Saturation', description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', value=0.3, - range=(0, 1, 0.01), + range=(0.0, 1.0, 0.01), uid=[0] ), desc.FloatParam( @@ -67,7 +67,7 @@ class ImageMasking(desc.CommandLineNode): label='Max Saturation', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', value=1.0, - range=(0, 1, 0.01), + range=(0.0, 1.0, 0.01), uid=[0] ), desc.FloatParam( @@ -75,7 +75,7 @@ class ImageMasking(desc.CommandLineNode): label='Min Value', description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', value=0.3, - range=(0, 1, 0.01), + range=(0.0, 1.0, 0.01), uid=[0] ), desc.FloatParam( @@ -83,7 +83,7 @@ class ImageMasking(desc.CommandLineNode): label='Max Value', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', value=1.0, - range=(0, 1, 0.01), + range=(0.0, 1.0, 0.01), uid=[0] ), ]), diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index c855cce317..e1037cd3cc 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -84,7 +84,7 @@ class KeyframeSelection(desc.CommandLineNode): label="Frame Offset", description="Frame offset.", value=0, - range=(0, 100.0, 1.0), + range=(0, 100, 1), uid=[0], ), name="frameOffsets", diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index edabdd9048..a64962c81d 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -94,19 +94,19 @@ class Meshing(desc.CommandLineNode): name="x", label="x", description="Euler X Rotation", value=0.0, uid=[0], - range=(-90.0, 90.0, 1) + range=(-90.0, 90.0, 1.0) ), desc.FloatParam( name="y", label="y", description="Euler Y Rotation", value=0.0, uid=[0], - range=(-180.0, 180.0, 1) + range=(-180.0, 180.0, 1.0) ), desc.FloatParam( name="z", label="z", description="Euler Z Rotation", value=0.0, uid=[0], - range=(-180.0, 180.0, 1) + range=(-180.0, 180.0, 1.0) ) ], joinChar="," @@ -164,7 +164,7 @@ class Meshing(desc.CommandLineNode): label='Min Observations Angle For SfM Space Estimation', description='Minimum angle between two observations for SfM space estimation.', value=10.0, - range=(0, 120, 1), + range=(0.0, 120.0, 1.0), uid=[0], enabled=lambda node: node.estimateSpaceFromSfM.value, ), diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index ae4b5625ac..0466ec50a8 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -99,19 +99,19 @@ class SfMTransform(desc.CommandLineNode): name="x", label="x", description="Euler X Rotation", value=0.0, uid=[0], - range=(-90.0, 90.0, 1) + range=(-90.0, 90.0, 1.0) ), desc.FloatParam( name="y", label="y", description="Euler Y Rotation", value=0.0, uid=[0], - range=(-180.0, 180.0, 1) + range=(-180.0, 180.0, 1.0) ), desc.FloatParam( name="z", label="z", description="Euler Z Rotation", value=0.0, uid=[0], - range=(-180.0, 180.0, 1) + range=(-180.0, 180.0, 1.0) ) ], joinChar="," diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 03b35ad150..4cacd6a106 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -213,7 +213,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Min Angle For Triangulation', description='Minimum angle for triangulation.', value=3.0, - range=(0.1, 10, 0.1), + range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), @@ -222,7 +222,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Min Angle For Landmark', description='Minimum angle for landmark.', value=2.0, - range=(0.1, 10, 0.1), + range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), @@ -231,7 +231,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Max Reprojection Error', description='Maximum reprojection error.', value=4.0, - range=(0.1, 10, 0.1), + range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), @@ -240,7 +240,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Min Angle Initial Pair', description='Minimum angle for the initial pair.', value=5.0, - range=(0.1, 10, 0.1), + range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), @@ -249,7 +249,7 @@ class StructureFromMotion(desc.CommandLineNode): label='Max Angle Initial Pair', description='Maximum angle for the initial pair.', value=40.0, - range=(0.1, 60, 0.1), + range=(0.1, 60.0, 0.1), uid=[0], advanced=True, ), diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index 803fdac6c0..8e60572feb 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -80,7 +80,7 @@ class RenderAnimatedCamera(desc.CommandLineNode): label='Particle Size', description='''Scale of particles used to show the point cloud''', value=0.1, - range=(0.01, 1, 0.01), + range=(0.01, 1.0, 0.01), uid=[0], ), desc.ChoiceParam( From 0e2d43a0f3c44020e260251762e89a157336a77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 3 Oct 2022 15:05:09 +0200 Subject: [PATCH 0576/1093] [pipelines] Update CameraInit version from 7.0 to 8.0 in templates --- meshroom/cameraTracking.mg | 8 ++++---- meshroom/panoramaFisheyeHdr.mg | 18 +++++++++--------- meshroom/panoramaHdr.mg | 18 +++++++++--------- meshroom/photogrammetry.mg | 18 +++++++++--------- meshroom/photogrammetryAndCameraTracking.mg | 14 +++++++------- meshroom/photogrammetryDraft.mg | 12 ++++++------ 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 361881d44a..b5bdbf21ee 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -8,7 +8,7 @@ "ExportAnimatedCamera": "2.0", "FeatureMatching": "2.0", "DistortionCalibration": "2.0", - "CameraInit": "7.0", + "CameraInit": "8.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "StructureFromMotion": "2.0" @@ -101,7 +101,7 @@ }, "nodeType": "StructureFromMotion", "uids": { - "0": "4d198974784fd71f5a1c189e10c2914e56523585" + "0": "28715b8d4a51e5a90fbfee17d9eb193262116845" }, "parallelization": { "blockSize": 0, @@ -125,7 +125,7 @@ }, "nodeType": "ExportAnimatedCamera", "uids": { - "0": "31413f19e51b239874733f13f9628286fd185c18" + "0": "65b4d273f9b9c6a177a8f586b1f9a085f3430133" }, "parallelization": { "blockSize": 0, @@ -172,7 +172,7 @@ }, "nodeType": "FeatureMatching", "uids": { - "0": "8386c096445d6988ea7d14f1ae3192978a4dd2e8" + "0": "d6266b2126948174744b0ff6c33d96440e7596de" }, "parallelization": { "blockSize": 20, diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 40e7c793bd..4428fd664f 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -10,7 +10,7 @@ "LdrToHdrCalibration": "3.0", "LdrToHdrSampling": "4.0", "PanoramaInit": "2.0", - "CameraInit": "7.0", + "CameraInit": "8.0", "SfMTransform": "3.0", "PanoramaMerging": "1.0", "ImageMatching": "2.0", @@ -58,7 +58,7 @@ }, "nodeType": "ImageProcessing", "uids": { - "0": "3b8b39e478a30aa0ef1871576665b2914204a919" + "0": "51d41208c0c929fa50d88c183713958e9a407fd3" }, "parallelization": { "blockSize": 0, @@ -81,7 +81,7 @@ }, "nodeType": "PanoramaWarping", "uids": { - "0": "45cca14aba2a8c4f68c79a15d3fbc48f30ae9d66" + "0": "2def8d004a44dcb3bbaa35da318d38bbb076b6ee" }, "parallelization": { "blockSize": 5, @@ -205,7 +205,7 @@ }, "nodeType": "PanoramaMerging", "uids": { - "0": "70edd7fe8194bf35dcb0b221141cd4abd2354547" + "0": "6895704a5fcd5fd070562190b3747cb3ca08121c" }, "parallelization": { "blockSize": 0, @@ -229,7 +229,7 @@ }, "nodeType": "PanoramaCompositing", "uids": { - "0": "1f1e629021e2280291046226e009a52dbb7809c1" + "0": "29f97e3a8c4d4989fae0ab4c1f3831a92dfbae5c" }, "parallelization": { "blockSize": 5, @@ -305,7 +305,7 @@ }, "nodeType": "SfMTransform", "uids": { - "0": "b8568fb40b68b42ac80c18df2dcdf600744fe3e1" + "0": "d9ff08700916f4e9e3ace1048c2c2621c9541272" }, "parallelization": { "blockSize": 0, @@ -329,7 +329,7 @@ }, "nodeType": "PanoramaSeams", "uids": { - "0": "dd02562c5c3b1e18e42561d99590cbf4ff5ba35a" + "0": "52cbb0d53e0ef49cefe9848394023cf3e7f30572" }, "parallelization": { "blockSize": 0, @@ -356,7 +356,7 @@ }, "nodeType": "PanoramaEstimation", "uids": { - "0": "47b0976fc98eefcbc0342bbb63e7d27ef3e0d4de" + "0": "350636ae916682708019397a10592596e8ef7e84" }, "parallelization": { "blockSize": 0, @@ -408,7 +408,7 @@ }, "nodeType": "FeatureMatching", "uids": { - "0": "c0fbe0b12fe47ada6a1ca8f74d266e99c1cc548c" + "0": "cb919baf3a96df73f0ef07a23357f3d8a7f380e8" }, "parallelization": { "blockSize": 20, diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 7de6e8700d..551fd42f88 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -10,7 +10,7 @@ "LdrToHdrCalibration": "3.0", "LdrToHdrSampling": "4.0", "PanoramaInit": "2.0", - "CameraInit": "7.0", + "CameraInit": "8.0", "SfMTransform": "3.0", "PanoramaMerging": "1.0", "ImageMatching": "2.0", @@ -58,7 +58,7 @@ }, "nodeType": "ImageProcessing", "uids": { - "0": "a6d1b7d35fd36828f678e4547e9e267d84586f20" + "0": "db79f52d50b71d5f8a0b398109bb8ff4c4506e75" }, "parallelization": { "blockSize": 0, @@ -81,7 +81,7 @@ }, "nodeType": "PanoramaWarping", "uids": { - "0": "f2971d0c73b15fa99cbccbc9515de346ca141a1e" + "0": "2b35fc7d314e510119ba9c40e2870fee75c0f145" }, "parallelization": { "blockSize": 5, @@ -201,7 +201,7 @@ }, "nodeType": "PanoramaMerging", "uids": { - "0": "e007a4eb5fc5937b320638eba667cea183c0c642" + "0": "ebc83e08ec420c2451e6e667feed11fad346acd7" }, "parallelization": { "blockSize": 0, @@ -225,7 +225,7 @@ }, "nodeType": "PanoramaCompositing", "uids": { - "0": "8aba78572808d012e0bb376503c2016df943b3f0" + "0": "7c118e7273f8f93818fbf82fe272c6d6553c650f" }, "parallelization": { "blockSize": 5, @@ -301,7 +301,7 @@ }, "nodeType": "SfMTransform", "uids": { - "0": "c72641a2cca50759bcf5283ae6e0b6f7abc3fe4a" + "0": "634e1a4143def636efac5c0f9cd64e0dcb99c20c" }, "parallelization": { "blockSize": 0, @@ -325,7 +325,7 @@ }, "nodeType": "PanoramaSeams", "uids": { - "0": "0ee6da171bd684358b7c64dcc631f81ba743e1fa" + "0": "89eb43d21b7fa9fcd438ed92109f4d736dafcdfb" }, "parallelization": { "blockSize": 0, @@ -352,7 +352,7 @@ }, "nodeType": "PanoramaEstimation", "uids": { - "0": "de946a7c1080873d15c9eb8a0523b544cf548719" + "0": "dc44122c2490f220a4e5f62aeec0745bfa44a8e3" }, "parallelization": { "blockSize": 0, @@ -403,7 +403,7 @@ }, "nodeType": "FeatureMatching", "uids": { - "0": "cec6da6e894230ab66683c2e959bc9581ea5430e" + "0": "f818137ea50d2e41fb541690adeb842db7cecc43" }, "parallelization": { "blockSize": 20, diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index b281dbda6e..37987903e6 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -11,7 +11,7 @@ "PrepareDenseScene": "3.0", "DepthMap": "2.0", "StructureFromMotion": "2.0", - "CameraInit": "7.0", + "CameraInit": "8.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "Meshing": "7.0", @@ -27,7 +27,7 @@ }, "nodeType": "Texturing", "uids": { - "0": "09f72f6745c6b13aae56fc3876e6541fbeaa557d" + "0": "a7508a27971a36b86401f0476f64287476069faa" }, "parallelization": { "blockSize": 0, @@ -53,7 +53,7 @@ }, "nodeType": "Meshing", "uids": { - "0": "aeb66fceaacd37ecd5bae8364bd9e87ccff2a84c" + "0": "a520c188f5e02d00b841b1a376de78a252c79c24" }, "parallelization": { "blockSize": 0, @@ -77,7 +77,7 @@ }, "nodeType": "DepthMapFilter", "uids": { - "0": "4de4649a857d7bd4f7fdfb27470a5087625ff8c9" + "0": "9d7527658e450be51a2fffb3923fd3d24b2b928c" }, "parallelization": { "blockSize": 10, @@ -151,7 +151,7 @@ }, "nodeType": "StructureFromMotion", "uids": { - "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" + "0": "5af4f4052aa22b0450708941b40928d46170f364" }, "parallelization": { "blockSize": 0, @@ -175,7 +175,7 @@ }, "nodeType": "PrepareDenseScene", "uids": { - "0": "894725f62ffeead1307d9d91852b07d7c8453625" + "0": "489beb05de9e2d5cdfac149936b8c30c691f4b67" }, "parallelization": { "blockSize": 40, @@ -219,7 +219,7 @@ }, "nodeType": "DepthMap", "uids": { - "0": "f5ef2fd13dad8f48fcb87e2364e1e821a9db7d2d" + "0": "279cdf5aa186d06aa81d952999991df43f3299f8" }, "parallelization": { "blockSize": 3, @@ -241,7 +241,7 @@ }, "nodeType": "MeshFiltering", "uids": { - "0": "febb162c4fbce195f6d312bbb80697720a2f52b9" + "0": "590f12b2789757dcbe3bfd3e5b50e28d73a4e060" }, "parallelization": { "blockSize": 0, @@ -266,7 +266,7 @@ }, "nodeType": "FeatureMatching", "uids": { - "0": "3b1f2c3fcfe0b94c65627c397a2671ba7594827d" + "0": "534c5224ba51c770ae3793cc085ae3aaa8c2c415" }, "parallelization": { "blockSize": 20, diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index a65feca724..a146e8122c 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -8,7 +8,7 @@ "ExportAnimatedCamera": "2.0", "FeatureMatching": "2.0", "DistortionCalibration": "2.0", - "CameraInit": "7.0", + "CameraInit": "8.0", "ImageMatchingMultiSfM": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", @@ -96,7 +96,7 @@ }, "nodeType": "StructureFromMotion", "uids": { - "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" + "0": "5af4f4052aa22b0450708941b40928d46170f364" }, "parallelization": { "blockSize": 0, @@ -121,7 +121,7 @@ }, "nodeType": "ExportAnimatedCamera", "uids": { - "0": "6f482ab9e161bd79341c5cd4a43ab9f8e39aec1f" + "0": "c28dfbc702edbecf8bf6721224cf6b10799a6a5d" }, "parallelization": { "blockSize": 0, @@ -171,7 +171,7 @@ }, "nodeType": "ImageMatchingMultiSfM", "uids": { - "0": "ef147c1bc069c7689863c7e14cdbbaca86af4006" + "0": "a789cef752e327c0f2ee58012ca4792e9ab6a70e" }, "parallelization": { "blockSize": 0, @@ -239,7 +239,7 @@ }, "nodeType": "FeatureMatching", "uids": { - "0": "7bb42f40b3f607da7e9f5f432409ddf6ef9c5951" + "0": "142e98e3637aedcd3ebc1e19a03878690896a35b" }, "parallelization": { "blockSize": 20, @@ -264,7 +264,7 @@ }, "nodeType": "FeatureMatching", "uids": { - "0": "3b1f2c3fcfe0b94c65627c397a2671ba7594827d" + "0": "534c5224ba51c770ae3793cc085ae3aaa8c2c415" }, "parallelization": { "blockSize": 20, @@ -295,7 +295,7 @@ }, "nodeType": "StructureFromMotion", "uids": { - "0": "4bc466c45bc7b430553752d1eb1640c581c43e36" + "0": "eddc0ed596eb15943d6acd74a7d64753344b40dd" }, "parallelization": { "blockSize": 0, diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index b7fa7d7edd..ab82eae419 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -5,7 +5,7 @@ "MeshFiltering": "3.0", "Texturing": "6.0", "StructureFromMotion": "2.0", - "CameraInit": "7.0", + "CameraInit": "8.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "Meshing": "7.0" @@ -22,7 +22,7 @@ }, "nodeType": "Texturing", "uids": { - "0": "1ed1516bf83493071547e69146be3f1218012e25" + "0": "32a36e3e637609b4d5a6971606728b59f3e7e62c" }, "parallelization": { "blockSize": 0, @@ -47,7 +47,7 @@ }, "nodeType": "Meshing", "uids": { - "0": "dc3d06f150a2601334a44174aa8e5523d3055468" + "0": "d2499e39c1dd2e30c366e3e912254fce9cd0ed59" }, "parallelization": { "blockSize": 0, @@ -122,7 +122,7 @@ }, "nodeType": "StructureFromMotion", "uids": { - "0": "89c3db0849ba07dfac5e97ca9e27dd690dc476ce" + "0": "5af4f4052aa22b0450708941b40928d46170f364" }, "parallelization": { "blockSize": 0, @@ -166,7 +166,7 @@ }, "nodeType": "MeshFiltering", "uids": { - "0": "057d1647de39a617f79aad02a721938e5625ff64" + "0": "a5f72b9e67b26be5a4974c21b9d0bc0b3c34bea5" }, "parallelization": { "blockSize": 0, @@ -191,7 +191,7 @@ }, "nodeType": "FeatureMatching", "uids": { - "0": "3b1f2c3fcfe0b94c65627c397a2671ba7594827d" + "0": "534c5224ba51c770ae3793cc085ae3aaa8c2c415" }, "parallelization": { "blockSize": 20, From 625f7ba9e6108223fe22c5663e965cd9ea225db3 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 5 Oct 2022 17:49:20 +0200 Subject: [PATCH 0577/1093] imageProcessing: Replace ACES with ACES2065-1 --- meshroom/aliceVision/ImageProcessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index e276c3658a..dcea6cac61 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -294,7 +294,7 @@ class ImageProcessing(desc.CommandLineNode): label='Output Color Space', description='Allows you to choose the color space of the output image.', value='AUTO', - values=['AUTO', 'sRGB', 'Linear', 'ACES', 'ACEScg'], + values=['AUTO', 'sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], exclusive=True, uid=[0], ), From 2a74388f27cd559896a80485a4a836431b1bdf5b Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 10 Oct 2022 15:54:40 +0200 Subject: [PATCH 0578/1093] Update ImageProcessing node parameters adding the keep filename option and the replacing the color space name ACES with ACES2065-1. --- meshroom/aliceVision/ImageProcessing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index dcea6cac61..0d5655a02a 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -87,6 +87,13 @@ class ImageProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name='keepImageFilename', + label='Keep Image Name', + description='Keep original image name instead of view name', + value=False, + uid=[0], + ), desc.BoolParam( name='fixNonFinite', label='Fix Non-Finite', From 913a5e139a3dbb69a354bb7ef2ba21d576eef96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 16 Sep 2022 17:01:07 +0200 Subject: [PATCH 0579/1093] added outputImageTypes in node desc to update the viewer2D imageType combo box when double clicking a node --- meshroom/aliceVision/DepthMap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index e1d842252c..8bd810e23d 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -299,3 +299,5 @@ class DepthMap(desc.CommandLineNode): uid=[], ), ] + + outputImageTypes = ['depth', 'sim'] From 9c5729ae82983ab6d6824b72563e54748f51ec1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 20 Sep 2022 18:26:20 +0200 Subject: [PATCH 0580/1093] use semantic field in file attributes to specify images and store displayed node in 2D viewer to adapt UI --- meshroom/aliceVision/DepthMap.py | 22 +++++++++++++++++++--- meshroom/aliceVision/DepthMapFilter.py | 18 ++++++++++++++++++ meshroom/aliceVision/ImageProcessing.py | 17 +++++++++++++---- meshroom/aliceVision/Texturing.py | 15 ++++++++++++--- 4 files changed, 62 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 8bd810e23d..53da77f0c0 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -293,11 +293,27 @@ class DepthMap(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output', + label='Output Folder', description='Output folder for generated depth maps.', value=desc.Node.internalFolder, uid=[], ), + desc.File( + name='depth', + label='Depth Maps', + description='Generated depth maps.', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr', + uid=[], + group='', # do not export on the command line + ), + desc.File( + name='sim', + label='Sim Maps', + description='Generated sim maps.', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_simMap.exr', + uid=[], + group='', # do not export on the command line + ), ] - - outputImageTypes = ['depth', 'sim'] diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 5043d074c0..5280c8089e 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -128,4 +128,22 @@ class DepthMapFilter(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), + desc.File( + name='depth', + label='Depth Maps', + description='Filtered depth maps.', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr', + uid=[], + group='', # do not export on the command line + ), + desc.File( + name='sim', + label='Sim Maps', + description='Filtered sim maps.', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_simMap.exr', + uid=[], + group='', # do not export on the command line + ), ] diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index e276c3658a..652ef3b393 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -338,12 +338,21 @@ class ImageProcessing(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), + #desc.File( + # name='outputImages', + # label='Output Images', + # description='Output Image Files.', + # value= outputImagesValueFunct, + # group='', # do not export on the command line + # uid=[], + #), desc.File( name='outputImages', label='Output Images', description='Output Image Files.', - value= outputImagesValueFunct, - group='', # do not export on the command line - uid=[], - ), + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>.exr', + group='', # do not export on the command line + uid=[] + ) ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 34ed45d42d..1f1c9bba1d 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -342,14 +342,23 @@ class Texturing(desc.CommandLineNode): uid=[], group='', ), + #desc.File( + # name='outputTextures', + # label='Textures', + # description='Output Texture files.', + # value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '', + # uid=[], + # group='', + # ), desc.File( name='outputTextures', label='Textures', description='Output Texture files.', - value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '', + semantic='image', + value=desc.Node.internalFolder+'texture_*.exr', uid=[], - group='', - ), + group='' + ) ] def upgradeAttributeValues(self, attrValues, fromVersion): From 32e0f879ac081cfbb4a016d7afe91020142b0f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 21 Sep 2022 13:07:41 +0200 Subject: [PATCH 0581/1093] added some comments --- meshroom/aliceVision/DepthMap.py | 3 +++ meshroom/aliceVision/DepthMapFilter.py | 3 +++ meshroom/aliceVision/ImageProcessing.py | 17 ++++------------- meshroom/aliceVision/Texturing.py | 11 +---------- 4 files changed, 11 insertions(+), 23 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 53da77f0c0..d7ecc25613 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -298,6 +298,9 @@ class DepthMap(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), + # these attributes are only here to describe more accurately the output of the node + # by specifying that it generates 2 sequences of images + # (see in Viewer2D.qml how these attributes can be used) desc.File( name='depth', label='Depth Maps', diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 5280c8089e..c52dd2337f 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -128,6 +128,9 @@ class DepthMapFilter(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), + # these attributes are only here to describe more accurately the output of the node + # by specifying that it generates 2 sequences of images + # (see in Viewer2D.qml how these attributes can be used) desc.File( name='depth', label='Depth Maps', diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 652ef3b393..e276c3658a 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -338,21 +338,12 @@ class ImageProcessing(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), - #desc.File( - # name='outputImages', - # label='Output Images', - # description='Output Image Files.', - # value= outputImagesValueFunct, - # group='', # do not export on the command line - # uid=[], - #), desc.File( name='outputImages', label='Output Images', description='Output Image Files.', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>.exr', - group='', # do not export on the command line - uid=[] - ) + value= outputImagesValueFunct, + group='', # do not export on the command line + uid=[], + ), ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 1f1c9bba1d..83d46d90d1 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -342,20 +342,11 @@ class Texturing(desc.CommandLineNode): uid=[], group='', ), - #desc.File( - # name='outputTextures', - # label='Textures', - # description='Output Texture files.', - # value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '', - # uid=[], - # group='', - # ), desc.File( name='outputTextures', label='Textures', description='Output Texture files.', - semantic='image', - value=desc.Node.internalFolder+'texture_*.exr', + value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '', uid=[], group='' ) From 9b692ce7802988c4f45e8d1d57f89a5616f79ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 21 Sep 2022 14:57:20 +0200 Subject: [PATCH 0582/1093] applied visualization workflow to PrepareDenseScene --- meshroom/aliceVision/PrepareDenseScene.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 31d0ecf17e..5d475e511b 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -100,10 +100,11 @@ class PrepareDenseScene(desc.CommandLineNode): uid=[], ), desc.File( - name='outputUndistorted', + name='undistorted', label='Undistorted Images', description='List of undistorted images.', - value=desc.Node.internalFolder + '*.{outputFileTypeValue}', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>.{outputFileTypeValue}', uid=[], group='', advanced=True From f6a421ae3b2c2a4293fd0630c21ddf67c7ce3cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 28 Sep 2022 17:29:32 +0200 Subject: [PATCH 0583/1093] [nodes] update desc for nodes in panoramaHDR pipeline to visualize their output --- meshroom/aliceVision/ImageProcessing.py | 3 ++- meshroom/aliceVision/PanoramaMerging.py | 1 + meshroom/aliceVision/PanoramaWarping.py | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index e276c3658a..f45361a257 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -12,7 +12,7 @@ def outputImagesValueFunct(attr): if inputExt in ['.abc', '.sfm']: # If we have an SfM in input - return desc.Node.internalFolder + '*' + (outputExt or '.*') + return desc.Node.internalFolder + '<VIEW_ID>' + (outputExt or '.*') if inputExt: # if we have one or multiple files in input @@ -342,6 +342,7 @@ class ImageProcessing(desc.CommandLineNode): name='outputImages', label='Output Images', description='Output Image Files.', + semantic='image', value= outputImagesValueFunct, group='', # do not export on the command line uid=[], diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 99a14ec7a0..bfe458057f 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -71,6 +71,7 @@ class PanoramaMerging(desc.CommandLineNode): name='outputPanorama', label='Output Folder', description='', + semantic='image', value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', uid=[], ), diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 33d3e0a97e..507ad4762a 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -97,4 +97,13 @@ class PanoramaWarping(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), + desc.File( + name='warping', + label='Image Warping', + description='', + group='', # do not export on the command line + semantic='image', + value=desc.Node.internalFolder+'<VIEW_ID>.exr', + uid=[] + ), ] From 7bb19a17f33f3cc09448758bfbcfcdcb44a7d7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 29 Sep 2022 09:22:19 +0200 Subject: [PATCH 0584/1093] [node] PanoramaWarping: add visualization for mask and weight maps --- meshroom/aliceVision/PanoramaWarping.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 507ad4762a..7710527ad0 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -99,11 +99,29 @@ class PanoramaWarping(desc.CommandLineNode): ), desc.File( name='warping', - label='Image Warping', + label='Warping', description='', group='', # do not export on the command line semantic='image', value=desc.Node.internalFolder+'<VIEW_ID>.exr', uid=[] ), + desc.File( + name='mask', + label='Mask', + description='', + group='', # do not export on the command line + semantic='image', + value=desc.Node.internalFolder+'<VIEW_ID>_mask.exr', + uid=[] + ), + desc.File( + name='weight', + label='Weight', + description='', + group='', # do not export on the command line + semantic='image', + value=desc.Node.internalFolder+'<VIEW_ID>_weight.exr', + uid=[] + ), ] From 24ecee62892f623b32eb50e751eec978fda1dea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 30 Sep 2022 14:05:56 +0200 Subject: [PATCH 0585/1093] [node] output labels renaming without 'Output' prefix --- meshroom/aliceVision/CameraLocalization.py | 4 ++-- meshroom/aliceVision/CameraRigCalibration.py | 2 +- meshroom/aliceVision/CameraRigLocalization.py | 2 +- meshroom/aliceVision/ColorCheckerCorrection.py | 4 ++-- meshroom/aliceVision/ConvertMesh.py | 2 +- meshroom/aliceVision/DepthMap.py | 2 +- meshroom/aliceVision/DistortionCalibration.py | 2 +- meshroom/aliceVision/ExportAnimatedCamera.py | 6 +++--- meshroom/aliceVision/ExportColoredPointCloud.py | 2 +- meshroom/aliceVision/ExportMatches.py | 2 +- meshroom/aliceVision/ExportMaya.py | 2 +- meshroom/aliceVision/FeatureRepeatability.py | 2 +- meshroom/aliceVision/GlobalSfM.py | 2 +- meshroom/aliceVision/ImageMatchingMultiSfM.py | 4 ++-- meshroom/aliceVision/ImageProcessing.py | 6 +++--- meshroom/aliceVision/KeyframeSelection.py | 2 +- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- meshroom/aliceVision/LightingEstimation.py | 2 +- meshroom/aliceVision/MergeMeshes.py | 2 +- meshroom/aliceVision/MeshDecimate.py | 2 +- meshroom/aliceVision/MeshMasking.py | 2 +- meshroom/aliceVision/MeshResampling.py | 2 +- meshroom/aliceVision/PanoramaCompositing.py | 2 +- meshroom/aliceVision/PanoramaEstimation.py | 4 ++-- meshroom/aliceVision/PanoramaInit.py | 2 +- meshroom/aliceVision/PanoramaMerging.py | 2 +- meshroom/aliceVision/PanoramaPrepareImages.py | 2 +- meshroom/aliceVision/PanoramaSeams.py | 2 +- meshroom/aliceVision/PanoramaWarping.py | 2 +- meshroom/aliceVision/SfMAlignment.py | 4 ++-- meshroom/aliceVision/SfMTransfer.py | 4 ++-- meshroom/aliceVision/SfMTransform.py | 4 ++-- meshroom/aliceVision/Split360Images.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- 36 files changed, 47 insertions(+), 47 deletions(-) diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index d8aabe9aa8..1f98119d49 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -209,14 +209,14 @@ class CameraLocalization(desc.CommandLineNode): outputs = [ desc.File( name='outputAlembic', - label='Output Alembic', + label='Alembic', description='''Filename for the SfMData export file (where camera poses will be stored)''', value=desc.Node.internalFolder + 'trackedCameras.abc', uid=[], ), desc.File( name='outputJSON', - label='Output JSON', + label='JSON', description='''Filename for the localization results as .json''', value=desc.Node.internalFolder + 'trackedCameras.json', uid=[], diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 117457c35f..3fa103e186 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -165,7 +165,7 @@ class CameraRigCalibration(desc.CommandLineNode): outputs = [ desc.File( name='outfile', - label='Output File', + label='File', description='''The name of the file where to store the calibration data''', value=desc.Node.internalFolder + 'cameraRigCalibration.rigCal', uid=[], diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 6cff2d31c3..ca4875c224 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -172,7 +172,7 @@ class CameraRigLocalization(desc.CommandLineNode): outputs = [ desc.File( name='outputAlembic', - label='Output Alembic', + label='Alembic', description='''Filename for the SfMData export file (where camera poses will be stored).''', value=desc.Node.internalFolder + 'trackedcameras.abc', uid=[], diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 1fb02baa19..0b5e65547c 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -63,7 +63,7 @@ class ColorCheckerCorrection(desc.CommandLineNode): outputs = [ desc.File( name='outSfMData', - label='Output sfmData', + label='SfmData', description='Output sfmData.', value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', uid=[], @@ -71,7 +71,7 @@ class ColorCheckerCorrection(desc.CommandLineNode): ), desc.File( name='output', - label='Output Folder', + label='Folder', description='Output Images Folder.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 55dac2dcd6..9ea7b57015 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -41,7 +41,7 @@ class ConvertMesh(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Mesh', + label='Mesh', description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFileTypeValue}', uid=[], diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index d7ecc25613..6f1508540d 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -293,7 +293,7 @@ class DepthMap(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='Output folder for generated depth maps.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 87fa9606f0..8f00606274 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -45,7 +45,7 @@ class DistortionCalibration(desc.CommandLineNode): outputs = [ desc.File( name='outSfMData', - label='Output SfmData File', + label='SfmData File', description='Path to the output sfmData file', value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 4eb378d866..1fc1ac95c3 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -87,14 +87,14 @@ class ExportAnimatedCamera(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output filepath', + label='Filepath', description='Output filepath for the alembic animated camera.', value=desc.Node.internalFolder, uid=[], ), desc.File( name='outputCamera', - label='Output Camera Filepath', + label='Camera Filepath', description='Output filename for the alembic animated camera.', value=desc.Node.internalFolder + 'camera.abc', group='', # exclude from command line @@ -102,7 +102,7 @@ class ExportAnimatedCamera(desc.CommandLineNode): ), desc.File( name='outputUndistorted', - label='Output Undistorted images Filepath', + label='Undistorted images Filepath', description='Output Undistorted images.', value=desc.Node.internalFolder + 'undistort', group='', # exclude from command line diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index a922a4a965..7ab7855bff 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -30,7 +30,7 @@ class ExportColoredPointCloud(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Point Cloud Filepath', + label='Point Cloud Filepath', description='Output point cloud with visibilities as SfMData file.', value="{cache}/{nodeType}/{uid0}/pointCloud.abc", uid=[], diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index b90c635898..2a1aeebcfe 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -65,7 +65,7 @@ class ExportMatches(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='Output path for the features and descriptors files (*.feat, *.desc).', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index aeea1b8122..99dacf1221 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -27,7 +27,7 @@ class ExportMaya(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='Folder for MeshroomMaya outputs: undistorted images and thumbnails.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index 12cd9012e7..ed22cf34cf 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -125,7 +125,7 @@ class FeatureRepeatability(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='Output path for the features and descriptors files (*.feat, *.desc).', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index a400570a39..8d6ebe0b17 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -119,7 +119,7 @@ class GlobalSfM(desc.CommandLineNode): ), desc.File( name='extraInfoFolder', - label='Output Folder', + label='Folder', description='Folder for intermediate reconstruction files and additional reconstruction information files.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 313534b1d5..c11776e768 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -141,14 +141,14 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output List File', + label='List File', description='Filepath to the output file with the list of selected image pairs.', value=desc.Node.internalFolder + 'imageMatches.txt', uid=[], ), desc.File( name='outputCombinedSfM', - label='Output Combined SfM', + label='Combined SfM', description='Path for the combined SfMData file', value=desc.Node.internalFolder + 'combineSfM.sfm', uid=[], diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index f45361a257..8aaebff6c9 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -325,7 +325,7 @@ class ImageProcessing(desc.CommandLineNode): outputs = [ desc.File( name='outSfMData', - label='Output sfmData', + label='SfmData', description='Output sfmData.', value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', uid=[], @@ -333,14 +333,14 @@ class ImageProcessing(desc.CommandLineNode): ), desc.File( name='output', - label='Output Folder', + label='Folder', description='Output Images Folder.', value=desc.Node.internalFolder, uid=[], ), desc.File( name='outputImages', - label='Output Images', + label='Images', description='Output Image Files.', semantic='image', value= outputImagesValueFunct, diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index e1037cd3cc..63ecb1f6ec 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -182,7 +182,7 @@ class KeyframeSelection(desc.CommandLineNode): outputs = [ desc.File( name='outputFolder', - label='Output Folder', + label='Folder', description='''Output keyframes folder for extracted frames.''', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 5b6ebbbf0d..a50cd8f524 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -139,7 +139,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): outputs = [ desc.File( name='response', - label='Output response File', + label='Response File', description='Path to the output response file', value=desc.Node.internalFolder + 'response.csv', uid=[], diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 391ae9e398..cc1ee60fb2 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -177,7 +177,7 @@ class LdrToHdrMerge(desc.CommandLineNode): outputs = [ desc.File( name='outSfMData', - label='Output SfMData File', + label='SfMData File', description='Path to the output sfmdata file', value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index a32f86c195..3324733bfa 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -146,7 +146,7 @@ class LdrToHdrSampling(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='Output path for the samples.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index c9d44b1a9d..077b3538ad 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -83,7 +83,7 @@ class LightingEstimation(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='Folder for output lighting vector files.', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 1669dde52d..739e5b0447 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -69,7 +69,7 @@ class MergeMeshes(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output mesh', + label='Mesh', description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', value=desc.Node.internalFolder + 'mesh.stl', uid=[], diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 4294e85848..29b51e42de 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -77,7 +77,7 @@ class MeshDecimate(desc.CommandLineNode): outputs = [ desc.File( name="output", - label="Output mesh", + label="Mesh", description="Output mesh (OBJ file format).", value=desc.Node.internalFolder + 'mesh.obj', uid=[], diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 9188072b4f..1888f56314 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -100,7 +100,7 @@ class MeshMasking(desc.CommandLineNode): outputs = [ desc.File( name='outputMesh', - label='Output Mesh', + label='Mesh', description='''Output mesh.''', value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}', uid=[], diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index d9a836cd36..047d572b94 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -82,7 +82,7 @@ class MeshResampling(desc.CommandLineNode): outputs = [ desc.File( name="output", - label="Output mesh", + label="Mesh", description="Output mesh (OBJ file format).", value=desc.Node.internalFolder + 'mesh.obj', uid=[], diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 896759e754..756d76db23 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -106,7 +106,7 @@ class PanoramaCompositing(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description='', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 6e78dd7ce7..476d29b131 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -178,14 +178,14 @@ class PanoramaEstimation(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output SfMData File', + label='SfMData File', description='Path to the output sfmdata file', value=desc.Node.internalFolder + 'panorama.abc', uid=[], ), desc.File( name='outputViewsAndPoses', - label='Output Poses', + label='Poses', description='''Path to the output sfmdata file with cameras (views and poses).''', value=desc.Node.internalFolder + 'cameras.sfm', uid=[], diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 947f092289..edac5cd6cc 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -156,7 +156,7 @@ class PanoramaInit(desc.CommandLineNode): outputs = [ desc.File( name='outSfMData', - label='Output SfMData File', + label='SfMData File', description='Path to the output sfmdata file', value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index bfe458057f..f0fc6fca04 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -69,7 +69,7 @@ class PanoramaMerging(desc.CommandLineNode): outputs = [ desc.File( name='outputPanorama', - label='Output Folder', + label='Panorama', description='', semantic='image', value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index 1add6c4795..89099f1968 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -36,7 +36,7 @@ class PanoramaPrepareImages(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output sfmData', + label='SfmData', description='Output sfmData.', value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value), uid=[], diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index c36beb9252..6817d9849b 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -61,7 +61,7 @@ class PanoramaSeams(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Labels', + label='Labels', description='', value=desc.Node.internalFolder + 'labels.exr', uid=[], diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 7710527ad0..99a38d5c2f 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -92,7 +92,7 @@ class PanoramaWarping(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output directory', + label='Folder', description='', value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 60d6d2e38d..accd9bfbd5 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -110,14 +110,14 @@ class SfMAlignment(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output SfMData File', + label='SfMData File', description='SfMData file.', value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', uid=[], ), desc.File( name='outputViewsAndPoses', - label='Output Poses', + label='Poses', description='''Path to the output sfmdata file with cameras (views and poses).''', value=desc.Node.internalFolder + 'cameras.sfm', uid=[], diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index dd0f8c4a16..edc5acffd9 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -94,14 +94,14 @@ class SfMTransfer(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output SfMData File', + label='SfMData File', description='SfMData file.', value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', uid=[], ), desc.File( name='outputViewsAndPoses', - label='Output Poses', + label='Poses', description='''Path to the output sfmdata file with cameras (views and poses).''', value=desc.Node.internalFolder + 'cameras.sfm', uid=[], diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 0466ec50a8..439ba3af38 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -197,14 +197,14 @@ class SfMTransform(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output SfMData File', + label='SfMData File', description='''Aligned SfMData file .''', value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', uid=[], ), desc.File( name='outputViewsAndPoses', - label='Output Poses', + label='Poses', description='''Path to the output sfmdata file with cameras (views and poses).''', value=desc.Node.internalFolder + 'cameras.sfm', uid=[], diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index daee459826..4ff56bb9a4 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -89,7 +89,7 @@ class Split360Images(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', + label='Folder', description="Output folder for extracted frames.", value=desc.Node.internalFolder, uid=[], diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 4cacd6a106..08a4541cbe 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -367,7 +367,7 @@ class StructureFromMotion(desc.CommandLineNode): ), desc.File( name='extraInfoFolder', - label='Output Folder', + label='Folder', description='Folder for intermediate reconstruction files and additional reconstruction information files.', value=desc.Node.internalFolder, uid=[], From 4665d52070eab3fee60f4dc5cfd8fa7c4e14e3eb Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 18 Oct 2022 16:38:07 +0200 Subject: [PATCH 0586/1093] [nodes] LdrToHdrCalibration: fix trailing space in label --- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index a50cd8f524..a1a384a3a3 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -139,7 +139,7 @@ class LdrToHdrCalibration(desc.CommandLineNode): outputs = [ desc.File( name='response', - label='Response File', + label='Response File', description='Path to the output response file', value=desc.Node.internalFolder + 'response.csv', uid=[], From ea6297af8543362180bafcf208451e39ed597d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 17 Oct 2022 10:14:59 +0200 Subject: [PATCH 0587/1093] [pipelines] Remove UIDs from existing templates --- meshroom/panoramaFisheyeHdr.mg | 48 --------------------- meshroom/panoramaHdr.mg | 48 --------------------- meshroom/photogrammetry.mg | 33 -------------- meshroom/photogrammetryAndCameraTracking.mg | 36 ---------------- meshroom/photogrammetryDraft.mg | 24 ----------- 5 files changed, 189 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 4428fd664f..4008bc190a 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -32,9 +32,6 @@ "response": "{LdrToHdrCalibration_1.response}" }, "nodeType": "LdrToHdrMerge", - "uids": { - "0": "9b90e3b468adc487fe2905e0cc78328216966317" - }, "parallelization": { "blockSize": 2, "split": 0, @@ -57,9 +54,6 @@ "fixNonFinite": true }, "nodeType": "ImageProcessing", - "uids": { - "0": "51d41208c0c929fa50d88c183713958e9a407fd3" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -80,9 +74,6 @@ "input": "{SfMTransform_1.output}" }, "nodeType": "PanoramaWarping", - "uids": { - "0": "2def8d004a44dcb3bbaa35da318d38bbb076b6ee" - }, "parallelization": { "blockSize": 5, "split": 0, @@ -106,9 +97,6 @@ "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" }, "nodeType": "LdrToHdrCalibration", - "uids": { - "0": "9225abd943d28be4387a8a8902711d0b7c604a2a" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -128,9 +116,6 @@ "input": "{PanoramaPrepareImages_1.output}" }, "nodeType": "LdrToHdrSampling", - "uids": { - "0": "af67674ecc8524592fe2b217259c241167e28dcd" - }, "parallelization": { "blockSize": 2, "split": 0, @@ -154,9 +139,6 @@ ] }, "nodeType": "ImageMatching", - "uids": { - "0": "a076f9e959d62b3a6f63d3f6493527b857eab8d6" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -181,9 +163,6 @@ "describerPreset": "high" }, "nodeType": "FeatureExtraction", - "uids": { - "0": "04f8824c2e2f206b47f05edaf76def15fa91446b" - }, "parallelization": { "blockSize": 40, "split": 0, @@ -204,9 +183,6 @@ "input": "{PanoramaCompositing_1.input}" }, "nodeType": "PanoramaMerging", - "uids": { - "0": "6895704a5fcd5fd070562190b3747cb3ca08121c" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -228,9 +204,6 @@ "input": "{PanoramaSeams_1.input}" }, "nodeType": "PanoramaCompositing", - "uids": { - "0": "29f97e3a8c4d4989fae0ab4c1f3831a92dfbae5c" - }, "parallelization": { "blockSize": 5, "split": 0, @@ -259,9 +232,6 @@ ] }, "nodeType": "CameraInit", - "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -281,9 +251,6 @@ "input": "{CameraInit_1.output}" }, "nodeType": "PanoramaPrepareImages", - "uids": { - "0": "6956c52a8d18cb4cdb7ceb0db68f4deb84a37aee" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -304,9 +271,6 @@ "input": "{PanoramaEstimation_1.output}" }, "nodeType": "SfMTransform", - "uids": { - "0": "d9ff08700916f4e9e3ace1048c2c2621c9541272" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -328,9 +292,6 @@ "warpingFolder": "{PanoramaWarping_1.output}" }, "nodeType": "PanoramaSeams", - "uids": { - "0": "52cbb0d53e0ef49cefe9848394023cf3e7f30572" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -355,9 +316,6 @@ "featuresFolders": "{FeatureMatching_1.featuresFolders}" }, "nodeType": "PanoramaEstimation", - "uids": { - "0": "350636ae916682708019397a10592596e8ef7e84" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -382,9 +340,6 @@ "input": "{FeatureExtraction_1.input}" }, "nodeType": "PanoramaInit", - "uids": { - "0": "2fd95a957eb42ffc8fb1c24d2666afcd859ba079" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -407,9 +362,6 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "uids": { - "0": "cb919baf3a96df73f0ef07a23357f3d8a7f380e8" - }, "parallelization": { "blockSize": 20, "split": 0, diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 551fd42f88..a2985e6904 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -32,9 +32,6 @@ "response": "{LdrToHdrCalibration_1.response}" }, "nodeType": "LdrToHdrMerge", - "uids": { - "0": "9b90e3b468adc487fe2905e0cc78328216966317" - }, "parallelization": { "blockSize": 2, "split": 0, @@ -57,9 +54,6 @@ "fixNonFinite": true }, "nodeType": "ImageProcessing", - "uids": { - "0": "db79f52d50b71d5f8a0b398109bb8ff4c4506e75" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -80,9 +74,6 @@ "input": "{SfMTransform_1.output}" }, "nodeType": "PanoramaWarping", - "uids": { - "0": "2b35fc7d314e510119ba9c40e2870fee75c0f145" - }, "parallelization": { "blockSize": 5, "split": 0, @@ -106,9 +97,6 @@ "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" }, "nodeType": "LdrToHdrCalibration", - "uids": { - "0": "9225abd943d28be4387a8a8902711d0b7c604a2a" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -128,9 +116,6 @@ "input": "{PanoramaPrepareImages_1.output}" }, "nodeType": "LdrToHdrSampling", - "uids": { - "0": "af67674ecc8524592fe2b217259c241167e28dcd" - }, "parallelization": { "blockSize": 2, "split": 0, @@ -154,9 +139,6 @@ ] }, "nodeType": "ImageMatching", - "uids": { - "0": "7efc9cd43585003fc6eec0776a704e358f0a15de" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -177,9 +159,6 @@ "input": "{LdrToHdrMerge_1.outSfMData}" }, "nodeType": "FeatureExtraction", - "uids": { - "0": "1863cc0989ab0fd910d4fe293074ff94c4e586a1" - }, "parallelization": { "blockSize": 40, "split": 0, @@ -200,9 +179,6 @@ "input": "{PanoramaCompositing_1.input}" }, "nodeType": "PanoramaMerging", - "uids": { - "0": "ebc83e08ec420c2451e6e667feed11fad346acd7" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -224,9 +200,6 @@ "input": "{PanoramaSeams_1.input}" }, "nodeType": "PanoramaCompositing", - "uids": { - "0": "7c118e7273f8f93818fbf82fe272c6d6553c650f" - }, "parallelization": { "blockSize": 5, "split": 0, @@ -255,9 +228,6 @@ ] }, "nodeType": "CameraInit", - "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -277,9 +247,6 @@ "input": "{CameraInit_1.output}" }, "nodeType": "PanoramaPrepareImages", - "uids": { - "0": "6956c52a8d18cb4cdb7ceb0db68f4deb84a37aee" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -300,9 +267,6 @@ "input": "{PanoramaEstimation_1.output}" }, "nodeType": "SfMTransform", - "uids": { - "0": "634e1a4143def636efac5c0f9cd64e0dcb99c20c" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -324,9 +288,6 @@ "warpingFolder": "{PanoramaWarping_1.output}" }, "nodeType": "PanoramaSeams", - "uids": { - "0": "89eb43d21b7fa9fcd438ed92109f4d736dafcdfb" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -351,9 +312,6 @@ "featuresFolders": "{FeatureMatching_1.featuresFolders}" }, "nodeType": "PanoramaEstimation", - "uids": { - "0": "dc44122c2490f220a4e5f62aeec0745bfa44a8e3" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -377,9 +335,6 @@ "input": "{FeatureExtraction_1.input}" }, "nodeType": "PanoramaInit", - "uids": { - "0": "702d6b973342e9203b50afea1470b4c01eb90174" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -402,9 +357,6 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "uids": { - "0": "f818137ea50d2e41fb541690adeb842db7cecc43" - }, "parallelization": { "blockSize": 20, "split": 0, diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 37987903e6..94cfbf5fd4 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -26,9 +26,6 @@ "inputMesh": "{MeshFiltering_1.outputMesh}" }, "nodeType": "Texturing", - "uids": { - "0": "a7508a27971a36b86401f0476f64287476069faa" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -52,9 +49,6 @@ "input": "{DepthMapFilter_1.input}" }, "nodeType": "Meshing", - "uids": { - "0": "a520c188f5e02d00b841b1a376de78a252c79c24" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -76,9 +70,6 @@ "input": "{DepthMap_1.input}" }, "nodeType": "DepthMapFilter", - "uids": { - "0": "9d7527658e450be51a2fffb3923fd3d24b2b928c" - }, "parallelization": { "blockSize": 10, "split": 0, @@ -101,9 +92,6 @@ ] }, "nodeType": "ImageMatching", - "uids": { - "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -123,9 +111,6 @@ "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", - "uids": { - "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" - }, "parallelization": { "blockSize": 40, "split": 0, @@ -150,9 +135,6 @@ ] }, "nodeType": "StructureFromMotion", - "uids": { - "0": "5af4f4052aa22b0450708941b40928d46170f364" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -174,9 +156,6 @@ "input": "{StructureFromMotion_1.output}" }, "nodeType": "PrepareDenseScene", - "uids": { - "0": "489beb05de9e2d5cdfac149936b8c30c691f4b67" - }, "parallelization": { "blockSize": 40, "split": 0, @@ -195,9 +174,6 @@ "CameraInit_1": { "inputs": {}, "nodeType": "CameraInit", - "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -218,9 +194,6 @@ "input": "{PrepareDenseScene_1.input}" }, "nodeType": "DepthMap", - "uids": { - "0": "279cdf5aa186d06aa81d952999991df43f3299f8" - }, "parallelization": { "blockSize": 3, "split": 0, @@ -240,9 +213,6 @@ "inputMesh": "{Meshing_1.outputMesh}" }, "nodeType": "MeshFiltering", - "uids": { - "0": "590f12b2789757dcbe3bfd3e5b50e28d73a4e060" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -265,9 +235,6 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "uids": { - "0": "534c5224ba51c770ae3793cc085ae3aaa8c2c415" - }, "parallelization": { "blockSize": 20, "split": 0, diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index a146e8122c..3775b6531a 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -21,9 +21,6 @@ "input": "{CameraInit_2.output}" }, "nodeType": "DistortionCalibration", - "uids": { - "0": "8afea9d171904cdb6ba1c0b116cb60de3ccb6fb4" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -46,9 +43,6 @@ ] }, "nodeType": "ImageMatching", - "uids": { - "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -68,9 +62,6 @@ "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", - "uids": { - "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" - }, "parallelization": { "blockSize": 40, "split": 0, @@ -95,9 +86,6 @@ ] }, "nodeType": "StructureFromMotion", - "uids": { - "0": "5af4f4052aa22b0450708941b40928d46170f364" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -120,9 +108,6 @@ "input": "{StructureFromMotion_2.output}" }, "nodeType": "ExportAnimatedCamera", - "uids": { - "0": "c28dfbc702edbecf8bf6721224cf6b10799a6a5d" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -142,9 +127,6 @@ "CameraInit_1": { "inputs": {}, "nodeType": "CameraInit", - "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -170,9 +152,6 @@ ] }, "nodeType": "ImageMatchingMultiSfM", - "uids": { - "0": "a789cef752e327c0f2ee58012ca4792e9ab6a70e" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -191,9 +170,6 @@ "CameraInit_2": { "inputs": {}, "nodeType": "CameraInit", - "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -213,9 +189,6 @@ "input": "{CameraInit_2.output}" }, "nodeType": "FeatureExtraction", - "uids": { - "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" - }, "parallelization": { "blockSize": 40, "split": 0, @@ -238,9 +211,6 @@ "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "uids": { - "0": "142e98e3637aedcd3ebc1e19a03878690896a35b" - }, "parallelization": { "blockSize": 20, "split": 0, @@ -263,9 +233,6 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "uids": { - "0": "534c5224ba51c770ae3793cc085ae3aaa8c2c415" - }, "parallelization": { "blockSize": 20, "split": 0, @@ -294,9 +261,6 @@ "minAngleForTriangulation": 1.0 }, "nodeType": "StructureFromMotion", - "uids": { - "0": "eddc0ed596eb15943d6acd74a7d64753344b40dd" - }, "parallelization": { "blockSize": 0, "split": 1, diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index ab82eae419..09759c73e9 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -21,9 +21,6 @@ "inputMesh": "{MeshFiltering_1.outputMesh}" }, "nodeType": "Texturing", - "uids": { - "0": "32a36e3e637609b4d5a6971606728b59f3e7e62c" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -46,9 +43,6 @@ "input": "{StructureFromMotion_1.output}" }, "nodeType": "Meshing", - "uids": { - "0": "d2499e39c1dd2e30c366e3e912254fce9cd0ed59" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -72,9 +66,6 @@ ] }, "nodeType": "ImageMatching", - "uids": { - "0": "46fb9072ac753d60bec7dda9c8674b0568506ddf" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -94,9 +85,6 @@ "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", - "uids": { - "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" - }, "parallelization": { "blockSize": 40, "split": 0, @@ -121,9 +109,6 @@ ] }, "nodeType": "StructureFromMotion", - "uids": { - "0": "5af4f4052aa22b0450708941b40928d46170f364" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -143,9 +128,6 @@ "CameraInit_1": { "inputs": {}, "nodeType": "CameraInit", - "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -165,9 +147,6 @@ "inputMesh": "{Meshing_1.outputMesh}" }, "nodeType": "MeshFiltering", - "uids": { - "0": "a5f72b9e67b26be5a4974c21b9d0bc0b3c34bea5" - }, "parallelization": { "blockSize": 0, "split": 1, @@ -190,9 +169,6 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "uids": { - "0": "534c5224ba51c770ae3793cc085ae3aaa8c2c415" - }, "parallelization": { "blockSize": 20, "split": 0, From 423f836a1c489f5e195bdef7ff6d1989eadf14a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 21 Oct 2022 10:04:37 +0200 Subject: [PATCH 0588/1093] [pipelines] Update Photogrammetry template with latest description of PrepareDenseScene --- meshroom/photogrammetry.mg | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 94cfbf5fd4..e3bc25fee5 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -76,7 +76,9 @@ "size": 0 }, "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" + "output": "{cache}/{nodeType}/{uid0}/", + "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", + "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr" }, "position": [ 1400, @@ -163,7 +165,7 @@ }, "outputs": { "output": "{cache}/{nodeType}/{uid0}/", - "outputUndistorted": "{cache}/{nodeType}/{uid0}/*.{outputFileTypeValue}" + "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" }, "position": [ 1000, @@ -200,7 +202,9 @@ "size": 0 }, "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" + "output": "{cache}/{nodeType}/{uid0}/", + "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", + "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr" }, "position": [ 1200, From ee304afd2eec7ae898b4005d43eca03a69517a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 21 Oct 2022 17:08:36 +0200 Subject: [PATCH 0589/1093] [pipelines] Remove obsolete keys from all templates Outputs, internal folder and parallelization parameters are not used anymore in templates. The existing templates are updated accordingly. --- meshroom/cameraTracking.mg | 102 +--------- meshroom/panoramaFisheyeHdr.mg | 199 +++----------------- meshroom/panoramaHdr.mg | 199 +++----------------- meshroom/photogrammetry.mg | 132 ++----------- meshroom/photogrammetryAndCameraTracking.mg | 139 ++------------ meshroom/photogrammetryDraft.mg | 94 +-------- 6 files changed, 90 insertions(+), 775 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index b5bdbf21ee..40b5e9d948 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -20,22 +20,10 @@ "input": "{CameraInit_1.output}" }, "nodeType": "DistortionCalibration", - "uids": { - "0": "8afea9d171904cdb6ba1c0b116cb60de3ccb6fb4" - }, - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" - }, "position": [ 200, 160 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageMatching_1": { "inputs": { @@ -47,44 +35,20 @@ ] }, "nodeType": "ImageMatching", - "uids": { - "0": "832b744de5fa804d7d63ea255419b1afaf24f723" - }, - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - }, "position": [ 400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureExtraction_1": { "inputs": { "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", - "uids": { - "0": "a07fb8d05b63327d05461954c2fd2a00f201275b" - }, - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "StructureFromMotion_1": { "inputs": { @@ -100,68 +64,28 @@ "minAngleForTriangulation": 1.0 }, "nodeType": "StructureFromMotion", - "uids": { - "0": "28715b8d4a51e5a90fbfee17d9eb193262116845" - }, - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/sfm.abc", - "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ExportAnimatedCamera_1": { "inputs": { "input": "{StructureFromMotion_1.output}" }, "nodeType": "ExportAnimatedCamera", - "uids": { - "0": "65b4d273f9b9c6a177a8f586b1f9a085f3430133" - }, - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputUndistorted": "{cache}/{nodeType}/{uid0}/undistort", - "outputCamera": "{cache}/{nodeType}/{uid0}/camera.abc" - }, "position": [ 1000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "CameraInit_1": { "inputs": {}, "nodeType": "CameraInit", - "uids": { - "0": "f9436e97e444fa71a05aa5cf7639b206df8ba282" - }, - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 0, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureMatching_1": { "inputs": { @@ -171,22 +95,10 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "uids": { - "0": "d6266b2126948174744b0ff6c33d96440e7596de" - }, - "parallelization": { - "blockSize": 20, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] } } } \ No newline at end of file diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 4008bc190a..e05afcc1b0 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -32,19 +32,10 @@ "response": "{LdrToHdrCalibration_1.response}" }, "nodeType": "LdrToHdrMerge", - "parallelization": { - "blockSize": 2, - "split": 0, - "size": 0 - }, - "outputs": { - "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" - }, "position": [ 800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageProcessing_1": { "inputs": { @@ -54,39 +45,20 @@ "fixNonFinite": true }, "nodeType": "ImageProcessing", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr" - }, "position": [ 3000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaWarping_1": { "inputs": { "input": "{SfMTransform_1.output}" }, "nodeType": "PanoramaWarping", - "parallelization": { - "blockSize": 5, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 2200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "LdrToHdrCalibration_1": { "inputs": { @@ -97,38 +69,20 @@ "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" }, "nodeType": "LdrToHdrCalibration", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "response": "{cache}/{nodeType}/{uid0}/response.csv" - }, "position": [ 600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "LdrToHdrSampling_1": { "inputs": { "input": "{PanoramaPrepareImages_1.output}" }, "nodeType": "LdrToHdrSampling", - "parallelization": { - "blockSize": 2, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageMatching_1": { "inputs": { @@ -139,19 +93,10 @@ ] }, "nodeType": "ImageMatching", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - }, "position": [ 1400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureExtraction_1": { "inputs": { @@ -163,39 +108,21 @@ "describerPreset": "high" }, "nodeType": "FeatureExtraction", - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 1000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, - "PanoramaMerging_1": { + "PanoramaSeams_1": { "inputs": { - "compositingFolder": "{PanoramaCompositing_1.output}", - "input": "{PanoramaCompositing_1.input}" - }, - "nodeType": "PanoramaMerging", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}" }, + "nodeType": "PanoramaSeams", "position": [ - 2800, + 2400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaCompositing_1": { "inputs": { @@ -204,19 +131,10 @@ "input": "{PanoramaSeams_1.input}" }, "nodeType": "PanoramaCompositing", - "parallelization": { - "blockSize": 5, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 2600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "CameraInit_1": { "inputs": { @@ -232,38 +150,20 @@ ] }, "nodeType": "CameraInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 0, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaPrepareImages_1": { "inputs": { "input": "{CameraInit_1.output}" }, "nodeType": "PanoramaPrepareImages", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "SfMTransform_1": { "inputs": { @@ -271,40 +171,21 @@ "input": "{PanoramaEstimation_1.output}" }, "nodeType": "SfMTransform", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/panorama.abc", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 2000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, - "PanoramaSeams_1": { + "PanoramaMerging_1": { "inputs": { - "input": "{PanoramaWarping_1.input}", - "warpingFolder": "{PanoramaWarping_1.output}" - }, - "nodeType": "PanoramaSeams", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/labels.exr" + "compositingFolder": "{PanoramaCompositing_1.output}", + "input": "{PanoramaCompositing_1.input}" }, + "nodeType": "PanoramaMerging", "position": [ - 2400, + 2800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaEstimation_1": { "inputs": { @@ -316,20 +197,10 @@ "featuresFolders": "{FeatureMatching_1.featuresFolders}" }, "nodeType": "PanoramaEstimation", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/panorama.abc", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 1800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaInit_1": { "inputs": { @@ -340,19 +211,10 @@ "input": "{FeatureExtraction_1.input}" }, "nodeType": "PanoramaInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" - }, "position": [ 1200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureMatching_1": { "inputs": { @@ -362,19 +224,10 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "parallelization": { - "blockSize": 20, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 1600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] } } } \ No newline at end of file diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index a2985e6904..316b3b8d03 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -32,19 +32,10 @@ "response": "{LdrToHdrCalibration_1.response}" }, "nodeType": "LdrToHdrMerge", - "parallelization": { - "blockSize": 2, - "split": 0, - "size": 0 - }, - "outputs": { - "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" - }, "position": [ 800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageProcessing_1": { "inputs": { @@ -54,39 +45,20 @@ "fixNonFinite": true }, "nodeType": "ImageProcessing", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputImages": "{cache}/{nodeType}/{uid0}/panorama.exr" - }, "position": [ 3000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaWarping_1": { "inputs": { "input": "{SfMTransform_1.output}" }, "nodeType": "PanoramaWarping", - "parallelization": { - "blockSize": 5, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 2200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "LdrToHdrCalibration_1": { "inputs": { @@ -97,38 +69,20 @@ "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" }, "nodeType": "LdrToHdrCalibration", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "response": "{cache}/{nodeType}/{uid0}/response.csv" - }, "position": [ 600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "LdrToHdrSampling_1": { "inputs": { "input": "{PanoramaPrepareImages_1.output}" }, "nodeType": "LdrToHdrSampling", - "parallelization": { - "blockSize": 2, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageMatching_1": { "inputs": { @@ -139,19 +93,10 @@ ] }, "nodeType": "ImageMatching", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - }, "position": [ 1400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureExtraction_1": { "inputs": { @@ -159,39 +104,21 @@ "input": "{LdrToHdrMerge_1.outSfMData}" }, "nodeType": "FeatureExtraction", - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 1000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, - "PanoramaMerging_1": { + "PanoramaSeams_1": { "inputs": { - "compositingFolder": "{PanoramaCompositing_1.output}", - "input": "{PanoramaCompositing_1.input}" - }, - "nodeType": "PanoramaMerging", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "outputPanorama": "{cache}/{nodeType}/{uid0}/panorama.{outputFileTypeValue}" + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}" }, + "nodeType": "PanoramaSeams", "position": [ - 2800, + 2400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaCompositing_1": { "inputs": { @@ -200,19 +127,10 @@ "input": "{PanoramaSeams_1.input}" }, "nodeType": "PanoramaCompositing", - "parallelization": { - "blockSize": 5, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 2600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "CameraInit_1": { "inputs": { @@ -228,38 +146,20 @@ ] }, "nodeType": "CameraInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 0, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaPrepareImages_1": { "inputs": { "input": "{CameraInit_1.output}" }, "nodeType": "PanoramaPrepareImages", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "SfMTransform_1": { "inputs": { @@ -267,40 +167,21 @@ "input": "{PanoramaEstimation_1.output}" }, "nodeType": "SfMTransform", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/panorama.abc", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 2000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, - "PanoramaSeams_1": { + "PanoramaMerging_1": { "inputs": { - "input": "{PanoramaWarping_1.input}", - "warpingFolder": "{PanoramaWarping_1.output}" - }, - "nodeType": "PanoramaSeams", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/labels.exr" + "compositingFolder": "{PanoramaCompositing_1.output}", + "input": "{PanoramaCompositing_1.input}" }, + "nodeType": "PanoramaMerging", "position": [ - 2400, + 2800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaEstimation_1": { "inputs": { @@ -312,20 +193,10 @@ "featuresFolders": "{FeatureMatching_1.featuresFolders}" }, "nodeType": "PanoramaEstimation", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/panorama.abc", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 1800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PanoramaInit_1": { "inputs": { @@ -335,19 +206,10 @@ "input": "{FeatureExtraction_1.input}" }, "nodeType": "PanoramaInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" - }, "position": [ 1200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureMatching_1": { "inputs": { @@ -357,19 +219,10 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "parallelization": { - "blockSize": 20, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 1600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] } } } \ No newline at end of file diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index e3bc25fee5..72c54b56e5 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -26,22 +26,10 @@ "inputMesh": "{MeshFiltering_1.outputMesh}" }, "nodeType": "Texturing", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr", - "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", - "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 2000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "Meshing_1": { "inputs": { @@ -49,20 +37,10 @@ "input": "{DepthMapFilter_1.input}" }, "nodeType": "Meshing", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/densePointCloud.abc", - "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" - }, "position": [ 1600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "DepthMapFilter_1": { "inputs": { @@ -70,21 +48,10 @@ "input": "{DepthMap_1.input}" }, "nodeType": "DepthMapFilter", - "parallelization": { - "blockSize": 10, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", - "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr" - }, "position": [ 1400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageMatching_1": { "inputs": { @@ -94,38 +61,20 @@ ] }, "nodeType": "ImageMatching", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - }, "position": [ 400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureExtraction_1": { "inputs": { "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "StructureFromMotion_1": { "inputs": { @@ -137,58 +86,28 @@ ] }, "nodeType": "StructureFromMotion", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/sfm.abc", - "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "PrepareDenseScene_1": { "inputs": { "input": "{StructureFromMotion_1.output}" }, "nodeType": "PrepareDenseScene", - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" - }, "position": [ 1000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "CameraInit_1": { "inputs": {}, "nodeType": "CameraInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 0, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "DepthMap_1": { "inputs": { @@ -196,40 +115,20 @@ "input": "{PrepareDenseScene_1.input}" }, "nodeType": "DepthMap", - "parallelization": { - "blockSize": 3, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", - "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr" - }, "position": [ 1200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "MeshFiltering_1": { "inputs": { "inputMesh": "{Meshing_1.outputMesh}" }, "nodeType": "MeshFiltering", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" - }, "position": [ 1800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureMatching_1": { "inputs": { @@ -239,19 +138,10 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "parallelization": { - "blockSize": 20, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] } } } \ No newline at end of file diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 3775b6531a..62d004126c 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -21,19 +21,10 @@ "input": "{CameraInit_2.output}" }, "nodeType": "DistortionCalibration", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "outSfMData": "{cache}/{nodeType}/{uid0}/sfmData.sfm" - }, "position": [ 1024, 393 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageMatching_1": { "inputs": { @@ -43,38 +34,20 @@ ] }, "nodeType": "ImageMatching", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - }, "position": [ 400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureExtraction_1": { "inputs": { "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "StructureFromMotion_1": { "inputs": { @@ -86,21 +59,10 @@ ] }, "nodeType": "StructureFromMotion", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/sfm.abc", - "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ExportAnimatedCamera_1": { "inputs": { @@ -108,38 +70,18 @@ "input": "{StructureFromMotion_2.output}" }, "nodeType": "ExportAnimatedCamera", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputUndistorted": "{cache}/{nodeType}/{uid0}/undistort", - "outputCamera": "{cache}/{nodeType}/{uid0}/camera.abc" - }, "position": [ 1629, 212 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "CameraInit_1": { "inputs": {}, "nodeType": "CameraInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 0, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageMatchingMultiSfM_1": { "inputs": { @@ -152,56 +94,28 @@ ] }, "nodeType": "ImageMatchingMultiSfM", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt", - "outputCombinedSfM": "{cache}/{nodeType}/{uid0}/combineSfM.sfm" - }, "position": [ 1029, 212 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "CameraInit_2": { "inputs": {}, "nodeType": "CameraInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ -2, 223 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureExtraction_2": { "inputs": { "input": "{CameraInit_2.output}" }, "nodeType": "FeatureExtraction", - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 198, 223 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureMatching_2": { "inputs": { @@ -211,19 +125,10 @@ "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "parallelization": { - "blockSize": 20, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 1229, 212 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureMatching_1": { "inputs": { @@ -233,19 +138,10 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "parallelization": { - "blockSize": 20, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "StructureFromMotion_2": { "inputs": { @@ -261,21 +157,10 @@ "minAngleForTriangulation": 1.0 }, "nodeType": "StructureFromMotion", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/sfm.abc", - "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 1429, 212 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] } } } \ No newline at end of file diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 09759c73e9..f8f5d7d67c 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -21,42 +21,20 @@ "inputMesh": "{MeshFiltering_1.outputMesh}" }, "nodeType": "Texturing", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr", - "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", - "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 1400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "Meshing_1": { "inputs": { "input": "{StructureFromMotion_1.output}" }, "nodeType": "Meshing", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/densePointCloud.abc", - "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" - }, "position": [ 1000, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "ImageMatching_1": { "inputs": { @@ -66,38 +44,20 @@ ] }, "nodeType": "ImageMatching", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - }, "position": [ 400, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureExtraction_1": { "inputs": { "input": "{CameraInit_1.output}" }, "nodeType": "FeatureExtraction", - "parallelization": { - "blockSize": 40, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "StructureFromMotion_1": { "inputs": { @@ -109,57 +69,28 @@ ] }, "nodeType": "StructureFromMotion", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/sfm.abc", - "extraInfoFolder": "{cache}/{nodeType}/{uid0}/", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - }, "position": [ 800, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "CameraInit_1": { "inputs": {}, "nodeType": "CameraInit", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - }, "position": [ 0, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "MeshFiltering_1": { "inputs": { "inputMesh": "{Meshing_1.outputMesh}" }, "nodeType": "MeshFiltering", - "parallelization": { - "blockSize": 0, - "split": 1, - "size": 1 - }, - "outputs": { - "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" - }, "position": [ 1200, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] }, "FeatureMatching_1": { "inputs": { @@ -169,19 +100,10 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}" }, "nodeType": "FeatureMatching", - "parallelization": { - "blockSize": 20, - "split": 0, - "size": 0 - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - }, "position": [ 600, 0 - ], - "internalFolder": "{cache}/{nodeType}/{uid0}/" + ] } } } \ No newline at end of file From 40d7a54a60977bb1329dccda1a3968cf1ee5f0b7 Mon Sep 17 00:00:00 2001 From: Stella TAN <tans@frapcvfx2008.mikros.int> Date: Wed, 10 Aug 2022 11:46:24 +0200 Subject: [PATCH 0590/1093] Add new parameters in ImageProcessing node --- meshroom/aliceVision/ImageProcessing.py | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 5ba2385587..3cab35892c 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -287,6 +287,51 @@ class ImageProcessing(desc.CommandLineNode): enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), ]), + desc.GroupAttribute(name="nlmFilter", label="NL Means Denoising", description="NL Means Denoising Parameters.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='denoiseEnabled', + label='Enable', + description='Use Non-local Mean Denoising from OpenCV to denoise images', + value=False, + uid=[0], + ), + desc.FloatParam( + name='filteringParamH', + label='H', + description='Parameter regulating filter strength. Bigger H value perfectly removes noise but also removes image details, smaller H value preserves details but also preserves some noise.', + value=5, + range=(1, 1000, 0.01), + uid=[0], + enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + ), + desc.FloatParam( + name='filteringParamHForColorComponents', + label='HColor', + description='Parameter regulating filter strength for color images only. Normally same as Filtering Parameter H. Not necessary for grayscale images', + value=5, + range=(0, 1000, 0.01), + uid=[0], + enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + ), + desc.IntParam( + name='templateWindowSize', + label='Template Window Size', + description='Size in pixels of the template patch that is used to compute weights. Should be odd.', + value=7, + range=(1, 101, 2), + uid=[0], + enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + ), + desc.IntParam( + name='searchWindowSize', + label='Search Window Size', + description='Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.', + value=21, + range=(1, 1001, 2), + uid=[0], + enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + ), + ]), desc.ChoiceParam( name='outputFormat', label='Output Image Format', From e54ff41360bfb108c4f78a926bd9c5b9ffecd238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 1 Dec 2022 15:08:34 +0100 Subject: [PATCH 0591/1093] [nodes] ImageProcessing: fix type of default and range values for FloatParams --- meshroom/aliceVision/ImageProcessing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 3cab35892c..bbfadfb1b1 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -299,8 +299,8 @@ class ImageProcessing(desc.CommandLineNode): name='filteringParamH', label='H', description='Parameter regulating filter strength. Bigger H value perfectly removes noise but also removes image details, smaller H value preserves details but also preserves some noise.', - value=5, - range=(1, 1000, 0.01), + value=5.0, + range=(1.0, 1000.0, 0.01), uid=[0], enabled=lambda node: node.nlmFilter.denoiseEnabled.value, ), @@ -308,8 +308,8 @@ class ImageProcessing(desc.CommandLineNode): name='filteringParamHForColorComponents', label='HColor', description='Parameter regulating filter strength for color images only. Normally same as Filtering Parameter H. Not necessary for grayscale images', - value=5, - range=(0, 1000, 0.01), + value=5.0, + range=(0.0, 1000.0, 0.01), uid=[0], enabled=lambda node: node.nlmFilter.denoiseEnabled.value, ), From f2e4755072f5949bd55e50736331b4ea7a342985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Dec 2022 15:58:04 +0100 Subject: [PATCH 0592/1093] [nodes] ImageProcessing: update NL Means parameters' description and default value Change HColor default value from 5 to 10 as advised in the documentation of OpenCV's non-local means denoising. Also update the description of the H and HColor parameters so that they are easier to understand. The name of the parameters is also updated to match with parameters from other groups. --- meshroom/aliceVision/ImageProcessing.py | 30 ++++++++++++++----------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index bbfadfb1b1..cc73c9e022 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -287,49 +287,53 @@ class ImageProcessing(desc.CommandLineNode): enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), ]), - desc.GroupAttribute(name="nlmFilter", label="NL Means Denoising", description="NL Means Denoising Parameters.", joinChar=":", groupDesc=[ + desc.GroupAttribute(name="nlmFilter", label="NL Means Denoising (8 bits)", + description="NL Means Denoising Parameters.\n This implementation only works on 8-bit images, so the colors can be reduced and clamped.", + joinChar=":", groupDesc=[ desc.BoolParam( - name='denoiseEnabled', + name='nlmFilterEnabled', label='Enable', description='Use Non-local Mean Denoising from OpenCV to denoise images', value=False, uid=[0], ), desc.FloatParam( - name='filteringParamH', + name='nlmFilterH', label='H', - description='Parameter regulating filter strength. Bigger H value perfectly removes noise but also removes image details, smaller H value preserves details but also preserves some noise.', + description='Parameter regulating filter strength for luminance component.\n' + 'Bigger H value perfectly removes noise but also removes image details, smaller H value preserves details but also preserves some noise.', value=5.0, range=(1.0, 1000.0, 0.01), uid=[0], - enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.FloatParam( - name='filteringParamHForColorComponents', + name='nlmFilterHColor', label='HColor', - description='Parameter regulating filter strength for color images only. Normally same as Filtering Parameter H. Not necessary for grayscale images', - value=5.0, + description='Parameter regulating filter strength for color components. Not necessary for grayscale images.\n' + 'Bigger HColor value perfectly removes noise but also removes image details, smaller HColor value preserves details but also preserves some noise.', + value=10.0, range=(0.0, 1000.0, 0.01), uid=[0], - enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.IntParam( - name='templateWindowSize', + name='nlmFilterTemplateWindowSize', label='Template Window Size', description='Size in pixels of the template patch that is used to compute weights. Should be odd.', value=7, range=(1, 101, 2), uid=[0], - enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.IntParam( - name='searchWindowSize', + name='nlmFilterSearchWindowSize', label='Search Window Size', description='Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.', value=21, range=(1, 1001, 2), uid=[0], - enabled=lambda node: node.nlmFilter.denoiseEnabled.value, + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), ]), desc.ChoiceParam( From 0c9f59e2d94e10b46adf6f353fd5f92ed01b3f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Dec 2022 12:40:04 +0100 Subject: [PATCH 0593/1093] Remove all references to pyCompatibility - "pyCompatibility.basestring" are replaced by standard Python3 "str" - "Sequence" and "Iterable" from "collections" are now directly imported with "collections.abc" --- meshroom/aliceVision/Texturing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 83d46d90d1..d7eb6f7cf1 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,6 +1,6 @@ __version__ = "6.0" -from meshroom.core import desc, Version, pyCompatibility +from meshroom.core import desc, Version import logging @@ -355,7 +355,7 @@ class Texturing(desc.CommandLineNode): def upgradeAttributeValues(self, attrValues, fromVersion): if fromVersion < Version(6, 0): outputTextureFileType = attrValues['outputTextureFileType'] - if isinstance(outputTextureFileType, pyCompatibility.basestring): + if isinstance(outputTextureFileType, str): attrValues['colorMapping'] = {} attrValues['colorMapping']['colorMappingFileType'] = outputTextureFileType return attrValues From 20f5fb8185201de629e5902880f8256a5eb10ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Dec 2022 16:34:01 +0100 Subject: [PATCH 0594/1093] Remove workarounds and backports for Python 2 support In particular: - In common/, remove the backport of weakref.WeakMethod - In docs/ and ui/, use the standard FileNotFoundError class - Use built-in open() instead of io.open(), and stop importing io - In core/stats.py, use the standard implementation of xml.etree instead of the C one --- meshroom/aliceVision/CameraInit.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 9bc0e4e284..406123ea0a 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -94,9 +94,8 @@ def readSfMData(sfmFile): Returns: The views and intrinsics of the .sfm as two separate lists """ - import io # use io.open for Python2/3 compatibility (allow to specify encoding + errors handling) # skip decoding errors to avoid potential exceptions due to non utf-8 characters in images metadata - with io.open(sfmFile, 'r', encoding='utf-8', errors='ignore') as f: + with open(sfmFile, 'r', encoding='utf-8', errors='ignore') as f: data = json.load(f) intrinsicsKeys = [i.name for i in Intrinsic] From 3f8cb6f56c8e0d90070d3e44d02806a1ddf33311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Dec 2022 16:52:54 +0100 Subject: [PATCH 0595/1093] [nodes] Use raw strings for parameters that contain regular expressions Regular expressions in regular strings generate deprecation warnings with Python 3 ("invalid escape sequence \x"). To fix these warnings, the regex must be contained within a raw string. For nodes that have parameters whose description and/or value contain regex, the strings are transformed into raw strings. In the case of descriptions, which are generally written across several lines, regular strings are concatenated with regular strings to preserve line returns (with "\n", which becomes uneffective in raw strings). --- meshroom/aliceVision/CameraInit.py | 6 +++--- meshroom/aliceVision/SfMAlignment.py | 8 ++++---- meshroom/aliceVision/SfMTransfer.py | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 406123ea0a..feb529cd29 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -222,9 +222,9 @@ class CameraInit(desc.CommandLineNode, desc.InitNode): description='Regex used to catch number used as viewId in filename.' 'You should capture specific parts of the filename with parenthesis to define matching elements. (only number will works)\n' 'Some examples of patterns:\n' - ' - Match the longest number at the end of filename (default value): ".*?(\d+)"\n' - ' - Match the first number found in filename : "(\d+).*"\n', - value='.*?(\d+)', + r' - Match the longest number at the end of filename (default value): ".*?(\d+)"' + '\n' + + r' - Match the first number found in filename : "(\d+).*"', + value=r'.*?(\d+)', uid=[], advanced=True, enabled=lambda node: node.viewIdMethod.value == 'filename', diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index accd9bfbd5..a001f7cd19 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -57,10 +57,10 @@ class SfMAlignment(desc.CommandLineNode): description='Matching regular expression for the "from_cameras_filepath" method. ' 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' 'Some examples of patterns:\n' - ' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"\n' - ' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"\n' - ' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"\n', - value='.*\/(.*?)\.\w{3}', + r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' + + r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' + + r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"', + value=r'.*\/(.*?)\.\w{3}', uid=[0], ), desc.ListAttribute( diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index edc5acffd9..22f1313a5d 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -48,10 +48,10 @@ class SfMTransfer(desc.CommandLineNode): description='Matching regular expression for the "from_cameras_filepath" method. ' 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' 'Some examples of patterns:\n' - ' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"\n' - ' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"\n' - ' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"\n', - value='.*\/(.*?)\.\w{3}', + r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' + + r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' + + r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"', + value=r'.*\/(.*?)\.\w{3}', uid=[0], ), desc.ListAttribute( From a913f8db6f44e655d455ccc56db0837bcede96af Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@technicolor.com> Date: Tue, 6 Dec 2022 15:02:05 +0100 Subject: [PATCH 0596/1093] [nodes] replace CommandLineNode with AVCommandLineNode for alicevision nodes --- meshroom/aliceVision/CameraCalibration.py | 2 +- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/CameraLocalization.py | 2 +- meshroom/aliceVision/CameraRigCalibration.py | 2 +- meshroom/aliceVision/CameraRigLocalization.py | 2 +- meshroom/aliceVision/ColorCheckerCorrection.py | 2 +- meshroom/aliceVision/ColorCheckerDetection.py | 2 +- meshroom/aliceVision/ConvertMesh.py | 2 +- meshroom/aliceVision/ConvertSfMFormat.py | 2 +- meshroom/aliceVision/DepthMap.py | 2 +- meshroom/aliceVision/DepthMapFilter.py | 2 +- meshroom/aliceVision/DistortionCalibration.py | 2 +- meshroom/aliceVision/ExportAnimatedCamera.py | 2 +- meshroom/aliceVision/ExportColoredPointCloud.py | 2 +- meshroom/aliceVision/ExportMatches.py | 2 +- meshroom/aliceVision/ExportMaya.py | 2 +- meshroom/aliceVision/FeatureExtraction.py | 2 +- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/FeatureRepeatability.py | 2 +- meshroom/aliceVision/GlobalSfM.py | 2 +- meshroom/aliceVision/ImageMasking.py | 2 +- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/ImageMatchingMultiSfM.py | 2 +- meshroom/aliceVision/ImageProcessing.py | 2 +- meshroom/aliceVision/ImportKnownPoses.py | 2 +- meshroom/aliceVision/KeyframeSelection.py | 2 +- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- meshroom/aliceVision/LightingEstimation.py | 2 +- meshroom/aliceVision/MergeMeshes.py | 2 +- meshroom/aliceVision/MeshDecimate.py | 2 +- meshroom/aliceVision/MeshDenoising.py | 2 +- meshroom/aliceVision/MeshFiltering.py | 2 +- meshroom/aliceVision/MeshMasking.py | 2 +- meshroom/aliceVision/MeshResampling.py | 2 +- meshroom/aliceVision/Meshing.py | 2 +- meshroom/aliceVision/PanoramaCompositing.py | 2 +- meshroom/aliceVision/PanoramaEstimation.py | 2 +- meshroom/aliceVision/PanoramaInit.py | 2 +- meshroom/aliceVision/PanoramaMerging.py | 2 +- meshroom/aliceVision/PanoramaPrepareImages.py | 2 +- meshroom/aliceVision/PanoramaSeams.py | 2 +- meshroom/aliceVision/PanoramaWarping.py | 2 +- meshroom/aliceVision/PrepareDenseScene.py | 2 +- meshroom/aliceVision/SfMAlignment.py | 2 +- meshroom/aliceVision/SfMDistances.py | 2 +- meshroom/aliceVision/SfMTransfer.py | 2 +- meshroom/aliceVision/SfMTransform.py | 2 +- meshroom/aliceVision/Split360Images.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- meshroom/aliceVision/Texturing.py | 2 +- 52 files changed, 52 insertions(+), 52 deletions(-) diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 888138cc3a..86a647f04c 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class CameraCalibration(desc.CommandLineNode): +class CameraCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_cameraCalibration {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index feb529cd29..6d959d2f71 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -119,7 +119,7 @@ def readSfMData(sfmFile): return views, intrinsics -class CameraInit(desc.CommandLineNode, desc.InitNode): +class CameraInit(desc.AVCommandLineNode, desc.InitNode): commandLine = 'aliceVision_cameraInit {allParams} --allowSingleView 1' # don't throw an error if there is only one image size = desc.DynamicNodeSize('viewpoints') diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 1f98119d49..055b7687a9 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -4,7 +4,7 @@ from meshroom.core import desc -class CameraLocalization(desc.CommandLineNode): +class CameraLocalization(desc.AVCommandLineNode): commandLine = 'aliceVision_cameraLocalization {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 3fa103e186..b575ea0db8 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -4,7 +4,7 @@ from meshroom.core import desc -class CameraRigCalibration(desc.CommandLineNode): +class CameraRigCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_rigCalibration {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index ca4875c224..063acbbe38 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -4,7 +4,7 @@ from meshroom.core import desc -class CameraRigLocalization(desc.CommandLineNode): +class CameraRigLocalization(desc.AVCommandLineNode): commandLine = 'aliceVision_rigLocalization {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 0b5e65547c..256ceaee5c 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -5,7 +5,7 @@ import os.path -class ColorCheckerCorrection(desc.CommandLineNode): +class ColorCheckerCorrection(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_colorCheckerCorrection {allParams}' size = desc.DynamicNodeSize('input') # parallelization = desc.Parallelization(blockSize=40) diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index f3109cfe74..eab8925a52 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -5,7 +5,7 @@ import os.path -class ColorCheckerDetection(desc.CommandLineNode): +class ColorCheckerDetection(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_colorCheckerDetection {allParams}' size = desc.DynamicNodeSize('input') # parallelization = desc.Parallelization(blockSize=40) diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 9ea7b57015..2bacbac365 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ConvertMesh(desc.CommandLineNode): +class ConvertMesh(desc.AVCommandLineNode): commandLine = 'aliceVision_convertMesh {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 1c859ea382..0fd163f6ab 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ConvertSfMFormat(desc.CommandLineNode): +class ConvertSfMFormat(desc.AVCommandLineNode): commandLine = 'aliceVision_convertSfMFormat {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 6f1508540d..6014967065 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class DepthMap(desc.CommandLineNode): +class DepthMap(desc.AVCommandLineNode): commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index c52dd2337f..3acebbacc5 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class DepthMapFilter(desc.CommandLineNode): +class DepthMapFilter(desc.AVCommandLineNode): commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 8f00606274..b69a2b7c9e 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class DistortionCalibration(desc.CommandLineNode): +class DistortionCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_distortionCalibration {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 1fc1ac95c3..de503cea39 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ExportAnimatedCamera(desc.CommandLineNode): +class ExportAnimatedCamera(desc.AVCommandLineNode): commandLine = 'aliceVision_exportAnimatedCamera {allParams}' category = 'Export' diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index 7ab7855bff..2f18c94cea 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ExportColoredPointCloud(desc.CommandLineNode): +class ExportColoredPointCloud(desc.AVCommandLineNode): commandLine = 'aliceVision_exportColoredPointCloud {allParams}' category = 'Export' diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 2a1aeebcfe..b2cd04a39e 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ExportMatches(desc.CommandLineNode): +class ExportMatches(desc.AVCommandLineNode): commandLine = 'aliceVision_exportMatches {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 99dacf1221..b297b81cf5 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ExportMaya(desc.CommandLineNode): +class ExportMaya(desc.AVCommandLineNode): commandLine = 'aliceVision_exportMeshroomMaya {allParams}' category = 'Export' diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 9c37f30333..3c20a690c0 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class FeatureExtraction(desc.CommandLineNode): +class FeatureExtraction(desc.AVCommandLineNode): commandLine = 'aliceVision_featureExtraction {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=40) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 4c0fba1b18..cdc5b69eda 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class FeatureMatching(desc.CommandLineNode): +class FeatureMatching(desc.AVCommandLineNode): commandLine = 'aliceVision_featureMatching {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=20) diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index ed22cf34cf..41d9967df5 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class FeatureRepeatability(desc.CommandLineNode): +class FeatureRepeatability(desc.AVCommandLineNode): commandLine = 'aliceVision_samples_repeatabilityDataset {allParams}' size = desc.DynamicNodeSize('input') # parallelization = desc.Parallelization(blockSize=40) diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 8d6ebe0b17..b3e93aa02a 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -6,7 +6,7 @@ from meshroom.core import desc -class GlobalSfM(desc.CommandLineNode): +class GlobalSfM(desc.AVCommandLineNode): commandLine = 'aliceVision_globalSfM {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index eefe335f51..e52ce5caeb 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ImageMasking(desc.CommandLineNode): +class ImageMasking(desc.AVCommandLineNode): commandLine = 'aliceVision_imageMasking {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=40) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index f2ac0d94d5..60992785ac 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -4,7 +4,7 @@ from meshroom.core import desc -class ImageMatching(desc.CommandLineNode): +class ImageMatching(desc.AVCommandLineNode): commandLine = 'aliceVision_imageMatching {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index c11776e768..6b25cb66af 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -4,7 +4,7 @@ from meshroom.core import desc -class ImageMatchingMultiSfM(desc.CommandLineNode): +class ImageMatchingMultiSfM(desc.AVCommandLineNode): commandLine = 'aliceVision_imageMatching {allParams}' # use both SfM inputs to define Node's size size = desc.MultiDynamicNodeSize(['input', 'inputB']) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 5ba2385587..54a9fdfb0d 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -28,7 +28,7 @@ def outputImagesValueFunct(attr): return desc.Node.internalFolder + '*' + (outputExt or '.*') -class ImageProcessing(desc.CommandLineNode): +class ImageProcessing(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_imageProcessing {allParams}' size = desc.DynamicNodeSize('input') # parallelization = desc.Parallelization(blockSize=40) diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index d0cd8656ce..2568953599 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class ImportKnownPoses(desc.CommandLineNode): +class ImportKnownPoses(desc.AVCommandLineNode): commandLine = 'aliceVision_importKnownPoses {allParams}' size = desc.DynamicNodeSize('sfmData') diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 63ecb1f6ec..668aa6333b 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -4,7 +4,7 @@ from meshroom.core import desc -class KeyframeSelection(desc.CommandLineNode): +class KeyframeSelection(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_keyframeSelection {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index a1a384a3a3..968ef98d81 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -23,7 +23,7 @@ def findMetadata(d, keys, defaultValue): -class LdrToHdrCalibration(desc.CommandLineNode): +class LdrToHdrCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_LdrToHdrCalibration {allParams}' size = desc.DynamicNodeSize('input') cpu = desc.Level.INTENSIVE diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index cc1ee60fb2..9259a3f185 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -22,7 +22,7 @@ def findMetadata(d, keys, defaultValue): return defaultValue -class LdrToHdrMerge(desc.CommandLineNode): +class LdrToHdrMerge(desc.AVCommandLineNode): commandLine = 'aliceVision_LdrToHdrMerge {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=2) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 3324733bfa..1d0f42b3c6 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -39,7 +39,7 @@ def computeSize(self, node): return s / divParam.value -class LdrToHdrSampling(desc.CommandLineNode): +class LdrToHdrSampling(desc.AVCommandLineNode): commandLine = 'aliceVision_LdrToHdrSampling {allParams}' size = DividedInputNodeSize('input', 'nbBrackets') parallelization = desc.Parallelization(blockSize=2) diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index 077b3538ad..9149dd0f46 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class LightingEstimation(desc.CommandLineNode): +class LightingEstimation(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_lightingEstimation {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 739e5b0447..98af5bf89d 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class MergeMeshes(desc.CommandLineNode): +class MergeMeshes(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_mergeMeshes {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 29b51e42de..2c42e401dc 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class MeshDecimate(desc.CommandLineNode): +class MeshDecimate(desc.AVCommandLineNode): commandLine = 'aliceVision_meshDecimate {allParams}' cpu = desc.Level.NORMAL ram = desc.Level.NORMAL diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index aa118bbe06..3fbf3592a6 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class MeshDenoising(desc.CommandLineNode): +class MeshDenoising(desc.AVCommandLineNode): commandLine = 'aliceVision_meshDenoising {allParams}' category = 'Mesh Post-Processing' diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 6c65bda0bb..c17e666eeb 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class MeshFiltering(desc.CommandLineNode): +class MeshFiltering(desc.AVCommandLineNode): commandLine = 'aliceVision_meshFiltering {allParams}' category = 'Dense Reconstruction' diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 1888f56314..5cbe4b864e 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class MeshMasking(desc.CommandLineNode): +class MeshMasking(desc.AVCommandLineNode): commandLine = 'aliceVision_meshMasking {allParams}' category = 'Mesh Post-Processing' documentation = ''' diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 047d572b94..b9bbeed491 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class MeshResampling(desc.CommandLineNode): +class MeshResampling(desc.AVCommandLineNode): commandLine = 'aliceVision_meshResampling {allParams}' cpu = desc.Level.NORMAL ram = desc.Level.NORMAL diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index a64962c81d..364b25145f 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class Meshing(desc.CommandLineNode): +class Meshing(desc.AVCommandLineNode): commandLine = 'aliceVision_meshing {allParams}' cpu = desc.Level.INTENSIVE diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 756d76db23..e7020ef9d2 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -6,7 +6,7 @@ from meshroom.core import desc -class PanoramaCompositing(desc.CommandLineNode): +class PanoramaCompositing(desc.AVCommandLineNode): commandLine = 'aliceVision_panoramaCompositing {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=5) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 476d29b131..2882d37a18 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -6,7 +6,7 @@ from meshroom.core import desc -class PanoramaEstimation(desc.CommandLineNode): +class PanoramaEstimation(desc.AVCommandLineNode): commandLine = 'aliceVision_panoramaEstimation {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index edac5cd6cc..e383bb6867 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class PanoramaInit(desc.CommandLineNode): +class PanoramaInit(desc.AVCommandLineNode): commandLine = 'aliceVision_panoramaInit {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index f0fc6fca04..544adcbc54 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -6,7 +6,7 @@ from meshroom.core import desc -class PanoramaMerging(desc.CommandLineNode): +class PanoramaMerging(desc.AVCommandLineNode): commandLine = 'aliceVision_panoramaMerging {allParams}' size = desc.DynamicNodeSize('input') cpu = desc.Level.NORMAL diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index 89099f1968..e738e9c0c8 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -5,7 +5,7 @@ import os.path -class PanoramaPrepareImages(desc.CommandLineNode): +class PanoramaPrepareImages(desc.AVCommandLineNode): commandLine = 'aliceVision_panoramaPrepareImages {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 6817d9849b..f595617a61 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -6,7 +6,7 @@ from meshroom.core import desc -class PanoramaSeams(desc.CommandLineNode): +class PanoramaSeams(desc.AVCommandLineNode): commandLine = 'aliceVision_panoramaSeams {allParams}' size = desc.DynamicNodeSize('input') cpu = desc.Level.INTENSIVE diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 99a38d5c2f..6517d4950c 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -6,7 +6,7 @@ from meshroom.core import desc -class PanoramaWarping(desc.CommandLineNode): +class PanoramaWarping(desc.AVCommandLineNode): commandLine = 'aliceVision_panoramaWarping {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=5) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 5d475e511b..eb511533c9 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class PrepareDenseScene(desc.CommandLineNode): +class PrepareDenseScene(desc.AVCommandLineNode): commandLine = 'aliceVision_prepareDenseScene {allParams}' size = desc.DynamicNodeSize('input') parallelization = desc.Parallelization(blockSize=40) diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index a001f7cd19..53e09c9202 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -5,7 +5,7 @@ import os.path -class SfMAlignment(desc.CommandLineNode): +class SfMAlignment(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_sfmAlignment {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py index 24ab23542d..1b4b91ab2d 100644 --- a/meshroom/aliceVision/SfMDistances.py +++ b/meshroom/aliceVision/SfMDistances.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class SfMDistances(desc.CommandLineNode): +class SfMDistances(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_sfmDistances {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 22f1313a5d..6c9811c398 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -5,7 +5,7 @@ import os.path -class SfMTransfer(desc.CommandLineNode): +class SfMTransfer(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_sfmTransfer {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 439ba3af38..525a92d741 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -5,7 +5,7 @@ import os.path -class SfMTransform(desc.CommandLineNode): +class SfMTransform(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_sfmTransform {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 4ff56bb9a4..6519a47c68 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -2,7 +2,7 @@ from meshroom.core import desc -class Split360Images(desc.CommandLineNode): +class Split360Images(desc.AVCommandLineNode): commandLine = 'aliceVision_utils_split360Images {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 08a4541cbe..c16de93a8d 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -3,7 +3,7 @@ from meshroom.core import desc -class StructureFromMotion(desc.CommandLineNode): +class StructureFromMotion(desc.AVCommandLineNode): commandLine = 'aliceVision_incrementalSfM {allParams}' size = desc.DynamicNodeSize('input') diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index d7eb6f7cf1..a6543bec1a 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -4,7 +4,7 @@ import logging -class Texturing(desc.CommandLineNode): +class Texturing(desc.AVCommandLineNode): commandLine = 'aliceVision_texturing {allParams}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE From 21f054eaf6ad0bcae486b80e449cedc4c2f145c7 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 21 Jun 2022 15:57:31 +0200 Subject: [PATCH 0597/1093] [nodes] CameraInit,ImageProcessing: Add parameters related to color profiles management --- meshroom/aliceVision/CameraInit.py | 22 ++++++++++++-- meshroom/aliceVision/ImageProcessing.py | 38 ++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 6d959d2f71..76ce981de7 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -162,6 +162,13 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): value='${ALICEVISION_SENSOR_DB}', uid=[], ), + desc.File( + name='colorProfileDatabase', + label='Color Profile Database', + description='''Color Profile database directory path.''', + value='${ALICEVISION_COLOR_PROFILE_DB}', + uid=[], + ), desc.FloatParam( name='defaultFieldOfView', label='Default Field Of View', @@ -197,10 +204,19 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): joinChar=',', advanced=True, ), + desc.ChoiceParam( + name='rawColorInterpretation', + label='RAW Color Interpretation', + description='Allows you to choose how raw data are color processed.', + value='LibRawNoWhiteBalancing', + values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], + exclusive=True, + uid=[0], + ), desc.BoolParam( - name='useInternalWhiteBalance', - label='Apply internal white balance', - description='Apply image white balance (Only for raw images)', + name='errorOnMissingColorProfile', + label='Error On Missing DCP Color Profile', + description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown', value=True, uid=[0], ), diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 54a9fdfb0d..292348777c 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -301,10 +301,46 @@ class ImageProcessing(desc.AVCommandLineNode): label='Output Color Space', description='Allows you to choose the color space of the output image.', value='AUTO', - values=['AUTO', 'sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + values=['AUTO', 'sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='workingColorSpace', + label='Working Color Space', + description='Allows you to choose the color space in which the data are processed.', + value='Linear', + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + exclusive=True, + uid=[0], + ), + + desc.ChoiceParam( + name='rawColorInterpretation', + label='RAW Color Interpretation', + description='Allows you to choose how raw data are color processed.', + value='LibRawNoWhiteBalancing', + values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata', 'Auto'], + exclusive=True, + uid=[0], + ), + + desc.File( + name='colorProfileDatabase', + label='Color Profile Database', + description='''Color Profile database directory path.''', + value='${ALICEVISION_COLOR_PROFILE_DB}', + uid=[], + ), + + desc.BoolParam( + name='errorOnMissingColorProfile', + label='Error On Missing DCP Color Profile', + description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown', + value=True, + uid=[0], + ), + desc.ChoiceParam( name='storageDataType', label='Storage Data Type for EXR output', From 6bad19a3d49b53c8d4d0b81faba3f0034b64c109 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 13 Dec 2022 15:30:46 +0100 Subject: [PATCH 0598/1093] [nodes] CameraInit,ImageProcessing: enable white balance by default --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/ImageProcessing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 76ce981de7..db4134f04e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -208,7 +208,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): name='rawColorInterpretation', label='RAW Color Interpretation', description='Allows you to choose how raw data are color processed.', - value='LibRawNoWhiteBalancing', + value='LibRawWhiteBalancing', values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], exclusive=True, uid=[0], diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 292348777c..8531b2b0de 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -319,7 +319,7 @@ class ImageProcessing(desc.AVCommandLineNode): name='rawColorInterpretation', label='RAW Color Interpretation', description='Allows you to choose how raw data are color processed.', - value='LibRawNoWhiteBalancing', + value='LibRawWhiteBalancing', values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata', 'Auto'], exclusive=True, uid=[0], From 95326a45c2fade10750ba6a4912b77c25c5c75bc Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 13 Dec 2022 17:21:34 +0100 Subject: [PATCH 0599/1093] [nodes] rename: remove "utils" from executables names --- meshroom/aliceVision/ColorCheckerCorrection.py | 2 +- meshroom/aliceVision/ColorCheckerDetection.py | 2 +- meshroom/aliceVision/ImageProcessing.py | 2 +- meshroom/aliceVision/KeyframeSelection.py | 2 +- meshroom/aliceVision/LightingEstimation.py | 2 +- meshroom/aliceVision/MergeMeshes.py | 2 +- meshroom/aliceVision/SfMAlignment.py | 2 +- meshroom/aliceVision/SfMDistances.py | 2 +- meshroom/aliceVision/SfMTransfer.py | 2 +- meshroom/aliceVision/SfMTransform.py | 2 +- meshroom/aliceVision/Split360Images.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 256ceaee5c..2e879ca6ea 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -6,7 +6,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_colorCheckerCorrection {allParams}' + commandLine = 'aliceVision_colorCheckerCorrection {allParams}' size = desc.DynamicNodeSize('input') # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index eab8925a52..1c6822e910 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -6,7 +6,7 @@ class ColorCheckerDetection(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_colorCheckerDetection {allParams}' + commandLine = 'aliceVision_colorCheckerDetection {allParams}' size = desc.DynamicNodeSize('input') # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 8531b2b0de..d4c8476774 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -29,7 +29,7 @@ def outputImagesValueFunct(attr): class ImageProcessing(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_imageProcessing {allParams}' + commandLine = 'aliceVision_imageProcessing {allParams}' size = desc.DynamicNodeSize('input') # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 668aa6333b..6a44d33a66 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -5,7 +5,7 @@ class KeyframeSelection(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_keyframeSelection {allParams}' + commandLine = 'aliceVision_keyframeSelection {allParams}' category = 'Utils' documentation = ''' diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index 9149dd0f46..b55883f4e2 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -4,7 +4,7 @@ class LightingEstimation(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_lightingEstimation {allParams}' + commandLine = 'aliceVision_lightingEstimation {allParams}' category = 'Utils' diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 98af5bf89d..2aef0ea659 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -4,7 +4,7 @@ class MergeMeshes(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_mergeMeshes {allParams}' + commandLine = 'aliceVision_mergeMeshes {allParams}' category = 'Utils' documentation = ''' diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 53e09c9202..f834e636b7 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -6,7 +6,7 @@ class SfMAlignment(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_sfmAlignment {allParams}' + commandLine = 'aliceVision_sfmAlignment {allParams}' size = desc.DynamicNodeSize('input') category = 'Utils' diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py index 1b4b91ab2d..433c7a8d1d 100644 --- a/meshroom/aliceVision/SfMDistances.py +++ b/meshroom/aliceVision/SfMDistances.py @@ -4,7 +4,7 @@ class SfMDistances(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_sfmDistances {allParams}' + commandLine = 'aliceVision_sfmDistances {allParams}' size = desc.DynamicNodeSize('input') inputs = [ diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 6c9811c398..b0ea1a6705 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -6,7 +6,7 @@ class SfMTransfer(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_sfmTransfer {allParams}' + commandLine = 'aliceVision_sfmTransfer {allParams}' size = desc.DynamicNodeSize('input') category = 'Utils' diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 525a92d741..4b7378f0b7 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -6,7 +6,7 @@ class SfMTransform(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_sfmTransform {allParams}' + commandLine = 'aliceVision_sfmTransform {allParams}' size = desc.DynamicNodeSize('input') category = 'Utils' diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 6519a47c68..4c3d042af3 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -3,7 +3,7 @@ from meshroom.core import desc class Split360Images(desc.AVCommandLineNode): - commandLine = 'aliceVision_utils_split360Images {allParams}' + commandLine = 'aliceVision_split360Images {allParams}' category = 'Utils' documentation = "This node is used to extract multiple images from equirectangular or dualfisheye images." From df0843596cb84019ea66fe03a271c907c9695b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:30:35 +0100 Subject: [PATCH 0600/1093] [nodes] DepthMap: Add tile user parameters --- meshroom/aliceVision/DepthMap.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 6014967065..40e4e76397 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -28,7 +28,7 @@ class DepthMap(desc.AVCommandLineNode): description='SfMData file.', value='', uid=[0], - ), + ), desc.File( name='imagesFolder', label='Images Folder', @@ -63,6 +63,30 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='tileWidth', + label='Tile Width', + description='Maximum tile width.', + value=-1, + range=(-1, 2000, 10), + uid=[0], + ), + desc.IntParam( + name='tileHeight', + label='Tile Height', + description='Maximum tile height.', + value=-1, + range=(-1, 2000, 10), + uid=[0], + ), + desc.IntParam( + name='tilePadding', + label='Tile Padding', + description='Tile padding for overlapping.', + value=0, + range=(0, 500, 1), + uid=[0], + ), desc.IntParam( name='sgmScale', label='SGM: Downscale factor', From 85294233887151e93dc6e73d5f4f8856d0423f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:31:40 +0100 Subject: [PATCH 0601/1093] [nodes] DepthMap: Add Refine user parameters --- meshroom/aliceVision/DepthMap.py | 40 +++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 40e4e76397..73c225c347 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -207,14 +207,14 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.IntParam( - name='refineMaxTCams', - label='Refine: Nb Neighbour Cameras', - description='Refine: Number of neighbour cameras.', - value=6, - range=(1, 20, 1), - uid=[0], - ), + desc.IntParam( + name='refineMaxTCams', + label='Refine: Nb Neighbour Cameras', + description='Refine: Number of neighbour cameras.', + value=6, + range=(1, 20, 1), + uid=[0], + ), desc.IntParam( name='refineNSamplesHalf', label='Refine: Number of Samples', @@ -286,6 +286,30 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='refineUseVolumeStrategy', + label='Refine: Use Volume Strategy', + description='Refine: Use volume strategy instead of legacy strategy for Refine/Fuse', + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='refineDoRefineFuse', + label='Refine: Refine and Fuse', + description='Refine: Perform Refine/Fuse', + value=True, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='refineDoRefineOptimization', + label='Refine: Post-Process Optimization', + description='Refine: Perform Refine post-process optimization', + value=True, + uid=[0], + advanced=True, + ), desc.BoolParam( name='exportIntermediateResults', label='Export Intermediate Results', From 8efee63704e8af66bb6fad35b7f632b80b49755e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:32:52 +0100 Subject: [PATCH 0602/1093] [nodes] DepthMap: Update P2 Weighting parameter --- meshroom/aliceVision/DepthMap.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 73c225c347..4c7215d46a 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -154,7 +154,6 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.FloatParam( name='sgmP1', label='SGM: P1', @@ -165,9 +164,9 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, ), desc.FloatParam( - name='sgmP2', - label='SGM: P2', - description='Semi Global Matching: P2 weight.', + name='sgmP2Weighting', + label='SGM: P2 Weighting', + description='Semi Global Matching: P2 weighting.', value=100.0, range=(-255.0, 255.0, 0.5), uid=[0], From 15bfcff124524c3cbe41e4c292608f54dbb0e43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:33:25 +0100 Subject: [PATCH 0603/1093] [nodes] DepthMap: Update node version from 2 to 3 --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 4c7215d46a..a3eae87d79 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc From 313b883e89a112154bcf22bff469e9f18f12fd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 24 Mar 2022 10:19:32 +0100 Subject: [PATCH 0604/1093] [nodes] DepthMap: Remove legacy Refine options --- meshroom/aliceVision/DepthMap.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index a3eae87d79..a7aa831e48 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -277,22 +277,6 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.BoolParam( - name='refineUseTcOrRcPixSize', - label='Refine: Tc or Rc pixel size', - description='Refine: Use minimum pixel size of neighbour cameras (Tc) or current camera pixel size (Rc)', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='refineUseVolumeStrategy', - label='Refine: Use Volume Strategy', - description='Refine: Use volume strategy instead of legacy strategy for Refine/Fuse', - value=False, - uid=[0], - advanced=True, - ), desc.BoolParam( name='refineDoRefineFuse', label='Refine: Refine and Fuse', From 3fd8eb660d32aba02ef69cce25e427a383c479a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 24 Mar 2022 10:21:08 +0100 Subject: [PATCH 0605/1093] [nodses] DepthMap: Add option to merge tiles --- meshroom/aliceVision/DepthMap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index a7aa831e48..821e589b59 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -87,6 +87,14 @@ class DepthMap(desc.AVCommandLineNode): range=(0, 500, 1), uid=[0], ), + desc.BoolParam( + name='tileMerge', + label='Tile Merge', + description='Read & merge all computed tiles.', + value=False, + uid=[0], + advanced=True, + ), desc.IntParam( name='sgmScale', label='SGM: Downscale factor', From 44e6b5e3eba1f4b7bbdb91ceacebe81cf92df726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 30 Jun 2022 11:59:02 +0200 Subject: [PATCH 0606/1093] [nodes] DepthMap: Update node parameters --- meshroom/aliceVision/DepthMap.py | 503 +++++++++++++++++-------------- 1 file changed, 274 insertions(+), 229 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 821e589b59..01d077a225 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -63,244 +63,289 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.IntParam( - name='tileWidth', - label='Tile Width', - description='Maximum tile width.', - value=-1, - range=(-1, 2000, 10), - uid=[0], - ), - desc.IntParam( - name='tileHeight', - label='Tile Height', - description='Maximum tile height.', - value=-1, - range=(-1, 2000, 10), - uid=[0], - ), - desc.IntParam( - name='tilePadding', - label='Tile Padding', - description='Tile padding for overlapping.', - value=0, - range=(0, 500, 1), - uid=[0], - ), + desc.GroupAttribute( + name="tilling", + label="Tilling Parameters", + description='Tilling Parameters.', + group=None, + groupDesc=[ + desc.IntParam( + name='tileWidth', + label='Width', + description='Maximum tile buffer width.', + value=1024, + range=(-1, 2000, 10), + uid=[0], + ), + desc.IntParam( + name='tileHeight', + label='Height', + description='Maximum tile buffer height.', + value=1024, + range=(-1, 2000, 10), + uid=[0], + ), + desc.IntParam( + name='tilePadding', + label='Padding', + description='Tile buffer padding for overlapping.', + value=128, + range=(0, 500, 1), + uid=[0], + ), + desc.BoolParam( + name='tileMerge', + label='Merge Tiles', + description='Read & merge all computed tiles.', + value=True, + uid=[0], + advanced=True, + ), + ]), desc.BoolParam( - name='tileMerge', - label='Tile Merge', - description='Read & merge all computed tiles.', - value=False, - uid=[0], - advanced=True, - ), - desc.IntParam( - name='sgmScale', - label='SGM: Downscale factor', - description='Semi Global Matching: Downscale factor used to compute the similarity volume.', - value=-1, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmStepXY', - label='SGM: Step XY', - description='Semi Global Matching: Step used to compute the similarity volume on X and Y axis.', - value=-1, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmStepZ', - label='SGM: Step Z', - description='Semi Global Matching: Step used to compute the similarity volume on Z axis.', - value=-1, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmMaxSideXY', - label='SGM: Max Side', - description='Semi Global Matching: Max side in pixels used to automatically decide for sgmScale/sgmStep if not defined.', - value=700, - range=(-1, 1000, 1), - uid=[0], - ), - desc.IntParam( - name='sgmMaxTCams', - label='SGM: Nb Neighbour Cameras', - description='Semi Global Matching: Number of neighbour cameras.', - value=10, - range=(1, 100, 1), - uid=[0], - ), - desc.IntParam( - name='sgmWSH', - label='SGM: WSH', - description='Semi Global Matching: Half-size of the patch used to compute the similarity.', - value=4, - range=(1, 20, 1), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmGammaC', - label='SGM: GammaC', - description='Semi Global Matching: GammaC Threshold.', - value=5.5, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmGammaP', - label='SGM: GammaP', - description='Semi Global Matching: GammaP Threshold.', - value=8.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmP1', - label='SGM: P1', - description='Semi Global Matching: P1.', - value=10.0, - range=(0.0, 255.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmP2Weighting', - label='SGM: P2 Weighting', - description='Semi Global Matching: P2 weighting.', - value=100.0, - range=(-255.0, 255.0, 0.5), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='sgmMaxDepths', - label='SGM: Max Depths', - description='Semi Global Matching: Max number of depths in the overall similarity volume.', - value=3000, - range=(1, 5000, 1), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='sgmMaxDepthsPerTc', - label='SGM: Max Depths Per Camera Pairs', - description='Semi Global Matching: Max number of depths to sweep in the similarity volume per Rc/Tc cameras.', - value=1500, - range=(1, 5000, 1), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='sgmUseSfmSeeds', - label='SGM: Use SfM Landmarks', - description='Semi Global Matching: Use landmarks from SfM to define the ranges for the plane sweeping.', + name='chooseTCamsPerTile', + label='Choose Neighbour Cameras Per Tile', + description='Choose neighbour cameras per tile.', value=True, uid=[0], advanced=True, ), - desc.StringParam( - name='sgmFilteringAxes', - label='SGM: Filtering Axes', - description="Semi Global Matching: Define axes for the filtering of the similarity volume.", - value='YX', - uid=[0], - advanced=True, - ), - desc.IntParam( - name='refineMaxTCams', - label='Refine: Nb Neighbour Cameras', - description='Refine: Number of neighbour cameras.', - value=6, - range=(1, 20, 1), - uid=[0], - ), - desc.IntParam( - name='refineNSamplesHalf', - label='Refine: Number of Samples', - description='Refine: Number of samples.', - value=150, - range=(1, 500, 10), - uid=[0], - advanced=True, - ), desc.IntParam( - name='refineNDepthsToRefine', - label='Refine: Number of Depths', - description='Refine: Number of depths.', - value=31, - range=(1, 100, 1), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='refineNiters', - label='Refine: Number of Iterations', - description='Refine:: Number of iterations.', - value=100, - range=(1, 500, 10), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='refineWSH', - label='Refine: WSH', - description='Refine: Half-size of the patch used to compute the similarity.', - value=3, + name='maxTCams', + label='Max Nb Neighbour Cameras', + description='Maximum number of neighbour cameras.', + value=10, range=(1, 20, 1), uid=[0], - advanced=True, - ), - desc.FloatParam( - name='refineSigma', - label='Refine: Sigma', - description='Refine: Sigma Threshold.', - value=15.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='refineGammaC', - label='Refine: GammaC', - description='Refine: GammaC Threshold.', - value=15.5, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='refineGammaP', - label='Refine: GammaP', - description='Refine: GammaP threshold.', - value=8.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='refineDoRefineFuse', - label='Refine: Refine and Fuse', - description='Refine: Perform Refine/Fuse', - value=True, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='refineDoRefineOptimization', - label='Refine: Post-Process Optimization', - description='Refine: Perform Refine post-process optimization', - value=True, - uid=[0], - advanced=True, ), + desc.GroupAttribute( + name="sgm", + label="SGM Parameters", + description='Semi Global Matching Parameters.', + group=None, + groupDesc=[ + desc.IntParam( + name='sgmScale', + label='Downscale factor', + description='Downscale factor used to compute the similarity volume.', + value=2, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name='sgmStepXY', + label='Step XY', + description='Step used to compute the similarity volume on X and Y axis.', + value=2, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name='sgmStepZ', + label='Step Z', + description='Step used to compute the similarity volume on Z axis.', + value=-1, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name='sgmMaxSideXY', + label='Max Side', + description='Max side in pixels used to automatically decide for sgmScale/sgmStep if not defined.', + value=700, + range=(-1, 1000, 1), + uid=[0], + ), + desc.IntParam( + name='sgmMaxTCamsPerTile', + label='Max Nb Neighbour Cameras Per Tile', + description='Maximum number of neighbour cameras.', + value=4, + range=(1, 20, 1), + uid=[0], + ), + desc.IntParam( + name='sgmWSH', + label='SWSH', + description='Half-size of the patch used to compute the similarity.', + value=4, + range=(1, 20, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='sgmGammaC', + label='GammaC', + description='SGammaC Threshold.', + value=5.5, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='sgmGammaP', + label='GammaP', + description='GammaP Threshold.', + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='sgmP1', + label='P1', + description='P1 parameter.', + value=10.0, + range=(0.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='sgmP2Weighting', + label='P2 Weighting', + description='P2 weighting parameter.', + value=100.0, + range=(-255.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='sgmMaxDepths', + label='Max Depths', + description='Max number of depths in the overall similarity volume.', + value=3000, + range=(1, 5000, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='sgmMaxDepthsPerTc', + label='Max Depths Per Camera Pairs', + description='Max number of depths to sweep in the similarity volume per Rc/Tc cameras.', + value=1500, + range=(1, 5000, 1), + uid=[0], + advanced=True, + ), + desc.StringParam( + name='sgmFilteringAxes', + label='Filtering Axes', + description="Define axes for the filtering of the similarity volume.", + value='YX', + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='sgmUseSfmSeeds', + label='Use SfM Landmarks', + description='Use landmarks from SfM to define the ranges for the plane sweeping.', + value=True, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='sgmChooseDepthListPerTile', + label='Choose Depth List Per Tile', + description='SChoose depth list per tile.', + value=False, + uid=[0], + advanced=True, + ), + ]), + desc.GroupAttribute( + name="refine", + label="Refine Parameters", + description='Refine Parameters.', + group=None, + groupDesc=[ + desc.IntParam( + name='refineNSamplesHalf', + label='Number of Samples', + description='Number of samples.', + value=150, + range=(1, 500, 10), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='refineNDepthsToRefine', + label='Number of Depths', + description='Number of depths.', + value=31, + range=(1, 100, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='refineNiters', + label='Number of Iterations', + description='Number of iterations.', + value=100, + range=(1, 500, 10), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='refineMaxTCamsPerTile', + label='Max Nb Neighbour Cameras Per Tile', + description='Maximum number of neighbour cameras.', + value=4, + range=(1, 20, 1), + uid=[0], + ), + desc.IntParam( + name='refineWSH', + label='WSH', + description='Half-size of the patch used to compute the similarity.', + value=3, + range=(1, 20, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='refineSigma', + label='Sigma', + description='Sigma Threshold.', + value=15, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='refineGammaC', + label='GammaC', + description='GammaC Threshold.', + value=15.5, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='refineGammaP', + label='GammaP', + description='GammaP threshold.', + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='refineDoRefineFuse', + label='Refine and Fuse', + description='Perform Refine/Fuse', + value=True, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='refineDoRefineOptimization', + label='Post-Process Optimization', + description='Perform Refine post-process optimization', + value=True, + uid=[0], + advanced=True, + ), + ]), desc.BoolParam( name='exportIntermediateResults', label='Export Intermediate Results', From f17103f210f6df4bf25186c2dcbb9fac60b34a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 4 Jul 2022 18:59:15 +0200 Subject: [PATCH 0607/1093] [nodes] depthMap: tiles are now always merged --- meshroom/aliceVision/DepthMap.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 01d077a225..b0a9c93274 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -93,14 +93,6 @@ class DepthMap(desc.AVCommandLineNode): range=(0, 500, 1), uid=[0], ), - desc.BoolParam( - name='tileMerge', - label='Merge Tiles', - description='Read & merge all computed tiles.', - value=True, - uid=[0], - advanced=True, - ), ]), desc.BoolParam( name='chooseTCamsPerTile', From 6899c9cd9d8cf6fc6811859ef1f078ebaf8f03b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 4 Jul 2022 18:59:42 +0200 Subject: [PATCH 0608/1093] [nodes] depthMap: depth list per tile is now enabled by default --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index b0a9c93274..6dd5a394a4 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -239,7 +239,7 @@ class DepthMap(desc.AVCommandLineNode): name='sgmChooseDepthListPerTile', label='Choose Depth List Per Tile', description='SChoose depth list per tile.', - value=False, + value=True, uid=[0], advanced=True, ), From a368f476254b3821a8587228a680ac0ed3fc4e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:23:16 +0100 Subject: [PATCH 0609/1093] [nodes] DepthMap: Fix label typo --- meshroom/aliceVision/DepthMap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 6dd5a394a4..8ad21d9297 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -158,7 +158,7 @@ class DepthMap(desc.AVCommandLineNode): ), desc.IntParam( name='sgmWSH', - label='SWSH', + label='WSH', description='Half-size of the patch used to compute the similarity.', value=4, range=(1, 20, 1), @@ -168,7 +168,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='sgmGammaC', label='GammaC', - description='SGammaC Threshold.', + description='GammaC Threshold.', value=5.5, range=(0.0, 30.0, 0.5), uid=[0], From 51d8e8a98d6ed101a0facba1f0be225e6fb38aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:24:07 +0100 Subject: [PATCH 0610/1093] [nodes] DepthMap: Fix float value --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 8ad21d9297..18aa1c3d3d 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -298,7 +298,7 @@ class DepthMap(desc.AVCommandLineNode): name='refineSigma', label='Sigma', description='Sigma Threshold.', - value=15, + value=15.0, range=(0.0, 30.0, 0.5), uid=[0], advanced=True, From e0c3bcb71af54c7459207c4385c6bfc632b1425c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:24:48 +0100 Subject: [PATCH 0611/1093] [nodes] DepthMap: Add options Refine scale & Refine step --- meshroom/aliceVision/DepthMap.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 18aa1c3d3d..8df8b89a5e 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -250,6 +250,22 @@ class DepthMap(desc.AVCommandLineNode): description='Refine Parameters.', group=None, groupDesc=[ + desc.IntParam( + name='refineScale', + label='Downscale factor', + description='Downscale factor.', + value=1, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name='refineStepXY', + label='Step XY', + description='Step on X and Y axis.', + value=1, + range=(-1, 10, 1), + uid=[0], + ), desc.IntParam( name='refineNSamplesHalf', label='Number of Samples', From 23c6656d29f7a7ebb53fbcd854fb13ec7c45d0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:25:29 +0100 Subject: [PATCH 0612/1093] [nodes] DepthMap: Add option Seeds Range Inflate --- meshroom/aliceVision/DepthMap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 8df8b89a5e..1cca40e2a2 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -165,6 +165,15 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='sgmSeedsRangeInflate', + label='Seeds Range Inflate', + description='Seeds range inflate factor.', + value=0.2, + range=(0.0, 2.0, 0.1), + uid=[0], + advanced=True, + ), desc.FloatParam( name='sgmGammaC', label='GammaC', From c183e091c1f564c8f57b7e4c6402968a35ccf4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 23 Nov 2022 13:15:35 +0100 Subject: [PATCH 0613/1093] [nodes] DepthMap: Add multiple options for intermediate results --- meshroom/aliceVision/DepthMap.py | 54 +++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 1cca40e2a2..64d7a087f5 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -363,14 +363,54 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, ), ]), - desc.BoolParam( - name='exportIntermediateResults', - label='Export Intermediate Results', - description='Export intermediate results from the SGM and Refine steps.', - value=False, - uid=[], + desc.GroupAttribute( + name="intermediateResults", + label="Intermediate Results", + description='Intermediate Results Parameters.', advanced=True, - ), + group=None, + groupDesc=[ + desc.BoolParam( + name='exportIntermediateDepthSimMaps', + label='Export Depth Maps', + description='Export intermediate depth/similarity maps from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), + desc.BoolParam( + name='exportIntermediateVolumes', + label='Export Volumes', + description='Export intermediate similarity volumes from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), + desc.BoolParam( + name='exportIntermediateCrossVolumes', + label='Export Cross Volumes', + description='Export intermediate similarity cross volumes from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), + desc.BoolParam( + name='exportIntermediateVolume9pCsv', + label='Export 9 Points', + description='Export intermediate volumes 9 points CSV from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), + desc.BoolParam( + name='exportTilePattern', + label='Export Tile Pattern', + description='Export workflow tile pattern.', + value=False, + uid=[], + advanced=True, + ), + ]), desc.IntParam( name='nbGPUs', label='Number of GPUs', From 10c1fea7829f326b7c5f107d2e8f366848bc15aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 23 Nov 2022 13:23:51 +0100 Subject: [PATCH 0614/1093] [nodes] DepthMap: Remove option sgmMaxSideXY --- meshroom/aliceVision/DepthMap.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 64d7a087f5..6e5d0566fe 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -140,14 +140,6 @@ class DepthMap(desc.AVCommandLineNode): range=(-1, 10, 1), uid=[0], ), - desc.IntParam( - name='sgmMaxSideXY', - label='Max Side', - description='Max side in pixels used to automatically decide for sgmScale/sgmStep if not defined.', - value=700, - range=(-1, 1000, 1), - uid=[0], - ), desc.IntParam( name='sgmMaxTCamsPerTile', label='Max Nb Neighbour Cameras Per Tile', From 3ecb6a1d254bdcaac99ad55cb9a735e0142279d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:37:35 +0100 Subject: [PATCH 0615/1093] [nodes] DepthMap: Rename parameters tileBufferWidth & tileBufferHeight --- meshroom/aliceVision/DepthMap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 6e5d0566fe..c9d6dc3b1f 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -70,16 +70,16 @@ class DepthMap(desc.AVCommandLineNode): group=None, groupDesc=[ desc.IntParam( - name='tileWidth', - label='Width', + name='tileBufferWidth', + label='Buffer Width', description='Maximum tile buffer width.', value=1024, range=(-1, 2000, 10), uid=[0], ), desc.IntParam( - name='tileHeight', - label='Height', + name='tileBufferHeight', + label='Buffer Height', description='Maximum tile buffer height.', value=1024, range=(-1, 2000, 10), From d56e6c1907aa48a1eb4f3a82ff4be21e880346d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:38:23 +0100 Subject: [PATCH 0616/1093] [nodes] DepthMap: Update tilePadding parameter default value to 64 --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index c9d6dc3b1f..135cb193c9 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -89,7 +89,7 @@ class DepthMap(desc.AVCommandLineNode): name='tilePadding', label='Padding', description='Tile buffer padding for overlapping.', - value=128, + value=64, range=(0, 500, 1), uid=[0], ), From 605c806031deb4909728e850ae5522fc1c827197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:39:00 +0100 Subject: [PATCH 0617/1093] [nodes] DepthMap: Add parameter autoAdjustSmallImage --- meshroom/aliceVision/DepthMap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 135cb193c9..8476b0b07d 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -93,6 +93,14 @@ class DepthMap(desc.AVCommandLineNode): range=(0, 500, 1), uid=[0], ), + desc.BoolParam( + name='autoAdjustSmallImage', + label='Auto Adjust Small Image', + description='Automatically override depth map parameters if images are smaller than one tile.', + value=True, + uid=[0], + advanced=True, + ), ]), desc.BoolParam( name='chooseTCamsPerTile', From fdadc784c0d8d19e160f4eb3338cd876e6dc846d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:39:47 +0100 Subject: [PATCH 0618/1093] [nodes] DepthMap: Update sgmMaxDepths parameter default value to 1500 --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 8476b0b07d..ebed125724 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -214,7 +214,7 @@ class DepthMap(desc.AVCommandLineNode): name='sgmMaxDepths', label='Max Depths', description='Max number of depths in the overall similarity volume.', - value=3000, + value=1500, range=(1, 5000, 1), uid=[0], advanced=True, From 35e2b8db2519807b05850c480162b72a64eaca17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:41:03 +0100 Subject: [PATCH 0619/1093] [nodes] DepthMap: Add debug output parameters --- meshroom/aliceVision/DepthMap.py | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index ebed125724..651e4e2660 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -460,4 +460,44 @@ class DepthMap(desc.AVCommandLineNode): uid=[], group='', # do not export on the command line ), + desc.File( + name='tilePattern', + label='Tile Pattern', + description='DEBUG: Tile pattern', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_tilePattern.obj', + uid=[], + group='', # do not export on the command line + # enabled=lambda node: node.intermediateResults.exportTilePattern.value, + ), + desc.File( + name='depthSgm', + label='Depth Maps SGM', + description='DEBUG: Depth maps SGM', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_scale2_sgm.exr', + uid=[], + group='', # do not export on the command line + # enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, + ), + desc.File( + name='depthSgmUpscaled', + label='Depth Maps SGM Upscaled', + description='DEBUG: Depth maps SGM upscaled', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_sgmUpscaled.exr', + uid=[], + group='', # do not export on the command line + # enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, + ), + desc.File( + name='depthRefined', + label='Depth Maps Refined', + description='DEBUG: Depth maps after refinement', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_refinedFused.exr', + uid=[], + group='', # do not export on the command line + # enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, + ), ] From d94f96703c482b4637656bd432b08318991d02cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 20 Dec 2022 18:42:00 +0100 Subject: [PATCH 0620/1093] [pipelines] photogrammetry: Update DepthMap node version to 3.0 --- meshroom/photogrammetry.mg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 72c54b56e5..8d978ddf0a 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -9,7 +9,7 @@ "MeshFiltering": "3.0", "Texturing": "6.0", "PrepareDenseScene": "3.0", - "DepthMap": "2.0", + "DepthMap": "3.0", "StructureFromMotion": "2.0", "CameraInit": "8.0", "ImageMatching": "2.0", From e6d93d40293f98be12f210e804cb74d9f0823cf4 Mon Sep 17 00:00:00 2001 From: mh0g <matthieu.hog@gmail.com> Date: Thu, 8 Dec 2022 15:37:01 +0100 Subject: [PATCH 0621/1093] started node triangulate based on sfm node --- meshroom/aliceVision/Triangulate.py | 325 ++++++++++++++++++++++++++++ 1 file changed, 325 insertions(+) create mode 100644 meshroom/aliceVision/Triangulate.py diff --git a/meshroom/aliceVision/Triangulate.py b/meshroom/aliceVision/Triangulate.py new file mode 100644 index 0000000000..f8f7d5ff9d --- /dev/null +++ b/meshroom/aliceVision/Triangulate.py @@ -0,0 +1,325 @@ +__version__ = "2.0" + +from meshroom.core import desc + + +class Triangulate(desc.AVCommandLineNode): + commandLine = 'aliceVision_triangulate {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Sparse Reconstruction' + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.ListAttribute( + elementDesc=desc.File( + name="matchesFolder", + label="Matches Folder", + description="", + value="", + uid=[0], + ), + name="matchesFolders", + label="Matches Folders", + description="Folder(s) in which computed matches are stored." + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.ChoiceParam( + name='localizerEstimator', + label='Localizer Estimator', + description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', + value='acransac', + values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], + exclusive=True, + uid=[0], + advanced=True, + ), + desc.ChoiceParam( + name='observationConstraint', + label='Observation Constraint', + description='Observation constraint mode used in the optimization:\n' + ' * Basic: Use standard reprojection error in pixel coordinates\n' + ' * Scale: Use reprojection error in pixel coordinates but relative to the feature scale', + value='Scale', + values=['Basic', 'Scale'], + exclusive=True, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='localizerEstimatorMaxIterations', + label='Localizer Max Ransac Iterations', + description='Maximum number of iterations allowed in ransac step.', + value=4096, + range=(1, 20000, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='localizerEstimatorError', + label='Localizer Max Ransac Error', + description='Maximum error (in pixels) allowed for camera localization (resectioning).\n' + 'If set to 0, it will select a threshold according to the localizer estimator used\n' + '(if ACRansac, it will analyze the input data to select the optimal value).', + value=0.0, + range=(0.0, 100.0, 0.1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='lockScenePreviouslyReconstructed', + label='Lock Scene Previously Reconstructed', + description='This option is useful for SfM augmentation. Lock previously reconstructed poses and intrinsics.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='useLocalBA', + label='Local Bundle Adjustment', + description='It reduces the reconstruction time, especially for large datasets (500+ images),\n' + 'by avoiding computation of the Bundle Adjustment on areas that are not changing.', + value=True, + uid=[0], + ), + desc.IntParam( + name='localBAGraphDistance', + label='LocalBA Graph Distance', + description='Graph-distance limit to define the Active region in the Local Bundle Adjustment strategy.', + value=1, + range=(2, 10, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name='maxNumberOfMatches', + label='Maximum Number of Matches', + description='Maximum number of matches per image pair (and per feature type). \n' + 'This can be useful to have a quick reconstruction overview. \n' + '0 means no limit.', + value=0, + range=(0, 50000, 1), + uid=[0], + ), + desc.IntParam( + name='minNumberOfMatches', + label='Minimum Number of Matches', + description='Minimum number of matches per image pair (and per feature type). \n' + 'This can be useful to have a meaningful reconstruction with accurate keypoints. 0 means no limit.', + value=0, + range=(0, 50000, 1), + uid=[0], + ), + desc.IntParam( + name='minInputTrackLength', + label='Min Input Track Length', + description='Minimum track length in input of SfM', + value=2, + range=(2, 10, 1), + uid=[0], + ), + desc.IntParam( + name='minNumberOfObservationsForTriangulation', + label='Min Observation For Triangulation', + description='Minimum number of observations to triangulate a point.\n' + 'Set it to 3 (or more) reduces drastically the noise in the point cloud,\n' + 'but the number of final poses is a little bit reduced\n' + '(from 1.5% to 11% on the tested datasets).', + value=2, + range=(2, 10, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='minAngleForTriangulation', + label='Min Angle For Triangulation', + description='Minimum angle for triangulation.', + value=3.0, + range=(0.1, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='minAngleForLandmark', + label='Min Angle For Landmark', + description='Minimum angle for landmark.', + value=2.0, + range=(0.1, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='maxReprojectionError', + label='Max Reprojection Error', + description='Maximum reprojection error.', + value=4.0, + range=(0.1, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='minAngleInitialPair', + label='Min Angle Initial Pair', + description='Minimum angle for the initial pair.', + value=5.0, + range=(0.1, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='maxAngleInitialPair', + label='Max Angle Initial Pair', + description='Maximum angle for the initial pair.', + value=40.0, + range=(0.1, 60.0, 0.1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='useOnlyMatchesFromInputFolder', + label='Use Only Matches From Input Folder', + description='Use only matches from the input matchesFolder parameter.\n' + 'Matches folders previously added to the SfMData file will be ignored.', + value=False, + uid=[], + advanced=True, + ), + desc.BoolParam( + name='useRigConstraint', + label='Use Rig Constraint', + description='Enable/Disable rig constraint.', + value=True, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='rigMinNbCamerasForCalibration', + label='Min Nb Cameras For Rig Calibration', + description='Minimal number of cameras to start the calibration of the rig', + value=20, + range=(1, 50, 1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='lockAllIntrinsics', + label='Force Lock of All Intrinsic Camera Parameters', + description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' + 'principal point, distortion if any) during the reconstruction.\n' + 'This may be helpful if the input cameras are already fully calibrated.', + value=False, + uid=[0], + ), + desc.IntParam( + name='minNbCamerasToRefinePrincipalPoint', + label='Min Nb Cameras To Refine Principal Point', + description='Minimal number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera). ' + 'If we do not have enough cameras, the principal point in consider is considered in the center of the image. ' + 'If minNbCamerasToRefinePrincipalPoint<=0, the principal point is never refined. ' + 'If minNbCamerasToRefinePrincipalPoint==1, the principal point is always refined.', + value=3, + range=(0, 20, 1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='filterTrackForks', + label='Filter Track Forks', + description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' + 'lead to multiple features in the same image for a single track. \n', + value=False, + uid=[0], + ), + desc.BoolParam( + name='computeStructureColor', + label='Compute Structure Color', + description='Enable/Disable color computation of each 3D point.', + value=True, + uid=[0], + ), + desc.File( + name='initialPairA', + label='Initial Pair A', + description='Filename of the first image (without path).', + value='', + uid=[0], + ), + desc.File( + name='initialPairB', + label='Initial Pair B', + description='Filename of the second image (without path).', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='interFileExtension', + label='Inter File Extension', + description='Extension of the intermediate file export.', + value='.abc', + values=('.abc', '.ply'), + exclusive=True, + uid=[], + advanced=True, + ), + 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='SfMData', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfm.abc', + uid=[], + ), + desc.File( + name='outputViewsAndPoses', + label='Views and Poses', + description='''Path to the output sfmdata file with cameras (views and poses).''', + value=desc.Node.internalFolder + 'cameras.sfm', + uid=[], + ), + desc.File( + name='extraInfoFolder', + label='Folder', + description='Folder for intermediate reconstruction files and additional reconstruction information files.', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 719b1ce5e5773bc9261fe08344567f8b4d2a46b1 Mon Sep 17 00:00:00 2001 From: mh0g <matthieu.hog@gmail.com> Date: Tue, 13 Dec 2022 10:59:25 +0100 Subject: [PATCH 0622/1093] added doc line --- meshroom/aliceVision/Triangulate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Triangulate.py b/meshroom/aliceVision/Triangulate.py index f8f7d5ff9d..ecaa1dd16a 100644 --- a/meshroom/aliceVision/Triangulate.py +++ b/meshroom/aliceVision/Triangulate.py @@ -8,8 +8,7 @@ class Triangulate(desc.AVCommandLineNode): size = desc.DynamicNodeSize('input') category = 'Sparse Reconstruction' - documentation = ''' -''' + documentation = '''Perfom keypoint triangulation (similarly to what is done in the SfM)''' inputs = [ desc.File( From 273eb5215384cb1c76ddfa487739f16e14063dff Mon Sep 17 00:00:00 2001 From: mh0g <matthieu.hog@gmail.com> Date: Mon, 19 Dec 2022 15:17:01 +0100 Subject: [PATCH 0623/1093] started cleanup of sfm arguments --- meshroom/aliceVision/Triangulate.py | 162 +--------------------------- 1 file changed, 1 insertion(+), 161 deletions(-) diff --git a/meshroom/aliceVision/Triangulate.py b/meshroom/aliceVision/Triangulate.py index ecaa1dd16a..334f73fb2d 100644 --- a/meshroom/aliceVision/Triangulate.py +++ b/meshroom/aliceVision/Triangulate.py @@ -8,7 +8,7 @@ class Triangulate(desc.AVCommandLineNode): size = desc.DynamicNodeSize('input') category = 'Sparse Reconstruction' - documentation = '''Perfom keypoint triangulation (similarly to what is done in the SfM)''' + documentation = '''Perfom keypoint triangulation (as it is done in the SfM)''' inputs = [ desc.File( @@ -52,72 +52,6 @@ class Triangulate(desc.AVCommandLineNode): uid=[0], joinChar=',', ), - desc.ChoiceParam( - name='localizerEstimator', - label='Localizer Estimator', - description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', - value='acransac', - values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], - exclusive=True, - uid=[0], - advanced=True, - ), - desc.ChoiceParam( - name='observationConstraint', - label='Observation Constraint', - description='Observation constraint mode used in the optimization:\n' - ' * Basic: Use standard reprojection error in pixel coordinates\n' - ' * Scale: Use reprojection error in pixel coordinates but relative to the feature scale', - value='Scale', - values=['Basic', 'Scale'], - exclusive=True, - uid=[0], - advanced=True, - ), - desc.IntParam( - name='localizerEstimatorMaxIterations', - label='Localizer Max Ransac Iterations', - description='Maximum number of iterations allowed in ransac step.', - value=4096, - range=(1, 20000, 1), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='localizerEstimatorError', - label='Localizer Max Ransac Error', - description='Maximum error (in pixels) allowed for camera localization (resectioning).\n' - 'If set to 0, it will select a threshold according to the localizer estimator used\n' - '(if ACRansac, it will analyze the input data to select the optimal value).', - value=0.0, - range=(0.0, 100.0, 0.1), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='lockScenePreviouslyReconstructed', - label='Lock Scene Previously Reconstructed', - description='This option is useful for SfM augmentation. Lock previously reconstructed poses and intrinsics.', - value=False, - uid=[0], - ), - desc.BoolParam( - name='useLocalBA', - label='Local Bundle Adjustment', - description='It reduces the reconstruction time, especially for large datasets (500+ images),\n' - 'by avoiding computation of the Bundle Adjustment on areas that are not changing.', - value=True, - uid=[0], - ), - desc.IntParam( - name='localBAGraphDistance', - label='LocalBA Graph Distance', - description='Graph-distance limit to define the Active region in the Local Bundle Adjustment strategy.', - value=1, - range=(2, 10, 1), - uid=[0], - advanced=True, - ), desc.IntParam( name='maxNumberOfMatches', label='Maximum Number of Matches', @@ -137,14 +71,6 @@ class Triangulate(desc.AVCommandLineNode): range=(0, 50000, 1), uid=[0], ), - desc.IntParam( - name='minInputTrackLength', - label='Min Input Track Length', - description='Minimum track length in input of SfM', - value=2, - range=(2, 10, 1), - uid=[0], - ), desc.IntParam( name='minNumberOfObservationsForTriangulation', label='Min Observation For Triangulation', @@ -175,42 +101,6 @@ class Triangulate(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.FloatParam( - name='maxReprojectionError', - label='Max Reprojection Error', - description='Maximum reprojection error.', - value=4.0, - range=(0.1, 10.0, 0.1), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='minAngleInitialPair', - label='Min Angle Initial Pair', - description='Minimum angle for the initial pair.', - value=5.0, - range=(0.1, 10.0, 0.1), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='maxAngleInitialPair', - label='Max Angle Initial Pair', - description='Maximum angle for the initial pair.', - value=40.0, - range=(0.1, 60.0, 0.1), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='useOnlyMatchesFromInputFolder', - label='Use Only Matches From Input Folder', - description='Use only matches from the input matchesFolder parameter.\n' - 'Matches folders previously added to the SfMData file will be ignored.', - value=False, - uid=[], - advanced=True, - ), desc.BoolParam( name='useRigConstraint', label='Use Rig Constraint', @@ -228,35 +118,6 @@ class Triangulate(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.BoolParam( - name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters', - description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) during the reconstruction.\n' - 'This may be helpful if the input cameras are already fully calibrated.', - value=False, - uid=[0], - ), - desc.IntParam( - name='minNbCamerasToRefinePrincipalPoint', - label='Min Nb Cameras To Refine Principal Point', - description='Minimal number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera). ' - 'If we do not have enough cameras, the principal point in consider is considered in the center of the image. ' - 'If minNbCamerasToRefinePrincipalPoint<=0, the principal point is never refined. ' - 'If minNbCamerasToRefinePrincipalPoint==1, the principal point is always refined.', - value=3, - range=(0, 20, 1), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='filterTrackForks', - label='Filter Track Forks', - description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' - 'lead to multiple features in the same image for a single track. \n', - value=False, - uid=[0], - ), desc.BoolParam( name='computeStructureColor', label='Compute Structure Color', @@ -264,20 +125,6 @@ class Triangulate(desc.AVCommandLineNode): value=True, uid=[0], ), - desc.File( - name='initialPairA', - label='Initial Pair A', - description='Filename of the first image (without path).', - value='', - uid=[0], - ), - desc.File( - name='initialPairB', - label='Initial Pair B', - description='Filename of the second image (without path).', - value='', - uid=[0], - ), desc.ChoiceParam( name='interFileExtension', label='Inter File Extension', @@ -307,13 +154,6 @@ class Triangulate(desc.AVCommandLineNode): value=desc.Node.internalFolder + 'sfm.abc', uid=[], ), - desc.File( - name='outputViewsAndPoses', - label='Views and Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', - uid=[], - ), desc.File( name='extraInfoFolder', label='Folder', From e391d5be682ff8bd422122d2691d8949e72afa9e Mon Sep 17 00:00:00 2001 From: mh0g <matthieu.hog@gmail.com> Date: Wed, 21 Dec 2022 14:48:57 +0100 Subject: [PATCH 0624/1093] [Nodes] cosmetic changes --- meshroom/aliceVision/Triangulate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Triangulate.py b/meshroom/aliceVision/Triangulate.py index 334f73fb2d..222b95ff51 100644 --- a/meshroom/aliceVision/Triangulate.py +++ b/meshroom/aliceVision/Triangulate.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "1.0" from meshroom.core import desc @@ -14,7 +14,7 @@ class Triangulate(desc.AVCommandLineNode): desc.File( name='input', label='SfMData', - description='SfMData file.', + description='SfMData file. Must contain the camera calibration.', value='', uid=[0], ), From 26cffc02955c916de6924410899359974fac7458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 4 Jan 2023 11:55:14 +0100 Subject: [PATCH 0625/1093] [nodes] renamed Triangulate to SfMTriangulation --- .../aliceVision/{Triangulate.py => SfMTriangulation.py} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename meshroom/aliceVision/{Triangulate.py => SfMTriangulation.py} (95%) diff --git a/meshroom/aliceVision/Triangulate.py b/meshroom/aliceVision/SfMTriangulation.py similarity index 95% rename from meshroom/aliceVision/Triangulate.py rename to meshroom/aliceVision/SfMTriangulation.py index 222b95ff51..851a20075c 100644 --- a/meshroom/aliceVision/Triangulate.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -3,12 +3,15 @@ from meshroom.core import desc -class Triangulate(desc.AVCommandLineNode): +class SfMTriangulation(desc.AVCommandLineNode): commandLine = 'aliceVision_triangulate {allParams}' size = desc.DynamicNodeSize('input') category = 'Sparse Reconstruction' - documentation = '''Perfom keypoint triangulation (as it is done in the SfM)''' + documentation = ''' +This node perfoms keypoint triangulation on its input data. +Contrary to the StructureFromMotion node, this node does not infer the camera poses, therefore they must be given in the SfMData input. +''' inputs = [ desc.File( From 38cde47889fff08bea09482258b9ba2f09430899 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 6 Jan 2023 18:02:13 +0100 Subject: [PATCH 0626/1093] [HDR Nodes and Panorama Pipelines] Add working color space as input parameter in Sampling, Calibration and Merging HDR nodes. (unused in calibration, but useful to transfer from sampling to merging in pipelines) Update rawColorInterpretation default value and add some comments in cameraInit. --- meshroom/aliceVision/CameraInit.py | 28 +++++++++++++-------- meshroom/aliceVision/LdrToHdrCalibration.py | 11 ++++++++ meshroom/aliceVision/LdrToHdrMerge.py | 10 ++++++++ meshroom/aliceVision/LdrToHdrSampling.py | 10 ++++++++ meshroom/panoramaFisheyeHdr.mg | 6 +++-- meshroom/panoramaHdr.mg | 6 +++-- 6 files changed, 57 insertions(+), 14 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index db4134f04e..3af90fa825 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -162,13 +162,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): value='${ALICEVISION_SENSOR_DB}', uid=[], ), - desc.File( - name='colorProfileDatabase', - label='Color Profile Database', - description='''Color Profile database directory path.''', - value='${ALICEVISION_COLOR_PROFILE_DB}', - uid=[], - ), desc.FloatParam( name='defaultFieldOfView', label='Default Field Of View', @@ -207,17 +200,32 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): desc.ChoiceParam( name='rawColorInterpretation', label='RAW Color Interpretation', - description='Allows you to choose how raw data are color processed.', - value='LibRawWhiteBalancing', + description='Allows you to choose how raw data are color processed:\n' + 'None: Debayering without any color processing.\n' + 'LibRawNoWhiteBalancing: Simple neutralization.\n' + 'LibRawWhiteBalancing: Use internal white balancing from libraw.\n' + 'DCPLinearProcessing: Use DCP color profile.\n' + 'DCPMetadata: Same as None with DCP info added in metadata.\n', + value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], exclusive=True, uid=[0], ), + desc.File( + name='colorProfileDatabase', + label='Color Profile Database', + description='''Color Profile database directory path.''', + value='${ALICEVISION_COLOR_PROFILE_DB}', + enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), + uid=[], + ), desc.BoolParam( name='errorOnMissingColorProfile', label='Error On Missing DCP Color Profile', - description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown', + description='When enabled, if no color profile is found for at least one image, then an error is thrown.\n' + 'When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.', value=True, + enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), uid=[0], ), desc.ChoiceParam( diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 968ef98d81..135ed05844 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -114,6 +114,17 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): advanced=True, enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), + desc.ChoiceParam( + name='workingColorSpace', + label='Working Color Space', + description='Allows you to choose the color space in which the data are processed.', + value='sRGB', + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + exclusive=True, + uid=[], + group='user', # not used directly on the command line + enabled= lambda node: node.byPass.enabled and not node.byPass.value, + ), desc.IntParam( name='maxTotalPoints', label='Max Number of Points', diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 9259a3f185..68405199f7 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -105,6 +105,16 @@ class LdrToHdrMerge(desc.AVCommandLineNode): advanced=True, enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), + desc.ChoiceParam( + name='workingColorSpace', + label='Working Color Space', + description='Allows you to choose the color space in which the data are processed.', + value='sRGB', + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + exclusive=True, + uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, + ), desc.BoolParam( name='enableHighlight', label='Enable Highlight', diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 1d0f42b3c6..997e75161b 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -94,6 +94,16 @@ class LdrToHdrSampling(desc.AVCommandLineNode): advanced=True, enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), + desc.ChoiceParam( + name='workingColorSpace', + label='Working Color Space', + description='Allows you to choose the color space in which the data are processed.', + value='sRGB', + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + exclusive=True, + uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, + ), desc.IntParam( name='blockSize', label='Block Size', diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index e05afcc1b0..bf0a376218 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -29,7 +29,8 @@ "byPass": "{LdrToHdrCalibration_1.byPass}", "input": "{LdrToHdrCalibration_1.input}", "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", - "response": "{LdrToHdrCalibration_1.response}" + "response": "{LdrToHdrCalibration_1.response}", + "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" }, "nodeType": "LdrToHdrMerge", "position": [ @@ -66,7 +67,8 @@ "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", "byPass": "{LdrToHdrSampling_1.byPass}", "input": "{LdrToHdrSampling_1.input}", - "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" + "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", + "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" }, "nodeType": "LdrToHdrCalibration", "position": [ diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 316b3b8d03..278a5f3fcf 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -29,7 +29,8 @@ "byPass": "{LdrToHdrCalibration_1.byPass}", "input": "{LdrToHdrCalibration_1.input}", "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", - "response": "{LdrToHdrCalibration_1.response}" + "response": "{LdrToHdrCalibration_1.response}", + "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" }, "nodeType": "LdrToHdrMerge", "position": [ @@ -66,7 +67,8 @@ "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", "byPass": "{LdrToHdrSampling_1.byPass}", "input": "{LdrToHdrSampling_1.input}", - "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}" + "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", + "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" }, "nodeType": "LdrToHdrCalibration", "position": [ From 1dede8c41c9a07af34b3ea240eacc21d94ee5eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 9 Jan 2023 09:42:25 +0100 Subject: [PATCH 0627/1093] [nodes] update cmd line aliceVision_triangulate to aliceVision_sfmTriangulation --- meshroom/aliceVision/SfMTriangulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index 851a20075c..aad874bc82 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -4,7 +4,7 @@ class SfMTriangulation(desc.AVCommandLineNode): - commandLine = 'aliceVision_triangulate {allParams}' + commandLine = 'aliceVision_sfmTriangulation {allParams}' size = desc.DynamicNodeSize('input') category = 'Sparse Reconstruction' From 39aeae85849727cd28d4706371aaf34f66abb127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:19:52 +0100 Subject: [PATCH 0628/1093] [nodes] DepthMap: Update GammaC & GammaP descriptions --- meshroom/aliceVision/DepthMap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 651e4e2660..15b574f584 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -177,7 +177,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='sgmGammaC', label='GammaC', - description='GammaC Threshold.', + description='GammaC threshold used for similarity computation.', value=5.5, range=(0.0, 30.0, 0.5), uid=[0], @@ -186,7 +186,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='sgmGammaP', label='GammaP', - description='GammaP Threshold.', + description='GammaP threshold used for similarity computation.', value=8.0, range=(0.0, 30.0, 0.5), uid=[0], @@ -331,7 +331,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='refineGammaC', label='GammaC', - description='GammaC Threshold.', + description='GammaC threshold used for similarity computation.', value=15.5, range=(0.0, 30.0, 0.5), uid=[0], @@ -340,7 +340,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='refineGammaP', label='GammaP', - description='GammaP threshold.', + description='GammaP threshold used for similarity computation.', value=8.0, range=(0.0, 30.0, 0.5), uid=[0], From 6fc87d67b6caa16ef0d73f9850afb647158f24ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:20:59 +0100 Subject: [PATCH 0629/1093] [nodes] DepthMap: Fix typo --- meshroom/aliceVision/DepthMap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 15b574f584..085eaf7ade 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -64,9 +64,9 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, ), desc.GroupAttribute( - name="tilling", - label="Tilling Parameters", - description='Tilling Parameters.', + name="tiling", + label="Tiling Parameters", + description='Tiling Parameters.', group=None, groupDesc=[ desc.IntParam( @@ -126,7 +126,7 @@ class DepthMap(desc.AVCommandLineNode): groupDesc=[ desc.IntParam( name='sgmScale', - label='Downscale factor', + label='Downscale Factor', description='Downscale factor used to compute the similarity volume.', value=2, range=(-1, 10, 1), From 55ea0a1c4201d24b1eabd63b2120d5eee55ae08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:21:58 +0100 Subject: [PATCH 0630/1093] [nodes] DepthMap: Remove parameter sgmMaxDepthsPerTc --- meshroom/aliceVision/DepthMap.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 085eaf7ade..31acd42486 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -219,15 +219,6 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.IntParam( - name='sgmMaxDepthsPerTc', - label='Max Depths Per Camera Pairs', - description='Max number of depths to sweep in the similarity volume per Rc/Tc cameras.', - value=1500, - range=(1, 5000, 1), - uid=[0], - advanced=True, - ), desc.StringParam( name='sgmFilteringAxes', label='Filtering Axes', From 31058d312a39da9754a15b0f00f51d6e954dfaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:23:21 +0100 Subject: [PATCH 0631/1093] [nodes] DepthMap: Remove tilePattern wrong semantic --- meshroom/aliceVision/DepthMap.py | 1 - 1 file changed, 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 31acd42486..24fbdce492 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -455,7 +455,6 @@ class DepthMap(desc.AVCommandLineNode): name='tilePattern', label='Tile Pattern', description='DEBUG: Tile pattern', - semantic='image', value=desc.Node.internalFolder + '<VIEW_ID>_tilePattern.obj', uid=[], group='', # do not export on the command line From db033a315a60b8dd24145c06dd1f5ece4482b1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Wed, 11 Jan 2023 15:38:25 +0100 Subject: [PATCH 0632/1093] [nodes] DepthMap: Update and imporve parameter names and descriptions --- meshroom/aliceVision/DepthMap.py | 195 +++++++++++++++++-------------- 1 file changed, 110 insertions(+), 85 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 24fbdce492..023da0970c 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -12,7 +12,7 @@ class DepthMap(desc.AVCommandLineNode): category = 'Dense Reconstruction' documentation = ''' -For each camera that have been estimated by the Structure-From-Motion, it estimates the depth value per pixel. +Estimate a depth map for each calibrated camera using Plane Sweeping, a multi-view stereo algorithm notable for its efficiency on modern graphics hardware (GPU). Adjust the downscale factor to compute depth maps at a higher/lower resolution. Use a downscale factor of one (full-resolution) only if the quality of the input images is really high (camera on a tripod with high-quality optics). @@ -39,7 +39,10 @@ class DepthMap(desc.AVCommandLineNode): desc.ChoiceParam( name='downscale', label='Downscale', - description='Image downscale factor.', + description='Downscale the input images to compute the depth map.\n' + 'Full resolution (downscale=1) gives the best result,\n' + 'but using a larger downscale will reduce computation time at the expense of quality.\n' + 'If the images are noisy, blurry or if the surfaces are challenging (weakly-textured or with specularities) a larger downscale may improve.', value=2, values=[1, 2, 4, 8, 16], exclusive=True, @@ -48,7 +51,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='minViewAngle', label='Min View Angle', - description='Minimum angle between two views.', + description='Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).', value=2.0, range=(0.0, 10.0, 0.1), uid=[0], @@ -57,16 +60,16 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='maxViewAngle', label='Max View Angle', - description='Maximum angle between two views.', + description='Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).', value=70.0, range=(10.0, 120.0, 1.0), uid=[0], advanced=True, ), desc.GroupAttribute( - name="tiling", - label="Tiling Parameters", - description='Tiling Parameters.', + name='tiling', + label='Tiling', + description='Tiles are used to split the computation into fixed buffers to best fit the GPU.', group=None, groupDesc=[ desc.IntParam( @@ -88,7 +91,7 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name='tilePadding', label='Padding', - description='Tile buffer padding for overlapping.', + description='Buffer padding for overlapping tiles.', value=64, range=(0, 500, 1), uid=[0], @@ -96,7 +99,7 @@ class DepthMap(desc.AVCommandLineNode): desc.BoolParam( name='autoAdjustSmallImage', label='Auto Adjust Small Image', - description='Automatically override depth map parameters if images are smaller than one tile.', + description='Automatically adjust depth map parameters if images are smaller than one tile (maxTCamsPerTile=maxTCams, adjust step if needed).', value=True, uid=[0], advanced=True, @@ -105,7 +108,7 @@ class DepthMap(desc.AVCommandLineNode): desc.BoolParam( name='chooseTCamsPerTile', label='Choose Neighbour Cameras Per Tile', - description='Choose neighbour cameras per tile.', + description='Choose neighbour cameras per tile or globally to the image.', value=True, uid=[0], advanced=True, @@ -113,21 +116,22 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name='maxTCams', label='Max Nb Neighbour Cameras', - description='Maximum number of neighbour cameras.', + description='Maximum number of neighbour cameras per image.', value=10, range=(1, 20, 1), uid=[0], ), desc.GroupAttribute( - name="sgm", - label="SGM Parameters", - description='Semi Global Matching Parameters.', + name='sgm', + label='SGM', + description='Semi-Global Matching (SGM) step computes a similarity volume and extracts the initial low-resolution depth map.\n' + 'This method is highly robust but has limited depth precision (banding artifacts due to a limited list of depth planes).', group=None, groupDesc=[ desc.IntParam( name='sgmScale', label='Downscale Factor', - description='Downscale factor used to compute the similarity volume.', + description='Downscale factor applied on source images for the SGM step (in addition to the global downscale).', value=2, range=(-1, 10, 1), uid=[0], @@ -135,7 +139,7 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name='sgmStepXY', label='Step XY', - description='Step used to compute the similarity volume on X and Y axis.', + description='The step is used to compute the similarity volume for one pixel over N (in the XY image plane).', value=2, range=(-1, 10, 1), uid=[0], @@ -143,7 +147,9 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name='sgmStepZ', label='Step Z', - description='Step used to compute the similarity volume on Z axis.', + description='Initial step used to compute the similarity volume on Z axis (every N pixels on the epilolar line).\n' + '-1 means automatic estimation.\n' + 'This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).', value=-1, range=(-1, 10, 1), uid=[0], @@ -151,7 +157,7 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name='sgmMaxTCamsPerTile', label='Max Nb Neighbour Cameras Per Tile', - description='Maximum number of neighbour cameras.', + description='Maximum number of neighbour cameras used per tile.', value=4, range=(1, 20, 1), uid=[0], @@ -159,16 +165,24 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name='sgmWSH', label='WSH', - description='Half-size of the patch used to compute the similarity.', + description='Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.', value=4, range=(1, 20, 1), uid=[0], advanced=True, ), + desc.BoolParam( + name='sgmUseSfmSeeds', + label='Use SfM Landmarks', + description='Use landmarks from Structure-from-Motion as input seeds to define min/max depth ranges.', + value=True, + uid=[0], + advanced=True, + ), desc.FloatParam( name='sgmSeedsRangeInflate', label='Seeds Range Inflate', - description='Seeds range inflate factor.', + description='Inflate factor to add margins around SfM seeds.', value=0.2, range=(0.0, 2.0, 0.1), uid=[0], @@ -195,7 +209,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='sgmP1', label='P1', - description='P1 parameter.', + description='P1 parameter for SGM filtering.', value=10.0, range=(0.0, 255.0, 0.5), uid=[0], @@ -204,7 +218,7 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name='sgmP2Weighting', label='P2 Weighting', - description='P2 weighting parameter.', + description='P2 weighting parameter for SGM filtering.', value=100.0, range=(-255.0, 255.0, 0.5), uid=[0], @@ -213,7 +227,7 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name='sgmMaxDepths', label='Max Depths', - description='Max number of depths in the overall similarity volume.', + description='Maximum number of depths in the similarity volume.', value=1500, range=(1, 5000, 1), uid=[0], @@ -222,102 +236,102 @@ class DepthMap(desc.AVCommandLineNode): desc.StringParam( name='sgmFilteringAxes', label='Filtering Axes', - description="Define axes for the filtering of the similarity volume.", + description='Define axes for the filtering of the similarity volume.', value='YX', uid=[0], advanced=True, ), desc.BoolParam( - name='sgmUseSfmSeeds', - label='Use SfM Landmarks', - description='Use landmarks from SfM to define the ranges for the plane sweeping.', - value=True, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='sgmChooseDepthListPerTile', - label='Choose Depth List Per Tile', - description='SChoose depth list per tile.', + name='sgmDepthListPerTile', + label='Depth List Per Tile', + description='Select the list of depth planes per tile or globally to the image.', value=True, uid=[0], advanced=True, ), ]), desc.GroupAttribute( - name="refine", - label="Refine Parameters", - description='Refine Parameters.', + name='refine', + label='Refine', + description='The refine step computes a similarity volume in higher resolution but with a small depth range around the SGM depth map.\n' + 'This allows to compute a depth map with sub-pixel accuracy.', group=None, groupDesc=[ + desc.BoolParam( + name='refineEnabled', + label='Enable', + description='Enable depth/similarity map refinement process.', + value=True, + uid=[0], + ), desc.IntParam( name='refineScale', label='Downscale factor', - description='Downscale factor.', + description='Downscale factor applied on source images for the Refine step (in addition to the global downscale).', value=1, range=(-1, 10, 1), uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, ), desc.IntParam( name='refineStepXY', label='Step XY', - description='Step on X and Y axis.', + description='The step is used to compute the refine volume for one pixel over N (in the XY image plane).', value=1, range=(-1, 10, 1), uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, ), desc.IntParam( - name='refineNSamplesHalf', - label='Number of Samples', - description='Number of samples.', - value=150, - range=(1, 500, 10), + name='refineMaxTCamsPerTile', + label='Max Nb Neighbour Cameras Per Tile', + description='Maximum number of neighbour cameras used per tile.', + value=4, + range=(1, 20, 1), uid=[0], - advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, ), desc.IntParam( - name='refineNDepthsToRefine', - label='Number of Depths', - description='Number of depths.', - value=31, - range=(1, 100, 1), + name='refineSubsampling', + label='Number of Subsamples', + description='The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).', + value=10, + range=(1, 30, 1), uid=[0], advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, ), desc.IntParam( - name='refineNiters', - label='Number of Iterations', - description='Number of iterations.', - value=100, - range=(1, 500, 10), + name='refineHalfNbDepths', + label='Half Number of Depths', + description='The thickness of the refine area around the initial depth map.\n' + 'This parameter defines the number of depths in front of and behind the initial value \n' + 'for which we evaluate the similarity with a finer z sampling.', + value=15, + range=(1, 50, 1), uid=[0], advanced=True, - ), - desc.IntParam( - name='refineMaxTCamsPerTile', - label='Max Nb Neighbour Cameras Per Tile', - description='Maximum number of neighbour cameras.', - value=4, - range=(1, 20, 1), - uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, ), desc.IntParam( name='refineWSH', label='WSH', - description='Half-size of the patch used to compute the similarity.', + description='Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.', value=3, range=(1, 20, 1), uid=[0], advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, ), desc.FloatParam( name='refineSigma', label='Sigma', - description='Sigma Threshold.', + description='Sigma (2*sigma^2) of the gaussian filter used to extract the best depth from the refine volume.', value=15.0, range=(0.0, 30.0, 0.5), uid=[0], advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, ), desc.FloatParam( name='refineGammaC', @@ -327,6 +341,7 @@ class DepthMap(desc.AVCommandLineNode): range=(0.0, 30.0, 0.5), uid=[0], advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, ), desc.FloatParam( name='refineGammaP', @@ -336,28 +351,38 @@ class DepthMap(desc.AVCommandLineNode): range=(0.0, 30.0, 0.5), uid=[0], advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, ), + ]), + desc.GroupAttribute( + name="colorOptimization", + label="Color Optimization", + description='Color optimization post-process parameters.', + group=None, + groupDesc=[ desc.BoolParam( - name='refineDoRefineFuse', - label='Refine and Fuse', - description='Perform Refine/Fuse', + name='colorOptimizationEnabled', + label='Enable', + description='Enable depth/similarity map post-process color optimization.', value=True, uid=[0], - advanced=True, ), - desc.BoolParam( - name='refineDoRefineOptimization', - label='Post-Process Optimization', - description='Perform Refine post-process optimization', - value=True, + desc.IntParam( + name='colorOptimizationNbIterations', + label='Number of Iterations', + description='Number of iterations of the optimization.', + value=100, + range=(1, 500, 10), uid=[0], advanced=True, + enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, ), ]), desc.GroupAttribute( - name="intermediateResults", - label="Intermediate Results", - description='Intermediate Results Parameters.', + name='intermediateResults', + label='Intermediate Results', + description='Intermediate results parameters for debug purposes.\n' + 'Warning: Dramatically affect performances and use large amount of storage.', advanced=True, group=None, groupDesc=[ @@ -372,7 +397,7 @@ class DepthMap(desc.AVCommandLineNode): desc.BoolParam( name='exportIntermediateVolumes', label='Export Volumes', - description='Export intermediate similarity volumes from the SGM and Refine steps.', + description='Export intermediate full similarity volumes from the SGM and Refine steps.', value=False, uid=[], advanced=True, @@ -388,7 +413,7 @@ class DepthMap(desc.AVCommandLineNode): desc.BoolParam( name='exportIntermediateVolume9pCsv', label='Export 9 Points', - description='Export intermediate volumes 9 points CSV from the SGM and Refine steps.', + description='Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.', value=False, uid=[], advanced=True, @@ -396,7 +421,7 @@ class DepthMap(desc.AVCommandLineNode): desc.BoolParam( name='exportTilePattern', label='Export Tile Pattern', - description='Export workflow tile pattern.', + description='Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.', value=False, uid=[], advanced=True, @@ -454,7 +479,7 @@ class DepthMap(desc.AVCommandLineNode): desc.File( name='tilePattern', label='Tile Pattern', - description='DEBUG: Tile pattern', + description='Debug: Tile pattern', value=desc.Node.internalFolder + '<VIEW_ID>_tilePattern.obj', uid=[], group='', # do not export on the command line @@ -463,7 +488,7 @@ class DepthMap(desc.AVCommandLineNode): desc.File( name='depthSgm', label='Depth Maps SGM', - description='DEBUG: Depth maps SGM', + description='Debug: Depth maps SGM', semantic='image', value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_scale2_sgm.exr', uid=[], @@ -473,7 +498,7 @@ class DepthMap(desc.AVCommandLineNode): desc.File( name='depthSgmUpscaled', label='Depth Maps SGM Upscaled', - description='DEBUG: Depth maps SGM upscaled', + description='Debug: Depth maps SGM upscaled', semantic='image', value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_sgmUpscaled.exr', uid=[], @@ -483,7 +508,7 @@ class DepthMap(desc.AVCommandLineNode): desc.File( name='depthRefined', label='Depth Maps Refined', - description='DEBUG: Depth maps after refinement', + description='Debug: Depth maps after refinement', semantic='image', value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_refinedFused.exr', uid=[], From f4e3483f2f5a3faad090d01cc291282ecbd32880 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 22 Jan 2023 19:30:23 +0100 Subject: [PATCH 0633/1093] [nodes] CameraInit: upgrade version following the parameters changes The PR https://github.com/alicevision/Meshroom/pull/1863 changes the order of parameters and modify the node UID, so it requires a version upgrade. --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 3af90fa825..000e4c6102 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "8.0" +__version__ = "9.0" import os import json From 2e7418cca3a01dc260319f0eea9abbb205fee0d2 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 22 Jan 2023 19:35:08 +0100 Subject: [PATCH 0634/1093] [nodes] CameraInit: upgrade version in pipelines --- meshroom/cameraTracking.mg | 4 ++-- meshroom/panoramaFisheyeHdr.mg | 4 ++-- meshroom/panoramaHdr.mg | 4 ++-- meshroom/photogrammetry.mg | 4 ++-- meshroom/photogrammetryAndCameraTracking.mg | 4 ++-- meshroom/photogrammetryDraft.mg | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 40b5e9d948..ffbf697d0e 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -8,7 +8,7 @@ "ExportAnimatedCamera": "2.0", "FeatureMatching": "2.0", "DistortionCalibration": "2.0", - "CameraInit": "8.0", + "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "StructureFromMotion": "2.0" @@ -101,4 +101,4 @@ ] } } -} \ No newline at end of file +} diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index bf0a376218..ebaa15d2b6 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -10,7 +10,7 @@ "LdrToHdrCalibration": "3.0", "LdrToHdrSampling": "4.0", "PanoramaInit": "2.0", - "CameraInit": "8.0", + "CameraInit": "9.0", "SfMTransform": "3.0", "PanoramaMerging": "1.0", "ImageMatching": "2.0", @@ -232,4 +232,4 @@ ] } } -} \ No newline at end of file +} diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 278a5f3fcf..2da01a006b 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -10,7 +10,7 @@ "LdrToHdrCalibration": "3.0", "LdrToHdrSampling": "4.0", "PanoramaInit": "2.0", - "CameraInit": "8.0", + "CameraInit": "9.0", "SfMTransform": "3.0", "PanoramaMerging": "1.0", "ImageMatching": "2.0", @@ -227,4 +227,4 @@ ] } } -} \ No newline at end of file +} diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 72c54b56e5..6354e8206a 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -11,7 +11,7 @@ "PrepareDenseScene": "3.0", "DepthMap": "2.0", "StructureFromMotion": "2.0", - "CameraInit": "8.0", + "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "Meshing": "7.0", @@ -144,4 +144,4 @@ ] } } -} \ No newline at end of file +} diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 62d004126c..81d12227cb 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -8,7 +8,7 @@ "ExportAnimatedCamera": "2.0", "FeatureMatching": "2.0", "DistortionCalibration": "2.0", - "CameraInit": "8.0", + "CameraInit": "9.0", "ImageMatchingMultiSfM": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", @@ -163,4 +163,4 @@ ] } } -} \ No newline at end of file +} diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index f8f5d7d67c..a76c80f3cf 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -5,7 +5,7 @@ "MeshFiltering": "3.0", "Texturing": "6.0", "StructureFromMotion": "2.0", - "CameraInit": "8.0", + "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "Meshing": "7.0" @@ -106,4 +106,4 @@ ] } } -} \ No newline at end of file +} From fc4873fc696aed011052351e70723b1c35f3992a Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@technicolor.com> Date: Mon, 23 Jan 2023 12:54:04 +0100 Subject: [PATCH 0635/1093] [sfmtransform] Transformation parameter availability --- meshroom/aliceVision/SfMTransform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 4b7378f0b7..9f0e687da7 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -57,7 +57,7 @@ class SfMTransform(desc.AVCommandLineNode): " * from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg')", value='', uid=[0], - enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera", + enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera" or node.method.value == "auto_from_cameras_x_axis", ), desc.GroupAttribute( name="manualTransform", From be5acbef302337cd5cbb45d8fd2a39044a55bec9 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 23 Jan 2023 18:24:07 +0100 Subject: [PATCH 0636/1093] [ImageProcessing node] Add applyDcpMetadata boolean parameter. --- meshroom/aliceVision/ImageProcessing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 6e2cdb879d..a5a6a2d9b6 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -374,6 +374,14 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], ), + desc.BoolParam( + name='applyDcpMetadata', + label='Apply DCP metadata', + description='If the image contains some DCP metadata then generate a DCP profile from them and apply it on the image content', + value=False, + uid=[0], + ), + desc.File( name='colorProfileDatabase', label='Color Profile Database', From c1b5b4b5a91f529d4ecbad4fa43c3579e3865419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 1 Feb 2023 11:28:30 +0100 Subject: [PATCH 0637/1093] [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. --- meshroom/aliceVision/KeyframeSelection.py | 173 ++++++++-------------- 1 file changed, 61 insertions(+), 112 deletions(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 6a44d33a66..1ad75bf3de 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -24,9 +24,9 @@ class KeyframeSelection(desc.AVCommandLineNode): value="", uid=[0], ), - name='mediaPaths', - label='Media Paths', - description='Input video files or image sequence directories.', + name="mediaPaths", + label="Media Paths", + description="Input video files or image sequence directories.", ), desc.ListAttribute( elementDesc=desc.File( @@ -56,124 +56,73 @@ class KeyframeSelection(desc.AVCommandLineNode): elementDesc=desc.FloatParam( name="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, 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, 1), - 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='${ALICEVISION_SENSOR_DB}', - uid=[0], + description="Focals in mm (will be used if not 0)." ), desc.File( - name='voctreePath', - label='Voctree Path', - description='''Vocabulary tree path.''', - value='${ALICEVISION_VOCTREE}', - uid=[0], - ), - desc.BoolParam( - name='useSparseDistanceSelection', - label='Use Sparse Distance Selection', - description='Use sparseDistance selection in order to avoid similar keyframes.', - value=False, + name="sensorDbPath", + label="Sensor Db Path", + description="Camera sensor width database path.", + value="${ALICEVISION_SENSOR_DB}", uid=[0], ), - desc.BoolParam( - name='useSharpnessSelection', - label='Use Sharpness Selection', - description='Use frame sharpness score for keyframe selection.', - value=False, - uid=[0], - ), - desc.FloatParam( - 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.ChoiceParam( - name='sharpnessPreset', - label='Sharpness Preset', - 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', - 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.GroupAttribute( + name="regularSelection", + label="Regular Keyframe Selection", + description="Parameters for the regular keyframe selection.\nKeyframes are selected regularly over the sequence with respect to the set parameters.", + group=None, # skip group from command line + groupDesc=[ + desc.BoolParam( + name="useRegularSelection", + label="Use Regular Selection", + description="Enable and use the regular keyframe selection.", + value=True, + uid=[0], + enabled=False, # only method for now, it must always be enabled + ), + desc.IntParam( + name="minFrameStep", + label="Min Frame Step", + description="Minimum number of frames between two keyframes.", + value=12, + range=(1, 1000, 1), + uid=[0], + enabled=lambda node: node.regularSelection.useRegularSelection.value + ), + desc.IntParam( + name="maxFrameStep", + label="Max Frame Step", + description="Maximum number of frames between two keyframes. Ignored if equal to 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( - name='verboseLevel', - label='Verbose Level', - description='verbosity level (fatal, error, warning, info, debug, trace).', - value='info', - values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], + 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=[], ), @@ -181,9 +130,9 @@ class KeyframeSelection(desc.AVCommandLineNode): outputs = [ desc.File( - name='outputFolder', - label='Folder', - description='''Output keyframes folder for extracted frames.''', + name="outputFolder", + label="Folder", + description="Output keyframes folder for extracted frames.", value=desc.Node.internalFolder, uid=[], ), From 3c92fbee401f9db96666e66c6e3e3b4d1f9f4e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 24 Jan 2023 15:16:42 +0000 Subject: [PATCH 0638/1093] [nodes] KeyframeSelection: Add smart keyframe selection method Group the keyframe selection parameters together depending on the method (regular or smart) they belong to. Parameters for a method are only shown if that method is the currently selected one. --- meshroom/aliceVision/KeyframeSelection.py | 150 ++++++++++++++++------ 1 file changed, 113 insertions(+), 37 deletions(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 1ad75bf3de..d0d75b1406 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -73,49 +73,125 @@ class KeyframeSelection(desc.AVCommandLineNode): uid=[0], ), desc.GroupAttribute( - name="regularSelection", - label="Regular Keyframe Selection", - description="Parameters for the regular keyframe selection.\nKeyframes are selected regularly over the sequence with respect to the set parameters.", + name="selectionMethod", + label="Keyframe Selection Method", + description="Selection the regular or smart method for the keyframe selection.\n" + "- With the regular method, keyframes are selected regularly over the sequence with respect to the set parameters.\n" + "- With the smart method, keyframes are selected based on their sharpness and optical flow scores.", group=None, # skip group from command line groupDesc=[ desc.BoolParam( - name="useRegularSelection", - label="Use Regular Selection", - description="Enable and use the regular keyframe selection.", + name='useSmartSelection', + label='Use Smart Keyframe Selection', + description="Use the smart keyframe selection.", value=True, - uid=[0], - enabled=False, # only method for now, it must always be enabled + uid=[0] ), - desc.IntParam( - name="minFrameStep", - label="Min Frame Step", - description="Minimum number of frames between two keyframes.", - value=12, - range=(1, 1000, 1), - uid=[0], - enabled=lambda node: node.regularSelection.useRegularSelection.value + desc.GroupAttribute( + name="regularSelection", + label="Regular Keyframe Selection", + description="Parameters for the regular keyframe selection.\nKeyframes are selected regularly over the sequence with respect to the set parameters.", + group=None, # skip group from command line + enabled=lambda node: node.selectionMethod.useSmartSelection.value is False, + groupDesc=[ + desc.IntParam( + name="minFrameStep", + label="Min Frame Step", + description="Minimum number of frames between two keyframes.", + value=12, + range=(1, 1000, 1), + uid=[0], + enabled=lambda node: node.regularSelection.enabled + ), + desc.IntParam( + name="maxFrameStep", + label="Max Frame Step", + description="Maximum number of frames between two keyframes. Ignored if equal to 0.", + value=0, + range=(0, 1000, 1), + uid=[0], + enabled=lambda node: node.regularSelection.enabled + ), + 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.enabled + ), + ], ), - desc.IntParam( - name="maxFrameStep", - label="Max Frame Step", - description="Maximum number of frames between two keyframes. Ignored if equal to 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.GroupAttribute( + name="smartSelection", + label="Smart Keyframe Selection", + description="Parameters for the smart keyframe selection.\nKeyframes are selected based on their sharpness and optical flow scores.", + group=None, # skip group from command line + enabled=lambda node: node.selectionMethod.useSmartSelection.value, + groupDesc=[ + desc.FloatParam( + name="pxDisplacement", + label="Pixel Displacement", + description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection", + value=3.0, + range=(0.0, 100.0, 1.0), + uid=[0], + enabled=lambda node: node.smartSelection.enabled + ), + desc.IntParam( + name="minNbOutFrames", + label="Min Nb Output Frames", + description="Minimum number of frames selected to be keyframes.", + value=10, + range=(1, 100, 1), + uid=[0], + enabled=lambda node: node.smartSelection.enabled + ), + desc.IntParam( + name="maxNbOutFrames", + label="Max Nb Output Frames", + description="Maximum number of frames selected to be keyframes.", + value=2000, + range=(1, 10000, 1), + uid=[0], + enabled=lambda node: node.smartSelection.enabled + ), + desc.IntParam( + name="rescaledWidth", + label="Rescaled Frame's Width", + description="Width, in pixels, of the frame after a rescale. Aspect ratio will be preserved. No rescale will be performed if equal to 0.", + value=720, + range=(0, 4000, 1), + uid=[0], + enabled=lambda node: node.smartSelection.enabled, + advanced=True + ), + desc.IntParam( + name="sharpnessWindowSize", + label="Sharpness Window Size", + description="The size, in pixels, of the sliding window used to evaluate a frame's sharpness.", + value=200, + range=(1, 10000, 1), + uid=[0], + enabled=lambda node: node.smartSelection.enabled, + advanced=True + ), + desc.IntParam( + name="flowCellSize", + label="Optical Flow Cell Size", + description="The size, in pixels, of the cells within a frame in which the optical flow scores is evaluated.", + value=90, + range=(10, 2000, 1), + uid=[0], + enabled=lambda node: node.smartSelection.enabled, + advanced=True + ), + ] + ) + ] ), desc.ChoiceParam( name="verboseLevel", From dd8cbd1b0db14085dc1a400060f5ef147083d245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 24 Jan 2023 17:58:09 +0100 Subject: [PATCH 0639/1093] [nodes] KeyframeSelection: Add debug options to export scores as a CSV --- meshroom/aliceVision/KeyframeSelection.py | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index d0d75b1406..6df11e7774 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -193,6 +193,48 @@ class KeyframeSelection(desc.AVCommandLineNode): ) ] ), + desc.GroupAttribute( + name="debugOptions", + label="Debug Options", + description="Debug options for the Smart keyframe selection method.", + group=None, # skip group from command line + enabled=lambda node: node.selectionMethod.useSmartSelection.value, + advanced=True, + groupDesc=[ + desc.GroupAttribute( + name="debugScores", + label="Export Scores", + description="Export the computed sharpness and optical flow scores to a file.", + group=None, # skip group from command line + enabled=lambda node: node.debugOptions.enabled, + groupDesc=[ + desc.BoolParam( + name="exportScores", + label="Export Scores To CSV", + description="Export the computed sharpness and optical flow scores to a CSV file.", + value=False, + uid=[0] + ), + desc.StringParam( + name="csvFilename", + label="CSV Filename", + description="Name of the CSV file to export. It will be written in the node's output folder.", + value="scores.csv", + uid=[0], + enabled=lambda node: node.debugOptions.debugScores.exportScores.value + ), + desc.BoolParam( + name="exportSelectedFrames", + label="Export Selected Frames", + description="Add a column in the CSV file containing 1s for frames that were selected and 0s for those that were not.", + value=False, + uid=[0], + enabled=lambda node: node.debugOptions.debugScores.exportScores.value + ) + ] + ) + ] + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From a5a68f135f647afefeb003c9836ffd25261cba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 24 Jan 2023 18:07:07 +0100 Subject: [PATCH 0640/1093] [nodes] KeyframeSelection: Add debug option to skip the keyframe selection If enabled, the scores are computed and, if requested, exported to a CSV file, but the keyframe selection itself is not performed. --- meshroom/aliceVision/KeyframeSelection.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 6df11e7774..f049ea5afb 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -232,6 +232,14 @@ class KeyframeSelection(desc.AVCommandLineNode): enabled=lambda node: node.debugOptions.debugScores.exportScores.value ) ] + ), + desc.BoolParam( + name="skipSelection", + label="Skip Frame Selection", + description="Compute the sharpness and optical flow scores, but do not proceed to the frame selection.", + value=False, + uid=[0], + enabled=lambda node: node.debugOptions.enabled ) ] ), From 8222e670866ba8044a243dd898d0ff8f167c102e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 25 Jan 2023 09:37:26 +0100 Subject: [PATCH 0641/1093] [nodes] KeyframeSelection: Add options to visualise computed motion vectors Add two debug options to export the computed motion vectors in HSV as PNG images. --- meshroom/aliceVision/KeyframeSelection.py | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index f049ea5afb..43a873b769 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -233,6 +233,32 @@ class KeyframeSelection(desc.AVCommandLineNode): ) ] ), + desc.GroupAttribute( + name="opticalFlowVisualisation", + label="Optical Flow Visualisation", + description="Visualise the motion vectors for each input frame in HSV.", + group=None, # skip group from command line + enabled=lambda node: node.debugOptions.enabled, + groupDesc=[ + desc.BoolParam( + name="exportFlowVisualisation", + label="Visualise Optical Flow", + description="Export each frame's optical flow HSV visualisation as PNG images.", + value=False, + uid=[0], + enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled + ), + desc.BoolParam( + name="flowVisualisationOnly", + label="Only Visualise Optical Flow", + description="Export each frame's optical flow HSV visualisation as PNG images, but do not perform any score computation or frame selection.\n" + "If this option is selected, all the other options will be ignored.", + value=False, + uid=[0], + enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled + ) + ] + ), desc.BoolParam( name="skipSelection", label="Skip Frame Selection", From d1b4b14cda2c936e891b711d587a0da2732d441f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 25 Jan 2023 18:28:09 +0100 Subject: [PATCH 0642/1093] [nodes] KeyframeSelection: Update node's version --- meshroom/aliceVision/KeyframeSelection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 43a873b769..8d8323a677 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" import os from meshroom.core import desc From d0aaeecfe4b9829fed3ef4cf344de4cb30b73fb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 31 Jan 2023 20:02:29 +0100 Subject: [PATCH 0643/1093] [nodes] KeyframeSelection: Add support for several output file formats Keyframes will be written as JPG, PNG or EXR files (by default, JPG). If EXR is the selected output extension, the storage data type can also be chosen. --- meshroom/aliceVision/KeyframeSelection.py | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 8d8323a677..c10c36b310 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -193,6 +193,30 @@ class KeyframeSelection(desc.AVCommandLineNode): ) ] ), + desc.ChoiceParam( + name="outputExtension", + label="Keyframes File Extension", + description="File extension of the written keyframes.", + value="jpg", + values=["exr", "jpg", "png"], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name="storageDataType", + label="EXR Storage Data Type", + description="Storage image data type for keyframes written to EXR files:\n" + " * float: Use full floating point (32 bits per channel)\n" + " * half: Use half float (16 bits per channel)\n" + " * halfFinite: Use half float, but clamp values to avoid non-finite values\n" + " * auto: Use half float if all values can fit, else use full float\n", + value="float", + values=["float", "half", "halfFinite", "auto"], + exclusive=True, + uid=[0], + enabled=lambda node: node.outputExtension.value == "exr", + advanced=True + ), desc.GroupAttribute( name="debugOptions", label="Debug Options", From 251cdb5477d0de9848e6bba04a928ffa426e8b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 1 Feb 2023 18:51:51 +0100 Subject: [PATCH 0644/1093] [nodes] KeyframeSelection: Split rescaling parameter in two new ones Split the existing "rescaledWidth" parameter into "rescaledWidthSharpness" and "rescaledWidthFlow" to allow independent rescaling of the frames used to compute the sharpness and motion scores. --- meshroom/aliceVision/KeyframeSelection.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index c10c36b310..18bcd0c82d 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -160,9 +160,21 @@ class KeyframeSelection(desc.AVCommandLineNode): enabled=lambda node: node.smartSelection.enabled ), desc.IntParam( - name="rescaledWidth", - label="Rescaled Frame's Width", - description="Width, in pixels, of the frame after a rescale. Aspect ratio will be preserved. No rescale will be performed if equal to 0.", + name="rescaledWidthSharpness", + label="Rescaled Frame's Width For Sharpness", + description="Width, in pixels, of the frame used for the sharpness score computation after a rescale.\n" + "Aspect ratio will be preserved. No rescale will be performed if equal to 0.", + value=720, + range=(0, 4000, 1), + uid=[0], + enabled=lambda node: node.smartSelection.enabled, + advanced=True + ), + desc.IntParam( + name="rescaledWidthFlow", + label="Rescaled Frame's Width For Motion", + description="Width, in pixels, of the frame used for the motion score computation after a rescale.\n" + "Aspect ratio will be preserved. No rescale will be performed if equal to 0.", value=720, range=(0, 4000, 1), uid=[0], From fe8d5921d0685216d1a27be6c60ae7c63d7fc555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 7 Feb 2023 11:34:50 +0100 Subject: [PATCH 0645/1093] [nodes] KeyframeSelection: Add option to name the keyframes consecutively By default, the keyframes' name is their index within the input sequence / video. A new option is added to name them as consecutive frames, starting from 0, instead. --- meshroom/aliceVision/KeyframeSelection.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 18bcd0c82d..8c1d6aa9ef 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -205,6 +205,15 @@ class KeyframeSelection(desc.AVCommandLineNode): ) ] ), + desc.BoolParam( + name="renameKeyframes", + label="Rename Output Keyframes", + description="Instead of using the selected keyframes' index as their name, name them as consecutive output frames.\n" + "If the selected keyframes are at index [15, 294, 825], they will be written as [00000.exr, 00001.exr, 00002.exr] with this\n" + "option enabled instead of [00015.exr, 00294.exr, 00825.exr].", + value=False, + uid=[0] + ), desc.ChoiceParam( name="outputExtension", label="Keyframes File Extension", From dc1439ff519d203d63255bffc0930481cc8f47c3 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 15 Dec 2022 17:30:21 +0100 Subject: [PATCH 0646/1093] [LdrToHdMerge] Add checkbox enabling the manual setting of reference bracket for HDR merging. --- meshroom/aliceVision/LdrToHdrMerge.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 68405199f7..d0776861de 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -65,6 +65,13 @@ class LdrToHdrMerge(desc.AVCommandLineNode): range=(0, 10, 1), uid=[0], ), + desc.BoolParam( + name='offsetRefBracketIndexEnabled', + label='Enable Ref Bracket Manual Setting', + description='Enable user selection of reference bracket index.', + value=False, + uid=[0], + ), desc.IntParam( name='offsetRefBracketIndex', label='Offset Ref Bracket Index', @@ -72,7 +79,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=1, range=(-4, 4, 1), uid=[0], - enabled= lambda node: node.nbBrackets.value != 1, + enabled= lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), ), desc.BoolParam( name='byPass', From e67a4dea6e37175e375bd92b383210abc41ba7d7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 15 Dec 2022 20:37:28 +0100 Subject: [PATCH 0647/1093] [nodes] LdrToHdrMerge: update description and remove from command line --- meshroom/aliceVision/LdrToHdrMerge.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index d0776861de..1bc0a3d7e8 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -66,11 +66,12 @@ class LdrToHdrMerge(desc.AVCommandLineNode): uid=[0], ), desc.BoolParam( - name='offsetRefBracketIndexEnabled', - label='Enable Ref Bracket Manual Setting', - description='Enable user selection of reference bracket index.', - value=False, - uid=[0], + name='offsetRefBracketIndexEnabled', + label='Manually Specify Ref Bracket', + description='Manually specify the reference bracket index to control the exposure of the HDR image.', + value=False, + uid=[0], + group='user', # not used directly on the command line ), desc.IntParam( name='offsetRefBracketIndex', From b3ba33b815f0933f7d9d11748effd96bdba8a2ad Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 16 Dec 2022 17:35:46 +0100 Subject: [PATCH 0648/1093] [Node] hdrCalibration: Add parameter about targeted luminance of HDR images --- meshroom/aliceVision/LdrToHdrCalibration.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 135ed05844..6eaba1dc9f 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -66,6 +66,14 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): range=(0, 10, 1), uid=[0], ), + desc.FloatParam( + name='meanTargetedLumaForMerging', + label='Targeted Luminance For Merging', + description='Expected mean luminance of the HDR images used to compute the final panorama', + value=0.4, + range=(0.0, 1.0, 0.01), + uid=[0], + ), desc.BoolParam( name='byPass', label='Bypass', From 45e15b452328d6ab4aa1592e91dbb6b9f7bd85b7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 23 Dec 2022 01:14:11 +0100 Subject: [PATCH 0649/1093] [nodes] LdrToHdrCalibration: fix alignment --- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 6eaba1dc9f..5bfe5ca6d8 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -66,7 +66,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): range=(0, 10, 1), uid=[0], ), - desc.FloatParam( + desc.FloatParam( name='meanTargetedLumaForMerging', label='Targeted Luminance For Merging', description='Expected mean luminance of the HDR images used to compute the final panorama', From 41fb377207708253a381811b66347ecfb243d22b Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 5 Jan 2023 18:29:49 +0100 Subject: [PATCH 0650/1093] [HDR calibration & merging] Update parameter set --- meshroom/aliceVision/LdrToHdrCalibration.py | 8 -------- meshroom/aliceVision/LdrToHdrMerge.py | 9 +++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 5bfe5ca6d8..135ed05844 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -66,14 +66,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): range=(0, 10, 1), uid=[0], ), - desc.FloatParam( - name='meanTargetedLumaForMerging', - label='Targeted Luminance For Merging', - description='Expected mean luminance of the HDR images used to compute the final panorama', - value=0.4, - range=(0.0, 1.0, 0.01), - uid=[0], - ), desc.BoolParam( name='byPass', label='Bypass', diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 1bc0a3d7e8..92ca0e35ee 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -82,6 +82,15 @@ class LdrToHdrMerge(desc.AVCommandLineNode): uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), ), + desc.FloatParam( + name='meanTargetedLumaForMerging', + label='Targeted Luminance For Merging', + description='Expected mean luminance of the HDR images used to compute the final panorama', + value=0.4, + range=(0.0, 1.0, 0.01), + uid=[0], + enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), + ), desc.BoolParam( name='byPass', label='Bypass', From b72e3b28b29fdba430c61ab1bbf08203e8ee19ea Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 18 Jan 2023 12:01:52 +0100 Subject: [PATCH 0651/1093] [HDR Calibration node] Bypass management --- meshroom/aliceVision/LdrToHdrCalibration.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 135ed05844..6e6921f303 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -72,7 +72,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps", value=False, uid=[0], - group='internal', enabled= lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( @@ -158,7 +157,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): ] def processChunk(self, chunk): - if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value: + if chunk.node.nbBrackets.value == 1: return super(LdrToHdrCalibration, self).processChunk(chunk) From dd286004c076a6d19e95ceb4c30f8a9b9990eb34 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 20 Jan 2023 15:32:11 +0100 Subject: [PATCH 0652/1093] [HDR sampling and calib nodes] Add calibrationMethod as parameter at sampling. Link calibrationMethod parameter of calib node to sampling node's calibrationMethod parameter in both HDR pipelines. --- meshroom/aliceVision/LdrToHdrSampling.py | 18 ++++++++++++++++-- meshroom/panoramaFisheyeHdr.mg | 3 ++- meshroom/panoramaHdr.mg | 3 ++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 997e75161b..570a7be04e 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -81,9 +81,23 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps", value=False, uid=[0], - group='internal', enabled= lambda node: node.nbBrackets.value != 1, ), + desc.ChoiceParam( + name='calibrationMethod', + label='Calibration Method', + description="Method used for camera calibration \n" + " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" + " * Debevec: This is the standard method for HDR calibration. \n" + " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" + " * Laguerre: Simple but robust method estimating the minimal number of parameters. \n" + " * Robertson: First method for HDR calibration in the literature. \n", + values=['linear', 'debevec', 'grossberg', 'laguerre'], + value='debevec', + exclusive=True, + uid=[0], + enabled= lambda node: node.byPass.enabled and not node.byPass.value, + ), desc.IntParam( name='channelQuantizationPower', label='Channel Quantization Power', @@ -164,7 +178,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): ] def processChunk(self, chunk): - if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value: + if chunk.node.nbBrackets.value == 1: return super(LdrToHdrSampling, self).processChunk(chunk) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index ebaa15d2b6..761a68f391 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -68,7 +68,8 @@ "byPass": "{LdrToHdrSampling_1.byPass}", "input": "{LdrToHdrSampling_1.input}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", - "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" + "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}", + "calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}" }, "nodeType": "LdrToHdrCalibration", "position": [ diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 2da01a006b..4248feaa25 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -68,7 +68,8 @@ "byPass": "{LdrToHdrSampling_1.byPass}", "input": "{LdrToHdrSampling_1.input}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", - "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" + "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}", + "calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}" }, "nodeType": "LdrToHdrCalibration", "position": [ From b193e5969453016af5cc67359a0d56a414250a2d Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 8 Nov 2022 08:10:37 +0100 Subject: [PATCH 0653/1093] [panorama] new nodes for large memory use --- .../aliceVision/PanoramaPostProcessing.py | 53 +++++++++++++++++++ meshroom/aliceVision/PanoramaSeams.py | 7 +++ 2 files changed, 60 insertions(+) create mode 100644 meshroom/aliceVision/PanoramaPostProcessing.py diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py new file mode 100644 index 0000000000..05b2be5945 --- /dev/null +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -0,0 +1,53 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class PanoramaPostProcessing(desc.CommandLineNode): + commandLine = 'aliceVision_panoramaPostProcessing {allParams}' + cpu = desc.Level.NORMAL + ram = desc.Level.INTENSIVE + + category = 'Panorama HDR' + documentation = ''' + Post process the panorama + ''' + + inputs = [ + desc.File( + name='inputPanorama', + label='Input Panorama', + description="Input Panorama.", + value='', + uid=[0], + ), + desc.BoolParam( + name='fillHoles', + label='Use fill holes algorithm', + description='Fill the non attributed pixels with push pull algorithm.', + value=False, + 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='outputPanorama', + label='Output Folder', + description='', + value=desc.Node.internalFolder + 'panorama.exr', + uid=[], + ), + ] diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index f595617a61..e9f5e70009 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -65,5 +65,12 @@ class PanoramaSeams(desc.AVCommandLineNode): description='', value=desc.Node.internalFolder + 'labels.exr', uid=[], + ), + desc.File( + name='outputSfm', + label='Output SfMData File', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'panorama.sfm', + uid=[], ) ] From b83084d3e5e70effa350634aa87802b75920f269 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 8 Nov 2022 09:35:47 +0100 Subject: [PATCH 0654/1093] [panorama] new templates --- meshroom/panoramaFisheyeHdr.mg | 54 ++++++++++++++++------------------ meshroom/panoramaHdr.mg | 54 ++++++++++++++++------------------ 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 761a68f391..7bfc1090fd 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,18 +1,18 @@ { "header": { "nodesVersions": { + "PanoramaMerging": "1.0", "PanoramaSeams": "2.0", "FeatureMatching": "2.0", - "ImageProcessing": "3.0", "PanoramaCompositing": "2.0", "LdrToHdrMerge": "4.0", - "PanoramaEstimation": "1.0", - "LdrToHdrCalibration": "3.0", "LdrToHdrSampling": "4.0", + "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", "PanoramaInit": "2.0", "CameraInit": "9.0", "SfMTransform": "3.0", - "PanoramaMerging": "1.0", + "PanoramaPostProcessing": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", @@ -38,19 +38,6 @@ 0 ] }, - "ImageProcessing_1": { - "inputs": { - "extension": "exr", - "fillHoles": true, - "input": "{PanoramaMerging_1.outputPanorama}", - "fixNonFinite": true - }, - "nodeType": "ImageProcessing", - "position": [ - 3000, - 0 - ] - }, "PanoramaWarping_1": { "inputs": { "input": "{SfMTransform_1.output}" @@ -116,14 +103,14 @@ 0 ] }, - "PanoramaSeams_1": { + "PanoramaMerging_1": { "inputs": { - "input": "{PanoramaWarping_1.input}", - "warpingFolder": "{PanoramaWarping_1.output}" + "compositingFolder": "{PanoramaCompositing_1.output}", + "input": "{PanoramaCompositing_1.input}" }, - "nodeType": "PanoramaSeams", + "nodeType": "PanoramaMerging", "position": [ - 2400, + 2800, 0 ] }, @@ -131,7 +118,7 @@ "inputs": { "warpingFolder": "{PanoramaSeams_1.warpingFolder}", "labels": "{PanoramaSeams_1.output}", - "input": "{PanoramaSeams_1.input}" + "input": "{PanoramaSeams_1.outputSfm}" }, "nodeType": "PanoramaCompositing", "position": [ @@ -158,6 +145,17 @@ 0 ] }, + "PanoramaPostProcessing_1": { + "inputs": { + "inputPanorama": "{PanoramaMerging_1.outputPanorama}", + "fillHoles": true + }, + "nodeType": "PanoramaPostProcessing", + "position": [ + 3005, + -19 + ] + }, "PanoramaPrepareImages_1": { "inputs": { "input": "{CameraInit_1.output}" @@ -179,14 +177,14 @@ 0 ] }, - "PanoramaMerging_1": { + "PanoramaSeams_1": { "inputs": { - "compositingFolder": "{PanoramaCompositing_1.output}", - "input": "{PanoramaCompositing_1.input}" + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}" }, - "nodeType": "PanoramaMerging", + "nodeType": "PanoramaSeams", "position": [ - 2800, + 2400, 0 ] }, diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 4248feaa25..46bf890599 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,18 +1,18 @@ { "header": { "nodesVersions": { + "PanoramaMerging": "1.0", "PanoramaSeams": "2.0", "FeatureMatching": "2.0", - "ImageProcessing": "3.0", "PanoramaCompositing": "2.0", "LdrToHdrMerge": "4.0", - "PanoramaEstimation": "1.0", - "LdrToHdrCalibration": "3.0", "LdrToHdrSampling": "4.0", + "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", "PanoramaInit": "2.0", "CameraInit": "9.0", "SfMTransform": "3.0", - "PanoramaMerging": "1.0", + "PanoramaPostProcessing": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", @@ -38,19 +38,6 @@ 0 ] }, - "ImageProcessing_1": { - "inputs": { - "extension": "exr", - "fillHoles": true, - "input": "{PanoramaMerging_1.outputPanorama}", - "fixNonFinite": true - }, - "nodeType": "ImageProcessing", - "position": [ - 3000, - 0 - ] - }, "PanoramaWarping_1": { "inputs": { "input": "{SfMTransform_1.output}" @@ -112,14 +99,14 @@ 0 ] }, - "PanoramaSeams_1": { + "PanoramaMerging_1": { "inputs": { - "input": "{PanoramaWarping_1.input}", - "warpingFolder": "{PanoramaWarping_1.output}" + "compositingFolder": "{PanoramaCompositing_1.output}", + "input": "{PanoramaCompositing_1.input}" }, - "nodeType": "PanoramaSeams", + "nodeType": "PanoramaMerging", "position": [ - 2400, + 2800, 0 ] }, @@ -127,7 +114,7 @@ "inputs": { "warpingFolder": "{PanoramaSeams_1.warpingFolder}", "labels": "{PanoramaSeams_1.output}", - "input": "{PanoramaSeams_1.input}" + "input": "{PanoramaSeams_1.outputSfm}" }, "nodeType": "PanoramaCompositing", "position": [ @@ -154,6 +141,17 @@ 0 ] }, + "PanoramaPostProcessing_1": { + "inputs": { + "inputPanorama": "{PanoramaMerging_1.outputPanorama}", + "fillHoles": true + }, + "nodeType": "PanoramaPostProcessing", + "position": [ + 3007, + 0 + ] + }, "PanoramaPrepareImages_1": { "inputs": { "input": "{CameraInit_1.output}" @@ -175,14 +173,14 @@ 0 ] }, - "PanoramaMerging_1": { + "PanoramaSeams_1": { "inputs": { - "compositingFolder": "{PanoramaCompositing_1.output}", - "input": "{PanoramaCompositing_1.input}" + "input": "{PanoramaWarping_1.input}", + "warpingFolder": "{PanoramaWarping_1.output}" }, - "nodeType": "PanoramaMerging", + "nodeType": "PanoramaSeams", "position": [ - 2800, + 2400, 0 ] }, From 439144737a64f6d3bb92c01b7776c952acea07c8 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 20 Feb 2023 23:17:54 +0100 Subject: [PATCH 0655/1093] [nodes] Panorama: add semantic flag on output image files --- meshroom/aliceVision/PanoramaPostProcessing.py | 1 + meshroom/aliceVision/PanoramaSeams.py | 1 + 2 files changed, 2 insertions(+) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 05b2be5945..0645115aad 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -47,6 +47,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): name='outputPanorama', label='Output Folder', description='', + semantic='image', value=desc.Node.internalFolder + 'panorama.exr', uid=[], ), diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index e9f5e70009..27e01369ad 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -63,6 +63,7 @@ class PanoramaSeams(desc.AVCommandLineNode): name='output', label='Labels', description='', + semantic='image', value=desc.Node.internalFolder + 'labels.exr', uid=[], ), From 819bb4f4f06bc8e4d2e9acfb58b6e3ee771bed4a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 21 Feb 2023 11:03:57 +0100 Subject: [PATCH 0656/1093] [nodes] PanoramaPostProcessing: fix label --- meshroom/aliceVision/PanoramaPostProcessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 0645115aad..1d67dc3be2 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -45,7 +45,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): outputs = [ desc.File( name='outputPanorama', - label='Output Folder', + label='Output Panorama', description='', semantic='image', value=desc.Node.internalFolder + 'panorama.exr', From 5ddc3261dab7553da67d0c2bf500c24ee51bcd2f Mon Sep 17 00:00:00 2001 From: Hossam Hammady <github@hammady.net> Date: Wed, 22 Feb 2023 05:42:18 +0000 Subject: [PATCH 0657/1093] Fix missing Publish node in photogrammetry pipeline Closes #1900. --- meshroom/photogrammetry.mg | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 43ed5bca37..6f98026ef2 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -15,10 +15,26 @@ "ImageMatching": "2.0", "FeatureExtraction": "1.1", "Meshing": "7.0", - "DepthMapFilter": "3.0" + "DepthMapFilter": "3.0", + "Publish": "1.0" } }, "graph": { + "Publish_1": { + "inputs": { + "output": "", + "inputFiles": [ + "{Texturing_1.outputMesh}", + "{Texturing_1.outputMaterial}", + "{Texturing_1.outputTextures}" + ] + }, + "nodeType": "Publish", + "position": [ + 2200, + 0 + ] + }, "Texturing_1": { "inputs": { "imagesFolder": "{DepthMap_1.imagesFolder}", From 72fa8ab02164fe2d586d36a47c9892d89f037fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 22 Feb 2023 17:14:58 +0100 Subject: [PATCH 0658/1093] [pipelines] Add a "Publish" node to all the templates Follow up on the previous commit that added a "Publish" node at the end of the photogrammetry pipeline. Additionally, this commit updates the version of the "Publish" node used in the photogrammetry template from 1.0 to 1.2, its most recent version. --- meshroom/cameraTracking.mg | 15 ++++++++++++++- meshroom/panoramaFisheyeHdr.mg | 15 ++++++++++++++- meshroom/panoramaHdr.mg | 15 ++++++++++++++- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 15 ++++++++++++++- meshroom/photogrammetryDraft.mg | 17 ++++++++++++++++- 6 files changed, 73 insertions(+), 6 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index ffbf697d0e..1b2a61c079 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -11,7 +11,8 @@ "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", - "StructureFromMotion": "2.0" + "StructureFromMotion": "2.0", + "Publish": "1.2" } }, "graph": { @@ -99,6 +100,18 @@ 600, 0 ] + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1200, + 0 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}" + ] + } } } } diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 761a68f391..1c0fbc7628 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -16,7 +16,8 @@ "ImageMatching": "2.0", "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", - "PanoramaWarping": "1.0" + "PanoramaWarping": "1.0", + "Publish": "1.2" }, "releaseVersion": "2021.1.0", "fileVersion": "1.1", @@ -231,6 +232,18 @@ 1600, 0 ] + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 3200, + 0 + ], + "inputs": { + "inputFiles": [ + "{ImageProcessing_1.outputImages}" + ] + } } } } diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 4248feaa25..dfb81a3d5a 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -16,7 +16,8 @@ "ImageMatching": "2.0", "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", - "PanoramaWarping": "1.0" + "PanoramaWarping": "1.0", + "Publish": "1.2" }, "releaseVersion": "2021.1.0", "fileVersion": "1.1", @@ -226,6 +227,18 @@ 1600, 0 ] + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 3200, + 0 + ], + "inputs": { + "inputFiles": [ + "{ImageProcessing_1.outputImages}" + ] + } } } } diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 6f98026ef2..abc7852137 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -16,7 +16,7 @@ "FeatureExtraction": "1.1", "Meshing": "7.0", "DepthMapFilter": "3.0", - "Publish": "1.0" + "Publish": "1.2" } }, "graph": { diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 81d12227cb..6983773b42 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -12,7 +12,8 @@ "ImageMatchingMultiSfM": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", - "StructureFromMotion": "2.0" + "StructureFromMotion": "2.0", + "Publish": "1.2" } }, "graph": { @@ -161,6 +162,18 @@ 1429, 212 ] + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1829, + 212 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}" + ] + } } } } diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index a76c80f3cf..fdedcaff14 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -8,7 +8,8 @@ "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", - "Meshing": "7.0" + "Meshing": "7.0", + "Publish": "1.2" }, "releaseVersion": "2021.1.0", "fileVersion": "1.1", @@ -104,6 +105,20 @@ 600, 0 ] + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1600, + 0 + ], + "inputs": { + "inputFiles": [ + "{Texturing_1.outputMesh}", + "{Texturing_1.outputMaterial}", + "{Texturing_1.outputTextures}" + ] + } } } } From 5c1c460b1fc618628b6c28dfe314d93a100834da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 23 Feb 2023 18:13:18 +0100 Subject: [PATCH 0659/1093] [nodes] KeyframeSelection: Add debug option to skip sharpness computations Add a debug option that will, during the scores' computation, skip all the calculations regarding sharpness. A fixed sharpness score of 1.0 will be applied to all the frames. --- meshroom/aliceVision/KeyframeSelection.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 8c1d6aa9ef..399a01335b 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -304,6 +304,14 @@ class KeyframeSelection(desc.AVCommandLineNode): ) ] ), + desc.BoolParam( + name="skipSharpnessComputation", + label="Skip Sharpness Computation", + description="Skip the sharpness score computation. A fixed score of 1.0 will be applied by default to all the frames.", + value=False, + uid=[0], + enabled=lambda node: node.debugOptions.enabled + ), desc.BoolParam( name="skipSelection", label="Skip Frame Selection", From 5d967ebb66e2ac9af96f38ae89c6bc0c30921d3f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 28 Feb 2023 09:44:04 +0100 Subject: [PATCH 0660/1093] [nodes] ExportAnimatedCameras: fix output params labels --- meshroom/aliceVision/ExportAnimatedCamera.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index de503cea39..644519e0ec 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -87,26 +87,26 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): outputs = [ desc.File( name='output', - label='Filepath', - description='Output filepath for the alembic animated camera.', + label='Folder', + description='Output folder with animated camera and undistorted images.', value=desc.Node.internalFolder, uid=[], ), desc.File( name='outputCamera', - label='Camera Filepath', - description='Output filename for the alembic animated camera.', + label='Camera', + description='Output filename for the animated camera in Alembic format.', value=desc.Node.internalFolder + 'camera.abc', group='', # exclude from command line uid=[], ), desc.File( name='outputUndistorted', - label='Undistorted images Filepath', + label='Undistorted Images', description='Output Undistorted images.', value=desc.Node.internalFolder + 'undistort', group='', # exclude from command line uid=[], ), - ] + ] From 77190188008dc76233281b953aba1cef01c091ce Mon Sep 17 00:00:00 2001 From: mugulmd <mugulmotion@gmail.com> Date: Thu, 2 Mar 2023 02:28:23 -0800 Subject: [PATCH 0661/1093] [nodes] PanoramaWarping: remove obsolete image output attributes --- meshroom/aliceVision/PanoramaWarping.py | 27 ------------------------- 1 file changed, 27 deletions(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 6517d4950c..c103a355f8 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -97,31 +97,4 @@ class PanoramaWarping(desc.AVCommandLineNode): value=desc.Node.internalFolder, uid=[], ), - desc.File( - name='warping', - label='Warping', - description='', - group='', # do not export on the command line - semantic='image', - value=desc.Node.internalFolder+'<VIEW_ID>.exr', - uid=[] - ), - desc.File( - name='mask', - label='Mask', - description='', - group='', # do not export on the command line - semantic='image', - value=desc.Node.internalFolder+'<VIEW_ID>_mask.exr', - uid=[] - ), - desc.File( - name='weight', - label='Weight', - description='', - group='', # do not export on the command line - semantic='image', - value=desc.Node.internalFolder+'<VIEW_ID>_weight.exr', - uid=[] - ), ] From 9b8a12a6d73b363f2d4ff9a09b7fa4652304438e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 3 Mar 2023 11:44:02 +0100 Subject: [PATCH 0662/1093] [nodes] LdrToHdr: Remore references to Robertson calibration method "Robertson" is not an available calibration method in the LdrToHdrCalibration and LdrToHdrSampling, so it should be removed from the nodes' documentation. --- meshroom/aliceVision/LdrToHdrCalibration.py | 3 +-- meshroom/aliceVision/LdrToHdrSampling.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 6e6921f303..912632f7e4 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -81,8 +81,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" " * Debevec: This is the standard method for HDR calibration. \n" " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" - " * Laguerre: Simple but robust method estimating the minimal number of parameters. \n" - " * Robertson: First method for HDR calibration in the literature. \n", + " * Laguerre: Simple but robust method estimating the minimal number of parameters.", values=['linear', 'debevec', 'grossberg', 'laguerre'], value='debevec', exclusive=True, diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 570a7be04e..e2cd8274eb 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -90,8 +90,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" " * Debevec: This is the standard method for HDR calibration. \n" " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" - " * Laguerre: Simple but robust method estimating the minimal number of parameters. \n" - " * Robertson: First method for HDR calibration in the literature. \n", + " * Laguerre: Simple but robust method estimating the minimal number of parameters.", values=['linear', 'debevec', 'grossberg', 'laguerre'], value='debevec', exclusive=True, From dd4902f0883c7f26aa271cd8a6b40319d6fc60bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 3 Mar 2023 13:55:47 +0100 Subject: [PATCH 0663/1093] [nodes] LdrToHdrMerge: Fix content of the documentation string The string described the LdrToHdrCalibration node. --- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 92ca0e35ee..27a39e6137 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -30,7 +30,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): category = 'Panorama HDR' documentation = ''' - Calibrate LDR to HDR response curve from samples +Merge LDR images into HDR images. ''' inputs = [ From d777575c32cc9a4904a1523f13edd7cc12b55866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 3 Mar 2023 15:08:12 +0100 Subject: [PATCH 0664/1093] [nodes] Panorama: Fix the documentation string display --- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- meshroom/aliceVision/PanoramaPostProcessing.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 912632f7e4..55e445c90d 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -31,7 +31,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): category = 'Panorama HDR' documentation = ''' - Calibrate LDR to HDR response curve from samples +Calibrate LDR to HDR response curve from samples. ''' inputs = [ diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index e2cd8274eb..857cb2a020 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -47,7 +47,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): category = 'Panorama HDR' documentation = ''' - Sample pixels from Low range images for HDR creation +Sample pixels from Low range images for HDR creation. ''' inputs = [ diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 1d67dc3be2..e1723ab48a 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -13,8 +13,8 @@ class PanoramaPostProcessing(desc.CommandLineNode): category = 'Panorama HDR' documentation = ''' - Post process the panorama - ''' +Post process the panorama. +''' inputs = [ desc.File( From d476c105f52e377ab7e6dc0343cc7bea82d6e48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 3 Mar 2023 15:13:15 +0100 Subject: [PATCH 0665/1093] [pipelines] Panorama: Align the PanoramaPostProcessing nodes with the rest --- meshroom/panoramaFisheyeHdr.mg | 4 ++-- meshroom/panoramaHdr.mg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 6514aa5032..09450441f3 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -153,8 +153,8 @@ }, "nodeType": "PanoramaPostProcessing", "position": [ - 3005, - -19 + 3000, + 0 ] }, "PanoramaPrepareImages_1": { diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index cbc9d6a858..00a241fd19 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -149,7 +149,7 @@ }, "nodeType": "PanoramaPostProcessing", "position": [ - 3007, + 3000, 0 ] }, From e77a576756520c296ec791d37ab536b70e27b9a5 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 3 Mar 2023 11:36:11 +0100 Subject: [PATCH 0666/1093] disable compositing tiling --- meshroom/aliceVision/PanoramaCompositing.py | 7 +++++++ meshroom/aliceVision/PanoramaMerging.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index e7020ef9d2..18c34d76fd 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -65,6 +65,13 @@ class PanoramaCompositing(desc.AVCommandLineNode): uid=[], advanced=True, ), + desc.BoolParam( + name='useTiling', + label='Use tiling', + description='''Enable tiling mode for parallelization''', + value=True, + uid=[0], + ), desc.ChoiceParam( name='storageDataType', label='Storage Data Type', diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 544adcbc54..2f1721ecb4 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -42,6 +42,13 @@ class PanoramaMerging(desc.AVCommandLineNode): uid=[0], group='', # not part of allParams, as this is not a parameter for the command line ), + desc.BoolParam( + name='useTiling', + label='Use tiling', + description='''Enable tiling mode for parallelization''', + value=True, + uid=[0], + ), desc.ChoiceParam( name='storageDataType', label='Storage Data Type', From 3198e30673530f770640a0ce6fde7d77a89f66d8 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sun, 5 Mar 2023 18:38:18 +0100 Subject: [PATCH 0667/1093] [panorama] update pipelines with useTiling option Disable tiling in panoramaFisheyeHdr as there is no need for tiling with small number of images (which is the case with fisheye images). --- meshroom/panoramaFisheyeHdr.mg | 6 ++++-- meshroom/panoramaHdr.mg | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 09450441f3..460a14018e 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -107,7 +107,8 @@ "PanoramaMerging_1": { "inputs": { "compositingFolder": "{PanoramaCompositing_1.output}", - "input": "{PanoramaCompositing_1.input}" + "input": "{PanoramaCompositing_1.input}", + "useTiling": "{PanoramaCompositing_1.useTiling}" }, "nodeType": "PanoramaMerging", "position": [ @@ -119,7 +120,8 @@ "inputs": { "warpingFolder": "{PanoramaSeams_1.warpingFolder}", "labels": "{PanoramaSeams_1.output}", - "input": "{PanoramaSeams_1.outputSfm}" + "input": "{PanoramaSeams_1.outputSfm}", + "useTiling": false }, "nodeType": "PanoramaCompositing", "position": [ diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 00a241fd19..c4a418c3e1 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -103,7 +103,8 @@ "PanoramaMerging_1": { "inputs": { "compositingFolder": "{PanoramaCompositing_1.output}", - "input": "{PanoramaCompositing_1.input}" + "input": "{PanoramaCompositing_1.input}", + "useTiling": "{PanoramaCompositing_1.useTiling}" }, "nodeType": "PanoramaMerging", "position": [ From 8aef21d5cbe6f26c7da91e6125e09e58c405159e Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 1 Feb 2023 07:39:45 +0100 Subject: [PATCH 0668/1093] [imageProcessing node] Add parameters --- meshroom/aliceVision/ImageProcessing.py | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index a5a6a2d9b6..c26e449757 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -398,6 +398,46 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], ), + desc.BoolParam( + name='useDCPColorMatrixOnly', + label='Use DCP Color Matrix Only', + description='Do not use the DCP forward matrices if any', + value=False, + uid=[0], + enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + ), + + desc.BoolParam( + name='doWBAfterDemosaicing', + label='WB after demosaicing', + description='Do White Balance after demosaicing, just before DCP profile application', + value=False, + uid=[0], + enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + ), + + desc.ChoiceParam( + name='demosaicingAlgo', + label='Demosaicing Algorithm', + description='LibRaw Demosaicing Algorithm\n', + value='AHD', + values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'], + exclusive=True, + uid=[0], + enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + ), + + desc.ChoiceParam( + name='highlightMode', + label='Highlight mode', + description='LibRaw highlight mode\n', + value=0, + values=[0, 1, 2, 3, 4, 5, 6, 7, 8], + exclusive=True, + uid=[0], + enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + ), + desc.ChoiceParam( name='storageDataType', label='Storage Data Type for EXR output', From 54ad9c2b46eef8b30cec35df927e88ce9291ed25 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 2 Feb 2023 10:55:29 +0100 Subject: [PATCH 0669/1093] [imageProcessing] Update some parameter enabling --- meshroom/aliceVision/ImageProcessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index c26e449757..5fe0370475 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -388,6 +388,7 @@ class ImageProcessing(desc.AVCommandLineNode): description='''Color Profile database directory path.''', value='${ALICEVISION_COLOR_PROFILE_DB}', uid=[], + enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), ), desc.BoolParam( @@ -396,6 +397,7 @@ class ImageProcessing(desc.AVCommandLineNode): description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown', value=True, uid=[0], + enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), ), desc.BoolParam( @@ -424,7 +426,6 @@ class ImageProcessing(desc.AVCommandLineNode): values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'], exclusive=True, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), ), desc.ChoiceParam( @@ -435,7 +436,6 @@ class ImageProcessing(desc.AVCommandLineNode): values=[0, 1, 2, 3, 4, 5, 6, 7, 8], exclusive=True, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), ), desc.ChoiceParam( From abcb76e755609faf38d218507dbc9bdb914d6a7e Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 1 Mar 2023 17:01:24 +0100 Subject: [PATCH 0670/1093] [imageProcessing] Disable workingColorSpace option when applyDCPMetadata is activated. --- meshroom/aliceVision/ImageProcessing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 5fe0370475..f442ca0d7a 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -362,6 +362,7 @@ class ImageProcessing(desc.AVCommandLineNode): values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, uid=[0], + enabled=lambda node: not node.applyDcpMetadata.value, ), desc.ChoiceParam( From 18ac5e9629a94f2e6eb9e3a7aa6bf4dc928576ba Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 2 Mar 2023 20:33:41 +0100 Subject: [PATCH 0671/1093] [panorama post processing & HDR fusion node] Add output color space option Add no_conversion option value in HDR fusion for working color space. --- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- meshroom/aliceVision/PanoramaPostProcessing.py | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 27a39e6137..4cbf5e3d46 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -127,7 +127,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label='Working Color Space', description='Allows you to choose the color space in which the data are processed.', value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 857cb2a020..d90944840f 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -112,7 +112,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label='Working Color Space', description='Allows you to choose the color space in which the data are processed.', value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index e1723ab48a..0f68af1bd1 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -31,6 +31,15 @@ class PanoramaPostProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.ChoiceParam( + name='outputColorSpace', + label='Output Color Space', + description='Allows you to choose the color space of the output image.', + value='AUTO', + values=['AUTO', 'sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 1f51bbfda7311964bb75e170d7e8c412093e5347 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 3 Mar 2023 15:05:21 +0100 Subject: [PATCH 0672/1093] [cameraInit node] Remove DCPMetadata option in the rawColorInterpretation choiceParam. --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 000e4c6102..ad6c1eb6fc 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -207,7 +207,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): 'DCPLinearProcessing: Use DCP color profile.\n' 'DCPMetadata: Same as None with DCP info added in metadata.\n', value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', - values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], + values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing'], exclusive=True, uid=[0], ), From 9534b685c7db60aaa13cabb9060b39ee6b139d01 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 6 Mar 2023 07:36:56 +0100 Subject: [PATCH 0673/1093] [PanoramaPostProcessing node] Remove 'auto' and 'no_conversion' choices for output color space option. --- meshroom/aliceVision/PanoramaPostProcessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 0f68af1bd1..71e23b2874 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -35,8 +35,8 @@ class PanoramaPostProcessing(desc.CommandLineNode): name='outputColorSpace', label='Output Color Space', description='Allows you to choose the color space of the output image.', - value='AUTO', - values=['AUTO', 'sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + value='Linear', + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], exclusive=True, uid=[0], ), From 0302603fe5fbb6856615885c4682c74bb463f099 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 3 Mar 2023 17:03:53 +0100 Subject: [PATCH 0674/1093] [panorama] force pyramid levels count in compositing --- meshroom/aliceVision/PanoramaCompositing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 18c34d76fd..e950c48f34 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -56,6 +56,15 @@ class PanoramaCompositing(desc.AVCommandLineNode): exclusive=True, uid=[0] ), + desc.IntParam( + name='forcedLevelsCount', + label='Pyramid levels', + description='Force the number of levels in the pyramid for multiband compositer.', + value=0, + range=(0, 64, 1), + uid=[], + enabled=lambda node: node.compositerType.value and node.compositerType.value == 'multiband', + ), desc.IntParam( name='maxThreads', label='Max Nb Threads', From 2e49a457efec26e3b4c3890d5ad4f81c031af83f Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 6 Mar 2023 11:48:00 +0100 Subject: [PATCH 0675/1093] Make sure compositing pyramid size change uid --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index e950c48f34..6812a3de46 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -62,7 +62,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): description='Force the number of levels in the pyramid for multiband compositer.', value=0, range=(0, 64, 1), - uid=[], + uid=[0], enabled=lambda node: node.compositerType.value and node.compositerType.value == 'multiband', ), desc.IntParam( From e3318e09d924075567b464ff47263779fa5833db Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 6 Mar 2023 11:51:13 +0100 Subject: [PATCH 0676/1093] [panorama] Previous max pyramid size was huge --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 6812a3de46..43039d2d2c 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -61,7 +61,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): label='Pyramid levels', description='Force the number of levels in the pyramid for multiband compositer.', value=0, - range=(0, 64, 1), + range=(0, 16, 1), uid=[0], enabled=lambda node: node.compositerType.value and node.compositerType.value == 'multiband', ), From 4ffbb43ca11b29816890fc6a198b7403579b71b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 6 Mar 2023 11:10:42 +0000 Subject: [PATCH 0677/1093] [pipelines] Panorama: Fix the inputs for the "Publish" nodes The "Publish" nodes were connected to "ImageProcessing" nodes, which used to be part of the panorama pipelines, but are not anymore. --- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 460a14018e..15ff88d2ad 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -241,7 +241,7 @@ ], "inputs": { "inputFiles": [ - "{ImageProcessing_1.outputImages}" + "{PanoramaPostProcessing_1.outputPanorama}" ] } } diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index c4a418c3e1..f65b53acc3 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -235,7 +235,7 @@ ], "inputs": { "inputFiles": [ - "{ImageProcessing_1.outputImages}" + "{PanoramaPostProcessing_1.outputPanorama}" ] } } From 3777875db343867130745810d83716e520760fc8 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 6 Mar 2023 12:29:30 +0100 Subject: [PATCH 0678/1093] [panorama] rename compositing variable --- meshroom/aliceVision/PanoramaCompositing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 43039d2d2c..a1cf391d03 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -57,9 +57,9 @@ class PanoramaCompositing(desc.AVCommandLineNode): uid=[0] ), desc.IntParam( - name='forcedLevelsCount', + name='forceMinPyramidLevels', label='Pyramid levels', - description='Force the number of levels in the pyramid for multiband compositer.', + description='Force the minimal number of levels in the pyramid for multiband compositer.', value=0, range=(0, 16, 1), uid=[0], From 092b0b2d66cb34051d7a338fb01adba90b95066d Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 7 Mar 2023 15:02:57 +0100 Subject: [PATCH 0679/1093] [imageProcessing node] Adjust default raw setting values. --- meshroom/aliceVision/ImageProcessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index f442ca0d7a..0bbda360ce 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -369,7 +369,7 @@ class ImageProcessing(desc.AVCommandLineNode): name='rawColorInterpretation', label='RAW Color Interpretation', description='Allows you to choose how raw data are color processed.', - value='LibRawWhiteBalancing', + value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata', 'Auto'], exclusive=True, uid=[0], @@ -423,7 +423,7 @@ class ImageProcessing(desc.AVCommandLineNode): name='demosaicingAlgo', label='Demosaicing Algorithm', description='LibRaw Demosaicing Algorithm\n', - value='AHD', + value='DHT', values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'], exclusive=True, uid=[0], From 08f513e5e1e2451036eafb1aa5ca9345861d5e58 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 9 Mar 2023 14:35:53 +0100 Subject: [PATCH 0680/1093] [imageProcessing] Update parameter default values --- meshroom/aliceVision/ImageProcessing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 0bbda360ce..87c2765115 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -404,8 +404,8 @@ class ImageProcessing(desc.AVCommandLineNode): desc.BoolParam( name='useDCPColorMatrixOnly', label='Use DCP Color Matrix Only', - description='Do not use the DCP forward matrices if any', - value=False, + description='Use only the Color Matrix information from the DCP and ignore the Forward Matrix.', + value=True, uid=[0], enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), ), @@ -423,7 +423,7 @@ class ImageProcessing(desc.AVCommandLineNode): name='demosaicingAlgo', label='Demosaicing Algorithm', description='LibRaw Demosaicing Algorithm\n', - value='DHT', + value='AHD', values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'], exclusive=True, uid=[0], From 9bec02aa04b804dc0dc7017e5474d3b667277f73 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Mar 2023 19:52:45 +0100 Subject: [PATCH 0681/1093] [nodes] PanoramaCompositing: typo fix case --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index a1cf391d03..6d14081b74 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -58,7 +58,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): ), desc.IntParam( name='forceMinPyramidLevels', - label='Pyramid levels', + label='Pyramid Levels', description='Force the minimal number of levels in the pyramid for multiband compositer.', value=0, range=(0, 16, 1), From 04012791a87c68a321627c1bbeab9f9d863add6a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 9 Mar 2023 19:54:00 +0100 Subject: [PATCH 0682/1093] [nodes] PanoramaCompositing: update label --- meshroom/aliceVision/PanoramaCompositing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 6d14081b74..77abd49805 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -58,7 +58,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): ), desc.IntParam( name='forceMinPyramidLevels', - label='Pyramid Levels', + label='Min Pyramid Levels', description='Force the minimal number of levels in the pyramid for multiband compositer.', value=0, range=(0, 16, 1), From 986459921117eafa63a775e8a61c40fc6330923b Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 22 Aug 2022 12:01:18 +0200 Subject: [PATCH 0683/1093] Add relevant parameters in CameraInit.py --- meshroom/aliceVision/CameraInit.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index ad6c1eb6fc..4db553e16b 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -162,6 +162,20 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): value='${ALICEVISION_SENSOR_DB}', uid=[], ), + desc.File( + name='lensCorrectionProfileInfo', + label='Lens Correction Profile Info', + description='''Lens Correction Profile filepath or database directory.''', + value='${ALICEVISION_LENS_PROFILE_INFO}', + uid=[], + ), + desc.BoolParam( + name='enableLensCorrectionProfileSearch', + label='Enable Automatic LCP Search', + description='''Enable automatic LCP Search if a database directory is specified as LCP info.''', + value=False, + uid=[0], + ), desc.FloatParam( name='defaultFieldOfView', label='Default Field Of View', From 831bf956033f04de1ce951f19942c35dd45dfdc5 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 5 Sep 2022 08:46:39 +0200 Subject: [PATCH 0684/1093] Add required parameters in CameraInit.py and ImageProcessing.py for LCP management and application. --- meshroom/aliceVision/CameraInit.py | 7 ++++++ meshroom/aliceVision/ImageProcessing.py | 33 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 4db553e16b..82f801fa29 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -176,6 +176,13 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): value=False, uid=[0], ), + desc.BoolParam( + name='lensCorrectionProfileSearchByLensNameAndCameraMakerOnly', + label='LCP Search using lens name and camera maker only.', + description='''Automatic LCP Search consider only the camera model and the lens name.''', + value=False, + uid=[0], + ), desc.FloatParam( name='defaultFieldOfView', label='Default Field Of View', diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 87c2765115..76c2f56c77 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -108,6 +108,39 @@ class ImageProcessing(desc.AVCommandLineNode): value=False, uid=[0], ), + desc.GroupAttribute(name="lensCorrection", label="Lens Correction", description="Automatic lens correction settings.", joinChar=":", groupDesc=[ + desc.BoolParam( + name='lensCorrectionEnabled', + label='Enable', + description='Enable lens correction.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='geometry', + label='Geometry', + description='Geometry correction if a model is available in sfm data.', + value=False, + uid=[0], + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + desc.BoolParam( + name='vignetting', + label='Vignetting', + description='Vignetting correction if model parameters are available in metadata.', + value=False, + uid=[0], + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + desc.BoolParam( + name='chromaticAberration', + label='Chromatic Aberration', + description='Chromatic aberration (fringing) correction if model parameters are available in metadata.', + value=False, + uid=[0], + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + ]), desc.FloatParam( name='scaleFactor', label='ScaleFactor', From 62deb83139b504f3cc93c6a21c9654cc88e9dad3 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 20 Dec 2022 07:49:26 +0100 Subject: [PATCH 0685/1093] [cameraInit] rename parameter for allowing lcp search ignoring camera model --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 82f801fa29..cedcfbe07e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -177,7 +177,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): uid=[0], ), desc.BoolParam( - name='lensCorrectionProfileSearchByLensNameAndCameraMakerOnly', + name='lensCorrectionProfileSearchIgnoreCameraModel', label='LCP Search using lens name and camera maker only.', description='''Automatic LCP Search consider only the camera model and the lens name.''', value=False, From 55ff4cd773caa125ecbe1385ef19ecd7d1b32bcb Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 21 Dec 2022 16:55:09 +0100 Subject: [PATCH 0686/1093] [cameraInit] remove enableAutomaticLcpSearch param and add lcp estimation mode --- meshroom/aliceVision/CameraInit.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index cedcfbe07e..0fa51dad9f 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -67,7 +67,7 @@ " * estimated: estimated from metadata and/or sensor width. \n" " * unknown: unknown camera parameters (can still have default value guess)\n" " * none: not set", - values=("calibrated", "estimated", "unknown", "none"), + values=("calibrated", "estimated", "lcp", "unknown", "none"), value="none", exclusive=True, uid=[0], @@ -169,18 +169,11 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): value='${ALICEVISION_LENS_PROFILE_INFO}', uid=[], ), - desc.BoolParam( - name='enableLensCorrectionProfileSearch', - label='Enable Automatic LCP Search', - description='''Enable automatic LCP Search if a database directory is specified as LCP info.''', - value=False, - uid=[0], - ), desc.BoolParam( name='lensCorrectionProfileSearchIgnoreCameraModel', label='LCP Search using lens name and camera maker only.', description='''Automatic LCP Search consider only the camera model and the lens name.''', - value=False, + value=True, uid=[0], ), desc.FloatParam( From 631b0d75a278fc2f9cb13124505ca2fb40dc8638 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 16 Jan 2023 14:00:41 +0100 Subject: [PATCH 0687/1093] [imageProcessing] Do not expose Chromatic aberration as possible lens correction. --- meshroom/aliceVision/ImageProcessing.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 76c2f56c77..a081386547 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -132,14 +132,6 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), - desc.BoolParam( - name='chromaticAberration', - label='Chromatic Aberration', - description='Chromatic aberration (fringing) correction if model parameters are available in metadata.', - value=False, - uid=[0], - enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, - ), ]), desc.FloatParam( name='scaleFactor', From 5111736111eef26634c0f329ec2651352d3f0118 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 21 Jan 2023 22:18:56 +0100 Subject: [PATCH 0688/1093] [nodes] CameraInit: minor update to LCP labels and descriptions --- meshroom/aliceVision/CameraInit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 0fa51dad9f..8e3eacdf98 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -64,7 +64,8 @@ desc.ChoiceParam(name="initializationMode", label="Initialization Mode", description="Defines how this Intrinsic was initialized:\n" " * calibrated: calibrated externally.\n" - " * estimated: estimated from metadata and/or sensor width. \n" + " * estimated: estimated from metadata and/or sensor width \n" + " * lcp: Lens Camera Profile from a database of generic calibrations \n" " * unknown: unknown camera parameters (can still have default value guess)\n" " * none: not set", values=("calibrated", "estimated", "lcp", "unknown", "none"), @@ -171,8 +172,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): ), desc.BoolParam( name='lensCorrectionProfileSearchIgnoreCameraModel', - label='LCP Search using lens name and camera maker only.', - description='''Automatic LCP Search consider only the camera model and the lens name.''', + label='LCP Generic Search', + description='The lens name and camera maker are used to match the LCP database, but the camera model is ignored.', value=True, uid=[0], ), From 37e3a5ce50b9528d83aab8e1988b3033cd5bf12d Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 15 Feb 2023 18:13:19 +0100 Subject: [PATCH 0689/1093] [cameraInit] Add initDistoMode info in intrinsics. --- meshroom/aliceVision/CameraInit.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 8e3eacdf98..35c2d81df2 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -65,10 +65,9 @@ description="Defines how this Intrinsic was initialized:\n" " * calibrated: calibrated externally.\n" " * estimated: estimated from metadata and/or sensor width \n" - " * lcp: Lens Camera Profile from a database of generic calibrations \n" " * unknown: unknown camera parameters (can still have default value guess)\n" " * none: not set", - values=("calibrated", "estimated", "lcp", "unknown", "none"), + values=("calibrated", "estimated", "unknown", "none"), value="none", exclusive=True, uid=[0], @@ -81,6 +80,20 @@ label="Distortion Params", description="Distortion Parameters", ), + + desc.ChoiceParam(name="distoInitializationMode", label="Disto Initialization Mode", + description="Defines how this Intrinsic was initialized:\n" + " * calibrated: calibrated externally.\n" + " * estimated: estimated from metadata and/or sensor width \n" + " * unknown: unknown camera parameters (can still have default value guess)\n" + " * none: not set", + values=("calibrated", "estimated", "unknown", "none"), + value="none", + exclusive=True, + uid=[0], + advanced=True + ), + desc.BoolParam(name='locked', label='Locked', description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', value=False, uid=[0]), From ba2a1735b16543015fe920cd614f973be9aeaa89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 16 Feb 2023 10:40:58 +0100 Subject: [PATCH 0690/1093] [ui] display distoInitMode in image gallery tooltip --- meshroom/aliceVision/CameraInit.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 35c2d81df2..a96b175dda 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -73,18 +73,11 @@ uid=[0], advanced=True ), - - desc.ListAttribute( - name="distortionParams", - elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), - label="Distortion Params", - description="Distortion Parameters", - ), - desc.ChoiceParam(name="distoInitializationMode", label="Disto Initialization Mode", - description="Defines how this Intrinsic was initialized:\n" + desc.ChoiceParam(name="distoInitializationMode", label="Distortion Initialization Mode", + description="Defines how the distortion model and parameters was initialized:\n" " * calibrated: calibrated externally.\n" - " * estimated: estimated from metadata and/or sensor width \n" + " * estimated: estimated from a database of generic calibration \n" " * unknown: unknown camera parameters (can still have default value guess)\n" " * none: not set", values=("calibrated", "estimated", "unknown", "none"), @@ -93,6 +86,13 @@ uid=[0], advanced=True ), + + desc.ListAttribute( + name="distortionParams", + elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), + label="Distortion Params", + description="Distortion Parameters", + ), desc.BoolParam(name='locked', label='Locked', description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', From 63dbd7c72782ec2b75cecb55db49dc5e754c90ea Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 10 Mar 2023 16:44:11 +0100 Subject: [PATCH 0691/1093] [imageProcessing node] Update highlight mode description. --- meshroom/aliceVision/ImageProcessing.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 87c2765115..1310d3ad4b 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -422,7 +422,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.ChoiceParam( name='demosaicingAlgo', label='Demosaicing Algorithm', - description='LibRaw Demosaicing Algorithm\n', + description='LibRaw Demosaicing Algorithm', value='AHD', values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'], exclusive=True, @@ -432,9 +432,13 @@ class ImageProcessing(desc.AVCommandLineNode): desc.ChoiceParam( name='highlightMode', label='Highlight mode', - description='LibRaw highlight mode\n', + description='LibRaw highlight mode:\n' + ' * 0: Clip (default)\n' + ' * 1: Unclip\n' + ' * 2: Blend\n' + ' * 3-9: Rebuild', value=0, - values=[0, 1, 2, 3, 4, 5, 6, 7, 8], + values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], exclusive=True, uid=[0], ), From 051082f571408bb2237e1cd377840b0eb6d08469 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 13 Mar 2023 10:26:11 +0100 Subject: [PATCH 0692/1093] [cameraInit] rename parameter distoInitializationMode into distortionInitializationMode --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index a96b175dda..1387a03d6e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -74,7 +74,7 @@ advanced=True ), - desc.ChoiceParam(name="distoInitializationMode", label="Distortion Initialization Mode", + desc.ChoiceParam(name="distortionInitializationMode", label="Distortion Initialization Mode", description="Defines how the distortion model and parameters was initialized:\n" " * calibrated: calibrated externally.\n" " * estimated: estimated from a database of generic calibration \n" From 24f344af571ba708ef60d72dd7e091a6ac8a16c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 13 Mar 2023 11:53:17 +0100 Subject: [PATCH 0693/1093] [nodes] KeyframeSelection: Update "pxDisplacement" default value to 10% --- meshroom/aliceVision/KeyframeSelection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 399a01335b..547b51f12c 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -136,7 +136,7 @@ class KeyframeSelection(desc.AVCommandLineNode): name="pxDisplacement", label="Pixel Displacement", description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection", - value=3.0, + value=10.0, range=(0.0, 100.0, 1.0), uid=[0], enabled=lambda node: node.smartSelection.enabled From f481dfa8584615d4171c8cfb90bf04d04ac8c8e7 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 13 Mar 2023 14:19:05 +0100 Subject: [PATCH 0694/1093] [nodes] CameraInit: update advanced modes for initModes and lens search mode --- meshroom/aliceVision/CameraInit.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 1387a03d6e..64697d85d1 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -71,9 +71,8 @@ value="none", exclusive=True, uid=[0], - advanced=True ), - + desc.ChoiceParam(name="distortionInitializationMode", label="Distortion Initialization Mode", description="Defines how the distortion model and parameters was initialized:\n" " * calibrated: calibrated externally.\n" @@ -84,7 +83,6 @@ value="none", exclusive=True, uid=[0], - advanced=True ), desc.ListAttribute( @@ -93,7 +91,7 @@ label="Distortion Params", description="Distortion Parameters", ), - + desc.BoolParam(name='locked', label='Locked', description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', value=False, uid=[0]), @@ -189,6 +187,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): description='The lens name and camera maker are used to match the LCP database, but the camera model is ignored.', value=True, uid=[0], + advanced=True, ), desc.FloatParam( name='defaultFieldOfView', From de38c53e253cef8171649d9ee04102449907790f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 13 Mar 2023 14:19:40 +0100 Subject: [PATCH 0695/1093] [nodes] CameraInit: update advanced mode for group and field of view params --- meshroom/aliceVision/CameraInit.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 64697d85d1..9631582225 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -192,11 +192,10 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): desc.FloatParam( name='defaultFieldOfView', label='Default Field Of View', - description='Empirical value for the field of view in degree.', + description='Default value for the field of view (in degree) used as an initialization when there is no focal or field of view in the image metadata.', value=45.0, range=(0.0, 180.0, 1.0), uid=[], - advanced=True, ), desc.ChoiceParam( name='groupCameraFallback', @@ -211,7 +210,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): value='folder', exclusive=True, uid=[], - advanced=True, ), desc.ChoiceParam( name='allowedCameraModels', @@ -232,7 +230,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): 'LibRawNoWhiteBalancing: Simple neutralization.\n' 'LibRawWhiteBalancing: Use internal white balancing from libraw.\n' 'DCPLinearProcessing: Use DCP color profile.\n' - 'DCPMetadata: Same as None with DCP info added in metadata.\n', + 'DCPMetadata: Same as None with DCP info added in metadata.', value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing'], exclusive=True, From 5e38b63ab4c10389994199d2005e32873e2e25c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 13 Mar 2023 18:20:20 +0100 Subject: [PATCH 0696/1093] [nodes] ImageProcessing: Add and hide the fringing correction in the LCP Add a parameter for the correction of chromatic aberrations in the LCP group but disable it. It will need to be re-enabled later on, when there will be a full support of the chromatic aberration correction. --- meshroom/aliceVision/ImageProcessing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 927274384d..085ee21e6d 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -132,6 +132,15 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), + desc.BoolParam( + name='chromaticAberration', + label='Chromatic Aberration', + description='Chromatic aberration (fringing) correction if model parameters are available in metadata.', + value=False, + uid=[0], + enabled=False # To replace with the line below when the correction of chromatic aberration will be available + # enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value + ) ]), desc.FloatParam( name='scaleFactor', From 145c84b9f1514359cc3a14deae30f2fb61b32098 Mon Sep 17 00:00:00 2001 From: fabien servant <fabien.servant@technicolor.com> Date: Wed, 9 Mar 2022 16:54:36 +0100 Subject: [PATCH 0697/1093] Checkerboard detection node --- meshroom/aliceVision/checkerboardDetection.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meshroom/aliceVision/checkerboardDetection.py diff --git a/meshroom/aliceVision/checkerboardDetection.py b/meshroom/aliceVision/checkerboardDetection.py new file mode 100644 index 0000000000..2bebe011c9 --- /dev/null +++ b/meshroom/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 276de9253d7821277aa5f461d643a333ef4cd2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 12 Jan 2023 16:01:19 +0100 Subject: [PATCH 0698/1093] [nodes] CheckerboardDetection: visualize debug output in 2D viewer --- meshroom/aliceVision/CheckerboardDetection.py | 66 +++++++++++++++++++ meshroom/aliceVision/checkerboardDetection.py | 47 ------------- 2 files changed, 66 insertions(+), 47 deletions(-) create mode 100644 meshroom/aliceVision/CheckerboardDetection.py delete mode 100644 meshroom/aliceVision/checkerboardDetection.py diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py new file mode 100644 index 0000000000..d7f578ac94 --- /dev/null +++ b/meshroom/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_<VIEW_ID>.png', + group='', # do not export on the command line + uid=[], + ), + ] diff --git a/meshroom/aliceVision/checkerboardDetection.py b/meshroom/aliceVision/checkerboardDetection.py deleted file mode 100644 index 2bebe011c9..0000000000 --- a/meshroom/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 6327e0727bfc45396ef5a05dca2a6cdd6706f29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 18 Jan 2023 15:12:11 +0100 Subject: [PATCH 0699/1093] [nodes] CheckerboardDetection: cosmetic changes --- meshroom/aliceVision/CheckerboardDetection.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index d7f578ac94..0dcba781ff 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/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_<VIEW_ID>.png', + value=desc.Node.internalFolder + '<VIEW_ID>.png', group='', # do not export on the command line uid=[], ), From d6f9f224c95511e2ea36b1f44ff2dd0aa20340ce Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 14 Mar 2023 14:59:15 +0100 Subject: [PATCH 0700/1093] [Node] Texturing: Replace processcolorspaceName with workingcolorSpace and add outputColorSpace --- meshroom/aliceVision/Texturing.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index a6543bec1a..8c62cfd903 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -254,11 +254,21 @@ class Texturing(desc.AVCommandLineNode): advanced=True, ), desc.ChoiceParam( - name='processColorspace', - label='Process Colorspace', - description="Colorspace for the texturing internal computation (does not impact the output file colorspace).", + name='workingColorSpace', + label='Working Color Space', + description="Color space for the texturing internal computation (does not impact the output file color space).", value='sRGB', - values=('sRGB', 'LAB', 'XYZ'), + values=('sRGB', 'Linear', 'ACES2065-1', 'ACEScg'), + exclusive=True, + uid=[0], + advanced=True, + ), + desc.ChoiceParam( + name='outputColorSpace', + label='Output Color Space', + description="Color space for the output file.", + value='AUTO', + values=('sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'AUTO'), exclusive=True, uid=[0], advanced=True, From b98c847e7dab433350bfba615bfdb05e29638907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 15 Mar 2023 12:06:41 +0100 Subject: [PATCH 0701/1093] [nodes] Split360Images: update attributes to software version 2.0 --- meshroom/aliceVision/Split360Images.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 4c3d042af3..0313a73e31 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc @@ -11,8 +11,8 @@ class Split360Images(desc.AVCommandLineNode): inputs = [ desc.File( name='input', - label='Images Folder', - description="Images Folder", + label='Images', + description="Images", value='', uid=[0], ), @@ -59,8 +59,8 @@ class Split360Images(desc.AVCommandLineNode): uid=[0], ), desc.BoolParam( - name='equirectangularDemoMode', - label='Demo Mode', + name='equirectangularPreviewMode', + label='Preview Mode', description="Export a SVG file that simulates the split", value=False, uid=[0], @@ -75,6 +75,15 @@ class Split360Images(desc.AVCommandLineNode): ), ] ), + desc.ChoiceParam( + name='extension', + label='Output File Extension', + description='Output Image File Extension.', + value='', + values=['', 'exr', 'jpg', 'tiff', 'png'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 13fc1cc3dd3a52ed546b6c2a02695cc0df3d1710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 15 Mar 2023 16:19:24 +0100 Subject: [PATCH 0702/1093] [nodes] StructureFromMotion: Update description of "initialPair" files "initialPairA" and "initialPairB" can either be the filename of the image (without the path), the whole path of the image, or its view ID. --- meshroom/aliceVision/StructureFromMotion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index c16de93a8d..e975a4f639 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -318,14 +318,14 @@ class StructureFromMotion(desc.AVCommandLineNode): desc.File( name='initialPairA', label='Initial Pair A', - description='Filename of the first image (without path).', + description='View ID or filename of the first image (either with or without the full path).', value='', uid=[0], ), desc.File( name='initialPairB', label='Initial Pair B', - description='Filename of the second image (without path).', + description='View ID or filename of the second image (either with or without the full path).', value='', uid=[0], ), From 3449304a8f5a2c74bbf712d9b598712ac184369d Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 17 Mar 2023 12:11:02 +0100 Subject: [PATCH 0703/1093] [nodes] Texturing: minor update to outputColorSpace param --- meshroom/aliceVision/Texturing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 8c62cfd903..d61342dd27 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -266,12 +266,11 @@ class Texturing(desc.AVCommandLineNode): desc.ChoiceParam( name='outputColorSpace', label='Output Color Space', - description="Color space for the output file.", + description="Color space for the output texture files.", value='AUTO', values=('sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'AUTO'), exclusive=True, uid=[0], - advanced=True, ), desc.BoolParam( name='correctEV', From 6b073a91cac79b9678edcc2bc8e212eac84489a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 24 Mar 2023 17:20:37 +0100 Subject: [PATCH 0704/1093] [pipelines] Update the release version from 2021.1.0 to 2023.1.0 --- meshroom/cameraTracking.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 2 +- meshroom/photogrammetryDraft.mg | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 1b2a61c079..d77c5611ac 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true, "nodesVersions": { diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 15ff88d2ad..d9d0c0df20 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -19,7 +19,7 @@ "PanoramaWarping": "1.0", "Publish": "1.2" }, - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true }, diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index f65b53acc3..7947e8c9ce 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -19,7 +19,7 @@ "PanoramaWarping": "1.0", "Publish": "1.2" }, - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true }, diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index abc7852137..6f3b3013c8 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true, "nodesVersions": { diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 6983773b42..c8a531dedc 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true, "nodesVersions": { diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index fdedcaff14..9b1e9a4fcb 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -11,7 +11,7 @@ "Meshing": "7.0", "Publish": "1.2" }, - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true }, From 7f6d1addcac51625671a6a2faddccd8ed8ab379b Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 22 Mar 2023 14:51:44 +0100 Subject: [PATCH 0705/1093] [panorama] option to build contact sheet --- meshroom/aliceVision/PanoramaInit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index e383bb6867..f51bb4f064 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -53,6 +53,13 @@ class PanoramaInit(desc.AVCommandLineNode): uid=[0], enabled=lambda node: ('Horizontal' in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), ), + desc.BoolParam( + name='buildContactSheet', + label='Build contact sheet', + description="Build contact sheet for panorama", + value=True, + uid=[0], + ), desc.ListAttribute( elementDesc=desc.IntParam( name='nbViews', From 4ddd522eb3a4791328db123aece8e64f4d045070 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 4 Apr 2023 17:03:57 +0200 Subject: [PATCH 0706/1093] [sfmTransform] add auto mode --- meshroom/aliceVision/SfMTransform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 9f0e687da7..fb29373527 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -37,6 +37,7 @@ class SfMTransform(desc.AVCommandLineNode): description="Transformation method:\n" " * transformation: Apply a given transformation\n" " * manual: Apply the gizmo transformation (show the transformed input)\n" + " * auto: Using X axis of all cameras as horizon. gps north and scale if available. cameras center mean is used as origin.\n" " * auto_from_cameras: Use cameras\n" " * auto_from_cameras_x_axis: Use X axis of all cameras\n" " * auto_from_landmarks: Use landmarks\n" @@ -45,7 +46,7 @@ class SfMTransform(desc.AVCommandLineNode): " * from_markers: Align specific markers to custom coordinates\n" " * from_gps: Align with the gps positions from the image metadata", value='auto_from_landmarks', - values=['transformation', 'manual', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps'], + values=['transformation', 'manual', 'auto', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps'], exclusive=True, uid=[0], ), From 3d97e3dcc6a90add87c5338e33245930d51f7467 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 6 Apr 2023 20:57:20 +0200 Subject: [PATCH 0707/1093] [nodes] SfMTransform: use auto by default --- meshroom/aliceVision/SfMTransform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index fb29373527..7ae2d0f0a0 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -45,7 +45,7 @@ class SfMTransform(desc.AVCommandLineNode): " * from_center_camera: Use the center camera as the origin of the coordinate system\n" " * from_markers: Align specific markers to custom coordinates\n" " * from_gps: Align with the gps positions from the image metadata", - value='auto_from_landmarks', + value='auto', values=['transformation', 'manual', 'auto', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps'], exclusive=True, uid=[0], From 67a3f16c98be61ac752764c9104097f7726e7371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 12 Apr 2023 12:39:24 +0200 Subject: [PATCH 0708/1093] [nodes] KeyframeSelection: Add SfMData files as outputs This commit updates the name of the input parameter (from "mediaPaths" to "inputPaths") as it now also supports SfMData files, and adds two SfMData files as output parameters: one that contains the selected keyframes, and one that contains the frames that were not selected as keyframes. --- meshroom/aliceVision/KeyframeSelection.py | 26 +++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 547b51f12c..f9ab02b239 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -18,15 +18,15 @@ class KeyframeSelection(desc.AVCommandLineNode): inputs = [ desc.ListAttribute( elementDesc=desc.File( - name="mediaPath", - label="Media Path", - description="Media path.", + name="inputPath", + label="Input Path", + description="Input path.", value="", uid=[0], ), - name="mediaPaths", - label="Media Paths", - description="Input video files or image sequence directories.", + name="inputPaths", + label="Input Paths", + description="Input video files, image sequence directories or SfMData file.", ), desc.ListAttribute( elementDesc=desc.File( @@ -341,5 +341,19 @@ class KeyframeSelection(desc.AVCommandLineNode): value=desc.Node.internalFolder, uid=[], ), + desc.File( + name="outputSfMDataKeyframes", + label="Keyframes SfMData", + description="Output SfMData file containing all the selected keyframes.", + value=desc.Node.internalFolder + "keyframes.sfm", + uid=[], + ), + desc.File( + name="outputSfMDataFrames", + label="Frames SfMData", + description="Output SfMData file containing all the frames that were not selected as keyframes.", + value=desc.Node.internalFolder + "frames.sfm", + uid=[] + ) ] From 7d937467eeb9fcb3a5e8c032405272928860e6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 7 Apr 2023 13:06:13 +0200 Subject: [PATCH 0709/1093] [nodes] KeyframeSelection: Update description of "outputSfmDataFrames" Indicate that this file is not written as an output if the input is a video or a list of videos. --- meshroom/aliceVision/KeyframeSelection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index f9ab02b239..f1c2d33190 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -351,7 +351,8 @@ class KeyframeSelection(desc.AVCommandLineNode): desc.File( name="outputSfMDataFrames", label="Frames SfMData", - description="Output SfMData file containing all the frames that were not selected as keyframes.", + description="Output SfMData file containing all the frames that were not selected as keyframes.\n" + "If the input contains videos, this file will not be written since all the frames that were not selected do not actually exist on disk.", value=desc.Node.internalFolder + "frames.sfm", uid=[] ) From 5e13932507c75e5441a88d52120566f408efa429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 7 Apr 2023 13:07:41 +0200 Subject: [PATCH 0710/1093] [nodes] KeyframeSelection: Update label for "sensorDbPath" --- meshroom/aliceVision/KeyframeSelection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index f1c2d33190..c2c85a973d 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -67,7 +67,7 @@ class KeyframeSelection(desc.AVCommandLineNode): ), desc.File( name="sensorDbPath", - label="Sensor Db Path", + label="Sensor Database", description="Camera sensor width database path.", value="${ALICEVISION_SENSOR_DB}", uid=[0], From ecaa9663cef08d48618e56ae528738e2e08b2ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 12 Apr 2023 15:01:28 +0200 Subject: [PATCH 0711/1093] [nodes] KeyframeSelection: Update node's version --- meshroom/aliceVision/KeyframeSelection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index c2c85a973d..12ec293eca 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" import os from meshroom.core import desc From c52d17a0855ff8de2e3c1b8ad5b66cfbb0b3aca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 13 Apr 2023 14:42:06 +0200 Subject: [PATCH 0712/1093] [nodes] StructureFromMotion: Add new inputs parameters Add two new input parameters, `nbFirstUnstableCameras` which sets the number of cameras for which a bundle adjustment is performed every time a camera is added, and `maxImagesPerGroup` which sets the maximum number of cameras that can be added before the bundle adjustment has to be performed again. By default, the bundle adjustment will be performed every time one of the first 30 cameras is added, as computations are not too expensive while there are few cameras. Past that number, the bundle adjustment will only be performed when up to 30 cameras have been added. The node's version is updated accordingly. --- meshroom/aliceVision/StructureFromMotion.py | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index e975a4f639..f4e1dcf636 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc @@ -169,6 +169,27 @@ class StructureFromMotion(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name='nbFirstUnstableCameras', + label='First Unstable Cameras Nb', + description='Number of cameras for which the bundle adjustment is performed every single time a camera is added.\n' + 'This leads to more stable results while computations are not too expensive, as there is little data.\n' + 'Past this number, the bundle adjustment will only be performed once for N added cameras.', + value=30, + range=(1, 100, 1), + uid=[0], + advanced=True + ), + desc.IntParam( + name='maxImagesPerGroup', + label='Max Images Per Group', + description='Maximum number of cameras that can be added before the bundle adjustment has to be performed again.\n' + 'This prevents adding too much data at once without performing the bundle adjustment.', + value=30, + range=(1, 100, 1), + uid=[0], + advanced=True + ), desc.IntParam( name='maxNumberOfMatches', label='Maximum Number of Matches', From 22abe94b223213d62394272856dbfc759fdc48e1 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 12 Apr 2023 15:37:38 +0200 Subject: [PATCH 0713/1093] [Nodes] Add rec709 option as output color space in ImageProcessing, PanoramaPostProcessing and Texturing nodes. In ImageProcessing rec709 option is also added as working color space. --- meshroom/aliceVision/ImageProcessing.py | 4 ++-- meshroom/aliceVision/PanoramaPostProcessing.py | 2 +- meshroom/aliceVision/Texturing.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 085ee21e6d..6fe0e0de84 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -384,7 +384,7 @@ class ImageProcessing(desc.AVCommandLineNode): label='Output Color Space', description='Allows you to choose the color space of the output image.', value='AUTO', - values=['AUTO', 'sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + values=['AUTO', 'sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, uid=[0], ), @@ -393,7 +393,7 @@ class ImageProcessing(desc.AVCommandLineNode): label='Working Color Space', description='Allows you to choose the color space in which the data are processed.', value='Linear', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, uid=[0], enabled=lambda node: not node.applyDcpMetadata.value, diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 71e23b2874..893b452fd4 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -36,7 +36,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): label='Output Color Space', description='Allows you to choose the color space of the output image.', value='Linear', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg'], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index d61342dd27..4daf3ecc92 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -268,7 +268,7 @@ class Texturing(desc.AVCommandLineNode): label='Output Color Space', description="Color space for the output texture files.", value='AUTO', - values=('sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'AUTO'), + values=('sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'AUTO'), exclusive=True, uid=[0], ), From ee6fae9d4e3453c60ea5bcce5432cb931c490ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 13 Apr 2023 19:56:16 +0200 Subject: [PATCH 0714/1093] [pipelines] Update `StructureFromMotion`'s version from 2.0 to 3.0 --- meshroom/cameraTracking.mg | 2 +- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 2 +- meshroom/photogrammetryDraft.mg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index d77c5611ac..24553e9f63 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -11,7 +11,7 @@ "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", - "StructureFromMotion": "2.0", + "StructureFromMotion": "3.0", "Publish": "1.2" } }, diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 6f3b3013c8..66bd3f8c65 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -10,7 +10,7 @@ "Texturing": "6.0", "PrepareDenseScene": "3.0", "DepthMap": "3.0", - "StructureFromMotion": "2.0", + "StructureFromMotion": "3.0", "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index c8a531dedc..6adc1b4acf 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -12,7 +12,7 @@ "ImageMatchingMultiSfM": "1.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", - "StructureFromMotion": "2.0", + "StructureFromMotion": "3.0", "Publish": "1.2" } }, diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 9b1e9a4fcb..1d8870490e 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -4,7 +4,7 @@ "FeatureMatching": "2.0", "MeshFiltering": "3.0", "Texturing": "6.0", - "StructureFromMotion": "2.0", + "StructureFromMotion": "3.0", "CameraInit": "9.0", "ImageMatching": "2.0", "FeatureExtraction": "1.1", From 50ef128d47ebfb3924ce1a907958613c8b3b1809 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 21 Mar 2023 11:12:57 +0100 Subject: [PATCH 0715/1093] [panorama] Panorama preview size --- meshroom/aliceVision/PanoramaPostProcessing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 893b452fd4..eb28db8881 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -31,6 +31,14 @@ class PanoramaPostProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.IntParam( + name='previewSize', + label='Panorama preview Width', + description='Choose the output preview width (in pixels).', + value=1000, + range=(0, 1000, 5000), + uid=[0] + ), desc.ChoiceParam( name='outputColorSpace', label='Output Color Space', From acd90f97af52e1ac25ca1a5902e461cf0ea2678b Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 28 Mar 2023 16:13:32 +0200 Subject: [PATCH 0716/1093] [panorama] Preview file name is now a parameter --- .../aliceVision/PanoramaPostProcessing.py | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index eb28db8881..447b91f712 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -40,13 +40,13 @@ class PanoramaPostProcessing(desc.CommandLineNode): uid=[0] ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', - description='Allows you to choose the color space of the output image.', - value='Linear', - values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg'], - exclusive=True, - uid=[0], + name='outputColorSpace', + label='Output Color Space', + description='Allows you to choose the color space of the output image.', + value='Linear', + values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg'], + exclusive=True, + uid=[0], ), desc.ChoiceParam( name='verboseLevel', @@ -68,4 +68,12 @@ class PanoramaPostProcessing(desc.CommandLineNode): value=desc.Node.internalFolder + 'panorama.exr', uid=[], ), + desc.File( + name='outputPanoramaPreview', + label='Output Panorama preview', + description='', + semantic='image', + value=desc.Node.internalFolder + 'panoramaPreview.jpg', + uid=[], + ), ] From d76da06efe4f53078765d98fb8c1520c3e5cbdf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 30 Mar 2023 12:13:16 +0200 Subject: [PATCH 0717/1093] [nodes] PanoramaPostProcessing: Fix "previewSize"'s range - Fixed the range of the "previewSize" parameter: since its step was set to 5000, it could only be set to 0 or 1000. It can now be set from 0 to 5000 with steps of 100 pixels; - Fixed the case of the "previewSize" and "outputPanoramaPreview"; - Improved the description of "previewSize", and added descriptions for "outputPanorama" and "outputPanoramaPreview". --- meshroom/aliceVision/PanoramaPostProcessing.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 447b91f712..4599b342e3 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -33,10 +33,10 @@ class PanoramaPostProcessing(desc.CommandLineNode): ), desc.IntParam( name='previewSize', - label='Panorama preview Width', - description='Choose the output preview width (in pixels).', + label='Panorama Preview Width', + description='The width (in pixels) of the output panorama preview.', value=1000, - range=(0, 1000, 5000), + range=(0, 5000, 100), uid=[0] ), desc.ChoiceParam( @@ -63,15 +63,15 @@ class PanoramaPostProcessing(desc.CommandLineNode): desc.File( name='outputPanorama', label='Output Panorama', - description='', + description='Generated panorama in EXR format.', semantic='image', value=desc.Node.internalFolder + 'panorama.exr', uid=[], ), desc.File( name='outputPanoramaPreview', - label='Output Panorama preview', - description='', + label='Output Panorama Preview', + description='Preview of the generated panorama in JPG format.', semantic='image', value=desc.Node.internalFolder + 'panoramaPreview.jpg', uid=[], From bf12982a9993a02b5954a307ca597391e518b2cd Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 25 Apr 2023 18:10:20 +0200 Subject: [PATCH 0718/1093] [Nodes] LdrToHdrMerge: Add option to keep the filename of the input image selected as the central one for the output image filename --- meshroom/aliceVision/LdrToHdrMerge.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 4cbf5e3d46..fddc0ef506 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -99,6 +99,13 @@ class LdrToHdrMerge(desc.AVCommandLineNode): uid=[0], enabled= lambda node: node.nbBrackets.value != 1, ), + desc.BoolParam( + name='keepSourceImageName', + label='Keep Source Image Name', + description="Keep the filename of the input image selected as central image for the output image filename.", + value=False, + uid=[0], + ), desc.ChoiceParam( name='fusionWeight', label='Fusion Weight', From bd8c1b712138afb927b36108f5dca7bc007abaaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 27 Apr 2023 16:14:59 +0200 Subject: [PATCH 0719/1093] [nodes] PanoramaInit: Disable "buildContactSheet" when there is no XML Additionally fix the case of the "buildContactSheet" label and improve the description. --- meshroom/aliceVision/PanoramaInit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index f51bb4f064..08894c64bf 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -55,10 +55,12 @@ class PanoramaInit(desc.AVCommandLineNode): ), desc.BoolParam( name='buildContactSheet', - label='Build contact sheet', - description="Build contact sheet for panorama", + label='Build Contact Sheet', + description='Build the contact sheet for the panorama if an XML data file is provided.\n' + 'The contact sheet consists in a preview of the panorama using the input images.', value=True, uid=[0], + enabled=lambda node: node.config.enabled and node.config.value != '' ), desc.ListAttribute( elementDesc=desc.IntParam( From e39e960d01787a32308477127dce62f1467a6b03 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 18 Apr 2023 11:10:06 +0200 Subject: [PATCH 0720/1093] [nodes] add TracksBuilding node --- meshroom/aliceVision/TracksBuilding.py | 101 +++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 meshroom/aliceVision/TracksBuilding.py diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py new file mode 100644 index 0000000000..3cfb49c422 --- /dev/null +++ b/meshroom/aliceVision/TracksBuilding.py @@ -0,0 +1,101 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class TracksBuilding(desc.AVCommandLineNode): + commandLine = 'aliceVision_tracksBuilding {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Sparse Reconstruction' + documentation = ''' +It fuses all feature matches between image pairs into tracks. Each track represents a candidate point in space, visible from multiple cameras. +''' + + inputs = [ + desc.File( + name='input', + label='SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.ListAttribute( + elementDesc=desc.File( + name="matchesFolder", + label="Matches Folder", + description="", + value="", + uid=[0], + ), + name="matchesFolders", + label="Matches Folders", + description="Folder(s) in which computed matches are stored." + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + exclusive=False, + uid=[0], + joinChar=',', + ), + desc.IntParam( + name='minInputTrackLength', + label='Min Input Track Length', + description='Minimum track length', + value=2, + range=(2, 10, 1), + uid=[0], + ), + desc.BoolParam( + name='useOnlyMatchesFromInputFolder', + label='Use Only Matches From Input Folder', + description='Use only matches from the input matchesFolder parameter.\n' + 'Matches folders previously added to the SfMData file will be ignored.', + value=False, + uid=[], + advanced=True, + ), + desc.BoolParam( + name='filterTrackForks', + label='Filter Track Forks', + description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' + 'lead to multiple features in the same image for a single track. \n', + value=False, + 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='Tracks', + description='Path to the output tracks file', + value=desc.Node.internalFolder + 'tracksFile.json', + uid=[], + ), + ] From 380a70c8fc627dcebe16b57e4d2ded1a8c82aedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 17 May 2023 10:59:01 +0200 Subject: [PATCH 0721/1093] [nodes] StructureFromMotion: new bundleAdjustmentMaxOutliers attribute --- meshroom/aliceVision/StructureFromMotion.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index f4e1dcf636..1fcd57d956 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "3.1" from meshroom.core import desc @@ -190,6 +190,15 @@ class StructureFromMotion(desc.AVCommandLineNode): uid=[0], advanced=True ), + desc.IntParam( + name='bundleAdjustmentMaxOutliers', + label='Bundle Adjustment Maximum Outliers', + description='Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.', + value=50, + range=(0, 1000, 1), + uid=[0], + advanced=True + ), desc.IntParam( name='maxNumberOfMatches', label='Maximum Number of Matches', From 4970269bfca6d0440215e55cb52423796c086c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 17 May 2023 16:35:06 +0200 Subject: [PATCH 0722/1093] [nodes] StructureFromMotion: allow negative bundleAdjustmentMaxOutliers to disable BA iterations --- meshroom/aliceVision/StructureFromMotion.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 1fcd57d956..94dd279ad0 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -192,10 +192,11 @@ class StructureFromMotion(desc.AVCommandLineNode): ), desc.IntParam( name='bundleAdjustmentMaxOutliers', - label='Bundle Adjustment Maximum Outliers', - description='Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.', + label='Max Nb of Outliers after BA', + description='Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.\n' + 'Using a negative value for this threshold will disable BA iterations.', value=50, - range=(0, 1000, 1), + range=(-1, 1000, 1), uid=[0], advanced=True ), From ba37187d35a331c7438af2d4024ba06e2ff1443b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 3 Mar 2023 15:48:08 +0100 Subject: [PATCH 0723/1093] [nodes] add undistortion to intrinsic attributes --- meshroom/aliceVision/CameraInit.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 9631582225..1090336eff 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -91,7 +91,21 @@ label="Distortion Params", description="Distortion Parameters", ), - + desc.GroupAttribute( + name="undistortionOffset", + label="Undistortion Offset", + description="Undistortion Offset", + groupDesc=[ + desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), + desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), + ] + ), + desc.ListAttribute( + name="undistortionParams", + elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), + label="Undistortion Params", + description="Undistortion Parameters" + ), desc.BoolParam(name='locked', label='Locked', description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', value=False, uid=[0]), @@ -123,6 +137,14 @@ def readSfMData(sfmFile): if intrinsic['distortionParams'] == '': intrinsic['distortionParams'] = list() + offset = intrinsic['undistortionOffset'] + intrinsic['undistortionOffset'] = {} + intrinsic['undistortionOffset']['x'] = offset[0] + intrinsic['undistortionOffset']['y'] = offset[1] + + if intrinsic['undistortionParams'] == '': + intrinsic['undistortionParams'] = list() + viewsKeys = [v.name for v in Viewpoint] views = [{k: v for k, v in item.items() if k in viewsKeys} for item in data.get("views", [])] for view in views: @@ -411,6 +433,7 @@ def createViewpointsFile(self, node, additionalViews=()): intrinsics = node.intrinsics.getPrimitiveValue(exportDefault=True) for intrinsic in intrinsics: intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] + intrinsic['undistortionOffset'] = [intrinsic['undistortionOffset']['x'], intrinsic['undistortionOffset']['y']] views = node.viewpoints.getPrimitiveValue(exportDefault=False) # convert the metadata string into a map From a452ce08eb34005e87f846f3bbbb34d0a6818d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 3 Mar 2023 15:49:39 +0100 Subject: [PATCH 0724/1093] [nodes] update DistortionCalibration to use the output of a Checkerboard Detection --- meshroom/aliceVision/DistortionCalibration.py | 31 ++++++------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index b69a2b7c9e..a14a128b83 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -1,4 +1,4 @@ -__version__ = '2.0' +__version__ = '3.0' from meshroom.core import desc @@ -7,8 +7,9 @@ class DistortionCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_distortionCalibration {allParams}' size = desc.DynamicNodeSize('input') + category = 'Other' documentation = ''' - Calibration of a camera/lens couple distortion using a full screen checkerboard +Calibration of a camera/lens couple distortion using a full screen checkerboard. ''' inputs = [ @@ -19,26 +20,12 @@ class DistortionCalibration(desc.AVCommandLineNode): value='', uid=[0], ), - desc.ListAttribute( - elementDesc=desc.File( - name='lensGridImage', - label='Lens Grid Image', - description='', - value='', - uid=[0], - ), - name='lensGrid', - label='Lens Grid Images', - description='Lens grid images to estimate the optical distortions.', - ), - 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=[], + desc.File( + name='checkerboards', + label='Checkerboards folder', + description='Folder containing checkerboard JSON files', + value='', + uid=[0] ), ] From 61e748ba462d293580ac3bc15eaf107c6e6d1b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 3 Mar 2023 15:50:14 +0100 Subject: [PATCH 0725/1093] [nodes] new ExportDistortion node --- meshroom/aliceVision/ExportDistortion.py | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 meshroom/aliceVision/ExportDistortion.py diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py new file mode 100644 index 0000000000..9eee081578 --- /dev/null +++ b/meshroom/aliceVision/ExportDistortion.py @@ -0,0 +1,31 @@ +__version__ = "1.0" + +from meshroom.core import desc + +class ExportDistortion(desc.AVCommandLineNode): + commandLine = 'aliceVision_exportDistortion {allParams}' + + category = 'Export' + documentation = ''' +Export the distortion model and parameters of cameras in a SfM scene. +''' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Folder', + description='', + value=desc.Node.internalFolder, + uid=[], + ), + ] From 58a88a9892d7328eebdcbce7f554bbbed9e6f7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 3 Mar 2023 18:05:07 +0100 Subject: [PATCH 0726/1093] [nodes] DistortionCalibration: add cameraModel input attribute --- meshroom/aliceVision/DistortionCalibration.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index a14a128b83..4303c23ac3 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -16,16 +16,25 @@ class DistortionCalibration(desc.AVCommandLineNode): desc.File( name='input', label='SfmData', - description='SfmData File', + description='SfmData File.', value='', uid=[0], ), desc.File( name='checkerboards', label='Checkerboards folder', - description='Folder containing checkerboard JSON files', + description='Folder containing checkerboard JSON files.', value='', - uid=[0] + uid=[0], + ), + desc.ChoiceParam( + name='cameraModel', + label='Camera Model', + description='Camera model used to estimate distortion.', + value='3deanamorphic4', + values=['3deanamorphic4'], + exclusive=True, + uid=[0], ), ] @@ -33,7 +42,7 @@ class DistortionCalibration(desc.AVCommandLineNode): desc.File( name='outSfMData', label='SfmData File', - description='Path to the output sfmData file', + description='Path to the output sfmData file.', value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], ) From 1c2d56597fb9ea5043a67734055921835521ca96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 15 Mar 2023 17:12:50 +0100 Subject: [PATCH 0727/1093] [nodes] new ApplyCalibration node for aliceVision_applyCalibration software --- meshroom/aliceVision/ApplyCalibration.py | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 meshroom/aliceVision/ApplyCalibration.py diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py new file mode 100644 index 0000000000..d10672b8cb --- /dev/null +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -0,0 +1,38 @@ +__version__ = "1.0" + +from meshroom.core import desc + +class ApplyCalibration(desc.AVCommandLineNode): + commandLine = 'aliceVision_applyCalibration {allParams}' + + category = 'Utils' + documentation = ''' +Overwrite intrinsics with a calibrated intrinsic. +''' + + inputs = [ + desc.File( + name='input', + label='Input SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.File( + name='calibration', + label='Calibration', + description='Calibration SfMData file.', + value='', + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='SfMData File.', + description='Path to the output sfmData file.', + value=desc.Node.internalFolder + 'sfmData.sfm', + uid=[], + ), + ] From ea2b237452a4ac6bd8f1a6a17ab06478d14f325a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 21 Mar 2023 18:26:29 +0100 Subject: [PATCH 0728/1093] [nodes] DistortionCalibration: rename outSfMData to output --- meshroom/aliceVision/DistortionCalibration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 4303c23ac3..eb38efaa8d 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -40,7 +40,7 @@ class DistortionCalibration(desc.AVCommandLineNode): outputs = [ desc.File( - name='outSfMData', + name='output', label='SfmData File', description='Path to the output sfmData file.', value=desc.Node.internalFolder + 'sfmData.sfm', From 1c5780178590ce1c06c5eec7f509b5f650e4d099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 17 Apr 2023 16:41:22 +0200 Subject: [PATCH 0729/1093] [nodes] ApplyCalibration: chunkable output --- meshroom/aliceVision/ApplyCalibration.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index d10672b8cb..e3f0bd30e8 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -4,6 +4,7 @@ class ApplyCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_applyCalibration {allParams}' + size = desc.DynamicNodeSize('input') category = 'Utils' documentation = ''' From 94162c4be42d3c965166ba840267ec6d666e4a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 27 Apr 2023 16:38:16 +0200 Subject: [PATCH 0730/1093] [pipelines] removed DistortionCalibration node from default pipelines --- meshroom/cameraTracking.mg | 135 +++++------ meshroom/photogrammetryAndCameraTracking.mg | 244 ++++++++++---------- 2 files changed, 178 insertions(+), 201 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 24553e9f63..a583a6891c 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,105 +1,94 @@ { "header": { - "pipelineVersion": "2.2", - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", - "template": true, + "pipelineVersion": "2.2", + "releaseVersion": "2023.2.0-develop", + "fileVersion": "1.1", + "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "DistortionCalibration": "2.0", - "CameraInit": "9.0", - "ImageMatching": "2.0", - "FeatureExtraction": "1.1", + "ExportAnimatedCamera": "2.0", + "Publish": "1.2", "StructureFromMotion": "3.0", - "Publish": "1.2" + "FeatureExtraction": "1.1", + "FeatureMatching": "2.0", + "CameraInit": "9.0", + "ImageMatching": "2.0" } - }, + }, "graph": { - "DistortionCalibration_1": { - "inputs": { - "input": "{CameraInit_1.output}" - }, - "nodeType": "DistortionCalibration", - "position": [ - 200, - 160 - ] - }, "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], "inputs": { - "nbNeighbors": 10, - "nbMatches": 5, - "input": "{FeatureExtraction_1.input}", + "input": "{FeatureExtraction_1.input}", "featuresFolders": [ "{FeatureExtraction_1.output}" - ] - }, - "nodeType": "ImageMatching", + ], + "nbMatches": 5, + "nbNeighbors": 10 + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 400, + 200, 0 - ] - }, - "FeatureExtraction_1": { + ], "inputs": { "input": "{CameraInit_1.output}" - }, - "nodeType": "FeatureExtraction", + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", "position": [ - 200, + 800, 0 - ] - }, - "StructureFromMotion_1": { + ], "inputs": { - "minAngleForLandmark": 0.5, - "minNumberOfObservationsForTriangulation": 3, - "describerTypes": "{FeatureMatching_1.describerTypes}", - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", "matchesFolders": [ "{FeatureMatching_1.output}" - ], - "minInputTrackLength": 5, - "minAngleForTriangulation": 1.0 - }, - "nodeType": "StructureFromMotion", + ], + "describerTypes": "{FeatureMatching_1.describerTypes}", + "minInputTrackLength": 5, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", "position": [ - 800, + 1000, 0 - ] - }, - "ExportAnimatedCamera_1": { + ], "inputs": { "input": "{StructureFromMotion_1.output}" - }, - "nodeType": "ExportAnimatedCamera", - "position": [ - 1000, - 0 - ] - }, + } + }, "CameraInit_1": { - "inputs": {}, - "nodeType": "CameraInit", + "nodeType": "CameraInit", "position": [ - 0, + 0, 0 - ] - }, + ], + "inputs": {} + }, "FeatureMatching_1": { - "inputs": { - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "imagePairsList": "{ImageMatching_1.output}", - "input": "{DistortionCalibration_1.outSfMData}", - "featuresFolders": "{ImageMatching_1.featuresFolders}" - }, - "nodeType": "FeatureMatching", + "nodeType": "FeatureMatching", "position": [ - 600, + 600, 0 - ] + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } }, "Publish_1": { "nodeType": "Publish", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 6adc1b4acf..92df635284 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,178 +1,166 @@ { "header": { - "pipelineVersion": "2.2", - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", - "template": true, + "pipelineVersion": "2.2", + "releaseVersion": "2023.2.0-develop", + "fileVersion": "1.1", + "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "DistortionCalibration": "2.0", - "CameraInit": "9.0", - "ImageMatchingMultiSfM": "1.0", - "ImageMatching": "2.0", - "FeatureExtraction": "1.1", + "Publish": "1.2", "StructureFromMotion": "3.0", - "Publish": "1.2" + "FeatureExtraction": "1.1", + "FeatureMatching": "2.0", + "CameraInit": "9.0", + "ImageMatchingMultiSfM": "1.0", + "ImageMatching": "2.0", + "ExportAnimatedCamera": "2.0" } - }, + }, "graph": { - "DistortionCalibration_1": { - "inputs": { - "input": "{CameraInit_2.output}" - }, - "nodeType": "DistortionCalibration", - "position": [ - 1024, - 393 - ] - }, "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], "inputs": { - "input": "{FeatureExtraction_1.input}", + "input": "{FeatureExtraction_1.input}", "featuresFolders": [ "{FeatureExtraction_1.output}" ] - }, - "nodeType": "ImageMatching", + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 400, + 200, 0 - ] - }, - "FeatureExtraction_1": { + ], "inputs": { "input": "{CameraInit_1.output}" - }, - "nodeType": "FeatureExtraction", + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", "position": [ - 200, + 800, 0 - ] - }, - "StructureFromMotion_1": { + ], "inputs": { - "describerTypes": "{FeatureMatching_1.describerTypes}", - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", "matchesFolders": [ "{FeatureMatching_1.output}" - ] - }, - "nodeType": "StructureFromMotion", - "position": [ - 800, - 0 - ] - }, + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + }, "ExportAnimatedCamera_1": { - "inputs": { - "sfmDataFilter": "{StructureFromMotion_1.output}", - "input": "{StructureFromMotion_2.output}" - }, - "nodeType": "ExportAnimatedCamera", + "nodeType": "ExportAnimatedCamera", "position": [ - 1629, + 1629, 212 - ] - }, + ], + "inputs": { + "input": "{StructureFromMotion_2.output}", + "sfmDataFilter": "{StructureFromMotion_1.output}" + } + }, "CameraInit_1": { - "inputs": {}, - "nodeType": "CameraInit", + "nodeType": "CameraInit", "position": [ - 0, + 0, 0 - ] - }, + ], + "inputs": {} + }, "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 1029, + 212 + ], "inputs": { - "nbNeighbors": 10, - "nbMatches": 5, - "input": "{FeatureExtraction_2.input}", - "inputB": "{StructureFromMotion_1.output}", + "input": "{FeatureExtraction_2.input}", + "inputB": "{StructureFromMotion_1.output}", "featuresFolders": [ "{FeatureExtraction_2.output}" - ] - }, - "nodeType": "ImageMatchingMultiSfM", + ], + "nbMatches": 5, + "nbNeighbors": 10 + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 1029, + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1829, 212 - ] - }, + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}" + ] + } + }, "CameraInit_2": { - "inputs": {}, - "nodeType": "CameraInit", + "nodeType": "CameraInit", "position": [ - -2, + -2, 223 - ] - }, + ], + "inputs": {} + }, "FeatureExtraction_2": { - "inputs": { - "input": "{CameraInit_2.output}" - }, - "nodeType": "FeatureExtraction", + "nodeType": "FeatureExtraction", "position": [ - 198, + 198, 223 - ] - }, - "FeatureMatching_2": { + ], "inputs": { - "describerTypes": "{FeatureExtraction_2.describerTypes}", - "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "input": "{DistortionCalibration_1.outSfMData}", - "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}" - }, - "nodeType": "FeatureMatching", + "input": "{CameraInit_2.output}" + } + }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", "position": [ - 1229, + 1229, 212 - ] - }, - "FeatureMatching_1": { - "inputs": { - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "imagePairsList": "{ImageMatching_1.output}", - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}" - }, - "nodeType": "FeatureMatching", - "position": [ - 600, - 0 - ] - }, - "StructureFromMotion_2": { + ], "inputs": { - "minAngleForLandmark": 0.5, - "minNumberOfObservationsForTriangulation": 3, - "describerTypes": "{FeatureMatching_2.describerTypes}", - "input": "{FeatureMatching_2.input}", - "featuresFolders": "{FeatureMatching_2.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_2.output}" - ], - "minInputTrackLength": 5, - "minAngleForTriangulation": 1.0 - }, - "nodeType": "StructureFromMotion", - "position": [ - 1429, - 212 - ] + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_2.describerTypes}" + } }, - "Publish_1": { - "nodeType": "Publish", + "StructureFromMotion_2": { + "nodeType": "StructureFromMotion", "position": [ - 1829, + 1429, 212 ], "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}" - ] + "input": "{FeatureMatching_2.input}", + "featuresFolders": "{FeatureMatching_2.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_2.output}" + ], + "describerTypes": "{FeatureMatching_2.describerTypes}", + "minInputTrackLength": 5, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 } } } From 0fcf2e332555f2caa5b53b0b3aa38c4e4bbff6ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 24 May 2023 11:17:02 +0200 Subject: [PATCH 0731/1093] [nodes] Improve labels and descriptions for distortion calibration nodes --- meshroom/aliceVision/ApplyCalibration.py | 4 ++-- meshroom/aliceVision/CameraInit.py | 6 +++--- meshroom/aliceVision/DistortionCalibration.py | 10 +++++----- meshroom/aliceVision/ExportDistortion.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index e3f0bd30e8..43c88b4e88 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -31,8 +31,8 @@ class ApplyCalibration(desc.AVCommandLineNode): outputs = [ desc.File( name='output', - label='SfMData File.', - description='Path to the output sfmData file.', + label='SfMData File', + description='Path to the output SfMData file.', value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], ), diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 1090336eff..10cf4d6a41 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -89,12 +89,12 @@ name="distortionParams", elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), label="Distortion Params", - description="Distortion Parameters", + description="Distortion parameters.", ), desc.GroupAttribute( name="undistortionOffset", label="Undistortion Offset", - description="Undistortion Offset", + description="Undistortion offset.", groupDesc=[ desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), @@ -104,7 +104,7 @@ name="undistortionParams", elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), label="Undistortion Params", - description="Undistortion Parameters" + description="Undistortion parameters." ), desc.BoolParam(name='locked', label='Locked', description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index eb38efaa8d..9bbfaa795c 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -15,14 +15,14 @@ class DistortionCalibration(desc.AVCommandLineNode): inputs = [ desc.File( name='input', - label='SfmData', - description='SfmData File.', + label='Input SfMData', + description='SfMData file.', value='', uid=[0], ), desc.File( name='checkerboards', - label='Checkerboards folder', + label='Checkerboards Folder', description='Folder containing checkerboard JSON files.', value='', uid=[0], @@ -41,8 +41,8 @@ class DistortionCalibration(desc.AVCommandLineNode): outputs = [ desc.File( name='output', - label='SfmData File', - description='Path to the output sfmData file.', + label='SfMData File', + description='Path to the output SfMData file.', value=desc.Node.internalFolder + 'sfmData.sfm', uid=[], ) diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 9eee081578..a0a7373fba 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -24,7 +24,7 @@ class ExportDistortion(desc.AVCommandLineNode): desc.File( name='output', label='Folder', - description='', + description='Output folder.', value=desc.Node.internalFolder, uid=[], ), From 1e259927b9a0758d67bfd0deef181eb93df01ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 24 May 2023 12:39:49 +0200 Subject: [PATCH 0732/1093] [nodes] ExportDistortion: Add ST maps as viewable outputs --- meshroom/aliceVision/ExportDistortion.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index a0a7373fba..fa9d070fa9 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -28,4 +28,22 @@ class ExportDistortion(desc.AVCommandLineNode): value=desc.Node.internalFolder, uid=[], ), + desc.File( + name='distoStMap', + label='Distortion ST Map', + description='Calibrated distortion ST map.', + semantic='image', + value=desc.Node.internalFolder + '<INTRINSIC_ID>_distort.exr', + group='', # do not export on the command line + uid=[], + ), + desc.File( + name='undistoStMap', + label='Undistortion ST Map', + description='Calibrated undistortion ST map.', + semantic='image', + value=desc.Node.internalFolder + '<INTRINSIC_ID>_undistort.exr', + group='', # do not export on the command line + uid=[], + ), ] From dc36b11a31003a3a643a8a2113981f0a2cf4d95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 24 May 2023 14:51:09 +0200 Subject: [PATCH 0733/1093] [pipelines] Add a new template for distortion calibration --- meshroom/distortionCalibration.mg | 69 +++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 meshroom/distortionCalibration.mg diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg new file mode 100644 index 0000000000..de9a29a1ab --- /dev/null +++ b/meshroom/distortionCalibration.mg @@ -0,0 +1,69 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2023.2.0-develop", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "Publish": "1.2", + "ExportDistortion": "1.0", + "CameraInit": "9.0", + "CheckerboardDetection": "1.0", + "DistortionCalibration": "3.0" + } + }, + "graph": { + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "exportDebugImages": true + } + }, + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 800, + 0 + ], + "inputs": { + "inputFiles": [ + "{ExportDistortion_1.output}" + ] + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + } + } +} From 6e4fb05fd34ce864294c6fadfe97dd4be81e5e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 29 May 2023 18:27:14 +0200 Subject: [PATCH 0734/1093] [nodes] rewrite RenderAnimatedCamera node and blender script + support for wireframe render --- meshroom/blender/RenderAnimatedCamera.py | 81 +-- .../scripts/renderAnimatedCameraInBlender.py | 579 ++++++++---------- 2 files changed, 306 insertions(+), 354 deletions(-) diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index 8e60572feb..00125e96a8 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc import os.path @@ -6,9 +6,9 @@ currentDir = os.path.dirname(os.path.abspath(__file__)) class RenderAnimatedCamera(desc.CommandLineNode): - commandLine = '{blenderPathValue} -b --python {scriptPathValue} -- {allParams}' + commandLine = '{blenderCmdValue} -b --python {scriptValue} -- {allParams}' - category = 'Export' + category = 'Visualization' documentation = ''' This node makes a rendering of the sfmData scene through an animated camera using the Blender rendering engine. It supports both Point Clouds (.abc) and Meshes (.obj). @@ -16,32 +16,33 @@ class RenderAnimatedCamera(desc.CommandLineNode): inputs = [ desc.File( - name='blenderPath', - label='Blender Path', - description='''Path to blender executable''', - value=os.environ.get('BLENDER',"C:/Program Files/Blender Foundation/Blender 2.91/blender.exe"), + name='blenderCmd', + label='Blender Command', + description='Command to launch Blender', + value='blender', uid=[], group='', ), desc.File( - name='scriptPath', + name='script', label='Script Path', - description='''Path to the internal script for rendering in Blender''', + description='Path to the internal script for rendering in Blender', value=os.path.join(currentDir, 'scripts' ,'renderAnimatedCameraInBlender.py'), uid=[], group='', + advanced=True, ), desc.File( - name='sfmCameraPath', + name='cameras', label='SfmData with Animated Camera', - description='''SfmData with the animated camera to render''', + description='SfmData with the animated camera to render (in json format)', value='', uid=[0], ), desc.File( name='model', label='Model', - description='Point Cloud or Mesh used in the rendering', + description='Point Cloud or Mesh to render', value='', uid=[0], ), @@ -55,7 +56,7 @@ class RenderAnimatedCamera(desc.CommandLineNode): desc.File( name='undistortedImages', label='Undistorted Images Folder', - description='''Input folder with the undistorted images''', + description='Input folder with the undistorted images', value='', uid=[0], enabled=lambda node: node.useBackground.value, @@ -65,28 +66,20 @@ class RenderAnimatedCamera(desc.CommandLineNode): label="Point Cloud Settings", group=None, enabled=lambda node: node.model.value.lower().endswith('.abc'), - description="Setting of the render if we use a Point Cloud", + description="Settings of the render if we use a Point Cloud", groupDesc=[ - desc.FloatParam( - name='pointCloudDensity', - label='Density', - description='''Reduce the points density for the point cloud rendering''', - value=0.25, - range=(0.01, 0.5, 0.01), - uid=[0], - ), desc.FloatParam( name='particleSize', label='Particle Size', - description='''Scale of particles used to show the point cloud''', - value=0.1, + description='Scale of particles used to show the point cloud', + value=0.01, range=(0.01, 1.0, 0.01), uid=[0], ), desc.ChoiceParam( name='particleColor', label='Particle Color', - description='''Color of particles used to show the point cloud''', + description='Color of particles used to show the point cloud', value='Red', values=['Grey', 'White', 'Red', 'Green', 'Magenta'], exclusive=True, @@ -102,35 +95,43 @@ class RenderAnimatedCamera(desc.CommandLineNode): enabled=lambda node: node.model.value.lower().endswith('.obj'), description="Setting of the render if we use a Mesh", groupDesc=[ + desc.ChoiceParam( + name='shading', + label='Shading', + description='Shading method for visualizing the mesh', + value='wireframe', + values=['wireframe', 'line_art'], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name='edgeColor', label='Edge Color', - description='''Color of the edges of the rendered object''', + description='Color of the edges of the rendered object', value='Red', values=['Grey', 'White', 'Red', 'Green', 'Magenta'], exclusive=True, uid=[0], - joinChar=',', ), ] ), - desc.ChoiceParam( - name='videoFormat', - label='Video Format', - description='''Choose the format of the output among this list of supported format''', - value='mkv', - values=['mkv', 'mp4', 'mov', 'avi'], - exclusive=True, - uid=[0], - ), ] outputs = [ desc.File( - name='outputPath', - label='Output Path', - description='''Output Folder''', + name='output', + label='Output Folder', + description='Output Folder', value=desc.Node.internalFolder, uid=[], - ) + ), + desc.File( + name='render', + label='Render', + description='Frames rendered in Blender', + semantic='image', + value=desc.Node.internalFolder + '<VIEW_ID>.png', + uid=[], + group='', + ), ] \ No newline at end of file diff --git a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py index e580aac3d6..1ed1c06deb 100644 --- a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py +++ b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py @@ -1,21 +1,14 @@ import bpy -import bmesh import os -import re import mathutils -import sys # to get command line args -import argparse # to parse options for us and print a nice help message -from distutils.util import strtobool +import math +import sys +import argparse +import json +import glob -def main(): - argv = sys.argv - - if "--" not in argv: - argv = [] # as if no args are passed - else: - argv = argv[argv.index("--") + 1:] # get all args after "--" - +def createParser(): # When --help or no args are given, print this help usage_text = ( "Run blender in background mode with this script:" @@ -25,85 +18,267 @@ def main(): parser = argparse.ArgumentParser(description=usage_text) parser.add_argument( - "--sfmCameraPath", metavar='FILE', required=True, + "--cameras", metavar='FILE', required=True, help="sfmData with the animated camera.", ) - parser.add_argument( - "--useBackground", type=strtobool, required=True, + "--useBackground", type=lambda x: (str(x).lower() == 'true'), required=True, help="Display the background image or not.", ) - parser.add_argument( "--undistortedImages", metavar='FILE', required=False, help="Save the generated file to the specified path", ) - parser.add_argument( "--model", metavar='FILE', required=True, help="Point Cloud or Mesh used in the rendering.", ) - - # Point Cloud Arguments (when SFM Data is .abc) - - parser.add_argument( - "--pointCloudDensity", type=float, required=False, - help="Number of point from the cloud rendered", - ) - parser.add_argument( "--particleSize", type=float, required=False, help="Scale of particles used to show the point cloud", ) - parser.add_argument( "--particleColor", type=str, required=False, help="Color of particles used to show the point cloud (SFM Data is .abc)", ) - - # Mesh Arguments (when SFM Data is .obj) - parser.add_argument( "--edgeColor", type=str, required=False, help="Color of the edges of the rendered object (SFM Data is .obj)", ) - - # Output Arguments - parser.add_argument( - "--videoFormat", type=str, required=True, - help="Format of the video output", + "--shading", type=str, required=False, + help="Shading method for rendering the mesh", ) - parser.add_argument( - "--outputPath", metavar='FILE', required=True, + "--output", metavar='FILE', required=True, help="Render an image to the specified path", ) + return parser + + +def parseSfMCameraFile(filepath): + '''Retrieve cameras from SfM file in json format.''' + with open(os.path.abspath(filepath), 'r') as file: + sfm = json.load(file) + views = sfm['views'] + intrinsics = sfm['intrinsics'] + poses = sfm['poses'] + return views, intrinsics, poses + + +def getFromId(data, key, id): + '''Utility function to retrieve view, intrinsic or pose using their IDs.''' + for item in data: + if item[key] == id: + return item + return None + + +def setupCamera(intrinsic, pose): + '''Setup Blender camera to match the given SfM camera.''' + camObj = bpy.data.objects['Camera'] + camData = bpy.data.cameras['Camera'] + + bpy.context.scene.render.resolution_x = int(intrinsic['width']) + bpy.context.scene.render.resolution_y = int(intrinsic['height']) + + camData.sensor_width = float(intrinsic['sensorWidth']) + camData.lens = float(intrinsic['focalLength']) + + tr = pose['pose']['transform'] + matPose = mathutils.Matrix.Identity(4) + matPose[0][0] = float(tr['rotation'][0]) + matPose[0][1] = float(tr['rotation'][1]) + matPose[0][2] = float(tr['rotation'][2]) + matPose[1][0] = float(tr['rotation'][3]) + matPose[1][1] = float(tr['rotation'][4]) + matPose[1][2] = float(tr['rotation'][5]) + matPose[2][0] = float(tr['rotation'][6]) + matPose[2][1] = float(tr['rotation'][7]) + matPose[2][2] = float(tr['rotation'][8]) + matPose[0][3] = float(tr['center'][0]) + matPose[1][3] = float(tr['center'][1]) + matPose[2][3] = float(tr['center'][2]) + + matConvert = mathutils.Matrix.Identity(4) + matConvert[1][1] = -1 + matConvert[2][2] = -1 + + camObj.matrix_world = matConvert @ matPose @ matConvert + + +def initScene(): + # Clear current scene (keep default camera) + bpy.data.objects.remove(bpy.data.objects['Cube']) + bpy.data.objects.remove(bpy.data.objects['Light']) + + +def initCompositing(): + '''Initialize Blender compositing graph for adding background image to render.''' + bpy.context.scene.render.image_settings.file_format = 'PNG' + bpy.context.scene.render.film_transparent = True + bpy.context.scene.use_nodes = True + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") + bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") + bpy.context.scene.node_tree.links.new( + bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], + bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) + bpy.context.scene.node_tree.links.new( + bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], + bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[1]) + bpy.context.scene.node_tree.links.new( + bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], + bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[2]) + + +def setupRender(view, intrinsic, pose, outputDir): + '''Setup rendering in Blender for a given view.''' + setupCamera(intrinsic, pose) + bpy.context.scene.render.filepath = os.path.abspath(outputDir + '/' + view['viewId'] + '.png') + + +def setupBackground(view, folderUndistorted): + '''TODO''' + baseImgName = os.path.splitext(os.path.basename(view['path']))[0] + undistortedImgPath = glob.glob(folderUndistorted + '/*' + baseImgName + "*")[0] + bpy.ops.image.open(filepath=undistortedImgPath) + undistortedImgName = os.path.basename(undistortedImgPath) + bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[undistortedImgName] + + +def loadScene(filename): + '''TODO''' + if filename.lower().endswith('.obj'): + bpy.ops.import_scene.obj(filepath=filename, axis_forward='Y', axis_up='Z') + return bpy.data.objects['mesh'], bpy.data.meshes['mesh'] + elif filename.lower().endswith('.abc'): + bpy.ops.wm.alembic_import(filepath=filename) + root = bpy.data.objects['mvgRoot'] + root.rotation_euler.rotate_axis('X', math.radians(-90.0)) + return bpy.data.objects['mvgPointCloud'], bpy.data.meshes['particleShape1'] + + +def setupWireframeShading(mesh, color): + '''TODO''' + # Initialize wireframe material + material = bpy.data.materials.new('Wireframe') + material.use_backface_culling = True + material.use_nodes = True + material.blend_method = 'BLEND' + material.node_tree.links.clear() + # Wireframe node + nodeWireframe = material.node_tree.nodes.new(type='ShaderNodeWireframe') + nodeWireframe.use_pixel_size = True + nodeWireframe.inputs['Size'].default_value = 2.0 + # Emission node + nodeEmission = material.node_tree.nodes.new(type='ShaderNodeEmission') + nodeEmission.inputs['Color'].default_value = color + # Transparent BSDF node + nodeTransparent = material.node_tree.nodes.new(type='ShaderNodeBsdfTransparent') + # Max Shader node + nodeMix = material.node_tree.nodes.new(type='ShaderNodeMixShader') + # Retrieve ouput node + nodeOutput = material.node_tree.nodes['Material Output'] + # Connect nodes + material.node_tree.links.new(nodeWireframe.outputs['Fac'], nodeMix.inputs['Fac']) + material.node_tree.links.new(nodeTransparent.outputs['BSDF'], nodeMix.inputs[1]) + material.node_tree.links.new(nodeEmission.outputs['Emission'], nodeMix.inputs[2]) + material.node_tree.links.new(nodeMix.outputs['Shader'], nodeOutput.inputs['Surface']) + # Apply material to mesh + mesh.materials.clear() + mesh.materials.append(material) + + +def setupLineArtShading(obj, mesh, color): + '''TODO''' + # Transparent filling material + matFill = bpy.data.materials.new('Fill') + matFill.use_backface_culling = True + matFill.use_nodes = True + matFill.blend_method = 'BLEND' + matFill.show_transparent_back = False + matFill.node_tree.links.clear() + nodeTransparent = matFill.node_tree.nodes.new(type='ShaderNodeBsdfTransparent') + nodeOutputFill = matFill.node_tree.nodes['Material Output'] + matFill.node_tree.links.new(nodeTransparent.outputs['BSDF'], nodeOutputFill.inputs['Surface']) + # Colored edge material + matEdge = bpy.data.materials.new('Edge') + matEdge.use_backface_culling = True + matEdge.use_nodes = True + matEdge.blend_method = 'BLEND' + matEdge.node_tree.links.clear() + nodeEmission = matEdge.node_tree.nodes.new(type='ShaderNodeEmission') + nodeEmission.inputs['Color'].default_value = color + nodeOutputEdge = matEdge.node_tree.nodes['Material Output'] + matEdge.node_tree.links.new(nodeEmission.outputs['Emission'], nodeOutputEdge.inputs['Surface']) + # Apply materials to mesh + mesh.materials.clear() + mesh.materials.append(matFill) + mesh.materials.append(matEdge) + # Solidify modifier + solidify = obj.modifiers.new('Solidify', type='SOLIDIFY') + solidify.thickness = -0.01 + solidify.use_rim = False + solidify.use_flip_normals = True + solidify.material_offset = 1 + + +def setupPointCloudShading(obj, color, size): + '''TODO''' + # Colored filling material + material = bpy.data.materials.new('PointCloud_Mat') + material.use_nodes = True + material.node_tree.links.clear() + nodeEmission = material.node_tree.nodes.new(type='ShaderNodeEmission') + nodeEmission.inputs['Color'].default_value = color + nodeOutputFill = material.node_tree.nodes['Material Output'] + material.node_tree.links.new(nodeEmission.outputs['Emission'], nodeOutputFill.inputs['Surface']) + # Geometry nodes modifier for particles + geo = bpy.data.node_groups.new('Particles_Graph', type='GeometryNodeTree') + mod = obj.modifiers.new('Particles_Modifier', type='NODES') + mod.node_group = geo + # Setup nodes + nodeInput = geo.nodes.new(type='NodeGroupInput') + nodeOutput = geo.nodes.new(type='NodeGroupOutput') + nodeM2P = geo.nodes.new(type='GeometryNodeMeshToPoints') + nodeIoP = geo.nodes.new(type='GeometryNodeInstanceOnPoints') + nodeCube = geo.nodes.new(type='GeometryNodeMeshCube') + nodeSize = geo.nodes.new(type='ShaderNodeValue') + nodeSize.outputs['Value'].default_value = size + nodeMat = geo.nodes.new(type='GeometryNodeSetMaterial') + nodeMat.inputs[2].default_value = material + # Connect nodes + geo.links.new(nodeInput.outputs[0], nodeM2P.inputs['Mesh']) + geo.links.new(nodeM2P.outputs['Points'], nodeIoP.inputs['Points']) + geo.links.new(nodeCube.outputs['Mesh'], nodeIoP.inputs['Instance']) + geo.links.new(nodeSize.outputs['Value'], nodeIoP.inputs['Scale']) + geo.links.new(nodeIoP.outputs['Instances'], nodeMat.inputs['Geometry']) + geo.links.new(nodeMat.outputs[0], nodeOutput.inputs[0]) + + + +def main(): + argv = sys.argv + + if "--" not in argv: + argv = [] # as if no args are passed + else: + argv = argv[argv.index("--") + 1:] # get all args after "--" + + parser = createParser() args = parser.parse_args(argv) if not argv: parser.print_help() return -1 - if not args.undistortedImages and args.useBackground: + if args.useBackground and not args.undistortedImages: print("Error: --undistortedImages argument not given, aborting.") parser.print_help() return -1 - # Clear Current Scene - try: - for objects in bpy.data.objects: - bpy.data.objects.remove(objects) - except RuntimeError: - print("Error while clearing current scene") - raise - - # The Switcher is the setting for most of the colors (if you want to add some, do it here and in the arguments of the node) - # Keep in mind that we use the same switcher for both the Edge Color and the Particle Color settings. - # So if you add a color to one of them in the node, might has well add it to the other. - - switcher={ + palette={ 'Grey':(0.2, 0.2, 0.2, 1), 'White':(1, 1, 1, 1), 'Red':(0.5, 0, 0, 1), @@ -111,271 +286,47 @@ def main(): 'Magenta':(1.0, 0, 0.75, 1) } - print("Import Undistorted Images") - - undis_imgs = [] - # Some of these variable will be very useful in the next steps keep them in mind - number_of_frame = 0 - offset = 0 - first_image_name = "" - try: - # In this part of the code we take the undistorted images and we process some info about them - # undis_imgs is the list of the images' names - # first_image_name says it all in the name - # The offset is important, it corresponds to the last part of the name of the first frame. - # In most case, it will be 0 but the sequence may start from a more advanced frame. + print("Init scene") + initScene() + + print("Init compositing") + if args.useBackground: + initCompositing() + + print("Parse cameras SfM file") + views, intrinsics, poses = parseSfMCameraFile(args.cameras) + + print("Load scene objects") + sceneObj, sceneMesh = loadScene(args.model) + + print("Setup shading") + if args.model.lower().endswith('.obj'): + color = palette[args.edgeColor] + if args.shading == 'wireframe': + setupWireframeShading(sceneMesh, color) + elif args.shading == 'line_art': + setupLineArtShading(sceneObj, sceneMesh, color) + elif args.model.lower().endswith('.abc'): + color = palette[args.particleColor] + setupPointCloudShading(sceneObj, color, args.particleSize) + + print("Render viewpoints") + for view in views: + intrinsic = getFromId(intrinsics, 'intrinsicId', view['intrinsicId']) + if not intrinsic: + continue + + pose = getFromId(poses, 'poseId', view['poseId']) + if not pose: + continue + + print("Rendering view " + view['viewId']) if args.useBackground: - files = os.listdir(args.undistortedImages) - for f in files : - if f.endswith(".exr") and not f.__contains__("UVMap"): - undis_imgs.append({"name":f}) - number_of_frame = len(undis_imgs) - print("undis_imgs: " + str(undis_imgs)) - first_image_name = undis_imgs[0]['name'] - offset = int(re.findall(r'\d+', first_image_name)[-1]) - 1 - - except RuntimeError: - print("Error while importing the undistorted images.") - raise - - print("Import Animated Camera") - - try: - - # In this part of the code we import the alembic in the cam_path to get the animated camera - # We use cam_location and cam_obj to store information about this camera - # We look for a camera (of type 'Persp') with the name 'anim' (not to confuse them with previously imported cams) - - # Once the cam has been found we select the main camera of the scene. - # The rest of the code is setting up the display of the background image, - # As it is not a simple image but an image Sequence, we have to use the offset and the number of frames. - - # We also have to make the scene render film transparent because we want to be able to display - # our background afterwards. - - bpy.ops.wm.alembic_import(filepath=args.sfmCameraPath) - animated_cams = bpy.context.selected_editable_objects[:] - cam_location = mathutils.Vector((0, 0, 0)) - cam_obj = None - for obj in animated_cams: - if obj.data and obj.data.type == 'PERSP' and "anim" in obj.data.name: - bpy.context.scene.collection.objects.link(obj) - bpy.context.view_layer.objects.active = obj - bpy.context.scene.camera = obj - cam_location = obj.location - cam_obj = obj - if args.useBackground : - bpy.ops.image.open(filepath=args.undistortedImages + "/" + first_image_name, directory=args.undistortedImages, files=undis_imgs, relative_path=True, show_multiview=False) - bpy.data.cameras[obj.data.name].background_images.new() - bpy.data.cameras[obj.data.name].show_background_images = True - bpy.data.cameras[obj.data.name].background_images[0].image = bpy.data.images[first_image_name] - bpy.data.cameras[obj.data.name].background_images[0].frame_method = 'CROP' - bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_offset = offset - bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_duration = number_of_frame - bpy.data.cameras[obj.data.name].background_images[0].image_user.frame_start = 1 - bpy.context.scene.render.film_transparent = True - except RuntimeError: - print("Error while importing the alembic file (Animated Camera): " + args.sfmCameraPath) - raise - - print("Create the particle plane") - - try: - - # We are using a particle system later in the code to display the Point Cloud. - # We need to setup a model for the particle, a plane that always face the camera. - # It is declared as a child of the camera in the parenting system, so when the camera moves, the plane moves accordingly. - - # We use an 'Emission' material so it does not react to lights. - # To do that we have to use the shader 'node_tree' we clear all links between nodes, create the emission node - # and connect it to the 'Material Output' node. - - plane = bpy.data.meshes.new('Plane') - objectsPlane = bpy.data.objects.new(name="Plane", object_data=plane) - bm = bmesh.new() - bmesh.ops.create_grid(bm, x_segments = 1, y_segments = 1, size = 1.0) - bm.to_mesh(plane) - bm.free() - if args.model.lower().endswith('.abc'): - objectsPlane.scale = mathutils.Vector((args.particleSize, args.particleSize, args.particleSize)) - cam_location.y += -2.0 - objectsPlane.location = cam_location - bpy.context.scene.collection.objects.link(objectsPlane) - bpy.data.objects['Plane'].parent = cam_obj - bpy.context.view_layer.objects.active = objectsPlane - - col = bpy.data.materials.new('Color') - objectsPlane.active_material = col - objectsPlane.active_material.use_nodes = True - objectsPlane.active_material.node_tree.links.clear() - objectsPlane.active_material.node_tree.nodes.new(type='ShaderNodeEmission') - objectsPlane.active_material.node_tree.links.new(objectsPlane.active_material.node_tree.nodes['Emission'].outputs['Emission'], objectsPlane.active_material.node_tree.nodes['Material Output'].inputs['Surface']) - if args.model.lower().endswith('.abc'): - objectsPlane.active_material.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.particleColor, 'Invalid Color') - - except RuntimeError: - print("Error: while setting up the particle model.") - raise - - - if args.model.lower().endswith('.abc'): - - print("Import ABC Point Cloud") - - # After importing the alembic, we look for a specific Point Cloud in the file. - # We make it the active object (important for the node_tree later). - # Then, we create a particle system on it. Render_type set to object and the said object is the plane. - # Emit_from 'vert' so the points of the point cloud are the one rendering the particle. - # The count is the number of particles repeated on the point cloud. We use the rate given as arguments - # to give a number. - # use_rotation and use_rotation_instance ensure that we use the same rotation than the model (which is needed to have the particle always facing the camera). - - # Import Point Cloud - try: - bpy.ops.wm.alembic_import(filepath=args.model) - all_abc_info = bpy.context.selected_editable_objects[:] - for obj in all_abc_info: - if obj.name == 'mvgPointCloud.001': #May have a problem with such hard code - bpy.context.scene.collection.objects.link(obj) - bpy.context.view_layer.objects.active = obj - obj.modifiers.new("ParticleSystem", "PARTICLE_SYSTEM") - particle_system = bpy.data.particles["ParticleSystem"] - particle_system.render_type = 'OBJECT' - - particle_system.instance_object = bpy.data.objects["Plane"] - particle_system.emit_from = 'VERT' - - if args.model.lower().endswith('.abc'): - particle_system.count = int(args.pointCloudDensity * len(obj.data.vertices.values())) - particle_system.frame_end = 1.0 - particle_system.use_emit_random = False - particle_system.particle_size = 0.02 - particle_system.physics_type = 'NO' - particle_system.use_rotations = True - particle_system.use_rotation_instance = True - particle_system.rotation_mode = 'GLOB_X' - - except RuntimeError: - print("Error while importing the alembic file (Point Cloud): " + args.model) - raise - - - # For showing an outline of the object, we need to add two materials to the mesh: - # Center and Edge, we are using a method that consists in having a "bold" effect on the Edge Material so we can see it - # around the Center material. We use a Solidify Modifier on which we flip normals and reduce Thickness to below zero. - # The more the thickness get below zero, the more the edge will be largely revealed. - elif args.model.lower().endswith('.obj'): - print("Import OBJ") - - bpy.ops.import_scene.obj(filepath=args.model) - - center = bpy.data.materials.new('Center') - center.use_nodes = True - center.node_tree.links.clear() - center.node_tree.nodes.new(type='ShaderNodeEmission') - center.node_tree.links.new(center.node_tree.nodes['Emission'].outputs['Emission'], center.node_tree.nodes['Material Output'].inputs['Surface']) - center.node_tree.nodes['Emission'].inputs[0].default_value = (0,0,0,0) - - if not args.useBackground and args.model.lower().endswith('.obj'): - center.node_tree.nodes['Emission'].inputs[0].default_value = (0.05, 0.05, 0.05, 1) #Same Color as the no background color in blender - - edge = bpy.data.materials.new('Edge') - - edge.use_nodes = True - edge.node_tree.links.clear() - edge.node_tree.nodes.new(type='ShaderNodeEmission') - edge.use_backface_culling = True - edge.node_tree.links.new(edge.node_tree.nodes['Emission'].outputs['Emission'], edge.node_tree.nodes['Material Output'].inputs['Surface']) - edge.node_tree.nodes['Emission'].inputs[0].default_value = switcher.get(args.edgeColor, 'Invalid Color') - - bpy.data.meshes['mesh'].materials.clear() - bpy.data.meshes['mesh'].materials.append(bpy.data.materials['Center']) - bpy.data.meshes['mesh'].materials.append(bpy.data.materials['Edge']) - - print(bpy.data.meshes['mesh'].materials.values()) - - bpy.data.objects['mesh'].modifiers.new('New', type='SOLIDIFY') - bpy.data.objects['mesh'].modifiers["New"].thickness = -0.01 - bpy.data.objects['mesh'].modifiers["New"].use_rim = False - bpy.data.objects['mesh'].modifiers["New"].use_flip_normals = True - bpy.data.objects['mesh'].modifiers["New"].material_offset = 1 - else: - raise ValueError("sfmData: unknown file format, only alembic (.abc) and object (.obj) are supported: " + args.model) - - print("Create compositing graph") - - # We use the compositing graph to add the background image. - # If the SFM Data is a Mesh, its extension is .obj so we have to build the graph accordingly. If the Background image setting was activated, - # we need to include it in our node tree through the "Image" and Scale node. - try: - bpy.context.scene.use_nodes = True - - # Create all the nodes that we could need - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeScale") - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") - - bpy.context.scene.node_tree.nodes.new(type="CompositorNodePremulKey") - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeMixRGB") - - bpy.data.scenes["Scene"].node_tree.nodes["Mix"].blend_type = 'LIGHTEN' - bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_duration = number_of_frame - bpy.data.scenes["Scene"].node_tree.nodes["Image"].frame_offset = offset - bpy.data.scenes["Scene"].node_tree.nodes["Scale"].space = 'RENDER_SIZE' - bpy.data.scenes["Scene"].node_tree.nodes["Scale"].frame_method = 'CROP' - - # create links between nodes - if args.useBackground : - if args.model.lower().endswith('.obj'): - bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Mix'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - # Two Inputs of AlphaOver are named "Image" so we use indexes instead - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Convert'].inputs['Image']) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Convert'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[2]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[1]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) - else: - bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[first_image_name] - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - # Two Inputs of AlphaOver are named "Image" so we use indexes instead - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[2]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[1]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) - else: - if args.model.lower().endswith('.obj'): - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Mix'].outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - # Two Inputs of AlphaOver are named "Image" so we use indexes instead - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], bpy.context.scene.node_tree.nodes['Alpha Convert'].inputs['Image']) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Alpha Convert'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[2]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Scale'].outputs['Image'], bpy.context.scene.node_tree.nodes['Mix'].inputs[1]) - bpy.context.scene.node_tree.links.new(bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], bpy.context.scene.node_tree.nodes['Scale'].inputs['Image']) - except RuntimeError: - print("Error while creating the compositing graph.") - raise - - try: - # Setup the render format and filepath - bpy.context.scene.render.image_settings.file_format = 'FFMPEG' - if args.videoFormat == 'mkv': - bpy.context.scene.render.ffmpeg.format = 'MKV' - elif args.videoFormat == 'avi': - bpy.context.scene.render.ffmpeg.format = 'AVI' - elif args.videoFormat == 'mov': - bpy.context.scene.render.ffmpeg.format = 'QUICKTIME' - else: - bpy.context.scene.render.ffmpeg.format = 'MPEG4' - bpy.context.scene.render.filepath = args.outputPath + '/render.' + args.videoFormat - - print("Start Rendering") - # Render everything on to the filepath - bpy.ops.render.render(animation=True) - print("Rendering Done") - # Starts a player automatically to play the output - # bpy.ops.render.play_rendered_anim() - except RuntimeError: - print("Error while rendering the scene") - raise + setupBackground(view, args.undistortedImages) + setupRender(view, intrinsic, pose, args.output) + bpy.ops.render.render(write_still=True) + print("Done") return 0 From d835221c8f5c533c7041137e73b0f4edf43404ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 30 May 2023 11:07:59 +0200 Subject: [PATCH 0735/1093] [nodes/blender] update documentation --- meshroom/blender/RenderAnimatedCamera.py | 41 ++++++++++--------- .../scripts/renderAnimatedCameraInBlender.py | 26 +++++++----- 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/RenderAnimatedCamera.py index 00125e96a8..9e40f4f141 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/RenderAnimatedCamera.py @@ -10,9 +10,11 @@ class RenderAnimatedCamera(desc.CommandLineNode): category = 'Visualization' documentation = ''' - This node makes a rendering of the sfmData scene through an animated camera using the Blender rendering engine. - It supports both Point Clouds (.abc) and Meshes (.obj). - ''' +This node uses Blender to visualize a 3D model from a given set of cameras. +The cameras must be a SfMData file in JSON format. +For the 3D model it supports both point clouds in Alembic format and meshes in OBJ format. +One frame per viewpoint will be rendered, and the undistorted views can optionally be used as background. +''' inputs = [ desc.File( @@ -25,7 +27,7 @@ class RenderAnimatedCamera(desc.CommandLineNode): ), desc.File( name='script', - label='Script Path', + label='Script', description='Path to the internal script for rendering in Blender', value=os.path.join(currentDir, 'scripts' ,'renderAnimatedCameraInBlender.py'), uid=[], @@ -34,15 +36,15 @@ class RenderAnimatedCamera(desc.CommandLineNode): ), desc.File( name='cameras', - label='SfmData with Animated Camera', - description='SfmData with the animated camera to render (in json format)', + label='Cameras', + description='SfmData with the views, poses and intrinsics to use (in JSON format)', value='', uid=[0], ), desc.File( name='model', label='Model', - description='Point Cloud or Mesh to render', + description='Point cloud (.abc) or mesh (.obj) to render', value='', uid=[0], ), @@ -55,8 +57,8 @@ class RenderAnimatedCamera(desc.CommandLineNode): ), desc.File( name='undistortedImages', - label='Undistorted Images Folder', - description='Input folder with the undistorted images', + label='Undistorted Images', + description='Folder containing the undistorted images', value='', uid=[0], enabled=lambda node: node.useBackground.value, @@ -66,12 +68,12 @@ class RenderAnimatedCamera(desc.CommandLineNode): label="Point Cloud Settings", group=None, enabled=lambda node: node.model.value.lower().endswith('.abc'), - description="Settings of the render if we use a Point Cloud", + description="Settings for point cloud rendering", groupDesc=[ desc.FloatParam( name='particleSize', label='Particle Size', - description='Scale of particles used to show the point cloud', + description='Scale of particles used for the point cloud', value=0.01, range=(0.01, 1.0, 0.01), uid=[0], @@ -79,12 +81,11 @@ class RenderAnimatedCamera(desc.CommandLineNode): desc.ChoiceParam( name='particleColor', label='Particle Color', - description='Color of particles used to show the point cloud', + description='Color of particles used for the point cloud', value='Red', values=['Grey', 'White', 'Red', 'Green', 'Magenta'], exclusive=True, uid=[0], - joinChar=',', ), ] ), @@ -93,7 +94,7 @@ class RenderAnimatedCamera(desc.CommandLineNode): label="Mesh Settings", group=None, enabled=lambda node: node.model.value.lower().endswith('.obj'), - description="Setting of the render if we use a Mesh", + description="Setting for mesh rendering", groupDesc=[ desc.ChoiceParam( name='shading', @@ -107,7 +108,7 @@ class RenderAnimatedCamera(desc.CommandLineNode): desc.ChoiceParam( name='edgeColor', label='Edge Color', - description='Color of the edges of the rendered object', + description='Color of the mesh edges', value='Red', values=['Grey', 'White', 'Red', 'Green', 'Magenta'], exclusive=True, @@ -120,17 +121,17 @@ class RenderAnimatedCamera(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Output Folder', - description='Output Folder', + label='Output', + description='Output folder', value=desc.Node.internalFolder, uid=[], ), desc.File( - name='render', - label='Render', + name='frames', + label='Frames', description='Frames rendered in Blender', semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>.png', + value=desc.Node.internalFolder + '<VIEW_ID>.jpg', uid=[], group='', ), diff --git a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py index 1ed1c06deb..04e4901478 100644 --- a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py +++ b/meshroom/blender/scripts/renderAnimatedCameraInBlender.py @@ -9,6 +9,7 @@ def createParser(): + '''Create command line interface.''' # When --help or no args are given, print this help usage_text = ( "Run blender in background mode with this script:" @@ -67,10 +68,10 @@ def parseSfMCameraFile(filepath): return views, intrinsics, poses -def getFromId(data, key, id): +def getFromId(data, key, identifier): '''Utility function to retrieve view, intrinsic or pose using their IDs.''' for item in data: - if item[key] == id: + if item[key] == identifier: return item return None @@ -109,14 +110,16 @@ def setupCamera(intrinsic, pose): def initScene(): + '''Initialize Blender scene.''' # Clear current scene (keep default camera) bpy.data.objects.remove(bpy.data.objects['Cube']) bpy.data.objects.remove(bpy.data.objects['Light']) + # Set output format + bpy.context.scene.render.image_settings.file_format = 'JPEG' def initCompositing(): '''Initialize Blender compositing graph for adding background image to render.''' - bpy.context.scene.render.image_settings.file_format = 'PNG' bpy.context.scene.render.film_transparent = True bpy.context.scene.use_nodes = True bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") @@ -135,11 +138,11 @@ def initCompositing(): def setupRender(view, intrinsic, pose, outputDir): '''Setup rendering in Blender for a given view.''' setupCamera(intrinsic, pose) - bpy.context.scene.render.filepath = os.path.abspath(outputDir + '/' + view['viewId'] + '.png') + bpy.context.scene.render.filepath = os.path.abspath(outputDir + '/' + view['viewId'] + '.jpg') def setupBackground(view, folderUndistorted): - '''TODO''' + '''Retrieve undistorted image corresponding to view and use it as background.''' baseImgName = os.path.splitext(os.path.basename(view['path']))[0] undistortedImgPath = glob.glob(folderUndistorted + '/*' + baseImgName + "*")[0] bpy.ops.image.open(filepath=undistortedImgPath) @@ -147,8 +150,8 @@ def setupBackground(view, folderUndistorted): bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[undistortedImgName] -def loadScene(filename): - '''TODO''' +def loadModel(filename): + '''Load model in Alembic of OBJ format. Make sure orientation matches camera orientation.''' if filename.lower().endswith('.obj'): bpy.ops.import_scene.obj(filepath=filename, axis_forward='Y', axis_up='Z') return bpy.data.objects['mesh'], bpy.data.meshes['mesh'] @@ -160,7 +163,7 @@ def loadScene(filename): def setupWireframeShading(mesh, color): - '''TODO''' + '''Setup material for wireframe shading.''' # Initialize wireframe material material = bpy.data.materials.new('Wireframe') material.use_backface_culling = True @@ -191,7 +194,7 @@ def setupWireframeShading(mesh, color): def setupLineArtShading(obj, mesh, color): - '''TODO''' + '''Setup materials and Solidify modifier for line art shading.''' # Transparent filling material matFill = bpy.data.materials.new('Fill') matFill.use_backface_culling = True @@ -225,7 +228,7 @@ def setupLineArtShading(obj, mesh, color): def setupPointCloudShading(obj, color, size): - '''TODO''' + '''Setup material and geometry nodes for point cloud shading.''' # Colored filling material material = bpy.data.materials.new('PointCloud_Mat') material.use_nodes = True @@ -278,6 +281,7 @@ def main(): parser.print_help() return -1 + # Color palette (common for point cloud and mesh visualization) palette={ 'Grey':(0.2, 0.2, 0.2, 1), 'White':(1, 1, 1, 1), @@ -297,7 +301,7 @@ def main(): views, intrinsics, poses = parseSfMCameraFile(args.cameras) print("Load scene objects") - sceneObj, sceneMesh = loadScene(args.model) + sceneObj, sceneMesh = loadModel(args.model) print("Setup shading") if args.model.lower().endswith('.obj'): From dbf319225a9cda67d013263a715e722f60f0019f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 30 May 2023 11:19:57 +0200 Subject: [PATCH 0736/1093] [nodes/blender] rename RenderAnimatedCamera to ScenePreview --- .../blender/{RenderAnimatedCamera.py => ScenePreview.py} | 8 ++++---- .../{renderAnimatedCameraInBlender.py => preview.py} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename meshroom/blender/{RenderAnimatedCamera.py => ScenePreview.py} (95%) rename meshroom/blender/scripts/{renderAnimatedCameraInBlender.py => preview.py} (100%) diff --git a/meshroom/blender/RenderAnimatedCamera.py b/meshroom/blender/ScenePreview.py similarity index 95% rename from meshroom/blender/RenderAnimatedCamera.py rename to meshroom/blender/ScenePreview.py index 9e40f4f141..2fe65f5449 100644 --- a/meshroom/blender/RenderAnimatedCamera.py +++ b/meshroom/blender/ScenePreview.py @@ -1,14 +1,14 @@ -__version__ = "2.0" +__version__ = "1.0" from meshroom.core import desc import os.path currentDir = os.path.dirname(os.path.abspath(__file__)) -class RenderAnimatedCamera(desc.CommandLineNode): +class ScenePreview(desc.CommandLineNode): commandLine = '{blenderCmdValue} -b --python {scriptValue} -- {allParams}' - category = 'Visualization' + category = 'Utils' documentation = ''' This node uses Blender to visualize a 3D model from a given set of cameras. The cameras must be a SfMData file in JSON format. @@ -29,7 +29,7 @@ class RenderAnimatedCamera(desc.CommandLineNode): name='script', label='Script', description='Path to the internal script for rendering in Blender', - value=os.path.join(currentDir, 'scripts' ,'renderAnimatedCameraInBlender.py'), + value=os.path.join(currentDir, 'scripts' ,'preview.py'), uid=[], group='', advanced=True, diff --git a/meshroom/blender/scripts/renderAnimatedCameraInBlender.py b/meshroom/blender/scripts/preview.py similarity index 100% rename from meshroom/blender/scripts/renderAnimatedCameraInBlender.py rename to meshroom/blender/scripts/preview.py From f1b6e2305ec5a9eafb6d2aec72e6cfd9a99ad663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 30 May 2023 11:37:51 +0200 Subject: [PATCH 0737/1093] [blender] preview script: more robust search for undistorted images --- meshroom/blender/scripts/preview.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 04e4901478..dd03ac3697 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -143,8 +143,11 @@ def setupRender(view, intrinsic, pose, outputDir): def setupBackground(view, folderUndistorted): '''Retrieve undistorted image corresponding to view and use it as background.''' - baseImgName = os.path.splitext(os.path.basename(view['path']))[0] - undistortedImgPath = glob.glob(folderUndistorted + '/*' + baseImgName + "*")[0] + matches = glob.glob(folderUndistorted + '/*' + view['viewId'] + "*") # try with viewId + if len(matches) == 0: + baseImgName = os.path.splitext(os.path.basename(view['path']))[0] + matches = glob.glob(folderUndistorted + '/*' + baseImgName + "*") # try with image name + undistortedImgPath = matches[0] bpy.ops.image.open(filepath=undistortedImgPath) undistortedImgName = os.path.basename(undistortedImgPath) bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[undistortedImgName] From 779a5224d957d083564300a0ddf7852000f69db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 30 May 2023 11:46:10 +0200 Subject: [PATCH 0738/1093] [blender] preview script: more robust mesh name retrieval --- meshroom/blender/scripts/preview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index dd03ac3697..00a9cf81af 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -157,7 +157,8 @@ def loadModel(filename): '''Load model in Alembic of OBJ format. Make sure orientation matches camera orientation.''' if filename.lower().endswith('.obj'): bpy.ops.import_scene.obj(filepath=filename, axis_forward='Y', axis_up='Z') - return bpy.data.objects['mesh'], bpy.data.meshes['mesh'] + meshName = os.path.splitext(os.path.basename(filename))[0] + return bpy.data.objects[meshName], bpy.data.meshes[meshName] elif filename.lower().endswith('.abc'): bpy.ops.wm.alembic_import(filepath=filename) root = bpy.data.objects['mvgRoot'] From f766078576f6978f69dc6df48065a77149bc4d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20M=C3=A9lou?= <jean.melou@gmail.com> Date: Wed, 20 Jul 2022 16:37:49 +0200 Subject: [PATCH 0739/1093] [photometricStereo] Add nodes for PS --- meshroom/aliceVision/LightingCalibration.py | 57 +++++++++++++++++++++ meshroom/aliceVision/NormalIntegration.py | 37 +++++++++++++ meshroom/aliceVision/PhotometricStereo.py | 53 +++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 meshroom/aliceVision/LightingCalibration.py create mode 100644 meshroom/aliceVision/NormalIntegration.py create mode 100644 meshroom/aliceVision/PhotometricStereo.py diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py new file mode 100644 index 0000000000..67e961c473 --- /dev/null +++ b/meshroom/aliceVision/LightingCalibration.py @@ -0,0 +1,57 @@ +__version__ = "3.0" + +from meshroom.core import desc + + +class LightingCalibration(desc.CommandLineNode): + commandLine = 'aliceVision_lightingCalibration {allParams}' + category = 'Photometry' + documentation = ''' +TODO. +''' + + inputs = [ + desc.File( + name='inputPath', + label='SfmData', + description='Input file. Coulb be SfMData file or folder.', + value='', + uid=[0], + ), + desc.GroupAttribute( + name="sphereCenter", + label="Sphere Center", + description="Center of the circle (XY offset to the center in pixels).", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="X Offset in pixels", + value=0.0, + uid=[0], + range=(-1000.0, 10000.0, 1.0)), + desc.FloatParam( + name="y", label="y", description="Y Offset in pixels", + value=0.0, + uid=[0], + range=(-1000.0, 10000.0, 1.0)), + ], + group=None, # skip group from command line + ), + desc.FloatParam( + name='sphereRadius', + label='Radius', + description='Sphere radius in pixels.', + value=500.0, + range=(0.0, 5000, 0.1), + uid=[0], + ) + ] + + outputs = [ + desc.File( + name='outputFile', + label='Output json file', + description='Light information will be written here.', + value=desc.Node.internalFolder +'/lights.json' , + uid=[], + ) + ] diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py new file mode 100644 index 0000000000..3596b9c285 --- /dev/null +++ b/meshroom/aliceVision/NormalIntegration.py @@ -0,0 +1,37 @@ +__version__ = "3.0" + +from meshroom.core import desc + +class NormalIntegration(desc.CommandLineNode): + commandLine = 'aliceVision_normalIntegration {allParams}' + category = 'Photometry' + documentation = ''' +TODO. +''' + + inputs = [ + desc.File( + name='sfmDataFile', + label='sfmDataFile', + description='''SfMData file.''', + value='', + uid=[0], + ), + desc.File( + name='inputPath', + label='inputPath', + description='Normal maps folder', + value='', + uid=[0] + ) + ] + + outputs = [ + desc.File( + name='outputPath', + label='Output path', + description='Path to the output folder', + value=desc.Node.internalFolder, + uid=[], + ) + ] diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py new file mode 100644 index 0000000000..cfaad2ba03 --- /dev/null +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -0,0 +1,53 @@ +__version__ = "3.0" + +from meshroom.core import desc + +class PhotometricStereo(desc.CommandLineNode): + commandLine = 'aliceVision_photometricStereo {allParams}' + category = 'Photometry' + documentation = ''' +TODO. +''' + + inputs = [ + desc.File( + name='inputPath', + label='SfmData', + description='Input file. Coulb be SfMData file or folder.', + value='', + uid=[0], + ), + desc.File( + name='maskPath', + label='Mask folder path', + description='Mask folder path', + value='', + uid=[0], + ), + desc.File( + name='pathToJSONLightFile', + label='Lights Folder', + description='Folder containing lighting information.', + value='', + uid=[0] + ), + desc.IntParam( + name='HSOrder', + label='HS order', + description='Order of the spherical harmonics. ', + value=0, + range=(0, 2, 1), + uid=[0], + advanced=True, + ) + ] + + outputs = [ + desc.File( + name='outputPath', + label='Output path', + description='Path to the output folder', + value=desc.Node.internalFolder, + uid=[], + ) + ] From e179daba6f88d54f0152b4bd940d578ae45dcf14 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Thu, 2 Mar 2023 15:16:16 +0100 Subject: [PATCH 0740/1093] New node : sphere detection Sphere detection is made in a new node. The LightingCalibration node takes now a json as input, and only calibrates lighting --- meshroom/aliceVision/LightingCalibration.py | 29 ++------- meshroom/aliceVision/SphereDetection.py | 71 +++++++++++++++++++++ 2 files changed, 76 insertions(+), 24 deletions(-) create mode 100644 meshroom/aliceVision/SphereDetection.py diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 67e961c473..9d0c1964cd 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -18,30 +18,11 @@ class LightingCalibration(desc.CommandLineNode): value='', uid=[0], ), - desc.GroupAttribute( - name="sphereCenter", - label="Sphere Center", - description="Center of the circle (XY offset to the center in pixels).", - groupDesc=[ - desc.FloatParam( - name="x", label="x", description="X Offset in pixels", - value=0.0, - uid=[0], - range=(-1000.0, 10000.0, 1.0)), - desc.FloatParam( - name="y", label="y", description="Y Offset in pixels", - value=0.0, - uid=[0], - range=(-1000.0, 10000.0, 1.0)), - ], - group=None, # skip group from command line - ), - desc.FloatParam( - name='sphereRadius', - label='Radius', - description='Sphere radius in pixels.', - value=500.0, - range=(0.0, 5000, 0.1), + desc.File( + name='inputJSON', + label='inputJSON', + description='Input file. Coulb be SfMData file or folder.', + value='', uid=[0], ) ] diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py new file mode 100644 index 0000000000..a916155a0a --- /dev/null +++ b/meshroom/aliceVision/SphereDetection.py @@ -0,0 +1,71 @@ +__version__ = "3.0" + +from meshroom.core import desc + + +class SphereDetection(desc.CommandLineNode): + commandLine = 'aliceVision_sphereDetection {allParams}' + category = 'Photometry' + documentation = ''' +TODO. +''' + + inputs = [ + desc.File( + name='input_sfmdata_path', + label='SfmData', + description='Input file. Coulb be SfMData file or folder.', + value='', + uid=[0], + ), + desc.File( + name='input_model_path', + label='input_model_path', + description='Input file. Coulb be SfMData file or folder.', + value='', + uid=[0], + ), + desc.BoolParam( + name='autoDetect', + label='autoDetect', + description='autoDetect', + value=False, + uid=[0], + ), + desc.GroupAttribute( + name="sphereCenter", + label="Sphere Center", + description="Center of the circle (XY offset to the center in pixels).", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="X Offset in pixels", + value=0.0, + uid=[0], + range=(-1000.0, 10000.0, 1.0)), + desc.FloatParam( + name="y", label="y", description="Y Offset in pixels", + value=0.0, + uid=[0], + range=(-1000.0, 10000.0, 1.0)), + ], + group=None, # skip group from command line + ), + desc.FloatParam( + name='sphereRadius', + label='r', + description='Sphere radius in pixels.', + value=500.0, + range=(0.0, 1000.0, 0.1), + uid=[0], + ) + ] + + outputs = [ + desc.File( + name='output_path', + label='Output json file', + description='Light information will be written here.', + value=desc.Node.internalFolder, + uid=[], + ) + ] From 662c0fbad0a13fdcf805bd0cddfd12381a6d2515 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 15 Mar 2023 17:36:42 +0100 Subject: [PATCH 0741/1093] [LightingCalibration] Add new method parameters --- meshroom/aliceVision/LightingCalibration.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 9d0c1964cd..ce7597ff29 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -24,6 +24,15 @@ class LightingCalibration(desc.CommandLineNode): description='Input file. Coulb be SfMData file or folder.', value='', uid=[0], + ), + desc.ChoiceParam( + name='method', + label='method', + description='Method used for light calibration.', + values=['brightestPoint', 'whiteSphere'], + value='brightestPoint', + exclusive=True, + uid=[0], ) ] From 1d07086d104f9a61c81b45cd849ae60f0281c7fc Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 15 Mar 2023 17:38:16 +0100 Subject: [PATCH 0742/1093] [RTI] Add PS from RTI dome node --- meshroom/aliceVision/RTI_PS.py | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 meshroom/aliceVision/RTI_PS.py diff --git a/meshroom/aliceVision/RTI_PS.py b/meshroom/aliceVision/RTI_PS.py new file mode 100644 index 0000000000..4707047545 --- /dev/null +++ b/meshroom/aliceVision/RTI_PS.py @@ -0,0 +1,44 @@ +__version__ = "3.0" + +from meshroom.core import desc + +class RTI(desc.CommandLineNode): + commandLine = 'aliceVision_rti_PS {allParams}' + category = 'Photometry' + documentation = ''' +TODO. +''' + + inputs = [ + desc.File( + name='inputPath', + label='SfmData', + description='Input file. Coulb be SfMData file or folder.', + value='', + uid=[0], + ), + desc.File( + name='maskPath', + label='Mask folder path', + description='Mask folder path', + value='', + uid=[0], + ), + desc.File( + name='pathToJSONLightFile', + label='Lights Folder', + description='Folder containing lighting information.', + value='', + uid=[0] + ), + ] + + outputs = [ + desc.File( + name='outputPath', + label='Output path', + description='Path to the output folder', + value=desc.Node.internalFolder, + uid=[], + ) + ] From fdb4289454fd0e5a99df45307b4143f1a2698476 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Apr 2023 10:23:57 +0200 Subject: [PATCH 0743/1093] [RTI] Add RTI node --- meshroom/aliceVision/RTI_PS.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/meshroom/aliceVision/RTI_PS.py b/meshroom/aliceVision/RTI_PS.py index 4707047545..2a3ef99696 100644 --- a/meshroom/aliceVision/RTI_PS.py +++ b/meshroom/aliceVision/RTI_PS.py @@ -31,6 +31,40 @@ class RTI(desc.CommandLineNode): value='', uid=[0] ), + desc.IntParam( + name='HSOrder', + label='HS order', + description='Order of the spherical harmonics. ', + value=0, + range=(0, 2, 1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='removeAmbiant', + label='removeAmbiant', + description='removeAmbiant', + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='isRobust', + label='isRobust', + description='isRobust', + value=False, + uid=[0], + advanced=True, + ), + desc.IntParam( + name='downscale', + label='downscale', + description='downscale', + value=1, + uid=[0], + range=(1, 2, 8), + advanced=True + ) ] outputs = [ From 932c78782c2870b66b3480a018b9b7989c45ed22 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Apr 2023 10:46:09 +0200 Subject: [PATCH 0744/1093] [RTI] Change RTI node file name --- meshroom/aliceVision/{RTI_PS.py => RTI.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename meshroom/aliceVision/{RTI_PS.py => RTI.py} (100%) diff --git a/meshroom/aliceVision/RTI_PS.py b/meshroom/aliceVision/RTI.py similarity index 100% rename from meshroom/aliceVision/RTI_PS.py rename to meshroom/aliceVision/RTI.py From a17c869bfaa2f584721196e73db91fb2320eaca1 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Apr 2023 10:46:32 +0200 Subject: [PATCH 0745/1093] [pipeline] Add RTI pipeline --- meshroom/RTI.mg | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 meshroom/RTI.mg diff --git a/meshroom/RTI.mg b/meshroom/RTI.mg new file mode 100644 index 0000000000..e5591ab0d0 --- /dev/null +++ b/meshroom/RTI.mg @@ -0,0 +1,33 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2021.1.0", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "CameraInit": "8.0", + "RTI": "3.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + }, + "RTI_1": { + "nodeType": "RTI", + "position": [ + 231, + -3 + ], + "inputs": { + "inputPath": "{CameraInit_1.output}", + "pathToJSONLightFile": "/home/jean/Documents/Recherche/Reconstructions/RTI_105.json" + } + } + } +} \ No newline at end of file From 0183ae7ec57013b2e4ef3c513915048c36753e0e Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Apr 2023 10:50:11 +0200 Subject: [PATCH 0746/1093] [pipeline] New PS pipeline --- meshroom/StereoPhotometry.mg | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 meshroom/StereoPhotometry.mg diff --git a/meshroom/StereoPhotometry.mg b/meshroom/StereoPhotometry.mg new file mode 100644 index 0000000000..8030136537 --- /dev/null +++ b/meshroom/StereoPhotometry.mg @@ -0,0 +1,57 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2021.1.0", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "SphereDetection": "3.0", + "LightingCalibration": "3.0", + "CameraInit": "8.0", + "NormalIntegration": "3.0", + "PhotometricStereo": "3.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + }, + "LightingCalibration_1": { + "nodeType": "LightingCalibration", + "position": [ + 406, + -2 + ], + "inputs": { + "inputPath": "{SphereDetection_1.input_sfmdata_path}", + "inputJSON": "{SphereDetection_1.output_path}" + } + }, + "SphereDetection_1": { + "nodeType": "SphereDetection", + "position": [ + 204, + 4 + ], + "inputs": { + "input_sfmdata_path": "{CameraInit_1.output}" + } + }, + "PhotometricStereo_1": { + "nodeType": "PhotometricStereo", + "position": [ + 591, + -2 + ], + "inputs": { + "inputPath": "{LightingCalibration_1.inputPath}", + "pathToJSONLightFile": "{LightingCalibration_1.outputFile}" + } + } + } +} From 76adc6bdadb5e40732fdf92d84ccf3fe18a8ebaa Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 6 Apr 2023 20:48:08 +0200 Subject: [PATCH 0747/1093] [nodes] PhotometricStereo: declare output sfmData --- meshroom/aliceVision/PhotometricStereo.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index cfaad2ba03..503e9f9262 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -43,11 +43,19 @@ class PhotometricStereo(desc.CommandLineNode): ] outputs = [ + desc.File( + name='outputSfmData', + label='SfmData', + description='Path to the output folder', + value=desc.Node.internalFolder + '/sfmData.sfm', + uid=[], + group='', # remove from command line + ), desc.File( name='outputPath', - label='Output path', + label='Output Folder', description='Path to the output folder', value=desc.Node.internalFolder, uid=[], - ) + ), ] From a9a9f030df8494317d3221524c8a377c0cc18e78 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 12 Apr 2023 09:35:29 +0200 Subject: [PATCH 0748/1093] [pipeline] Stereophotometry: Update release version --- meshroom/RTI.mg | 6 +++--- meshroom/StereoPhotometry.mg | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/RTI.mg b/meshroom/RTI.mg index e5591ab0d0..8fdcba36fe 100644 --- a/meshroom/RTI.mg +++ b/meshroom/RTI.mg @@ -1,11 +1,11 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "8.0", + "CameraInit": "9.0", "RTI": "3.0" } }, @@ -30,4 +30,4 @@ } } } -} \ No newline at end of file +} diff --git a/meshroom/StereoPhotometry.mg b/meshroom/StereoPhotometry.mg index 8030136537..2a102dceed 100644 --- a/meshroom/StereoPhotometry.mg +++ b/meshroom/StereoPhotometry.mg @@ -1,13 +1,13 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2021.1.0", + "releaseVersion": "2023.1.0", "fileVersion": "1.1", "template": true, "nodesVersions": { "SphereDetection": "3.0", "LightingCalibration": "3.0", - "CameraInit": "8.0", + "CameraInit": "9.0", "NormalIntegration": "3.0", "PhotometricStereo": "3.0" } From 1af613c38c943fdba2fe43c895e8557c8878b4c6 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Fri, 7 Apr 2023 18:07:56 +0200 Subject: [PATCH 0749/1093] [PS] Remove options for first version --- meshroom/aliceVision/PhotometricStereo.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 503e9f9262..e8db212fc4 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -30,16 +30,7 @@ class PhotometricStereo(desc.CommandLineNode): description='Folder containing lighting information.', value='', uid=[0] - ), - desc.IntParam( - name='HSOrder', - label='HS order', - description='Order of the spherical harmonics. ', - value=0, - range=(0, 2, 1), - uid=[0], - advanced=True, - ) + ) ] outputs = [ From 02c4e2436d5950b4561c53e061acf3cbe4180164 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 19 Apr 2023 11:34:07 +0200 Subject: [PATCH 0750/1093] [nodes] PS: Expose normal and albedo maps in Viewer --- meshroom/aliceVision/PhotometricStereo.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index e8db212fc4..92caaf70d5 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -49,4 +49,25 @@ class PhotometricStereo(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), + # these attributes are only here to describe more accurately the output of the node + # by specifying that it generates 2 sequences of images + # (see in Viewer2D.qml how these attributes can be used) + desc.File( + name='normals', + label='Normal Maps', + description='Generated normal maps.', + semantic='image', + value=desc.Node.internalFolder + '<POSE_ID>_normals.png', + uid=[], + group='', # do not export on the command line + ), + desc.File( + name='albedo', + label='Albedo Maps', + description='Generated albedo maps.', + semantic='image', + value=desc.Node.internalFolder + '<POSE_ID>_albedo.png', + uid=[], + group='', # do not export on the command line + ), ] From fe127b5519937863b709fffc085ffbbb4f1eb189 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Tue, 23 May 2023 15:07:09 +0200 Subject: [PATCH 0751/1093] [PS] Fuse RTI and PS nodes part. 2 --- meshroom/aliceVision/LightingCalibration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index ce7597ff29..1f7e402749 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -25,6 +25,13 @@ class LightingCalibration(desc.CommandLineNode): value='', uid=[0], ), + desc.BoolParam( + name='saveAsModel', + label='saveAsModel', + description='saveAsModel', + value=False, + uid=[0], + ), desc.ChoiceParam( name='method', label='method', From 90886661d439cb42b5c3887332c428e8da698896 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Tue, 23 May 2023 15:07:34 +0200 Subject: [PATCH 0752/1093] [PS] Add outputs to PS node --- meshroom/aliceVision/PhotometricStereo.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 92caaf70d5..9663b99b27 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -42,6 +42,22 @@ class PhotometricStereo(desc.CommandLineNode): uid=[], group='', # remove from command line ), + desc.File( + name='outputSfmDataAlbedo', + label='SfmData Albedo', + description='', + value=desc.Node.internalFolder + '/albedoMaps.sfm', + uid=[], + group='', # remove from command line + ), + desc.File( + name='outputSfmDataNormal', + label='SfmData Normal', + description='', + value=desc.Node.internalFolder + '/normalMaps.sfm', + uid=[], + group='', # remove from command line + ), desc.File( name='outputPath', label='Output Folder', From e412d64f1daa02c8798222684ec22f5ffb0a7f97 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Tue, 23 May 2023 16:21:35 +0200 Subject: [PATCH 0753/1093] [PS] Add some description, correct some typo --- meshroom/aliceVision/LightingCalibration.py | 22 ++++++++++----------- meshroom/aliceVision/PhotometricStereo.py | 22 ++++++++++----------- meshroom/aliceVision/SphereDetection.py | 20 +++++++++---------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 1f7e402749..68e81943d3 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -12,30 +12,30 @@ class LightingCalibration(desc.CommandLineNode): inputs = [ desc.File( - name='inputPath', - label='SfmData', - description='Input file. Coulb be SfMData file or folder.', + name='inputJSON', + label='Sphere detection file', + description='Input file containing spheres centers and radius.', value='', uid=[0], ), desc.File( - name='inputJSON', - label='inputJSON', - description='Input file. Coulb be SfMData file or folder.', + name='inputPath', + label='SfmData', + description='Input file. Could be SfMData file or folder.', value='', uid=[0], ), desc.BoolParam( name='saveAsModel', - label='saveAsModel', - description='saveAsModel', + label='Save as model', + description='Check if this calibration file will be used with other datasets', value=False, uid=[0], ), desc.ChoiceParam( name='method', - label='method', - description='Method used for light calibration.', + label='Calibration method', + description='Method used for light calibration. Use brightestPoint for shiny sphere and whiteSphere for white matte sphere', values=['brightestPoint', 'whiteSphere'], value='brightestPoint', exclusive=True, @@ -46,7 +46,7 @@ class LightingCalibration(desc.CommandLineNode): outputs = [ desc.File( name='outputFile', - label='Output json file', + label='Output light file', description='Light information will be written here.', value=desc.Node.internalFolder +'/lights.json' , uid=[], diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 9663b99b27..78b2668f9b 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -10,10 +10,17 @@ class PhotometricStereo(desc.CommandLineNode): ''' inputs = [ + desc.File( + name='pathToJSONLightFile', + label='Lights file', + description='File containing lighting information.', + value='', + uid=[0] + ), desc.File( name='inputPath', label='SfmData', - description='Input file. Coulb be SfMData file or folder.', + description='Input file. Could be SfMData file or folder.', value='', uid=[0], ), @@ -23,13 +30,6 @@ class PhotometricStereo(desc.CommandLineNode): description='Mask folder path', value='', uid=[0], - ), - desc.File( - name='pathToJSONLightFile', - label='Lights Folder', - description='Folder containing lighting information.', - value='', - uid=[0] ) ] @@ -37,7 +37,7 @@ class PhotometricStereo(desc.CommandLineNode): desc.File( name='outputSfmData', label='SfmData', - description='Path to the output folder', + description='', value=desc.Node.internalFolder + '/sfmData.sfm', uid=[], group='', # remove from command line @@ -73,7 +73,7 @@ class PhotometricStereo(desc.CommandLineNode): label='Normal Maps', description='Generated normal maps.', semantic='image', - value=desc.Node.internalFolder + '<POSE_ID>_normals.png', + value=desc.Node.internalFolder + '<POSE_ID>_normals.exr', uid=[], group='', # do not export on the command line ), @@ -82,7 +82,7 @@ class PhotometricStereo(desc.CommandLineNode): label='Albedo Maps', description='Generated albedo maps.', semantic='image', - value=desc.Node.internalFolder + '<POSE_ID>_albedo.png', + value=desc.Node.internalFolder + '<POSE_ID>_albedo.exr', uid=[], group='', # do not export on the command line ), diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index a916155a0a..2018fef2fd 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -13,29 +13,29 @@ class SphereDetection(desc.CommandLineNode): inputs = [ desc.File( name='input_sfmdata_path', - label='SfmData', - description='Input file. Coulb be SfMData file or folder.', + label="SfmData", + description='Input SfMData file.', value='', uid=[0], ), desc.File( name='input_model_path', - label='input_model_path', - description='Input file. Coulb be SfMData file or folder.', + label='Deep learning net for automatic detection', + description='Deep learning net for automatic detection.', value='', uid=[0], ), desc.BoolParam( name='autoDetect', - label='autoDetect', - description='autoDetect', + label='Automatic Sphere Detection', + description='Automatic detection of calibration spheres', value=False, uid=[0], ), desc.GroupAttribute( name="sphereCenter", - label="Sphere Center", - description="Center of the circle (XY offset to the center in pixels).", + label="Sphere center", + description="Center of the circle (XY offset to the center of the image in pixels).", groupDesc=[ desc.FloatParam( name="x", label="x", description="X Offset in pixels", @@ -52,7 +52,7 @@ class SphereDetection(desc.CommandLineNode): ), desc.FloatParam( name='sphereRadius', - label='r', + label='Radius', description='Sphere radius in pixels.', value=500.0, range=(0.0, 1000.0, 0.1), @@ -63,7 +63,7 @@ class SphereDetection(desc.CommandLineNode): outputs = [ desc.File( name='output_path', - label='Output json file', + label='Output light file folder', description='Light information will be written here.', value=desc.Node.internalFolder, uid=[], From 738a605c097c421a3132c892a29ed23836e83e00 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 25 May 2023 08:29:33 +0100 Subject: [PATCH 0754/1093] [nodes] remove RTI node and pipeline as it is integrated in photometricStereo --- meshroom/RTI.mg | 33 ---------------- meshroom/aliceVision/RTI.py | 78 ------------------------------------- 2 files changed, 111 deletions(-) delete mode 100644 meshroom/RTI.mg delete mode 100644 meshroom/aliceVision/RTI.py diff --git a/meshroom/RTI.mg b/meshroom/RTI.mg deleted file mode 100644 index 8fdcba36fe..0000000000 --- a/meshroom/RTI.mg +++ /dev/null @@ -1,33 +0,0 @@ -{ - "header": { - "pipelineVersion": "2.2", - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", - "template": true, - "nodesVersions": { - "CameraInit": "9.0", - "RTI": "3.0" - } - }, - "graph": { - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - 0, - 0 - ], - "inputs": {} - }, - "RTI_1": { - "nodeType": "RTI", - "position": [ - 231, - -3 - ], - "inputs": { - "inputPath": "{CameraInit_1.output}", - "pathToJSONLightFile": "/home/jean/Documents/Recherche/Reconstructions/RTI_105.json" - } - } - } -} diff --git a/meshroom/aliceVision/RTI.py b/meshroom/aliceVision/RTI.py deleted file mode 100644 index 2a3ef99696..0000000000 --- a/meshroom/aliceVision/RTI.py +++ /dev/null @@ -1,78 +0,0 @@ -__version__ = "3.0" - -from meshroom.core import desc - -class RTI(desc.CommandLineNode): - commandLine = 'aliceVision_rti_PS {allParams}' - category = 'Photometry' - documentation = ''' -TODO. -''' - - inputs = [ - desc.File( - name='inputPath', - label='SfmData', - description='Input file. Coulb be SfMData file or folder.', - value='', - uid=[0], - ), - desc.File( - name='maskPath', - label='Mask folder path', - description='Mask folder path', - value='', - uid=[0], - ), - desc.File( - name='pathToJSONLightFile', - label='Lights Folder', - description='Folder containing lighting information.', - value='', - uid=[0] - ), - desc.IntParam( - name='HSOrder', - label='HS order', - description='Order of the spherical harmonics. ', - value=0, - range=(0, 2, 1), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='removeAmbiant', - label='removeAmbiant', - description='removeAmbiant', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='isRobust', - label='isRobust', - description='isRobust', - value=False, - uid=[0], - advanced=True, - ), - desc.IntParam( - name='downscale', - label='downscale', - description='downscale', - value=1, - uid=[0], - range=(1, 2, 8), - advanced=True - ) - ] - - outputs = [ - desc.File( - name='outputPath', - label='Output path', - description='Path to the output folder', - value=desc.Node.internalFolder, - uid=[], - ) - ] From 0e260f72c1ee4c1a1bf9a70d77f65665936bc19a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 25 May 2023 08:42:35 +0100 Subject: [PATCH 0755/1093] [nodes] SphereDetection: use env var for model by default --- meshroom/aliceVision/SphereDetection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 2018fef2fd..00c1aa85fa 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -22,7 +22,7 @@ class SphereDetection(desc.CommandLineNode): name='input_model_path', label='Deep learning net for automatic detection', description='Deep learning net for automatic detection.', - value='', + value='${ALICEVISION_SPHERE_DETECTION_MODEL}', uid=[0], ), desc.BoolParam( From 12176c8c79addb84f67ad8735ff488df7205033b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 31 May 2023 12:46:17 +0200 Subject: [PATCH 0756/1093] [nodes] SfMTransfer: Add a parameter to transfer landmarks --- meshroom/aliceVision/SfMTransfer.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index b0ea1a6705..c88dee13d7 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "2.1" from meshroom.core import desc @@ -80,6 +80,13 @@ class SfMTransfer(desc.AVCommandLineNode): value=True, uid=[0] ), + desc.BoolParam( + name='transferLandmarks', + label='Landmarks', + description='Transfer landmarks.', + value=True, + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 5f657023dd0ada32bfac0781c45770e82ff0973a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 31 May 2023 12:47:52 +0200 Subject: [PATCH 0757/1093] [nodes] StereoPhotometry: Update nodes' parameters and descriptions --- meshroom/aliceVision/LightingCalibration.py | 43 +++++--- meshroom/aliceVision/NormalIntegration.py | 42 +++++--- meshroom/aliceVision/PhotometricStereo.py | 109 +++++++++++++++----- meshroom/aliceVision/SphereDetection.py | 50 ++++++--- 4 files changed, 174 insertions(+), 70 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 68e81943d3..9f7ae21098 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "1.0" from meshroom.core import desc @@ -12,43 +12,52 @@ class LightingCalibration(desc.CommandLineNode): inputs = [ desc.File( - name='inputJSON', - label='Sphere detection file', - description='Input file containing spheres centers and radius.', + name='inputPath', + label='SfMData', + description='Input file. Could be SfMData file or folder.', value='', - uid=[0], + uid=[0] ), desc.File( - name='inputPath', - label='SfmData', - description='Input file. Could be SfMData file or folder.', + name='inputJSON', + label='Sphere Detection File', + description='Input JSON file containing spheres centers and radius.', value='', - uid=[0], + uid=[0] ), desc.BoolParam( name='saveAsModel', - label='Save as model', - description='Check if this calibration file will be used with other datasets', + label='Save As Model', + description='Check if this calibration file will be used with other datasets.', value=False, - uid=[0], + uid=[0] ), desc.ChoiceParam( name='method', - label='Calibration method', - description='Method used for light calibration. Use brightestPoint for shiny sphere and whiteSphere for white matte sphere', + label='Calibration Method', + description='Method used for light calibration. Use "brightestPoint" for shiny spheres and "whiteSphere" for white matte spheres.', values=['brightestPoint', 'whiteSphere'], value='brightestPoint', exclusive=True, - uid=[0], + 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='outputFile', - label='Output light file', + label='Light File', description='Light information will be written here.', value=desc.Node.internalFolder +'/lights.json' , - uid=[], + uid=[] ) ] diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 3596b9c285..6fbe440742 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "1.0" from meshroom.core import desc @@ -10,28 +10,46 @@ class NormalIntegration(desc.CommandLineNode): ''' inputs = [ + desc.File( + name='inputPath', + label='Normal Maps Folder', + description='Path to the folder containing the normal maps and the masks.', + value='', + uid=[0] + ), desc.File( name='sfmDataFile', - label='sfmDataFile', - description='''SfMData file.''', + label='SfMData', + description='Input SfMData file.', value='', uid=[0], ), - desc.File( - name='inputPath', - label='inputPath', - description='Normal maps folder', - value='', + desc.IntParam( + name='downscale', + label='Downscale Factor', + description='Downscale factor for faster results.', + value=1, + range=(1, 10, 1), + advanced=True, 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='outputPath', - label='Output path', - description='Path to the output folder', + label='Output Path', + description='Path to the output folder.', value=desc.Node.internalFolder, - uid=[], + uid=[] ) ] diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 78b2668f9b..e2de716380 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "1.0" from meshroom.core import desc @@ -10,41 +10,96 @@ class PhotometricStereo(desc.CommandLineNode): ''' inputs = [ - desc.File( - name='pathToJSONLightFile', - label='Lights file', - description='File containing lighting information.', + desc.File( + name='inputPath', + label='SfMData', + description='Input file. Could be an SfMData file or folder containing images.', value='', uid=[0] ), desc.File( - name='inputPath', - label='SfmData', - description='Input file. Could be SfMData file or folder.', - value='', - uid=[0], + name='pathToJSONLightFile', + label='Light File', + description='Path to a JSON file containing the lighting information.\n' + 'If empty, .txt files are expected in the image folder.', + value='defaultJSON.txt', + uid=[0] ), desc.File( name='maskPath', - label='Mask folder path', - description='Mask folder path', + label='Mask Folder Path', + description='Path to a folder containing masks or to a mask directly.', value='', - uid=[0], + uid=[0] + ), + desc.ChoiceParam( + name='SHOrder', + label='Spherical Harmonics Order', + description='Order of the spherical harmonics.\n' + '- 0: directional\n' + '- 1: directional + ambiant\n' + '- 2: second order spherical harmonics', + values=['0', '1', '2'], + value='0', + exclusive=True, + advanced=True, + uid=[0] + ), + desc.BoolParam( + name='removeAmbiant', + label='Remove Ambiant Light', + description='True if the ambiant light is to be removed on the PS images, false otherwise.', + value=False, + advanced=True, + uid=[0] + ), + desc.BoolParam( + name='isRobust', + label='Use Robust Algorithm', + description='True to use the robust algorithm, false otherwise.', + value=False, + advanced=True, + uid=[0] + ), + desc.IntParam( + name='downscale', + label='Downscale Factor', + description='Downscale factor for faster results.', + value=1, + range=(1, 10, 1), + advanced=True, + 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='outputPath', + label='Output Folder', + description='Path to the output folder', + value=desc.Node.internalFolder, + uid=[], + ), desc.File( name='outputSfmData', - label='SfmData', - description='', + label='SfMData', + description='Output path for the Sfm', value=desc.Node.internalFolder + '/sfmData.sfm', uid=[], group='', # remove from command line ), desc.File( name='outputSfmDataAlbedo', - label='SfmData Albedo', + label='SfMData Albedo', description='', value=desc.Node.internalFolder + '/albedoMaps.sfm', uid=[], @@ -52,31 +107,33 @@ class PhotometricStereo(desc.CommandLineNode): ), desc.File( name='outputSfmDataNormal', - label='SfmData Normal', + label='SfMData Normal', description='', value=desc.Node.internalFolder + '/normalMaps.sfm', uid=[], group='', # remove from command line ), - desc.File( - name='outputPath', - label='Output Folder', - description='Path to the output folder', - value=desc.Node.internalFolder, - uid=[], - ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) desc.File( name='normals', - label='Normal Maps', - description='Generated normal maps.', + label='Normal Maps Camera', + description='Generated normal maps in the camera coordinate system.', semantic='image', value=desc.Node.internalFolder + '<POSE_ID>_normals.exr', uid=[], group='', # do not export on the command line ), + desc.File( + name='normalsWorld', + label='Normal Maps World', + description='Generated normal maps in the world coordinate system.', + semantic='image', + value=desc.Node.internalFolder + '<POSE_ID>_normals_w.exr', + uid=[], + group='', # do not export on the command line + ), desc.File( name='albedo', label='Albedo Maps', diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 00c1aa85fa..cef254c17d 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "1.0" from meshroom.core import desc @@ -12,29 +12,38 @@ class SphereDetection(desc.CommandLineNode): inputs = [ desc.File( - name='input_sfmdata_path', - label="SfmData", + name='input', + label="SfMData", description='Input SfMData file.', value='', - uid=[0], + uid=[0] ), desc.File( - name='input_model_path', - label='Deep learning net for automatic detection', - description='Deep learning net for automatic detection.', + name='modelPath', + label='Detection Network', + description='Deep learning network for automatic calibration sphere detection.', value='${ALICEVISION_SPHERE_DETECTION_MODEL}', - uid=[0], + uid=[0] ), desc.BoolParam( name='autoDetect', label='Automatic Sphere Detection', description='Automatic detection of calibration spheres', value=False, - uid=[0], + uid=[0] + ), + desc.FloatParam( + name="minScore", + label="Minimum Score", + description="Minimum score for the detection.", + value=0.0, + range=(0.0, 50.0, 0.01), + advanced=True, + uid=[0] ), desc.GroupAttribute( name="sphereCenter", - label="Sphere center", + label="Sphere Center", description="Center of the circle (XY offset to the center of the image in pixels).", groupDesc=[ desc.FloatParam( @@ -48,7 +57,8 @@ class SphereDetection(desc.CommandLineNode): uid=[0], range=(-1000.0, 10000.0, 1.0)), ], - group=None, # skip group from command line + enabled=lambda node: not node.autoDetect.value, + group=None # skip group from command line ), desc.FloatParam( name='sphereRadius', @@ -56,16 +66,26 @@ class SphereDetection(desc.CommandLineNode): description='Sphere radius in pixels.', value=500.0, range=(0.0, 1000.0, 0.1), - uid=[0], + enabled=lambda node: not node.autoDetect.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_path', - label='Output light file folder', + name='output', + label='Light File Folder', description='Light information will be written here.', value=desc.Node.internalFolder, - uid=[], + uid=[] ) ] From 9ab11aea3a8fb4aa74990899f1dd7f8a38afbadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 31 May 2023 12:49:22 +0200 Subject: [PATCH 0758/1093] [pipelines] StereoPhotometry: Update template and add `Publish` node --- meshroom/StereoPhotometry.mg | 57 --------------------------- meshroom/stereoPhotometry.mg | 75 ++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 57 deletions(-) delete mode 100644 meshroom/StereoPhotometry.mg create mode 100644 meshroom/stereoPhotometry.mg diff --git a/meshroom/StereoPhotometry.mg b/meshroom/StereoPhotometry.mg deleted file mode 100644 index 2a102dceed..0000000000 --- a/meshroom/StereoPhotometry.mg +++ /dev/null @@ -1,57 +0,0 @@ -{ - "header": { - "pipelineVersion": "2.2", - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", - "template": true, - "nodesVersions": { - "SphereDetection": "3.0", - "LightingCalibration": "3.0", - "CameraInit": "9.0", - "NormalIntegration": "3.0", - "PhotometricStereo": "3.0" - } - }, - "graph": { - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - 0, - 0 - ], - "inputs": {} - }, - "LightingCalibration_1": { - "nodeType": "LightingCalibration", - "position": [ - 406, - -2 - ], - "inputs": { - "inputPath": "{SphereDetection_1.input_sfmdata_path}", - "inputJSON": "{SphereDetection_1.output_path}" - } - }, - "SphereDetection_1": { - "nodeType": "SphereDetection", - "position": [ - 204, - 4 - ], - "inputs": { - "input_sfmdata_path": "{CameraInit_1.output}" - } - }, - "PhotometricStereo_1": { - "nodeType": "PhotometricStereo", - "position": [ - 591, - -2 - ], - "inputs": { - "inputPath": "{LightingCalibration_1.inputPath}", - "pathToJSONLightFile": "{LightingCalibration_1.outputFile}" - } - } - } -} diff --git a/meshroom/stereoPhotometry.mg b/meshroom/stereoPhotometry.mg new file mode 100644 index 0000000000..0adf694ef0 --- /dev/null +++ b/meshroom/stereoPhotometry.mg @@ -0,0 +1,75 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2023.2.0-develop", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "SphereDetection": "1.0", + "LightingCalibration": "1.0", + "Publish": "1.2", + "CameraInit": "9.0", + "PhotometricStereo": "1.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + }, + "SphereDetection_1": { + "nodeType": "SphereDetection", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "autoDetect": true + } + }, + "LightingCalibration_1": { + "nodeType": "LightingCalibration", + "position": [ + 400, + 0 + ], + "inputs": { + "inputPath": "{SphereDetection_1.input}", + "inputJSON": "{SphereDetection_1.output}" + } + }, + "PhotometricStereo_1": { + "nodeType": "PhotometricStereo", + "position": [ + 600, + 0 + ], + "inputs": { + "inputPath": "{LightingCalibration_1.inputPath}", + "pathToJSONLightFile": "{LightingCalibration_1.outputFile}" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 800, + 0 + ], + "inputs": { + "inputFiles": [ + "{PhotometricStereo_1.outputSfmData}", + "{PhotometricStereo_1.outputSfmDataNormal}", + "{PhotometricStereo_1.normals}", + "{PhotometricStereo_1.normalsWorld}", + "{PhotometricStereo_1.albedo}", + "{PhotometricStereo_1.outputSfmDataAlbedo}" + ] + } + } + } +} \ No newline at end of file From 5d909968aff7a124bcb8318bf2ed41287df3d2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 24 May 2023 11:49:03 +0200 Subject: [PATCH 0759/1093] [nodes] SfMTransform: add align_ground mode --- meshroom/aliceVision/SfMTransform.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 7ae2d0f0a0..6ee8b3a872 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "3.1" from meshroom.core import desc @@ -20,6 +20,7 @@ class SfMTransform(desc.AVCommandLineNode): * from_single_camera: Use a specific camera as the origin of the coordinate system * from_markers: Align specific markers to custom coordinates * from_gps: Align with the gps positions from the image metadata + * align_ground: Detect ground level and align to it ''' @@ -37,16 +38,17 @@ class SfMTransform(desc.AVCommandLineNode): description="Transformation method:\n" " * transformation: Apply a given transformation\n" " * manual: Apply the gizmo transformation (show the transformed input)\n" - " * auto: Using X axis of all cameras as horizon. gps north and scale if available. cameras center mean is used as origin.\n" + " * auto: Using X axis of all cameras as horizon. gps north and scale if available. aligning on detected ground level.\n" " * auto_from_cameras: Use cameras\n" " * auto_from_cameras_x_axis: Use X axis of all cameras\n" " * auto_from_landmarks: Use landmarks\n" " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" " * from_center_camera: Use the center camera as the origin of the coordinate system\n" " * from_markers: Align specific markers to custom coordinates\n" - " * from_gps: Align with the gps positions from the image metadata", + " * from_gps: Align with the gps positions from the image metadata\n" + " * align_ground: Detect ground level and align to it", value='auto', - values=['transformation', 'manual', 'auto', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps'], + values=['transformation', 'manual', 'auto', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps', 'align_ground'], exclusive=True, uid=[0], ), From 76154682ee786bbff4bed269f7fcf373a73b57dd Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Thu, 1 Jun 2023 20:45:33 +0200 Subject: [PATCH 0760/1093] [PS] Add nodes documentation --- meshroom/aliceVision/LightingCalibration.py | 3 ++- meshroom/aliceVision/PhotometricStereo.py | 3 ++- meshroom/aliceVision/SphereDetection.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 9f7ae21098..0b9a80a867 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -7,7 +7,8 @@ class LightingCalibration(desc.CommandLineNode): commandLine = 'aliceVision_lightingCalibration {allParams}' category = 'Photometry' documentation = ''' -TODO. +Evaluate the lighting in a scene using spheres placed in the scene. +Can also be used to calibrate a lighting dome (RTI type). ''' inputs = [ diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index e2de716380..33c753a2ba 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -6,7 +6,8 @@ class PhotometricStereo(desc.CommandLineNode): commandLine = 'aliceVision_photometricStereo {allParams}' category = 'Photometry' documentation = ''' -TODO. +Reconstruction using Photometric Stereo. A normal map is evaluated from several photographs taken from the same point of view, but under different lighting conditions. +The lighting conditions are assumed to be known. ''' inputs = [ diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index cef254c17d..417127d663 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -7,7 +7,8 @@ class SphereDetection(desc.CommandLineNode): commandLine = 'aliceVision_sphereDetection {allParams}' category = 'Photometry' documentation = ''' -TODO. +Detect spheres in pictures. These spheres will be used for lighting calibration. +Spheres can be automatically detected or manually defined in the interface. ''' inputs = [ From 486ec57c0e36e0c663a7cddfed5481b7e7f34698 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 13 Apr 2023 20:23:51 +0200 Subject: [PATCH 0761/1093] [Nodes] imageProcessing: Add options for exposure and format adjustment. --- meshroom/aliceVision/ImageProcessing.py | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 6fe0e0de84..7c92874cd2 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -104,10 +104,18 @@ class ImageProcessing(desc.AVCommandLineNode): desc.BoolParam( name='exposureCompensation', label='Exposure Compensation', - description='Exposure Compensation', + description='Exposure Compensation (only valid for sfmData)', value=False, uid=[0], ), + desc.FloatParam( + name='exposureAdjust', + label='Exposure Adjustment', + description='Exposure Adjustment in fstops', + value=0.0, + range=(-2.0, 2.0, 0.125), + uid=[0], + ), desc.GroupAttribute(name="lensCorrection", label="Lens Correction", description="Automatic lens correction settings.", joinChar=":", groupDesc=[ desc.BoolParam( name='lensCorrectionEnabled', @@ -150,6 +158,22 @@ class ImageProcessing(desc.AVCommandLineNode): range=(0.0, 1.0, 0.01), uid=[0], ), + desc.IntParam( + name='maxWidth', + label='max Width', + description='Maximal width of the output images.', + value=0, + range=(0, 10000, 1), + uid=[0], + ), + desc.IntParam( + name='maxHeight', + label='max Height', + description='Maximal height of the output images.', + value=0, + range=(0, 10000, 1), + uid=[0], + ), desc.FloatParam( name='contrast', label='Contrast', From 52b859055366b4bd866ea300ff24460d6988f9e4 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 14 Apr 2023 17:17:51 +0200 Subject: [PATCH 0762/1093] [Nodes] imageProcessing: update exposure options --- meshroom/aliceVision/ImageProcessing.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 7c92874cd2..d3c07e4a9f 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -104,16 +104,23 @@ class ImageProcessing(desc.AVCommandLineNode): desc.BoolParam( name='exposureCompensation', label='Exposure Compensation', - description='Exposure Compensation (only valid for sfmData)', + description='Exposure compensation (only valid for sfmData)', + value=False, + uid=[0], + ), + desc.BoolParam( + name='rawAutoBright', + label='RAW Auto Bright', + description='Enable automatic exposure adjustment for RAW images', value=False, uid=[0], ), desc.FloatParam( - name='exposureAdjust', - label='Exposure Adjustment', - description='Exposure Adjustment in fstops', + name='rawExposureAdjust', + label='RAW Exposure Adjustment', + description='Manual exposure adjustment in fstops for RAW images', value=0.0, - range=(-2.0, 2.0, 0.125), + range=(-2.0, 3.0, 0.125), uid=[0], ), desc.GroupAttribute(name="lensCorrection", label="Lens Correction", description="Automatic lens correction settings.", joinChar=":", groupDesc=[ From ff303b0e3dd908a3a543a39610784270cbdb3d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 2 Jun 2023 16:44:04 +0200 Subject: [PATCH 0763/1093] [nodes] ImageProcessing: minor updates --- meshroom/aliceVision/ImageProcessing.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index d3c07e4a9f..5102323b33 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "3.1" from meshroom.core import desc @@ -167,16 +167,16 @@ class ImageProcessing(desc.AVCommandLineNode): ), desc.IntParam( name='maxWidth', - label='max Width', - description='Maximal width of the output images.', + label='Max Width', + description='Maximal width of the output images (0: ignored).', value=0, range=(0, 10000, 1), uid=[0], ), desc.IntParam( name='maxHeight', - label='max Height', - description='Maximal height of the output images.', + label='Max Height', + description='Maximal height of the output images (0: ignored).', value=0, range=(0, 10000, 1), uid=[0], From 4df35d0126d9c00c80460f9fe7511e77d00ac4e8 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 3 Jun 2023 15:35:07 +0200 Subject: [PATCH 0764/1093] [node] SfMTransform: update description of transformation methods --- meshroom/aliceVision/SfMTransform.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 6ee8b3a872..a15d93d294 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -36,17 +36,17 @@ class SfMTransform(desc.AVCommandLineNode): name='method', label='Transformation Method', description="Transformation method:\n" - " * transformation: Apply a given transformation\n" - " * manual: Apply the gizmo transformation (show the transformed input)\n" - " * auto: Using X axis of all cameras as horizon. gps north and scale if available. aligning on detected ground level.\n" - " * auto_from_cameras: Use cameras\n" - " * auto_from_cameras_x_axis: Use X axis of all cameras\n" - " * auto_from_landmarks: Use landmarks\n" - " * from_single_camera: Use a specific camera as the origin of the coordinate system\n" - " * from_center_camera: Use the center camera as the origin of the coordinate system\n" - " * from_markers: Align specific markers to custom coordinates\n" - " * from_gps: Align with the gps positions from the image metadata\n" - " * align_ground: Detect ground level and align to it", + " * transformation: Apply a given transformation.\n" + " * manual: Apply the gizmo transformation (show the transformed input).\n" + " * auto: Determines scene orientation from the cameras' X axis, determines north and scale from GPS information if available, and defines ground level from the point cloud.\n" + " * auto_from_cameras: Defines coordinate system from cameras.\n" + " * auto_from_cameras_x_axis: Determines scene orientation from the cameras' X axis.\n" + " * auto_from_landmarks: Defines coordinate system from landmarks.\n" + " * from_single_camera: Defines the coordinate system from the camera specified by --tranformation.\n" + " * from_center_camera: Defines the coordinate system from the camera closest to the center of the reconstruction.\n" + " * from_markers: Defines the coordinate system from markers specified by --markers.\n" + " * from_gps: Defines coordinate system from GPS metadata.\n" + " * align_ground: Defines ground level from the point cloud density. It assumes that the scene is oriented.", value='auto', values=['transformation', 'manual', 'auto', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps', 'align_ground'], exclusive=True, From 200c0d73aceb24772d45650672b4e7068575fa7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 16 Mar 2023 15:18:03 +0100 Subject: [PATCH 0765/1093] [nodes] Split360Images: support for SfMData file input and output --- meshroom/aliceVision/Split360Images.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 0313a73e31..1901542f4a 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -11,8 +11,8 @@ class Split360Images(desc.AVCommandLineNode): inputs = [ desc.File( name='input', - label='Images', - description="Images", + label='Input', + description="Single image, image folder or SfMData file.", value='', uid=[0], ), @@ -103,4 +103,11 @@ class Split360Images(desc.AVCommandLineNode): value=desc.Node.internalFolder, uid=[], ), + desc.File( + name='outSfMData', + label='SfMData file', + description="Output SfMData file.", + value=desc.Node.internalFolder + 'rig.sfm', + uid=[], + ), ] From bc8657dc9e6987cdf06df21ab8cb77a480cffe17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 20 Mar 2023 12:57:29 +0100 Subject: [PATCH 0766/1093] [nodes] Split360Images: camera model choice for dual fisheye --- meshroom/aliceVision/Split360Images.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 1901542f4a..13864e29a2 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -37,6 +37,15 @@ class Split360Images(desc.AVCommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='dualFisheyeCameraModel', + label='Camera Model', + description="Dual-Fisheye camera model", + value='fisheye4', + values=['fisheye4', 'equidistant_r3'], + exclusive=True, + uid=[0], + ), ] ), desc.GroupAttribute(name="equirectangularGroup", label="Equirectangular", description="Equirectangular", group=None, From c8722caa13735624b68a0f85080cb90c915325b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 20 Mar 2023 16:16:28 +0100 Subject: [PATCH 0767/1093] [nodes] Split360Images: XY offset presets in dual fisheye mode --- meshroom/aliceVision/Split360Images.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 13864e29a2..cd202eee09 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -29,9 +29,18 @@ class Split360Images(desc.AVCommandLineNode): enabled=lambda node: node.splitMode.value == 'dualfisheye', groupDesc=[ desc.ChoiceParam( - name='dualFisheyeSplitPreset', - label='Split Preset', - description="Dual-Fisheye split type preset (center, top, bottom)", + name='dualFisheyeOffsetPresetX', + label='X Offset Preset', + description="Dual-Fisheye X offset preset", + value='center', + values=['center', 'left', 'right'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name='dualFisheyeOffsetPresetY', + label='Y Offset Preset', + description="Dual-Fisheye Y offset preset", value='center', values=['center', 'top', 'bottom'], exclusive=True, From bed5dc21c3eaecdd608d68e326aa697919436e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 20 Mar 2023 16:17:00 +0100 Subject: [PATCH 0768/1093] [nodes] Split360Images: update node version --- meshroom/aliceVision/Split360Images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index cd202eee09..456a509406 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc From 1b9a6486839c6ec753df767222e30a3e2b20fc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 20 Mar 2023 18:32:18 +0100 Subject: [PATCH 0769/1093] [nodes] Split360Images: custom dynamic node size for chunkable output --- meshroom/aliceVision/LdrToHdrSampling.py | 1 + meshroom/aliceVision/Split360Images.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index d90944840f..7cd19ffbac 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -31,6 +31,7 @@ class DividedInputNodeSize(desc.DynamicNodeSize): def __init__(self, param, divParam): super(DividedInputNodeSize, self).__init__(param) self._divParam = divParam + def computeSize(self, node): s = super(DividedInputNodeSize, self).computeSize(node) divParam = node.attribute(self._divParam) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 456a509406..ccdfa7eb03 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -2,8 +2,26 @@ from meshroom.core import desc + +class Split360InputNodeSize(desc.DynamicNodeSize): + ''' + The Split360Images will increase the amount of views in the SfMData. + This class converts the number of input views into the number of split output views. + ''' + def computeSize(self, node): + s = super(Split360InputNodeSize, self).computeSize(node) + factor = 0 + mode = node.attribute('splitMode') + if mode.value == 'equirectangular': + factor = node.attribute('equirectangularGroup.equirectangularNbSplits').value + elif mode.value == 'dualfisheye': + factor = 2 + return s * factor + + class Split360Images(desc.AVCommandLineNode): commandLine = 'aliceVision_split360Images {allParams}' + size = Split360InputNodeSize('input') category = 'Utils' documentation = "This node is used to extract multiple images from equirectangular or dualfisheye images." From 99b408596b066ecf368897b80684ea56865c0ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 1 Jun 2023 15:10:06 +0200 Subject: [PATCH 0770/1093] [nodes] Publish: Add support to publish directories as well as files Before this commit, the `Publish` node could only copy files to an output directory. It can now copy a complete directory to an output directory. This is useful for cases where the names or number of the files to publish are unknown prior to the computation of the node to publish. --- meshroom/aliceVision/Publish.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 4ca8b055bb..dd65306783 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -1,8 +1,9 @@ from __future__ import print_function -__version__ = "1.2" +__version__ = "1.3" from meshroom.core import desc +import distutils.dir_util as du import shutil import glob import os @@ -27,13 +28,13 @@ class Publish(desc.Node): ), name="inputFiles", label="Input Files", - description="Input Files to publish.", + description="Input files or folders' content to publish.", group="", ), desc.File( name="output", label="Output Folder", - description="", + description="Folder to publish to.", value="", uid=[0], ), @@ -52,7 +53,10 @@ def resolvedPaths(self, inputFiles, outDir): paths = {} for inputFile in inputFiles: for f in glob.glob(inputFile.value): - paths[f] = os.path.join(outDir, os.path.basename(f)) + if os.path.isdir(f): + paths[f] = outDir # Do not concatenate the input folder's name with the output's + else: + paths[f] = os.path.join(outDir, os.path.basename(f)) return paths def processChunk(self, chunk): @@ -77,8 +81,12 @@ def processChunk(self, chunk): os.mkdir(chunk.node.output.value) for iFile, oFile in outFiles.items(): - chunk.logger.info('Publish file {} into {}'.format(iFile, oFile)) - shutil.copyfile(iFile, oFile) + if os.path.isdir(iFile): # If the input is a directory, copy the directory's content + chunk.logger.info('Publish directory {} into {}'.format(iFile, oFile)) + du.copy_tree(iFile, oFile) + else: + chunk.logger.info('Publish file {} into {}'.format(iFile, oFile)) + shutil.copyfile(iFile, oFile) chunk.logger.info('Publish end') finally: chunk.logManager.end() From 25e8f5a4e1b6634e11a8713575696fda4a063d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 1 Jun 2023 12:27:02 +0200 Subject: [PATCH 0771/1093] [nodes] LdrToHdrMerge: Add the output folder as a parameter Being able to connect the output folder instead of only the output SfMData file might be useful for the `LdrToHdrMerge` node since it produces more than a single SfMData file as outputs. --- meshroom/aliceVision/LdrToHdrMerge.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index fddc0ef506..5b71849f68 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,4 +1,4 @@ -__version__ = "4.0" +__version__ = "4.1" import json @@ -209,6 +209,14 @@ class LdrToHdrMerge(desc.AVCommandLineNode): ] outputs = [ + desc.File( + name='outputFolder', + label='Output Folder', + description='Path to the folder containing the merged HDR images.', + value=desc.Node.internalFolder, + uid=[], + group='', # do not export on the command line + ), desc.File( name='outSfMData', label='SfMData File', From f53f10ecc371b9ff4c5fab81a4f92632c9b0cc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Jun 2023 12:46:45 +0200 Subject: [PATCH 0772/1093] [pipelines] Update `Publish` and `LdrToHdrMerge` versions for all templates --- meshroom/cameraTracking.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 4 ++-- meshroom/panoramaHdr.mg | 4 ++-- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 2 +- meshroom/photogrammetryDraft.mg | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index a583a6891c..d70bcb32ff 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -6,7 +6,7 @@ "template": true, "nodesVersions": { "ExportAnimatedCamera": "2.0", - "Publish": "1.2", + "Publish": "1.3", "StructureFromMotion": "3.0", "FeatureExtraction": "1.1", "FeatureMatching": "2.0", diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index d9d0c0df20..4b51b123a6 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -5,7 +5,7 @@ "PanoramaSeams": "2.0", "FeatureMatching": "2.0", "PanoramaCompositing": "2.0", - "LdrToHdrMerge": "4.0", + "LdrToHdrMerge": "4.1", "LdrToHdrSampling": "4.0", "LdrToHdrCalibration": "3.0", "PanoramaEstimation": "1.0", @@ -17,7 +17,7 @@ "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", "PanoramaWarping": "1.0", - "Publish": "1.2" + "Publish": "1.3" }, "releaseVersion": "2023.1.0", "fileVersion": "1.1", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 7947e8c9ce..5969a1712e 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -5,7 +5,7 @@ "PanoramaSeams": "2.0", "FeatureMatching": "2.0", "PanoramaCompositing": "2.0", - "LdrToHdrMerge": "4.0", + "LdrToHdrMerge": "4.1", "LdrToHdrSampling": "4.0", "LdrToHdrCalibration": "3.0", "PanoramaEstimation": "1.0", @@ -17,7 +17,7 @@ "FeatureExtraction": "1.1", "PanoramaPrepareImages": "1.1", "PanoramaWarping": "1.0", - "Publish": "1.2" + "Publish": "1.3" }, "releaseVersion": "2023.1.0", "fileVersion": "1.1", diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 66bd3f8c65..a8fb773ad1 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -16,7 +16,7 @@ "FeatureExtraction": "1.1", "Meshing": "7.0", "DepthMapFilter": "3.0", - "Publish": "1.2" + "Publish": "1.3" } }, "graph": { diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 92df635284..c15695c2bb 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,7 +5,7 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "Publish": "1.2", + "Publish": "1.3", "StructureFromMotion": "3.0", "FeatureExtraction": "1.1", "FeatureMatching": "2.0", diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 1d8870490e..70184e0796 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -9,7 +9,7 @@ "ImageMatching": "2.0", "FeatureExtraction": "1.1", "Meshing": "7.0", - "Publish": "1.2" + "Publish": "1.3" }, "releaseVersion": "2023.1.0", "fileVersion": "1.1", From b7f3ce45c35d06a4f9af0379b9397e0bcc11340c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 1 Jun 2023 15:14:40 +0200 Subject: [PATCH 0773/1093] [pipelines] Add a new template for the HDR fusion --- meshroom/hdrFusion.mg | 88 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 meshroom/hdrFusion.mg diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg new file mode 100644 index 0000000000..253a69c643 --- /dev/null +++ b/meshroom/hdrFusion.mg @@ -0,0 +1,88 @@ +{ + "header": { + "nodesVersions": { + "Publish": "1.3", + "LdrToHdrSampling": "4.0", + "LdrToHdrMerge": "4.1", + "LdrToHdrCalibration": "3.0", + "CameraInit": "9.0" + }, + "releaseVersion": "2023.2.0-develop", + "fileVersion": "1.1", + "template": true + }, + "graph": { + "LdrToHdrMerge_1": { + "nodeType": "LdrToHdrMerge", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{LdrToHdrCalibration_1.input}", + "response": "{LdrToHdrCalibration_1.response}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "byPass": "{LdrToHdrCalibration_1.byPass}", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", + "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" + } + }, + "LdrToHdrCalibration_1": { + "nodeType": "LdrToHdrCalibration", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{LdrToHdrSampling_1.input}", + "samples": "{LdrToHdrSampling_1.output}", + "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", + "byPass": "{LdrToHdrSampling_1.byPass}", + "calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}", + "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", + "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" + } + }, + "LdrToHdrSampling_1": { + "nodeType": "LdrToHdrSampling", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": { + "allowedCameraModels": [ + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye1", + "3deanamorphic4", + "3deradial4", + "3declassicld" + ] + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 800, + 0 + ], + "inputs": { + "inputFiles": [ + "{LdrToHdrMerge_1.outputFolder}" + ] + } + } + } +} \ No newline at end of file From 26b2875689c63b67c03adf6a013da0674830ca1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 31 May 2023 17:09:21 +0200 Subject: [PATCH 0774/1093] [pipelines] Update the Camera Tracking pipeline --- meshroom/camTrackTmp.mg | 314 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 314 insertions(+) create mode 100644 meshroom/camTrackTmp.mg diff --git a/meshroom/camTrackTmp.mg b/meshroom/camTrackTmp.mg new file mode 100644 index 0000000000..b77253e151 --- /dev/null +++ b/meshroom/camTrackTmp.mg @@ -0,0 +1,314 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2023.2.0-develop", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "ExportAnimatedCamera": "2.0", + "Publish": "1.2", + "Meshing": "7.0", + "DepthMapFilter": "3.0", + "FeatureMatching": "2.0", + "SfMTransfer": "2.0", + "Texturing": "6.0", + "SfMTriangulation": "1.0", + "CameraInit": "9.0", + "KeyframeSelection": "4.0", + "ImageMatchingMultiSfM": "1.0", + "FeatureExtraction": "1.1", + "StructureFromMotion": "3.1", + "MeshFiltering": "3.0", + "MeshDecimate": "1.0", + "PrepareDenseScene": "3.0", + "ImageMatching": "2.0", + "DepthMap": "3.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 2400, + 0 + ], + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 2200, + 0 + ], + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingKeyframes" + } + }, + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 1000, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{StructureFromMotion_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive" + } + }, + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", + "position": [ + 200, + 160 + ], + "inputs": { + "inputPaths": [ + "{CameraInit_1.output}" + ] + } + }, + "MeshDecimate_1": { + "nodeType": "MeshDecimate", + "position": [ + 3000, + 0 + ], + "inputs": { + "input": "{MeshFiltering_1.outputMesh}", + "simplificationFactor": 0.2 + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 2800, + 0 + ], + "inputs": { + "inputMesh": "{Meshing_2.outputMesh}", + "filterLargeTrianglesFactor": 10.0 + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 2000, + 0 + ], + "inputs": { + "input": "{SfMTriangulation_1.output}" + } + }, + "SfMTransfer_1": { + "nodeType": "SfMTransfer", + "position": [ + 1600, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "reference": "{StructureFromMotion_2.output}" + } + }, + "SfMTriangulation_1": { + "nodeType": "SfMTriangulation", + "position": [ + 1800, + 0 + ], + "inputs": { + "input": "{SfMTransfer_1.output}", + "featuresFolders": "{StructureFromMotion_1.featuresFolders}", + "matchesFolders": "{StructureFromMotion_1.matchesFolders}" + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 3200, + 0 + ], + "inputs": { + "input": "{Meshing_2.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshDecimate_1.output}" + } + }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 160 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames" + } + }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 400, + 160 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + } + }, + "Meshing_2": { + "nodeType": "Meshing", + "position": [ + 2600, + 0 + ], + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "estimateSpaceFromSfM": false, + "minStep": 1, + "fullWeight": 10.0, + "saveRawDensePointCloud": true + } + }, + "StructureFromMotion_2": { + "nodeType": "StructureFromMotion", + "position": [ + 1400, + 0 + ], + "inputs": { + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_3.output}", + "{FeatureMatching_2.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "minInputTrackLength": 5, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1200, + 0 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1800, + 160 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}" + ] + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1600, + 160 + ], + "inputs": { + "input": "{StructureFromMotion_2.output}" + } + } + } +} \ No newline at end of file From 9dad87f62d5f817650673a72d8f2c82ee39abfb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 5 Jun 2023 11:09:31 +0200 Subject: [PATCH 0775/1093] [pipeline] add distortion calibration to cam track pipeline --- meshroom/camTrackTmp.mg | 113 +++++++++++++++++++++++++++++----------- 1 file changed, 84 insertions(+), 29 deletions(-) diff --git a/meshroom/camTrackTmp.mg b/meshroom/camTrackTmp.mg index b77253e151..02f37aab5a 100644 --- a/meshroom/camTrackTmp.mg +++ b/meshroom/camTrackTmp.mg @@ -5,32 +5,36 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", + "SfMTriangulation": "1.0", "Publish": "1.2", - "Meshing": "7.0", - "DepthMapFilter": "3.0", - "FeatureMatching": "2.0", - "SfMTransfer": "2.0", "Texturing": "6.0", - "SfMTriangulation": "1.0", - "CameraInit": "9.0", - "KeyframeSelection": "4.0", + "MeshFiltering": "3.0", + "SfMTransfer": "2.1", + "ApplyCalibration": "1.0", + "CheckerboardDetection": "1.0", "ImageMatchingMultiSfM": "1.0", - "FeatureExtraction": "1.1", + "Meshing": "7.0", + "ExportDistortion": "1.0", "StructureFromMotion": "3.1", - "MeshFiltering": "3.0", + "ExportAnimatedCamera": "2.0", "MeshDecimate": "1.0", - "PrepareDenseScene": "3.0", + "FeatureMatching": "2.0", "ImageMatching": "2.0", - "DepthMap": "3.0" + "PrepareDenseScene": "3.0", + "KeyframeSelection": "4.0", + "FeatureExtraction": "1.1", + "CameraInit": "9.0", + "DepthMap": "3.0", + "DepthMapFilter": "3.0", + "DistortionCalibration": "3.0" } }, "graph": { "CameraInit_1": { "nodeType": "CameraInit", "position": [ - 0, - 0 + -213, + -2 ], "inputs": {} }, @@ -63,7 +67,7 @@ 0 ], "inputs": { - "input": "{CameraInit_1.output}" + "input": "{ApplyCalibration_1.output}" } }, "FeatureMatching_1": { @@ -121,7 +125,7 @@ ], "inputs": { "inputPaths": [ - "{CameraInit_1.output}" + "{ApplyCalibration_1.output}" ] } }, @@ -207,6 +211,28 @@ "inputMesh": "{MeshDecimate_1.output}" } }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1800, + 160 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}" + ] + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1600, + 160 + ], + "inputs": { + "input": "{StructureFromMotion_2.output}" + } + }, "FeatureMatching_2": { "nodeType": "FeatureMatching", "position": [ @@ -229,7 +255,7 @@ 160 ], "inputs": { - "input": "{CameraInit_1.output}", + "input": "{ApplyCalibration_1.output}", "featuresFolders": [ "{FeatureExtraction_1.output}" ], @@ -288,26 +314,55 @@ "label": "FeatureMatchingFramesToKeyframes" } }, - "Publish_1": { - "nodeType": "Publish", + "CameraInit_2": { + "nodeType": "CameraInit", "position": [ - 1800, - 160 + -633, + -130 + ], + "inputs": {} + }, + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + -431, + -131 ], "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}" - ] + "input": "{CameraInit_2.output}", + "exportDebugImages": true } }, - "ExportAnimatedCamera_1": { - "nodeType": "ExportAnimatedCamera", + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", "position": [ - 1600, - 160 + -216, + -133 ], "inputs": { - "input": "{StructureFromMotion_2.output}" + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + -13, + -136 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + } + }, + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + -9, + 11 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" } } } From 7c6dde717e57bcf0116d35ddb990c3c2f0038c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 5 Jun 2023 11:26:04 +0200 Subject: [PATCH 0776/1093] [pipeline] add scene preview to cam track pipeline --- meshroom/camTrackTmp.mg | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/meshroom/camTrackTmp.mg b/meshroom/camTrackTmp.mg index 02f37aab5a..7867478b7c 100644 --- a/meshroom/camTrackTmp.mg +++ b/meshroom/camTrackTmp.mg @@ -11,6 +11,7 @@ "MeshFiltering": "3.0", "SfMTransfer": "2.1", "ApplyCalibration": "1.0", + "ScenePreview": "1.0", "CheckerboardDetection": "1.0", "ImageMatchingMultiSfM": "1.0", "Meshing": "7.0", @@ -18,6 +19,7 @@ "StructureFromMotion": "3.1", "ExportAnimatedCamera": "2.0", "MeshDecimate": "1.0", + "ConvertSfMFormat": "2.0", "FeatureMatching": "2.0", "ImageMatching": "2.0", "PrepareDenseScene": "3.0", @@ -364,6 +366,31 @@ "input": "{CameraInit_1.output}", "calibration": "{DistortionCalibration_1.output}" } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 3200, + 274 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 3001, + 275 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "json", + "structure": false, + "observations": false + } } } } \ No newline at end of file From 18d6cd5ddc6c850df2d6c2103843e34a0e4e7076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 5 Jun 2023 12:33:55 +0200 Subject: [PATCH 0777/1093] [pipeline] cam track pipeline adjustments --- meshroom/camTrackTmp.mg | 280 +++++++++++++++++++++------------------- 1 file changed, 150 insertions(+), 130 deletions(-) diff --git a/meshroom/camTrackTmp.mg b/meshroom/camTrackTmp.mg index 7867478b7c..7c58c7238e 100644 --- a/meshroom/camTrackTmp.mg +++ b/meshroom/camTrackTmp.mg @@ -5,38 +5,38 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "SfMTriangulation": "1.0", - "Publish": "1.2", + "FeatureExtraction": "1.1", + "CameraInit": "9.0", + "DepthMap": "3.0", + "DepthMapFilter": "3.0", + "DistortionCalibration": "3.0", + "StructureFromMotion": "3.1", + "PrepareDenseScene": "3.0", "Texturing": "6.0", - "MeshFiltering": "3.0", - "SfMTransfer": "2.1", - "ApplyCalibration": "1.0", + "ExportDistortion": "1.0", + "KeyframeSelection": "4.0", "ScenePreview": "1.0", "CheckerboardDetection": "1.0", - "ImageMatchingMultiSfM": "1.0", "Meshing": "7.0", - "ExportDistortion": "1.0", - "StructureFromMotion": "3.1", - "ExportAnimatedCamera": "2.0", + "ImageMatchingMultiSfM": "1.0", "MeshDecimate": "1.0", + "Publish": "1.2", + "MeshFiltering": "3.0", + "ApplyCalibration": "1.0", + "ExportAnimatedCamera": "2.0", + "SfMTransfer": "2.1", "ConvertSfMFormat": "2.0", "FeatureMatching": "2.0", "ImageMatching": "2.0", - "PrepareDenseScene": "3.0", - "KeyframeSelection": "4.0", - "FeatureExtraction": "1.1", - "CameraInit": "9.0", - "DepthMap": "3.0", - "DepthMapFilter": "3.0", - "DistortionCalibration": "3.0" + "SfMTriangulation": "1.0" } }, "graph": { "CameraInit_1": { "nodeType": "CameraInit", "position": [ - -213, - -2 + -215, + 15 ], "inputs": {} }, @@ -65,8 +65,8 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 200, - 0 + 197, + 227 ], "inputs": { "input": "{ApplyCalibration_1.output}" @@ -91,12 +91,12 @@ "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ - 1000, - 0 + 996, + 215 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataFrames}", - "inputB": "{StructureFromMotion_1.output}", + "inputB": "{StructureFromMotion_2.output}", "featuresFolders": [ "{FeatureExtraction_1.output}" ], @@ -117,13 +117,16 @@ "{FeatureExtraction_1.output}" ], "method": "Exhaustive" + }, + "internalInputs": { + "label": "ImageMatchingKeyframes" } }, "KeyframeSelection_1": { "nodeType": "KeyframeSelection", "position": [ - 200, - 160 + 197, + 3 ], "inputs": { "inputPaths": [ @@ -149,7 +152,7 @@ 0 ], "inputs": { - "inputMesh": "{Meshing_2.outputMesh}", + "inputMesh": "{Meshing_1.outputMesh}", "filterLargeTrianglesFactor": 10.0 } }, @@ -171,7 +174,10 @@ ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "reference": "{StructureFromMotion_2.output}" + "reference": "{StructureFromMotion_1.output}" + }, + "internalInputs": { + "comment": "Transfer pose from final camera tracking into the keyframes-only scene." } }, "SfMTriangulation_1": { @@ -182,23 +188,8 @@ ], "inputs": { "input": "{SfMTransfer_1.output}", - "featuresFolders": "{StructureFromMotion_1.featuresFolders}", - "matchesFolders": "{StructureFromMotion_1.matchesFolders}" - } - }, - "StructureFromMotion_1": { - "nodeType": "StructureFromMotion", - "position": [ - 800, - 0 - ], - "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}" + "featuresFolders": "{StructureFromMotion_2.featuresFolders}", + "matchesFolders": "{StructureFromMotion_2.matchesFolders}" } }, "Texturing_1": { @@ -208,7 +199,7 @@ 0 ], "inputs": { - "input": "{Meshing_2.output}", + "input": "{Meshing_1.output}", "imagesFolder": "{PrepareDenseScene_1.output}", "inputMesh": "{MeshDecimate_1.output}" } @@ -216,56 +207,29 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 1800, - 160 + 3574, + 166 ], "inputs": { "inputFiles": [ - "{ExportAnimatedCamera_1.output}" + "{ExportAnimatedCamera_1.output}", + "{Texturing_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}" ] } }, "ExportAnimatedCamera_1": { "nodeType": "ExportAnimatedCamera", "position": [ - 1600, - 160 - ], - "inputs": { - "input": "{StructureFromMotion_2.output}" - } - }, - "FeatureMatching_2": { - "nodeType": "FeatureMatching", - "position": [ - 600, - 160 - ], - "inputs": { - "input": "{ImageMatching_2.input}", - "featuresFolders": "{ImageMatching_2.featuresFolders}", - "imagePairsList": "{ImageMatching_2.output}" - }, - "internalInputs": { - "label": "FeatureMatchingAllFrames" - } - }, - "ImageMatching_2": { - "nodeType": "ImageMatching", - "position": [ - 400, - 160 + 1625, + 209 ], "inputs": { - "input": "{ApplyCalibration_1.output}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "Sequential", - "nbNeighbors": 20 + "input": "{StructureFromMotion_1.output}" } }, - "Meshing_2": { + "Meshing_1": { "nodeType": "Meshing", "position": [ 2600, @@ -280,50 +244,6 @@ "saveRawDensePointCloud": true } }, - "StructureFromMotion_2": { - "nodeType": "StructureFromMotion", - "position": [ - 1400, - 0 - ], - "inputs": { - "input": "{FeatureMatching_3.input}", - "featuresFolders": "{FeatureMatching_3.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_3.output}", - "{FeatureMatching_2.output}" - ], - "describerTypes": "{FeatureMatching_3.describerTypes}", - "minInputTrackLength": 5, - "minNumberOfObservationsForTriangulation": 3, - "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 - } - }, - "FeatureMatching_3": { - "nodeType": "FeatureMatching", - "position": [ - 1200, - 0 - ], - "inputs": { - "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", - "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", - "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" - }, - "internalInputs": { - "label": "FeatureMatchingFramesToKeyframes" - } - }, - "CameraInit_2": { - "nodeType": "CameraInit", - "position": [ - -633, - -130 - ], - "inputs": {} - }, "CheckerboardDetection_1": { "nodeType": "CheckerboardDetection", "position": [ @@ -332,6 +252,7 @@ ], "inputs": { "input": "{CameraInit_2.output}", + "useNestedGrids": true, "exportDebugImages": true } }, @@ -370,8 +291,8 @@ "ScenePreview_1": { "nodeType": "ScenePreview", "position": [ - 3200, - 274 + 3202, + 232 ], "inputs": { "cameras": "{ConvertSfMFormat_1.output}", @@ -382,8 +303,8 @@ "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ - 3001, - 275 + 3006, + 233 ], "inputs": { "input": "{ExportAnimatedCamera_1.input}", @@ -391,6 +312,105 @@ "structure": false, "observations": false } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", + "position": [ + 1396, + 215 + ], + "inputs": { + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_3.output}", + "{FeatureMatching_2.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "minInputTrackLength": 5, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the complete camera tracking sequence." + } + }, + "StructureFromMotion_2": { + "nodeType": "StructureFromMotion", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + }, + "internalInputs": { + "comment": "Solve all keyframes first.", + "label": "StructureFromMotionKeyframes" + } + }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 1198, + 396 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames" + } + }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 998, + 396 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + } + }, + "CameraInit_2": { + "nodeType": "CameraInit", + "position": [ + -633, + -130 + ], + "inputs": {}, + "internalInputs": { + "label": "CameraInitLensGrid" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1196, + 215 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes" + } } } } \ No newline at end of file From ff5cda3e86220de2d10039ce7fed876756bb2d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 5 Jun 2023 12:41:42 +0200 Subject: [PATCH 0778/1093] [pipelines] overwrite cameraTracking with camTrackTmp --- meshroom/camTrackTmp.mg | 416 ------------------------------------- meshroom/cameraTracking.mg | 394 +++++++++++++++++++++++++++++++---- 2 files changed, 352 insertions(+), 458 deletions(-) delete mode 100644 meshroom/camTrackTmp.mg diff --git a/meshroom/camTrackTmp.mg b/meshroom/camTrackTmp.mg deleted file mode 100644 index 7c58c7238e..0000000000 --- a/meshroom/camTrackTmp.mg +++ /dev/null @@ -1,416 +0,0 @@ -{ - "header": { - "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0-develop", - "fileVersion": "1.1", - "template": true, - "nodesVersions": { - "FeatureExtraction": "1.1", - "CameraInit": "9.0", - "DepthMap": "3.0", - "DepthMapFilter": "3.0", - "DistortionCalibration": "3.0", - "StructureFromMotion": "3.1", - "PrepareDenseScene": "3.0", - "Texturing": "6.0", - "ExportDistortion": "1.0", - "KeyframeSelection": "4.0", - "ScenePreview": "1.0", - "CheckerboardDetection": "1.0", - "Meshing": "7.0", - "ImageMatchingMultiSfM": "1.0", - "MeshDecimate": "1.0", - "Publish": "1.2", - "MeshFiltering": "3.0", - "ApplyCalibration": "1.0", - "ExportAnimatedCamera": "2.0", - "SfMTransfer": "2.1", - "ConvertSfMFormat": "2.0", - "FeatureMatching": "2.0", - "ImageMatching": "2.0", - "SfMTriangulation": "1.0" - } - }, - "graph": { - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - -215, - 15 - ], - "inputs": {} - }, - "DepthMapFilter_1": { - "nodeType": "DepthMapFilter", - "position": [ - 2400, - 0 - ], - "inputs": { - "input": "{DepthMap_1.input}", - "depthMapsFolder": "{DepthMap_1.output}" - } - }, - "DepthMap_1": { - "nodeType": "DepthMap", - "position": [ - 2200, - 0 - ], - "inputs": { - "input": "{PrepareDenseScene_1.input}", - "imagesFolder": "{PrepareDenseScene_1.output}" - } - }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", - "position": [ - 197, - 227 - ], - "inputs": { - "input": "{ApplyCalibration_1.output}" - } - }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", - "position": [ - 600, - 0 - ], - "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" - }, - "internalInputs": { - "label": "FeatureMatchingKeyframes" - } - }, - "ImageMatchingMultiSfM_1": { - "nodeType": "ImageMatchingMultiSfM", - "position": [ - 996, - 215 - ], - "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataFrames}", - "inputB": "{StructureFromMotion_2.output}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "VocabularyTree", - "matchingMode": "a/b", - "nbMatches": 20 - } - }, - "ImageMatching_1": { - "nodeType": "ImageMatching", - "position": [ - 400, - 0 - ], - "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "Exhaustive" - }, - "internalInputs": { - "label": "ImageMatchingKeyframes" - } - }, - "KeyframeSelection_1": { - "nodeType": "KeyframeSelection", - "position": [ - 197, - 3 - ], - "inputs": { - "inputPaths": [ - "{ApplyCalibration_1.output}" - ] - } - }, - "MeshDecimate_1": { - "nodeType": "MeshDecimate", - "position": [ - 3000, - 0 - ], - "inputs": { - "input": "{MeshFiltering_1.outputMesh}", - "simplificationFactor": 0.2 - } - }, - "MeshFiltering_1": { - "nodeType": "MeshFiltering", - "position": [ - 2800, - 0 - ], - "inputs": { - "inputMesh": "{Meshing_1.outputMesh}", - "filterLargeTrianglesFactor": 10.0 - } - }, - "PrepareDenseScene_1": { - "nodeType": "PrepareDenseScene", - "position": [ - 2000, - 0 - ], - "inputs": { - "input": "{SfMTriangulation_1.output}" - } - }, - "SfMTransfer_1": { - "nodeType": "SfMTransfer", - "position": [ - 1600, - 0 - ], - "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "reference": "{StructureFromMotion_1.output}" - }, - "internalInputs": { - "comment": "Transfer pose from final camera tracking into the keyframes-only scene." - } - }, - "SfMTriangulation_1": { - "nodeType": "SfMTriangulation", - "position": [ - 1800, - 0 - ], - "inputs": { - "input": "{SfMTransfer_1.output}", - "featuresFolders": "{StructureFromMotion_2.featuresFolders}", - "matchesFolders": "{StructureFromMotion_2.matchesFolders}" - } - }, - "Texturing_1": { - "nodeType": "Texturing", - "position": [ - 3200, - 0 - ], - "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{PrepareDenseScene_1.output}", - "inputMesh": "{MeshDecimate_1.output}" - } - }, - "Publish_1": { - "nodeType": "Publish", - "position": [ - 3574, - 166 - ], - "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}", - "{Texturing_1.output}", - "{ScenePreview_1.output}", - "{ExportDistortion_1.output}" - ] - } - }, - "ExportAnimatedCamera_1": { - "nodeType": "ExportAnimatedCamera", - "position": [ - 1625, - 209 - ], - "inputs": { - "input": "{StructureFromMotion_1.output}" - } - }, - "Meshing_1": { - "nodeType": "Meshing", - "position": [ - 2600, - 0 - ], - "inputs": { - "input": "{DepthMapFilter_1.input}", - "depthMapsFolder": "{DepthMapFilter_1.output}", - "estimateSpaceFromSfM": false, - "minStep": 1, - "fullWeight": 10.0, - "saveRawDensePointCloud": true - } - }, - "CheckerboardDetection_1": { - "nodeType": "CheckerboardDetection", - "position": [ - -431, - -131 - ], - "inputs": { - "input": "{CameraInit_2.output}", - "useNestedGrids": true, - "exportDebugImages": true - } - }, - "DistortionCalibration_1": { - "nodeType": "DistortionCalibration", - "position": [ - -216, - -133 - ], - "inputs": { - "input": "{CheckerboardDetection_1.input}", - "checkerboards": "{CheckerboardDetection_1.output}" - } - }, - "ExportDistortion_1": { - "nodeType": "ExportDistortion", - "position": [ - -13, - -136 - ], - "inputs": { - "input": "{DistortionCalibration_1.output}" - } - }, - "ApplyCalibration_1": { - "nodeType": "ApplyCalibration", - "position": [ - -9, - 11 - ], - "inputs": { - "input": "{CameraInit_1.output}", - "calibration": "{DistortionCalibration_1.output}" - } - }, - "ScenePreview_1": { - "nodeType": "ScenePreview", - "position": [ - 3202, - 232 - ], - "inputs": { - "cameras": "{ConvertSfMFormat_1.output}", - "model": "{MeshDecimate_1.output}", - "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" - } - }, - "ConvertSfMFormat_1": { - "nodeType": "ConvertSfMFormat", - "position": [ - 3006, - 233 - ], - "inputs": { - "input": "{ExportAnimatedCamera_1.input}", - "fileExt": "json", - "structure": false, - "observations": false - } - }, - "StructureFromMotion_1": { - "nodeType": "StructureFromMotion", - "position": [ - 1396, - 215 - ], - "inputs": { - "input": "{FeatureMatching_3.input}", - "featuresFolders": "{FeatureMatching_3.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_3.output}", - "{FeatureMatching_2.output}" - ], - "describerTypes": "{FeatureMatching_3.describerTypes}", - "minInputTrackLength": 5, - "minNumberOfObservationsForTriangulation": 3, - "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 - }, - "internalInputs": { - "comment": "Estimate cameras parameters for the complete camera tracking sequence." - } - }, - "StructureFromMotion_2": { - "nodeType": "StructureFromMotion", - "position": [ - 800, - 0 - ], - "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}" - }, - "internalInputs": { - "comment": "Solve all keyframes first.", - "label": "StructureFromMotionKeyframes" - } - }, - "FeatureMatching_2": { - "nodeType": "FeatureMatching", - "position": [ - 1198, - 396 - ], - "inputs": { - "input": "{ImageMatching_2.input}", - "featuresFolders": "{ImageMatching_2.featuresFolders}", - "imagePairsList": "{ImageMatching_2.output}" - }, - "internalInputs": { - "label": "FeatureMatchingAllFrames" - } - }, - "ImageMatching_2": { - "nodeType": "ImageMatching", - "position": [ - 998, - 396 - ], - "inputs": { - "input": "{ApplyCalibration_1.output}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "Sequential", - "nbNeighbors": 20 - } - }, - "CameraInit_2": { - "nodeType": "CameraInit", - "position": [ - -633, - -130 - ], - "inputs": {}, - "internalInputs": { - "label": "CameraInitLensGrid" - } - }, - "FeatureMatching_3": { - "nodeType": "FeatureMatching", - "position": [ - 1196, - 215 - ], - "inputs": { - "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", - "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", - "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" - }, - "internalInputs": { - "label": "FeatureMatchingFramesToKeyframes" - } - } - } -} \ No newline at end of file diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index d70bcb32ff..0fdb261b8c 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,16 +5,106 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", - "Publish": "1.3", - "StructureFromMotion": "3.0", "FeatureExtraction": "1.1", - "FeatureMatching": "2.0", "CameraInit": "9.0", - "ImageMatching": "2.0" + "DepthMap": "3.0", + "DepthMapFilter": "3.0", + "DistortionCalibration": "3.0", + "StructureFromMotion": "3.1", + "PrepareDenseScene": "3.0", + "Texturing": "6.0", + "ExportDistortion": "1.0", + "KeyframeSelection": "4.0", + "ScenePreview": "1.0", + "CheckerboardDetection": "1.0", + "Meshing": "7.0", + "ImageMatchingMultiSfM": "1.0", + "MeshDecimate": "1.0", + "Publish": "1.2", + "MeshFiltering": "3.0", + "ApplyCalibration": "1.0", + "ExportAnimatedCamera": "2.0", + "SfMTransfer": "2.1", + "ConvertSfMFormat": "2.0", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "SfMTriangulation": "1.0" } }, "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -215, + 15 + ], + "inputs": {} + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 2400, + 0 + ], + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 2200, + 0 + ], + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 197, + 227 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingKeyframes" + } + }, + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 996, + 215 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{StructureFromMotion_2.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + } + }, "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ @@ -22,84 +112,304 @@ 0 ], "inputs": { - "input": "{FeatureExtraction_1.input}", + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", "featuresFolders": [ "{FeatureExtraction_1.output}" ], - "nbMatches": 5, - "nbNeighbors": 10 + "method": "Exhaustive" + }, + "internalInputs": { + "label": "ImageMatchingKeyframes" } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", + "position": [ + 197, + 3 + ], + "inputs": { + "inputPaths": [ + "{ApplyCalibration_1.output}" + ] + } + }, + "MeshDecimate_1": { + "nodeType": "MeshDecimate", + "position": [ + 3000, + 0 + ], + "inputs": { + "input": "{MeshFiltering_1.outputMesh}", + "simplificationFactor": 0.2 + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 2800, + 0 + ], + "inputs": { + "inputMesh": "{Meshing_1.outputMesh}", + "filterLargeTrianglesFactor": 10.0 + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", "position": [ - 200, + 2000, 0 ], "inputs": { - "input": "{CameraInit_1.output}" + "input": "{SfMTriangulation_1.output}" + } + }, + "SfMTransfer_1": { + "nodeType": "SfMTransfer", + "position": [ + 1600, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "reference": "{StructureFromMotion_1.output}" + }, + "internalInputs": { + "comment": "Transfer pose from final camera tracking into the keyframes-only scene." + } + }, + "SfMTriangulation_1": { + "nodeType": "SfMTriangulation", + "position": [ + 1800, + 0 + ], + "inputs": { + "input": "{SfMTransfer_1.output}", + "featuresFolders": "{StructureFromMotion_2.featuresFolders}", + "matchesFolders": "{StructureFromMotion_2.matchesFolders}" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 3200, + 0 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshDecimate_1.output}" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 3574, + 166 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{Texturing_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}" + ] + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1625, + 209 + ], + "inputs": { + "input": "{StructureFromMotion_1.output}" + } + }, + "Meshing_1": { + "nodeType": "Meshing", + "position": [ + 2600, + 0 + ], + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "estimateSpaceFromSfM": false, + "minStep": 1, + "fullWeight": 10.0, + "saveRawDensePointCloud": true + } + }, + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + -431, + -131 + ], + "inputs": { + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true + } + }, + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", + "position": [ + -216, + -133 + ], + "inputs": { + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + -13, + -136 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + } + }, + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + -9, + 11 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" + } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 3202, + 232 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 3006, + 233 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "json", + "structure": false, + "observations": false } }, "StructureFromMotion_1": { "nodeType": "StructureFromMotion", "position": [ - 800, - 0 + 1396, + 215 ], "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", "matchesFolders": [ - "{FeatureMatching_1.output}" + "{FeatureMatching_3.output}", + "{FeatureMatching_2.output}" ], - "describerTypes": "{FeatureMatching_1.describerTypes}", + "describerTypes": "{FeatureMatching_3.describerTypes}", "minInputTrackLength": 5, "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the complete camera tracking sequence." } }, - "ExportAnimatedCamera_1": { - "nodeType": "ExportAnimatedCamera", + "StructureFromMotion_2": { + "nodeType": "StructureFromMotion", "position": [ - 1000, + 800, 0 ], "inputs": { - "input": "{StructureFromMotion_1.output}" + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + }, + "internalInputs": { + "comment": "Solve all keyframes first.", + "label": "StructureFromMotionKeyframes" } }, - "CameraInit_1": { - "nodeType": "CameraInit", + "FeatureMatching_2": { + "nodeType": "FeatureMatching", "position": [ - 0, - 0 + 1198, + 396 ], - "inputs": {} + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames" + } }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", + "ImageMatching_2": { + "nodeType": "ImageMatching", "position": [ - 600, - 0 + 998, + 396 ], "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 } }, - "Publish_1": { - "nodeType": "Publish", + "CameraInit_2": { + "nodeType": "CameraInit", "position": [ - 1200, - 0 + -633, + -130 + ], + "inputs": {}, + "internalInputs": { + "label": "CameraInitLensGrid" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1196, + 215 ], "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}" - ] + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes" } } } From 1e3831588bc29153bd1a5d8f78cc5ed34fea72c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 5 Jun 2023 16:18:42 +0200 Subject: [PATCH 0779/1093] [pipelines] cameraTracking: export undistorted images in ExportAnimatedCamera --- meshroom/cameraTracking.mg | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 0fdb261b8c..31e6c4ed6a 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,30 +5,30 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { + "MeshDecimate": "1.0", + "ScenePreview": "1.0", + "ConvertSfMFormat": "2.0", + "MeshFiltering": "3.0", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "SfMTransfer": "2.1", "FeatureExtraction": "1.1", "CameraInit": "9.0", "DepthMap": "3.0", + "SfMTriangulation": "1.0", "DepthMapFilter": "3.0", "DistortionCalibration": "3.0", - "StructureFromMotion": "3.1", - "PrepareDenseScene": "3.0", - "Texturing": "6.0", "ExportDistortion": "1.0", + "PrepareDenseScene": "3.0", "KeyframeSelection": "4.0", - "ScenePreview": "1.0", + "Publish": "1.3", + "StructureFromMotion": "3.1", + "ApplyCalibration": "1.0", "CheckerboardDetection": "1.0", - "Meshing": "7.0", "ImageMatchingMultiSfM": "1.0", - "MeshDecimate": "1.0", - "Publish": "1.2", - "MeshFiltering": "3.0", - "ApplyCalibration": "1.0", + "Texturing": "6.0", "ExportAnimatedCamera": "2.0", - "SfMTransfer": "2.1", - "ConvertSfMFormat": "2.0", - "FeatureMatching": "2.0", - "ImageMatching": "2.0", - "SfMTriangulation": "1.0" + "Meshing": "7.0" } }, "graph": { @@ -226,7 +226,8 @@ 209 ], "inputs": { - "input": "{StructureFromMotion_1.output}" + "input": "{StructureFromMotion_1.output}", + "exportUndistortedImages": true } }, "Meshing_1": { @@ -413,4 +414,4 @@ } } } -} +} \ No newline at end of file From 1ed37524f0f95d6ff65ef295bd4a6d50aebf0dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 5 Jun 2023 17:38:29 +0200 Subject: [PATCH 0780/1093] [pipelines] cameraTracking: minor improvements --- meshroom/cameraTracking.mg | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 31e6c4ed6a..0bbfece4d2 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,30 +5,30 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "MeshDecimate": "1.0", - "ScenePreview": "1.0", - "ConvertSfMFormat": "2.0", - "MeshFiltering": "3.0", - "FeatureMatching": "2.0", - "ImageMatching": "2.0", - "SfMTransfer": "2.1", "FeatureExtraction": "1.1", "CameraInit": "9.0", "DepthMap": "3.0", "SfMTriangulation": "1.0", + "ExportDistortion": "1.0", "DepthMapFilter": "3.0", "DistortionCalibration": "3.0", - "ExportDistortion": "1.0", "PrepareDenseScene": "3.0", "KeyframeSelection": "4.0", "Publish": "1.3", "StructureFromMotion": "3.1", - "ApplyCalibration": "1.0", "CheckerboardDetection": "1.0", "ImageMatchingMultiSfM": "1.0", + "ApplyCalibration": "1.0", "Texturing": "6.0", "ExportAnimatedCamera": "2.0", - "Meshing": "7.0" + "Meshing": "7.0", + "MeshDecimate": "1.0", + "ScenePreview": "1.0", + "ConvertSfMFormat": "2.0", + "MeshFiltering": "3.0", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "SfMTransfer": "2.1" } }, "graph": { @@ -142,7 +142,7 @@ ], "inputs": { "input": "{MeshFiltering_1.outputMesh}", - "simplificationFactor": 0.2 + "simplificationFactor": 0.05 } }, "MeshFiltering_1": { @@ -174,7 +174,8 @@ ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "reference": "{StructureFromMotion_1.output}" + "reference": "{StructureFromMotion_1.output}", + "transferLandmarks": false }, "internalInputs": { "comment": "Transfer pose from final camera tracking into the keyframes-only scene." @@ -310,6 +311,7 @@ "inputs": { "input": "{ExportAnimatedCamera_1.input}", "fileExt": "json", + "describerTypes": "{StructureFromMotion_1.describerTypes}", "structure": false, "observations": false } From 78f8bf4c209136457611eab479d90c9f37850114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Jun 2023 12:38:01 +0200 Subject: [PATCH 0781/1093] [nodes] SphereDetection: Fix label and description for the output folder The `SphereDetection` node does not output any information related to lighting, it only outputs a folder that will contain the information of the spheres detected in the input images. --- meshroom/aliceVision/SphereDetection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 417127d663..9f11616c41 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -84,8 +84,8 @@ class SphereDetection(desc.CommandLineNode): outputs = [ desc.File( name='output', - label='Light File Folder', - description='Light information will be written here.', + label='Output Folder', + description='Sphere detection information will be written here.', value=desc.Node.internalFolder, uid=[] ) From 72f7c4f5f402d96d7964f13e426a0806195b727c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Jun 2023 12:39:19 +0200 Subject: [PATCH 0782/1093] [nodes] LightingCalibration: Fix some parameters' description In particular, the `inputPath` parameter currently does not support folders for now, so this mention should be stripped from it. --- meshroom/aliceVision/LightingCalibration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 0b9a80a867..b96a7acddb 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -15,14 +15,14 @@ class LightingCalibration(desc.CommandLineNode): desc.File( name='inputPath', label='SfMData', - description='Input file. Could be SfMData file or folder.', + description='Input SfMData file.', value='', uid=[0] ), desc.File( name='inputJSON', label='Sphere Detection File', - description='Input JSON file containing spheres centers and radius.', + description='Input JSON file containing sphere centers and radiuses.', value='', uid=[0] ), From 143c8bbd898fa86abe09ca3ef0d9d29110bdb3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 5 Jun 2023 19:25:39 +0200 Subject: [PATCH 0783/1093] [pipelines] CameraTracking: Align all nodes together --- meshroom/cameraTracking.mg | 66 +++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 0bbfece4d2..b5057c8f3c 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -35,8 +35,8 @@ "CameraInit_1": { "nodeType": "CameraInit", "position": [ - -215, - 15 + -200, + 0 ], "inputs": {} }, @@ -65,8 +65,8 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 197, - 227 + 200, + 200 ], "inputs": { "input": "{ApplyCalibration_1.output}" @@ -91,8 +91,8 @@ "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ - 996, - 215 + 1000, + 200 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataFrames}", @@ -125,8 +125,8 @@ "KeyframeSelection_1": { "nodeType": "KeyframeSelection", "position": [ - 197, - 3 + 200, + 0 ], "inputs": { "inputPaths": [ @@ -223,8 +223,8 @@ "ExportAnimatedCamera_1": { "nodeType": "ExportAnimatedCamera", "position": [ - 1625, - 209 + 1600, + 200 ], "inputs": { "input": "{StructureFromMotion_1.output}", @@ -249,8 +249,8 @@ "CheckerboardDetection_1": { "nodeType": "CheckerboardDetection", "position": [ - -431, - -131 + -400, + -160 ], "inputs": { "input": "{CameraInit_2.output}", @@ -261,8 +261,8 @@ "DistortionCalibration_1": { "nodeType": "DistortionCalibration", "position": [ - -216, - -133 + -200, + -160 ], "inputs": { "input": "{CheckerboardDetection_1.input}", @@ -272,8 +272,8 @@ "ExportDistortion_1": { "nodeType": "ExportDistortion", "position": [ - -13, - -136 + 0, + -160 ], "inputs": { "input": "{DistortionCalibration_1.output}" @@ -282,8 +282,8 @@ "ApplyCalibration_1": { "nodeType": "ApplyCalibration", "position": [ - -9, - 11 + 0, + 0 ], "inputs": { "input": "{CameraInit_1.output}", @@ -293,8 +293,8 @@ "ScenePreview_1": { "nodeType": "ScenePreview", "position": [ - 3202, - 232 + 3200, + 200 ], "inputs": { "cameras": "{ConvertSfMFormat_1.output}", @@ -305,8 +305,8 @@ "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ - 3006, - 233 + 3000, + 200 ], "inputs": { "input": "{ExportAnimatedCamera_1.input}", @@ -319,8 +319,8 @@ "StructureFromMotion_1": { "nodeType": "StructureFromMotion", "position": [ - 1396, - 215 + 1400, + 200 ], "inputs": { "input": "{FeatureMatching_3.input}", @@ -361,8 +361,8 @@ "FeatureMatching_2": { "nodeType": "FeatureMatching", "position": [ - 1198, - 396 + 1200, + 360 ], "inputs": { "input": "{ImageMatching_2.input}", @@ -376,8 +376,8 @@ "ImageMatching_2": { "nodeType": "ImageMatching", "position": [ - 998, - 396 + 1000, + 360 ], "inputs": { "input": "{ApplyCalibration_1.output}", @@ -391,8 +391,8 @@ "CameraInit_2": { "nodeType": "CameraInit", "position": [ - -633, - -130 + -600, + -160 ], "inputs": {}, "internalInputs": { @@ -402,8 +402,8 @@ "FeatureMatching_3": { "nodeType": "FeatureMatching", "position": [ - 1196, - 215 + 1200, + 200 ], "inputs": { "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", @@ -416,4 +416,4 @@ } } } -} \ No newline at end of file +} From e17c76c7704aa8aca79432b1cc1db4cceea6760d Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 7 Apr 2023 15:58:47 +0200 Subject: [PATCH 0784/1093] [Nodes] Add options for image compression in imageProcessing and PanoramaPostProcessing. --- meshroom/aliceVision/ImageProcessing.py | 20 +++++++++++++++++++ .../aliceVision/PanoramaPostProcessing.py | 18 +++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 5102323b33..3bca36a9bb 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -521,6 +521,26 @@ class ImageProcessing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), + + desc.ChoiceParam( + name='compressionMethod', + label='Compression Method', + description='Compression method for output image.', + value='Auto', + values=['None', 'Auto', 'RLE', 'ZIP', 'ZIPS', 'PIZ', 'PXR24', 'B44', 'B44A', 'DWAA', 'DWAB'], + exclusive=True, + uid=[0], + ), + + desc.IntParam( + name='compressionLevel', + label='Compression Level', + description='Level of compression relying on the selected compression method.', + value=0, + range=(0, 200, 1), + uid=[0], + ), + desc.ChoiceParam( name='verboseLevel', label='Verbose Level', diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 4599b342e3..b87efad692 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -48,6 +48,24 @@ class PanoramaPostProcessing(desc.CommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name='compressionMethod', + label='Compression Method', + description='Compression method for output image.', + value='Auto', + values=['None', 'Auto', 'RLE', 'ZIP', 'ZIPS', 'PIZ', 'PXR24', 'B44', 'B44A', 'DWAA', 'DWAB'], + exclusive=True, + uid=[0], + ), + desc.IntParam( + name='compressionLevel', + label='Compression Level', + description='Level of compression relying on the selected compression method.', + value=0, + range=(0, 200, 1), + uid=[0], + ), + desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From abbdc7fa2a8eed1a618ebdf54e96fb8da814ef77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 5 Jun 2023 18:04:33 +0200 Subject: [PATCH 0785/1093] [nodes] ScenePreview: use base image name instead of viewId for output naming --- meshroom/blender/ScenePreview.py | 2 +- meshroom/blender/scripts/preview.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 2fe65f5449..84a0eb5bab 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -131,7 +131,7 @@ class ScenePreview(desc.CommandLineNode): label='Frames', description='Frames rendered in Blender', semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>.jpg', + value=desc.Node.internalFolder + '<FILENAME>_preview.jpg', uid=[], group='', ), diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 00a9cf81af..30439af7ea 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -138,7 +138,9 @@ def initCompositing(): def setupRender(view, intrinsic, pose, outputDir): '''Setup rendering in Blender for a given view.''' setupCamera(intrinsic, pose) - bpy.context.scene.render.filepath = os.path.abspath(outputDir + '/' + view['viewId'] + '.jpg') + + baseImgName = os.path.splitext(os.path.basename(view['path']))[0] + bpy.context.scene.render.filepath = os.path.abspath(outputDir + '/' + baseImgName + '_preview.jpg') def setupBackground(view, folderUndistorted): From 886c2fdd3926163973913bdb1659122c6c716faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 6 Jun 2023 18:19:52 +0200 Subject: [PATCH 0786/1093] [nodes] KeyframeSelection: Add parameter value to avoid exporting keyframes The `outputExtension` parameter now supports a new value, `none`, that disables the export of the keyframes, and becomes the new default value. The `renameKeyframes` parameter, which changes the way keyframes are named when they are written, is automatically disabled when `outputExtension` is set to `none`. --- meshroom/aliceVision/KeyframeSelection.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 12ec293eca..d2699c044a 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,4 +1,4 @@ -__version__ = "4.0" +__version__ = "4.1" import os from meshroom.core import desc @@ -212,14 +212,17 @@ class KeyframeSelection(desc.AVCommandLineNode): "If the selected keyframes are at index [15, 294, 825], they will be written as [00000.exr, 00001.exr, 00002.exr] with this\n" "option enabled instead of [00015.exr, 00294.exr, 00825.exr].", value=False, + enabled=lambda node: node.outputExtension.value != "none", uid=[0] ), desc.ChoiceParam( name="outputExtension", label="Keyframes File Extension", - description="File extension of the written keyframes.", - value="jpg", - values=["exr", "jpg", "png"], + description="File extension of the written keyframes.\n" + "If 'none' is selected, no keyframe will be written on disk.\n" + "For input videos, 'none' should not be used since the written keyframes are used to generate the output SfMData file.", + value="none", + values=["none", "exr", "jpg", "png"], exclusive=True, uid=[0], ), From 7fde432cd4e684fc5bd4a05c36f39ebb889ed921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 6 Jun 2023 18:20:12 +0200 Subject: [PATCH 0787/1093] [pipelines] CameraTracking: Update version for the KeyframeSelection node --- meshroom/cameraTracking.mg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index b5057c8f3c..d37dc46884 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -13,7 +13,7 @@ "DepthMapFilter": "3.0", "DistortionCalibration": "3.0", "PrepareDenseScene": "3.0", - "KeyframeSelection": "4.0", + "KeyframeSelection": "4.1", "Publish": "1.3", "StructureFromMotion": "3.1", "CheckerboardDetection": "1.0", From c137602844f69a0d170aedd18c872f5ef4b3977f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 7 Jun 2023 11:52:20 +0200 Subject: [PATCH 0788/1093] [nodes] ImageProcessing: split EXR and JPEG compression --- meshroom/aliceVision/ImageProcessing.py | 39 +++++++++++++++++++------ 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 3bca36a9bb..751e0ca638 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -523,22 +523,43 @@ class ImageProcessing(desc.AVCommandLineNode): ), desc.ChoiceParam( - name='compressionMethod', - label='Compression Method', - description='Compression method for output image.', - value='Auto', - values=['None', 'Auto', 'RLE', 'ZIP', 'ZIPS', 'PIZ', 'PXR24', 'B44', 'B44A', 'DWAA', 'DWAB'], + name='exrCompressionMethod', + label='EXR Compression Method', + description='Compression method for EXR images.', + value='auto', + values=['none', 'auto', 'rle', 'zip', 'zips', 'piz', 'pxr24', 'b44', 'b44a', 'dwaa', 'dwab'], exclusive=True, uid=[0], ), desc.IntParam( - name='compressionLevel', - label='Compression Level', - description='Level of compression relying on the selected compression method.', + name='exrCompressionLevel', + label='EXR Compression Level', + description='Level of compression for EXR images, range depends on method used.\n' + 'For zip/zips methods, values must be between 1 and 9.\n' + 'A value of 0 will be ignored, default value for the selected method will be used.', value=0, - range=(0, 200, 1), + range=(0, 500, 1), uid=[0], + enabled=lambda node: node.exrCompressionMethod.value in ['dwaa', 'dwab', 'zip', 'zips'] + ), + + desc.BoolParam( + name='jpegCompress', + label='JPEG Compress', + description='Enable JPEG compression.', + value=True, + uid=[0], + ), + + desc.IntParam( + name='jpegQuality', + label='JPEG Quality', + description='JPEG images quality after compression.', + value=90, + range=(0, 100, 1), + uid=[0], + enabled=lambda node: node.jpegCompress.value ), desc.ChoiceParam( From 00abf0cc61657cd683790f081b75cb3f7e0af3bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 7 Jun 2023 11:53:04 +0200 Subject: [PATCH 0789/1093] [nodes] PanoramaPostProcessing: align compression params with ImageProcessing --- meshroom/aliceVision/PanoramaPostProcessing.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index b87efad692..0f105104e2 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -51,19 +51,22 @@ class PanoramaPostProcessing(desc.CommandLineNode): desc.ChoiceParam( name='compressionMethod', label='Compression Method', - description='Compression method for output image.', - value='Auto', - values=['None', 'Auto', 'RLE', 'ZIP', 'ZIPS', 'PIZ', 'PXR24', 'B44', 'B44A', 'DWAA', 'DWAB'], + description='Compression method for output EXR image.', + value='auto', + values=['none', 'auto', 'rle', 'zip', 'zips', 'piz', 'pxr24', 'b44', 'b44a', 'dwaa', 'dwab'], exclusive=True, uid=[0], ), desc.IntParam( name='compressionLevel', label='Compression Level', - description='Level of compression relying on the selected compression method.', + description='Level of compression for output EXR image, range depends on method used.\n' + 'For zip/zips methods, values must be between 1 and 9.\n' + 'A value of 0 will be ignored, default value for the selected method will be used.', value=0, - range=(0, 200, 1), + range=(0, 500, 1), uid=[0], + enabled=lambda node: node.compressionMethod.value in ['dwaa', 'dwab', 'zip', 'zips'] ), desc.ChoiceParam( From 022ed6705e3faca3cd2365acc230141f2a3e275e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 7 Jun 2023 17:38:53 +0200 Subject: [PATCH 0790/1093] [nodes] KeyframeSelection: Set a dynamic size for the node The size is set with the minimum between the input frames (when available) and the set maximum number of output keyframes. This allows the nodes following the KeyframeSelection one to be chunked if applicable. --- meshroom/aliceVision/KeyframeSelection.py | 49 ++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 12ec293eca..a6a058380b 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,11 +1,58 @@ -__version__ = "4.0" +__version__ = "4.1" import os from meshroom.core import desc +class KeyframeSelectionNodeSize(desc.DynamicNodeSize): + def computeSize(self, node): + inputPathsSize = super(KeyframeSelectionNodeSize, self).computeSize(node) + s = 0 + finalSize = 0 + defaultParam = self._param + + # Compute the size for each entry in the list of input paths + for input in node.attribute("inputPaths").value: + self._param = input.getFullName() + s = s + super(KeyframeSelectionNodeSize, self).computeSize(node) + + # Retrieve the maximum number of keyframes for the smart selection (which is high by default) + maxFramesSmart = node.attribute("selectionMethod.smartSelection.maxNbOutFrames").value + + # If the smart selection is enabled and the number of input frames is available (s is not equal to the number of input paths), + # set the size as the minimum between the number of input frames and maximum number of output keyframes. If the number of + # input frames is not available, set the size to the maximum number of output keyframes. + smartSelectionOn = node.attribute("selectionMethod.useSmartSelection").value + if smartSelectionOn: + if s != inputPathsSize: + finalSize = min(s, maxFramesSmart) + else: + finalSize = maxFramesSmart + + # If the smart selection is not enabled, the maximum number of output keyframes for the regular mode can be used + # if and only if it has been set, in the same way as for the smart selection. If the maximum number of frames has + # not been set, then the size is either the minimum between the maximum number of output keyframes for the smart + # selection and the number of input frames if it is available, or the maximum number of output keyframes for the + # smart selection if the number of input frames is not available. + else: + maxFrames = node.attribute("selectionMethod.regularSelection.maxNbOutFrames").value + if maxFrames > 0 and s != inputPathsSize: + finalSize = min(s, maxFrames) + elif maxFrames > 0 and s == inputPathsSize: + finalSize = maxFrames + elif maxFrames <= 0 and s != inputPathsSize: + finalSize = min(s, maxFramesSmart) + else: + finalSize = maxFramesSmart + + # Reset the param used to compute size to the default one: if the size is computed again, + # this will prevent having an inputPathsSize that is erroneous + self._param = defaultParam + return finalSize + class KeyframeSelection(desc.AVCommandLineNode): commandLine = 'aliceVision_keyframeSelection {allParams}' + size = KeyframeSelectionNodeSize('inputPaths') category = 'Utils' documentation = ''' From b8061bda96ca5faccec88837c54556544194beed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 7 Jun 2023 17:58:42 +0200 Subject: [PATCH 0791/1093] [nodes] CameraInit: access intrinsic properties safely --- meshroom/aliceVision/CameraInit.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 10cf4d6a41..a5294df4b9 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -128,21 +128,23 @@ def readSfMData(sfmFile): intrinsics = [{k: v for k, v in item.items() if k in intrinsicsKeys} for item in data.get("intrinsics", [])] for intrinsic in intrinsics: - pp = intrinsic['principalPoint'] + pp = intrinsic.get('principalPoint', (0, 0)) intrinsic['principalPoint'] = {} intrinsic['principalPoint']['x'] = pp[0] intrinsic['principalPoint']['y'] = pp[1] # convert empty string distortionParams (i.e: Pinhole model) to empty list - if intrinsic['distortionParams'] == '': + distortionParams = intrinsic.get('distortionParams', '') + if distortionParams == '': intrinsic['distortionParams'] = list() - offset = intrinsic['undistortionOffset'] + offset = intrinsic.get('undistortionOffset', (0, 0)) intrinsic['undistortionOffset'] = {} intrinsic['undistortionOffset']['x'] = offset[0] intrinsic['undistortionOffset']['y'] = offset[1] - if intrinsic['undistortionParams'] == '': + undistortionParams = intrinsic.get('undistortionParams', '') + if undistortionParams == '': intrinsic['undistortionParams'] = list() viewsKeys = [v.name for v in Viewpoint] From b8f5310ec3bce2cdf8d5d343542a24b52d73a6fc Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 12 Apr 2023 09:23:44 +0200 Subject: [PATCH 0792/1093] Node to split reconstructed and not reconstructed cameras --- meshroom/aliceVision/SfMSplitReconstructed.py | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 meshroom/aliceVision/SfMSplitReconstructed.py diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py new file mode 100644 index 0000000000..d241c11be2 --- /dev/null +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -0,0 +1,50 @@ +__version__ = "2.0" + +from meshroom.core import desc + +import os.path + + +class SfMSplitReconstructed(desc.AVCommandLineNode): + commandLine = 'aliceVision_sfmSplitReconstructed {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='''SfMData 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='reconstructedOutput', + label='Reconstructed SfMData File', + description='SfMData file with reconstructed cameras', + value=desc.Node.internalFolder + 'sfmReconstructed.abc', + uid=[], + ), + desc.File( + name='notReconstructedOutput', + label='Not Reconstructed SfMData File', + description='SfMData file with non reconstructed cameras', + value=desc.Node.internalFolder + 'sfmNonReconstructed.abc', + uid=[], + ) + ] From 03234d01c2ef8733c205b43b2548fd7cc163b8a9 Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <fabien.servant@technicolor.com> Date: Thu, 8 Jun 2023 10:42:48 +0200 Subject: [PATCH 0793/1093] Node documentation and versioning --- meshroom/aliceVision/SfMSplitReconstructed.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index d241c11be2..f224c4114c 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -1,9 +1,7 @@ -__version__ = "2.0" +__version__ = "1.0" from meshroom.core import desc -import os.path - class SfMSplitReconstructed(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmSplitReconstructed {allParams}' @@ -11,6 +9,9 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): category = 'Utils' documentation = ''' + This nodes takes a sfmData file and split it in two + - One sfmData with the reconstructed views + - One sfmData with the non reconstructed views ''' inputs = [ From dd090ce3861a0f44b26d8230a219017ac41b0e06 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 12 May 2023 14:22:03 +0200 Subject: [PATCH 0794/1093] [Node] imageProcessing: Add scene illuminant color temperature as option for raw processing. --- meshroom/aliceVision/ImageProcessing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 751e0ca638..8cc9223ebd 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -508,6 +508,15 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], ), + desc.FloatParam( + name='correlatedColorTemperature', + label='Illuminant Color Temperature', + description='Scene illuminant color temperature in Kelvin. A negative or nul value indicates to use metadata information.', + value=-1.0, + range=(-1.0, 10000.0, 1.0), + uid=[0], + ), + desc.ChoiceParam( name='storageDataType', label='Storage Data Type for EXR output', From 64e477b87d7e2eaaa909486fbe1cf2043548b6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 9 Jun 2023 13:16:24 +0200 Subject: [PATCH 0795/1093] [nodes] ImageProcessing: Update version and fix typo --- meshroom/aliceVision/ImageProcessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 8cc9223ebd..97268a8465 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -1,4 +1,4 @@ -__version__ = "3.1" +__version__ = "3.2" from meshroom.core import desc @@ -511,7 +511,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.FloatParam( name='correlatedColorTemperature', label='Illuminant Color Temperature', - description='Scene illuminant color temperature in Kelvin. A negative or nul value indicates to use metadata information.', + description='Scene illuminant color temperature in Kelvin. A negative or null value indicates to use metadata information.', value=-1.0, range=(-1.0, 10000.0, 1.0), uid=[0], From 280b2d4f0a6fe5f670fc77bc458de3bcf5d8510b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 6 Mar 2023 16:17:30 +0100 Subject: [PATCH 0796/1093] [nodes] DepthMap: Enable/disable outputs depending on inputs' values --- meshroom/aliceVision/DepthMap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 023da0970c..4e0bb79e4b 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -483,7 +483,7 @@ class DepthMap(desc.AVCommandLineNode): value=desc.Node.internalFolder + '<VIEW_ID>_tilePattern.obj', uid=[], group='', # do not export on the command line - # enabled=lambda node: node.intermediateResults.exportTilePattern.value, + enabled=lambda node: node.intermediateResults.exportTilePattern.value, ), desc.File( name='depthSgm', @@ -493,7 +493,7 @@ class DepthMap(desc.AVCommandLineNode): value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_scale2_sgm.exr', uid=[], group='', # do not export on the command line - # enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, + enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( name='depthSgmUpscaled', @@ -503,7 +503,7 @@ class DepthMap(desc.AVCommandLineNode): value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_sgmUpscaled.exr', uid=[], group='', # do not export on the command line - # enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, + enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( name='depthRefined', @@ -513,6 +513,6 @@ class DepthMap(desc.AVCommandLineNode): value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_refinedFused.exr', uid=[], group='', # do not export on the command line - # enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, + enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), ] From d1e3b243862505f0f46ed606dbc7cba93e2c9f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 9 Jun 2023 15:12:04 +0200 Subject: [PATCH 0797/1093] [nodes] DepthMap: fix uid of intermediate export attributes --- meshroom/aliceVision/DepthMap.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 4e0bb79e4b..7161fbcd78 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -391,7 +391,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Depth Maps', description='Export intermediate depth/similarity maps from the SGM and Refine steps.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam( @@ -399,7 +399,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Volumes', description='Export intermediate full similarity volumes from the SGM and Refine steps.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam( @@ -407,7 +407,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Cross Volumes', description='Export intermediate similarity cross volumes from the SGM and Refine steps.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam( @@ -415,7 +415,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export 9 Points', description='Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam( @@ -423,7 +423,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Tile Pattern', description='Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.', value=False, - uid=[], + uid=[0], advanced=True, ), ]), From c0e6e135a0ae51392965d81b2a445b446d1aba41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 9 Jun 2023 15:33:04 +0200 Subject: [PATCH 0798/1093] [blender] preview: handle background image not found --- meshroom/blender/scripts/preview.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 30439af7ea..30e24f36ed 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -149,10 +149,14 @@ def setupBackground(view, folderUndistorted): if len(matches) == 0: baseImgName = os.path.splitext(os.path.basename(view['path']))[0] matches = glob.glob(folderUndistorted + '/*' + baseImgName + "*") # try with image name + if len(matches) == 0: + # no background image found + return False undistortedImgPath = matches[0] bpy.ops.image.open(filepath=undistortedImgPath) undistortedImgName = os.path.basename(undistortedImgPath) bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[undistortedImgName] + return True def loadModel(filename): @@ -332,7 +336,10 @@ def main(): print("Rendering view " + view['viewId']) if args.useBackground: - setupBackground(view, args.undistortedImages) + if not setupBackground(view, args.undistortedImages): + # background setup failed + # do not render this frame + continue setupRender(view, intrinsic, pose, args.output) bpy.ops.render.render(write_still=True) From 4465c75bca55816901504b93fd74b1c9c9755e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 9 Jun 2023 16:03:16 +0200 Subject: [PATCH 0799/1093] [nodes] ImageProcessing: Use camel case for all labels --- meshroom/aliceVision/ImageProcessing.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 97268a8465..c68c41413c 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -104,7 +104,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.BoolParam( name='exposureCompensation', label='Exposure Compensation', - description='Exposure compensation (only valid for sfmData)', + description='Exposure compensation (only valid for SfMData)', value=False, uid=[0], ), @@ -134,7 +134,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.BoolParam( name='geometry', label='Geometry', - description='Geometry correction if a model is available in sfm data.', + description='Geometry correction if a model is available in SfM data.', value=False, uid=[0], enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, @@ -159,7 +159,7 @@ class ImageProcessing(desc.AVCommandLineNode): ]), desc.FloatParam( name='scaleFactor', - label='ScaleFactor', + label='Scale Factor', description='Scale Factor.', value=1.0, range=(0.0, 1.0, 0.01), @@ -477,7 +477,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.BoolParam( name='doWBAfterDemosaicing', - label='WB after demosaicing', + label='WB After Demosaicing', description='Do White Balance after demosaicing, just before DCP profile application', value=False, uid=[0], @@ -496,7 +496,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.ChoiceParam( name='highlightMode', - label='Highlight mode', + label='Highlight Mode', description='LibRaw highlight mode:\n' ' * 0: Clip (default)\n' ' * 1: Unclip\n' @@ -511,7 +511,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.FloatParam( name='correlatedColorTemperature', label='Illuminant Color Temperature', - description='Scene illuminant color temperature in Kelvin. A negative or null value indicates to use metadata information.', + description='Scene illuminant color temperature in Kelvin. A negative or null value indicates that the metadata information will be used.', value=-1.0, range=(-1.0, 10000.0, 1.0), uid=[0], @@ -519,7 +519,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.ChoiceParam( name='storageDataType', - label='Storage Data Type for EXR output', + label='Storage Data Type For EXR Output', description='Storage image data type:\n' ' * float: Use full floating point (32 bits per channel)\n' ' * half: Use half float (16 bits per channel)\n' @@ -585,8 +585,8 @@ class ImageProcessing(desc.AVCommandLineNode): outputs = [ desc.File( name='outSfMData', - label='SfmData', - description='Output sfmData.', + label='SfMData', + description='Output SfMData.', value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', uid=[], group='', # do not export on the command line From 84d064d606490490d9a3c14d79738b0b553808d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Tue, 17 Jan 2023 14:00:33 +0100 Subject: [PATCH 0800/1093] [nodes] DepthMap: Add sgmMaxSimilarity parameter --- meshroom/aliceVision/DepthMap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 7161fbcd78..872fe4258a 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -188,6 +188,15 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='sgmMaxSimilarity', + label='Max Similarity', + description='Maximum similarity threshold (between 0 and 1) used to filter out poorly supported depth values.', + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0], + advanced=True, + ), desc.FloatParam( name='sgmGammaC', label='GammaC', From b5f84cbb350e9c6d6075630f358e7eba6161954e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:48:55 +0100 Subject: [PATCH 0801/1093] [nodes] DepthMap: Add refineInterpolateMiddleDepth parameter --- meshroom/aliceVision/DepthMap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 872fe4258a..44b555ecdc 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -362,6 +362,13 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, enabled= lambda node: node.refine.refineEnabled.value, ), + desc.BoolParam( + name='refineInterpolateMiddleDepth', + label='Interpolate Middle Depth', + description='Enable middle depth bilinear interpolation.', + value=False, + uid=[0], + ), ]), desc.GroupAttribute( name="colorOptimization", From 6e8ea5160b2b8a4ea212a088522f21f78547870c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:49:34 +0100 Subject: [PATCH 0802/1093] [nodes] DepthMap: Add exportIntermediateNormalMaps parameter --- meshroom/aliceVision/DepthMap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 44b555ecdc..173ef50db3 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -410,6 +410,14 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='exportIntermediateNormalMaps', + label='Export Normal Maps', + description='Export intermediate normal maps from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), desc.BoolParam( name='exportIntermediateVolumes', label='Export Volumes', From dbdc618acd38ebb25a7efe654faba78c11d3c089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:50:17 +0100 Subject: [PATCH 0803/1093] [nodes] DepthMap: Add exportIntermediateTopographicCutVolumes parameter --- meshroom/aliceVision/DepthMap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 173ef50db3..0fc3a93095 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -434,6 +434,14 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='exportIntermediateTopographicCutVolumes', + label='Export Cut Volumes', + description='Export intermediate similarity topographic cut volumes from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), desc.BoolParam( name='exportIntermediateVolume9pCsv', label='Export 9 Points', From 242c8ef9b288d370281df233b71af1562adafded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:50:54 +0100 Subject: [PATCH 0804/1093] [nodes] DepthMap: Add sgmDepthThiknessInflate parameter --- meshroom/aliceVision/DepthMap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 0fc3a93095..f204bfcd7a 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -188,6 +188,15 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='sgmDepthThiknessInflate', + label='Thikness Inflate', + description='Inflate factor to add margins to the depth thikness.', + value=0.0, + range=(0.0, 2.0, 0.1), + uid=[0], + advanced=True, + ), desc.FloatParam( name='sgmMaxSimilarity', label='Max Similarity', From 513db5996124d7b426b1ed1313750874cc213171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:27:55 +0200 Subject: [PATCH 0805/1093] [nodes] DepthMap: Add useConsistentScale parameters --- meshroom/aliceVision/DepthMap.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index f204bfcd7a..d8efc14d20 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -267,6 +267,13 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='sgmUseConsistentScale', + label='Consistent Scale', + description='Compare patch with consistent scale for similarity volume computation.', + value=False, + uid=[0], + ), ]), desc.GroupAttribute( name='refine', @@ -377,6 +384,15 @@ class DepthMap(desc.AVCommandLineNode): description='Enable middle depth bilinear interpolation.', value=False, uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.BoolParam( + name='refineUseConsistentScale', + label='Consistent Scale', + description='Compare patch with consistent scale for similarity volume computation.', + value=False, + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, ), ]), desc.GroupAttribute( From 066fa40beaeb19a883b823d0f03ca338d8b95d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:28:32 +0200 Subject: [PATCH 0806/1093] [nodes] DepthMap: Add customPatchPattern group parameter --- meshroom/aliceVision/DepthMap.py | 89 ++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index d8efc14d20..157aa4ab11 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -419,6 +419,95 @@ class DepthMap(desc.AVCommandLineNode): enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, ), ]), + desc.GroupAttribute( + name='customPatchPattern', + label='Custom Patch Pattern', + description='User custom patch pattern for similarity comparison.', + advanced=True, + group=None, + groupDesc=[ + desc.BoolParam( + name='sgmUseCustomPatchPattern', + label='Enable for SGM', + description='Enable custom patch pattern for similarity volume computation at the SGM step .', + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='refineUseCustomPatchPattern', + label='Enable for Refine', + description='Enable custom patch pattern for similarity volume computation at the Refine step .', + value=False, + uid=[0], + advanced=True, + ), + desc.ListAttribute( + name="customPatchPatternSubparts", + label="Subparts", + description='User custom patch pattern subparts for similarity volume computation.', + advanced=True, + enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + elementDesc=desc.GroupAttribute( + name='customPatchPatternSubpart', + label='Patch Pattern Subpart', + description='', + joinChar=":", + group=None, + groupDesc=[ + desc.ChoiceParam( + name='customPatchPatternSubpartType', + label='Type', + description='Patch pattern subpart type.', + value='full', + values=['full', 'circle'], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name='customPatchPatternSubpartRadius', + label='Radius / WSH', + description='Patch pattern subpart half-width or circle radius.', + value=2.5, + range=(0.5, 30.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='customPatchPatternSubpartNbCoords', + label='Coordinates', + description='Patch pattern subpart number of coordinates (for circle or ignore).', + value=12, + range=(3, 24, 1), + uid=[0], + ), + desc.IntParam( + name='customPatchPatternSubpartLevel', + label='Level', + description='Patch pattern subpart image level.', + value=0, + range=(0, 2, 1), + uid=[0], + ), + desc.FloatParam( + name='customPatchPatternSubpartWeight', + label='Weight', + description='Patch pattern subpart weight.', + value=1.0, + range=(0.0, 1.0, 0.1), + uid=[0], + ), + ]), + ), + desc.BoolParam( + name='customPatchPatternGroupSubpartsPerLevel', + label='Group Subparts Per Level', + description='Group all subparts with the same image level.', + value=False, + uid=[0], + advanced=True, + enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + ), + ]), desc.GroupAttribute( name='intermediateResults', label='Intermediate Results', From f191ecc62fa3ede4eadfc7dfd88a781b071ae2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Fri, 14 Apr 2023 17:18:38 +0200 Subject: [PATCH 0807/1093] [nodes] DepthMap: Update SGM depth map path pattern --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 157aa4ab11..ee29979dfd 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -636,7 +636,7 @@ class DepthMap(desc.AVCommandLineNode): label='Depth Maps SGM', description='Debug: Depth maps SGM', semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_scale2_sgm.exr', + value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_sgm.exr', uid=[], group='', # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, From 39313ee1a20ae3932c6c8301f5a4f560d5474f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= <gregoire-dl@users.noreply.github.com> Date: Fri, 14 Apr 2023 19:07:02 +0200 Subject: [PATCH 0808/1093] [nodes] DepthMap: Fix Thickness spelling error --- meshroom/aliceVision/DepthMap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index ee29979dfd..004e74471a 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -189,9 +189,9 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, ), desc.FloatParam( - name='sgmDepthThiknessInflate', - label='Thikness Inflate', - description='Inflate factor to add margins to the depth thikness.', + name='sgmDepthThicknessInflate', + label='Thickness Inflate', + description='Inflate factor to add margins to the depth thickness.', value=0.0, range=(0.0, 2.0, 0.1), uid=[0], From 3a2fedf8c2be005b79aa3dd811a9c42768f82ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 8 Jun 2023 19:47:34 +0200 Subject: [PATCH 0809/1093] [nodes] DepthMap: Update the node's version --- meshroom/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 004e74471a..30f5dc3bba 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" from meshroom.core import desc From 0909c189d4c623715c0c9640f6982d3990147192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 8 Jun 2023 19:48:22 +0200 Subject: [PATCH 0810/1093] [pipelines] Update DepthMap's version in templates --- meshroom/cameraTracking.mg | 2 +- meshroom/photogrammetry.mg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index d37dc46884..1f3bf5e70e 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -7,7 +7,7 @@ "nodesVersions": { "FeatureExtraction": "1.1", "CameraInit": "9.0", - "DepthMap": "3.0", + "DepthMap": "4.0", "SfMTriangulation": "1.0", "ExportDistortion": "1.0", "DepthMapFilter": "3.0", diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index a8fb773ad1..272e1eff66 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -9,7 +9,7 @@ "MeshFiltering": "3.0", "Texturing": "6.0", "PrepareDenseScene": "3.0", - "DepthMap": "3.0", + "DepthMap": "4.0", "StructureFromMotion": "3.0", "CameraInit": "9.0", "ImageMatching": "2.0", From 8d908e697ef8e260e694da7108719e6380250d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 9 Jun 2023 16:32:32 +0200 Subject: [PATCH 0811/1093] [nodes] DepthMap: Fix UIDs of intermediate export attributes --- meshroom/aliceVision/DepthMap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 30f5dc3bba..7959096567 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -529,7 +529,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Normal Maps', description='Export intermediate normal maps from the SGM and Refine steps.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam( @@ -553,7 +553,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Cut Volumes', description='Export intermediate similarity topographic cut volumes from the SGM and Refine steps.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam( From 362c554878cfda1663f4aa81e7b167f92b1e8991 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 14 Mar 2023 18:08:44 +0100 Subject: [PATCH 0812/1093] [Node] FeatureExtraction: Add working color space --- meshroom/aliceVision/FeatureExtraction.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 3c20a690c0..04dd2cb774 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -120,6 +120,15 @@ class FeatureExtraction(desc.AVCommandLineNode): advanced=True, uid=[0], ), + desc.ChoiceParam( + name='workingColorSpace', + label='Working Color Space', + description='Allows you to choose the color space in which the data are processed.', + value='sRGB', + values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + exclusive=True, + uid=[0], + ), desc.BoolParam( name='forceCpuExtraction', label='Force CPU Extraction', From 3cb09a6fe8a18dcc7ca4af2ea9fa589af5fa63c7 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 14 Mar 2023 20:30:05 +0100 Subject: [PATCH 0813/1093] [Node] panoramaWarping: Add output color space option --- meshroom/aliceVision/PanoramaWarping.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index c103a355f8..7d62be5a25 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -66,6 +66,15 @@ class PanoramaWarping(desc.AVCommandLineNode): enabled=lambda node: (node.estimateResolution.value), ), desc.ChoiceParam( + name='outputColorSpace', + label='Output Color Space', + description='Allows you to choose the color space of the output image.', + value='Linear', + values=['Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( name='storageDataType', label='Storage Data Type', description='Storage image data type:\n' From 834b66752a24b6d62a616aeb7582e16bdb2313ec Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 15 Mar 2023 18:49:48 +0100 Subject: [PATCH 0814/1093] [Node] cameraInit: Add dcpMetadata as choice for raw color interpretation option. --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index a5294df4b9..b64943b98a 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -256,7 +256,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): 'DCPLinearProcessing: Use DCP color profile.\n' 'DCPMetadata: Same as None with DCP info added in metadata.', value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', - values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing'], + values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], exclusive=True, uid=[0], ), From 847e49f0b926da95c5cc0c6b48d9aab8f5c464ba Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 24 Mar 2023 17:18:26 +0100 Subject: [PATCH 0815/1093] [Nodes] PanoramaWarping: rename outputColorSpace in workingColorSpace --- meshroom/aliceVision/PanoramaWarping.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 7d62be5a25..d4e847233e 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -66,9 +66,9 @@ class PanoramaWarping(desc.AVCommandLineNode): enabled=lambda node: (node.estimateResolution.value), ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', - description='Allows you to choose the color space of the output image.', + name='workingColorSpace', + label='Working Color Space', + description='Allows you to choose the color space of the output image in which the stitching will be done.', value='Linear', values=['Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, From 7646167ce56e9adc434fd2c67d6ad7b92671b347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 9 Jun 2023 19:20:00 +0200 Subject: [PATCH 0816/1093] [nodes] PanoramaWarping: Update version and parameter description --- meshroom/aliceVision/PanoramaWarping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index d4e847233e..2d09e69c86 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "1.1" import json import os @@ -68,7 +68,7 @@ class PanoramaWarping(desc.AVCommandLineNode): desc.ChoiceParam( name='workingColorSpace', label='Working Color Space', - description='Allows you to choose the color space of the output image in which the stitching will be done.', + description='Colorspace in which the panorama warping will be performed.', value='Linear', values=['Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], exclusive=True, From 896c7d9a7f77936dd4bb935075131bfe7beacddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 9 Jun 2023 19:20:10 +0200 Subject: [PATCH 0817/1093] [nodes] FeatureExtraction: Update version --- meshroom/aliceVision/FeatureExtraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 04dd2cb774..7b744a5e57 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -1,4 +1,4 @@ -__version__ = "1.1" +__version__ = "1.2" from meshroom.core import desc From 3629c45df768130c9879e5124056a6f92fb141b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 9 Jun 2023 19:23:31 +0200 Subject: [PATCH 0818/1093] [pipelines] Update versions for `FeatureExtraction` and `PanoramaWarping` --- meshroom/cameraTracking.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 4 ++-- meshroom/panoramaHdr.mg | 4 ++-- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 2 +- meshroom/photogrammetryDraft.mg | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index d37dc46884..7c9a5e854f 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,7 +5,7 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "FeatureExtraction": "1.1", + "FeatureExtraction": "1.2", "CameraInit": "9.0", "DepthMap": "3.0", "SfMTriangulation": "1.0", diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 4b51b123a6..84f8131d20 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -14,9 +14,9 @@ "SfMTransform": "3.0", "PanoramaPostProcessing": "1.0", "ImageMatching": "2.0", - "FeatureExtraction": "1.1", + "FeatureExtraction": "1.2", "PanoramaPrepareImages": "1.1", - "PanoramaWarping": "1.0", + "PanoramaWarping": "1.1", "Publish": "1.3" }, "releaseVersion": "2023.1.0", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 5969a1712e..5e77f91e89 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -14,9 +14,9 @@ "SfMTransform": "3.0", "PanoramaPostProcessing": "1.0", "ImageMatching": "2.0", - "FeatureExtraction": "1.1", + "FeatureExtraction": "1.2", "PanoramaPrepareImages": "1.1", - "PanoramaWarping": "1.0", + "PanoramaWarping": "1.1", "Publish": "1.3" }, "releaseVersion": "2023.1.0", diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index a8fb773ad1..909c3eb268 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -13,7 +13,7 @@ "StructureFromMotion": "3.0", "CameraInit": "9.0", "ImageMatching": "2.0", - "FeatureExtraction": "1.1", + "FeatureExtraction": "1.2", "Meshing": "7.0", "DepthMapFilter": "3.0", "Publish": "1.3" diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index c15695c2bb..403b86402b 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -7,7 +7,7 @@ "nodesVersions": { "Publish": "1.3", "StructureFromMotion": "3.0", - "FeatureExtraction": "1.1", + "FeatureExtraction": "1.2", "FeatureMatching": "2.0", "CameraInit": "9.0", "ImageMatchingMultiSfM": "1.0", diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 70184e0796..cc7cac1c17 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -7,7 +7,7 @@ "StructureFromMotion": "3.0", "CameraInit": "9.0", "ImageMatching": "2.0", - "FeatureExtraction": "1.1", + "FeatureExtraction": "1.2", "Meshing": "7.0", "Publish": "1.3" }, From 0c37b007377c2f7a773a3452906846c7f90ee54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 13 Jun 2023 11:56:27 +0200 Subject: [PATCH 0819/1093] [blender] preview: clear loaded images to avoid memory leak --- meshroom/blender/scripts/preview.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 30e24f36ed..64bb72ee13 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -151,12 +151,11 @@ def setupBackground(view, folderUndistorted): matches = glob.glob(folderUndistorted + '/*' + baseImgName + "*") # try with image name if len(matches) == 0: # no background image found - return False + return None undistortedImgPath = matches[0] - bpy.ops.image.open(filepath=undistortedImgPath) - undistortedImgName = os.path.basename(undistortedImgPath) - bpy.context.scene.node_tree.nodes["Image"].image = bpy.data.images[undistortedImgName] - return True + img = bpy.data.images.load(filepath=undistortedImgPath) + bpy.context.scene.node_tree.nodes["Image"].image = img + return img def loadModel(filename): @@ -335,14 +334,20 @@ def main(): continue print("Rendering view " + view['viewId']) + img = None if args.useBackground: - if not setupBackground(view, args.undistortedImages): + img = setupBackground(view, args.undistortedImages) + if not img: # background setup failed # do not render this frame continue setupRender(view, intrinsic, pose, args.output) bpy.ops.render.render(write_still=True) + if img: + # clear memory + bpy.data.images.remove(img) + print("Done") return 0 From 64934591f784044d555c0f29a143fd282e2564c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 8 Jun 2023 14:19:54 +0200 Subject: [PATCH 0820/1093] [pipelines] new photogrammetry and camera tracking pipeline --- meshroom/photogrammetryAndCameraTracking.mg | 464 +++++++++++++++++--- 1 file changed, 391 insertions(+), 73 deletions(-) diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 403b86402b..8d5d9fd692 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,21 +1,89 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0-develop", + "releaseVersion": "2023.2.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "Publish": "1.3", - "StructureFromMotion": "3.0", - "FeatureExtraction": "1.2", - "FeatureMatching": "2.0", + "MeshDecimate": "1.0", + "DepthMap": "4.0", + "MeshFiltering": "3.0", + "ApplyCalibration": "1.0", "CameraInit": "9.0", + "ScenePreview": "1.0", + "StructureFromMotion": "3.1", + "PrepareDenseScene": "3.0", + "Publish": "1.3", + "ExportAnimatedCamera": "2.0", + "Texturing": "6.0", + "DepthMapFilter": "3.0", "ImageMatchingMultiSfM": "1.0", + "CheckerboardDetection": "1.0", + "ExportDistortion": "1.0", + "FeatureMatching": "2.0", "ImageMatching": "2.0", - "ExportAnimatedCamera": "2.0" + "ConvertSfMFormat": "2.0", + "FeatureExtraction": "1.2", + "KeyframeSelection": "4.1", + "Meshing": "7.0", + "DistortionCalibration": "3.0" } }, "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -200, + 0 + ], + "inputs": {}, + "internalInputs": { + "label": "InitShot" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 200, + 200 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingKeyframes" + } + }, + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 1000, + 200 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{StructureFromMotion_2.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + } + }, "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ @@ -23,144 +91,394 @@ 0 ], "inputs": { - "input": "{FeatureExtraction_1.input}", + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", "featuresFolders": [ "{FeatureExtraction_1.output}" - ] + ], + "method": "Exhaustive" + }, + "internalInputs": { + "label": "ImageMatchingKeyframes" } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", "position": [ 200, 0 ], "inputs": { - "input": "{CameraInit_1.output}" + "inputPaths": [ + "{ApplyCalibration_1.output}" + ] } }, - "StructureFromMotion_1": { - "nodeType": "StructureFromMotion", + "MeshDecimate_1": { + "nodeType": "MeshDecimate", "position": [ - 800, - 0 + 1947, + 123 ], "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}" + "input": "{MeshFiltering_2.outputMesh}", + "simplificationFactor": 0.05 + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 2362, + -139 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}", + "{Texturing_2.output}" + ] } }, "ExportAnimatedCamera_1": { "nodeType": "ExportAnimatedCamera", "position": [ - 1629, - 212 + 1600, + 200 ], "inputs": { - "input": "{StructureFromMotion_2.output}", - "sfmDataFilter": "{StructureFromMotion_1.output}" + "input": "{StructureFromMotion_1.output}", + "sfmDataFilter": "{ImageMatchingMultiSfM_2.inputB}", + "exportUndistortedImages": true } }, - "CameraInit_1": { - "nodeType": "CameraInit", + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + -400, + -160 + ], + "inputs": { + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true + } + }, + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", + "position": [ + -200, + -160 + ], + "inputs": { + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 0, + -160 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + } + }, + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", "position": [ 0, 0 ], - "inputs": {} + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" + } }, - "ImageMatchingMultiSfM_1": { - "nodeType": "ImageMatchingMultiSfM", + "ScenePreview_1": { + "nodeType": "ScenePreview", "position": [ - 1029, - 212 + 2148, + 211 ], "inputs": { - "input": "{FeatureExtraction_2.input}", - "inputB": "{StructureFromMotion_1.output}", - "featuresFolders": [ - "{FeatureExtraction_2.output}" + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 1948, + 211 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "sfm", + "describerTypes": "{StructureFromMotion_1.describerTypes}", + "structure": false, + "observations": false + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", + "position": [ + 1400, + 200 + ], + "inputs": { + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_3.output}", + "{FeatureMatching_2.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "nbFirstUnstableCameras": 0, + "maxImagesPerGroup": 0, + "bundleAdjustmentMaxOutliers": -1, + "minInputTrackLength": 5, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the complete camera tracking sequence." + } + }, + "StructureFromMotion_2": { + "nodeType": "StructureFromMotion", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{FeatureMatching_5.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}", + "{FeatureMatching_5.output}" ], - "nbMatches": 5, - "nbNeighbors": 10 + "describerTypes": "{FeatureMatching_1.describerTypes}", + "lockScenePreviouslyReconstructed": true + }, + "internalInputs": { + "comment": "Solve all keyframes first.", + "label": "StructureFromMotionKeyframes" } }, - "FeatureMatching_1": { + "FeatureMatching_2": { "nodeType": "FeatureMatching", "position": [ - 600, - 0 + 1200, + 360 ], "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames" } }, - "Publish_1": { - "nodeType": "Publish", + "ImageMatching_2": { + "nodeType": "ImageMatching", "position": [ - 1829, - 212 + 1000, + 360 ], "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}" - ] + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 } }, "CameraInit_2": { "nodeType": "CameraInit", "position": [ - -2, - 223 + -600, + -160 + ], + "inputs": {}, + "internalInputs": { + "label": "InitLensGrid" + } + }, + "Texturing_2": { + "nodeType": "Texturing", + "position": [ + 1406, + -584 + ], + "inputs": { + "input": "{Meshing_2.output}", + "imagesFolder": "{DepthMap_2.imagesFolder}", + "inputMesh": "{MeshFiltering_2.outputMesh}" + } + }, + "Meshing_2": { + "nodeType": "Meshing", + "position": [ + 1006, + -584 ], - "inputs": {} + "inputs": { + "input": "{DepthMapFilter_2.input}", + "depthMapsFolder": "{DepthMapFilter_2.output}" + } + }, + "DepthMapFilter_2": { + "nodeType": "DepthMapFilter", + "position": [ + 806, + -584 + ], + "inputs": { + "input": "{DepthMap_2.input}", + "depthMapsFolder": "{DepthMap_2.output}" + } }, "FeatureExtraction_2": { "nodeType": "FeatureExtraction", "position": [ - 198, - 223 + -394, + -584 ], "inputs": { - "input": "{CameraInit_2.output}" + "input": "{CameraInit_3.output}" } }, - "FeatureMatching_2": { + "PrepareDenseScene_2": { + "nodeType": "PrepareDenseScene", + "position": [ + 406, + -584 + ], + "inputs": { + "input": "{StructureFromMotion_3.output}" + } + }, + "DepthMap_2": { + "nodeType": "DepthMap", + "position": [ + 606, + -584 + ], + "inputs": { + "input": "{PrepareDenseScene_2.input}", + "imagesFolder": "{PrepareDenseScene_2.output}" + } + }, + "MeshFiltering_2": { + "nodeType": "MeshFiltering", + "position": [ + 1206, + -584 + ], + "inputs": { + "inputMesh": "{Meshing_2.outputMesh}" + } + }, + "ImageMatchingMultiSfM_2": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 401, + -299 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "inputB": "{StructureFromMotion_3.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b" + } + }, + "FeatureMatching_3": { "nodeType": "FeatureMatching", "position": [ - 1229, - 212 + 1200, + 200 ], "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "describerTypes": "{FeatureExtraction_2.describerTypes}" + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes" } }, - "StructureFromMotion_2": { + "ImageMatching_3": { + "nodeType": "ImageMatching", + "position": [ + -194, + -584 + ], + "inputs": { + "input": "{FeatureExtraction_2.input}", + "featuresFolders": [ + "{FeatureExtraction_2.output}" + ] + } + }, + "StructureFromMotion_3": { "nodeType": "StructureFromMotion", "position": [ - 1429, - 212 + 206, + -584 ], "inputs": { - "input": "{FeatureMatching_2.input}", - "featuresFolders": "{FeatureMatching_2.featuresFolders}", + "input": "{FeatureMatching_4.input}", + "featuresFolders": "{FeatureMatching_4.featuresFolders}", "matchesFolders": [ - "{FeatureMatching_2.output}" + "{FeatureMatching_4.output}" ], - "describerTypes": "{FeatureMatching_2.describerTypes}", - "minInputTrackLength": 5, - "minNumberOfObservationsForTriangulation": 3, - "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 + "describerTypes": "{FeatureMatching_4.describerTypes}" + } + }, + "CameraInit_3": { + "nodeType": "CameraInit", + "position": [ + -594, + -584 + ], + "inputs": {}, + "internalInputs": { + "label": "InitPhotogrammetry" + } + }, + "FeatureMatching_4": { + "nodeType": "FeatureMatching", + "position": [ + 6, + -584 + ], + "inputs": { + "input": "{ImageMatching_3.input}", + "featuresFolders": "{ImageMatching_3.featuresFolders}", + "imagePairsList": "{ImageMatching_3.output}", + "describerTypes": "{FeatureExtraction_2.describerTypes}" + } + }, + "FeatureMatching_5": { + "nodeType": "FeatureMatching", + "position": [ + 607, + -300 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_2.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_2.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_2.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" } } } From 01b9a6f48c3a66c79624412673f8e571e68a05aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 15 Jun 2023 11:28:38 +0200 Subject: [PATCH 0821/1093] [nodes] SfM: extend nbFirstUnstableCamera range to 0 --- meshroom/aliceVision/StructureFromMotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 94dd279ad0..06f7518ec6 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -176,7 +176,7 @@ class StructureFromMotion(desc.AVCommandLineNode): 'This leads to more stable results while computations are not too expensive, as there is little data.\n' 'Past this number, the bundle adjustment will only be performed once for N added cameras.', value=30, - range=(1, 100, 1), + range=(0, 100, 1), uid=[0], advanced=True ), From af5518dbac23dac00ec2b7ed89ae683f202b20a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 15 Jun 2023 12:01:37 +0200 Subject: [PATCH 0822/1093] [nodes] SfM: extend maxImagesPerGroup range to 0 --- meshroom/aliceVision/StructureFromMotion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 06f7518ec6..a78f9dd650 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -186,7 +186,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description='Maximum number of cameras that can be added before the bundle adjustment has to be performed again.\n' 'This prevents adding too much data at once without performing the bundle adjustment.', value=30, - range=(1, 100, 1), + range=(0, 100, 1), uid=[0], advanced=True ), From a8377c1d8876408dae084bd25be040931cbef310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 14 Jun 2023 12:18:54 +0200 Subject: [PATCH 0823/1093] [pipelines] cameraTracking: change StructureFromMotion parameters --- meshroom/cameraTracking.mg | 39 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index b77218bb90..4c950d6d8f 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,30 +5,30 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { + "ImageMatching": "2.0", + "ConvertSfMFormat": "2.0", + "ExportDistortion": "1.0", + "SfMTransfer": "2.1", + "KeyframeSelection": "4.1", "FeatureExtraction": "1.2", - "CameraInit": "9.0", + "DistortionCalibration": "3.0", + "Meshing": "7.0", + "MeshDecimate": "1.0", "DepthMap": "4.0", + "MeshFiltering": "3.0", "SfMTriangulation": "1.0", - "ExportDistortion": "1.0", - "DepthMapFilter": "3.0", - "DistortionCalibration": "3.0", - "PrepareDenseScene": "3.0", - "KeyframeSelection": "4.1", - "Publish": "1.3", + "Texturing": "6.0", "StructureFromMotion": "3.1", - "CheckerboardDetection": "1.0", - "ImageMatchingMultiSfM": "1.0", + "CameraInit": "9.0", "ApplyCalibration": "1.0", - "Texturing": "6.0", + "PrepareDenseScene": "3.0", + "Publish": "1.3", "ExportAnimatedCamera": "2.0", - "Meshing": "7.0", - "MeshDecimate": "1.0", + "DepthMapFilter": "3.0", "ScenePreview": "1.0", - "ConvertSfMFormat": "2.0", - "MeshFiltering": "3.0", - "FeatureMatching": "2.0", - "ImageMatching": "2.0", - "SfMTransfer": "2.1" + "ImageMatchingMultiSfM": "1.0", + "CheckerboardDetection": "1.0", + "FeatureMatching": "2.0" } }, "graph": { @@ -330,6 +330,9 @@ "{FeatureMatching_2.output}" ], "describerTypes": "{FeatureMatching_3.describerTypes}", + "nbFirstUnstableCameras": 0, + "maxImagesPerGroup": 0, + "bundleAdjustmentMaxOutliers": -1, "minInputTrackLength": 5, "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, @@ -416,4 +419,4 @@ } } } -} +} \ No newline at end of file From 002aa5fdf35f0982375c11ef6fd5dcd495fefcaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 15 Jun 2023 13:06:03 +0200 Subject: [PATCH 0824/1093] [nodes] A-C: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/aliceVision/ApplyCalibration.py | 33 ++- meshroom/aliceVision/CameraCalibration.py | 162 ++++++----- meshroom/aliceVision/CameraInit.py | 269 +++++++++--------- meshroom/aliceVision/CameraLocalization.py | 267 ++++++++--------- meshroom/aliceVision/CameraRigCalibration.py | 212 +++++++------- meshroom/aliceVision/CameraRigLocalization.py | 220 +++++++------- .../aliceVision/ColorCheckerCorrection.py | 70 +++-- meshroom/aliceVision/ColorCheckerDetection.py | 38 ++- meshroom/aliceVision/ConvertMesh.py | 40 +-- meshroom/aliceVision/ConvertSfMFormat.py | 90 +++--- 10 files changed, 745 insertions(+), 656 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 43c88b4e88..e50ee4839f 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -13,27 +13,36 @@ class ApplyCalibration(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='calibration', - label='Calibration', - description='Calibration SfMData file.', - value='', + name="calibration", + label="Calibration", + description="Calibration SfMData 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='SfMData File', - description='Path to the output SfMData file.', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="output", + label="SMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 86a647f04c..38af3adb83 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -7,123 +7,139 @@ class CameraCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_cameraCalibration {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input', - description='''Input images in one of the following form: - - folder containing images - - image sequence like "/path/to/seq.@.jpg" - - video file''', - value='', + name="input", + label="Input", + description="Input images in one of the following form:\n" + " - folder containing images.\n" + " - image sequence like \"/path/to/seq.@.jpg\".\n" + " - video file.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='pattern', - label='Pattern', - description='''Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).''', - value='CHESSBOARD', - values=['CHESSBOARD', 'CIRCLES', 'ASYMMETRIC_CIRCLES', 'ASYMMETRIC_CCTAG'], + name="pattern", + label="Pattern", + description="Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).", + value="CHESSBOARD", + values=["CHESSBOARD", "CIRCLES", "ASYMMETRIC_CIRCLES", "ASYMMETRIC_CCTAG"], exclusive=True, uid=[0], - ), - desc.GroupAttribute(name="size", label="Size", description="Number of inner corners per one of board dimension like W H.", groupDesc=[ - desc.IntParam( - name='width', - label='Width', - description='', - value=7, - range=(0, 10000, 1), - uid=[0], + ), + desc.GroupAttribute( + name="size", + label="Size", + description="Number of inner corners per one of board dimension like W H.", + groupDesc=[ + desc.IntParam( + name="width", + label="Width", + description="", + value=7, + range=(0, 10000, 1), + uid=[0], ), - desc.IntParam( - name='height', - label='Height', - description='', - value=5, - range=(0, 10000, 1), - uid=[0], + desc.IntParam( + name="height", + label="Height", + description="", + value=5, + range=(0, 10000, 1), + uid=[0], ), - ]), + ] + ), desc.FloatParam( - name='squareSize', - label='Square Size', - description='''Size of the grid's square cells (mm).''', + name="squareSize", + label="Square Size", + description="Size of the grid's square cells (mm).", value=1.0, range=(0.0, 100.0, 1.0), uid=[0], - ), + ), desc.IntParam( - name='nbDistortionCoef', - label='Nb Distortion Coef', - description='''Number of distortion coefficient.''', + name="nbDistortionCoef", + label="Nb Distortion Coef", + description="Number of distortion coefficients.", value=3, range=(0, 5, 1), uid=[0], - ), + ), desc.IntParam( - name='maxFrames', - label='Max Frames', - description='''Maximal number of frames to extract from the video file.''', + name="maxFrames", + label="Max Frames", + description="Maximum number of frames to extract from the video file.", value=0, range=(0, 5, 1), uid=[0], - ), + ), desc.IntParam( - name='maxCalibFrames', - label='Max Calib Frames', - description='''Maximal number of frames to use to calibrate from the selected frames.''', + name="maxCalibFrames", + label="Max Calib Frames", + description="Maximum number of frames to use to calibrate from the selected frames.", value=100, range=(0, 1000, 1), uid=[0], - ), + ), desc.IntParam( - name='calibGridSize', - label='Calib Grid Size', - description='''Define the number of cells per edge.''', + name="calibGridSize", + label="Calib Grid Size", + description="Define the number of cells per edge.", value=10, range=(0, 50, 1), uid=[0], - ), + ), desc.IntParam( - name='minInputFrames', - label='Min Input Frames', - description='''Minimal number of frames to limit the refinement loop.''', + name="minInputFrames", + label="Min Input Frames", + description="Minimum number of frames to limit the refinement loop.", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.FloatParam( - name='maxTotalAvgErr', - label='Max Total Avg Err', - description='''Max Total Average Error.''', + name="maxTotalAvgErr", + label="Max Total Avg Err", + description="Maximum total average error.", value=0.10000000000000001, range=(0.0, 1.0, 0.01), uid=[0], - ), + ), desc.File( - name='debugRejectedImgFolder', - label='Debug Rejected Img Folder', - description='''Folder to export delete images during the refinement loop.''', - value='', + name="debugRejectedImgFolder", + label="Debug Rejected Img Folder", + description="Folder to export images that were deleted during the refinement loop.", + value="", uid=[0], - ), + ), desc.File( - name='debugSelectedImgFolder', - label='Debug Selected Img Folder', - description='''Folder to export debug images.''', - value='', + name="debugSelectedImgFolder", + label="Debug Selected Img Folder", + description="Folder to export debug images.", + 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', - description='''Output filename for intrinsic [and extrinsic] parameters.''', - value=desc.Node.internalFolder + '/cameraCalibration.cal', + name="output", + label="Output", + description="Output filename for intrinsic [and extrinsic] parameters.", + value=desc.Node.internalFolder + "/cameraCalibration.cal", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index b64943b98a..84764376ef 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -11,86 +11,88 @@ from meshroom.multiview import FilesByType, findFilesByTypeInFolder Viewpoint = [ - desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=None), - desc.IntParam(name="poseId", label="Pose Id", description="Pose Id", value=-1, uid=[0], range=None), - desc.File(name="path", label="Image Path", description="Image Filepath", value="", uid=[0]), - desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=None), - desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=None), - desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=None), + desc.IntParam(name="viewId", label="ID", description="Image UID.", value=-1, uid=[0], range=None), + desc.IntParam(name="poseId", label="Pose ID", description="Pose ID.", value=-1, uid=[0], range=None), + desc.File(name="path", label="Image Path", description="Image filepath.", value="", uid=[0]), + desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal camera parameters.", value=-1, uid=[0], range=None), + desc.IntParam(name="rigId", label="Rig", description="Rig parameters.", value=-1, uid=[0], range=None), + desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig sub-pose parameters.", value=-1, uid=[0], range=None), desc.StringParam(name="metadata", label="Image Metadata", - description="The configuration of the Viewpoints is based on the images metadata.\n" + description="The configuration of the Viewpoints is based on the images' metadata.\n" "The important ones are:\n" - " * Focal Length: the focal length in mm.\n" - " * Make and Model: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database.\n" - " * Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately.", + " - Focal Length: the focal length in mm.\n" + " - Make and Model: this information allows to convert the focal in mm into a focal length in pixels using " + "an embedded sensor database.\n" + " - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be " + "differentiated and their internal parameters are optimized separately.", value="", uid=[], advanced=True), ] Intrinsic = [ - desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=None), + desc.IntParam(name="intrinsicId", label="ID", description="Intrinsic UID.", value=-1, uid=[0], range=None), desc.FloatParam(name="initialFocalLength", label="Initial Focal Length", - description="Initial Guess on the Focal Length (in pixels). \n" - "When we have an initial value from EXIF, this value is not accurate but cannot be wrong. \n" - "So this value is used to limit the range of possible values in the optimization. \n" - "If you put -1, this value will not be used and the focal length will not be bounded.", + description="Initial guess on the focal length (in pixels).\n" + "When we have an initial value from EXIF, this value is not accurate but it cannot be wrong.\n" + "So this value is used to limit the range of possible values in the optimization.\n" + "If this value is set to -1, it will not be used and the focal length will not be bounded.", value=-1.0, uid=[0], range=None), - desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), - desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), - desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', - description='the pixelRatio value is locked for estimation', + desc.FloatParam(name="focalLength", label="Focal Length", description="Known/calibrated focal length (in mm).", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), + desc.FloatParam(name="pixelRatio", label="Pixel Ratio", description="Ratio between the pixel width and the pixel height.", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), + desc.BoolParam(name='pixelRatioLocked', label='Pixel Ratio Locked', + description='The pixel ratio value is locked for estimation.', value=True, uid=[0]), desc.ChoiceParam(name="type", label="Camera Type", - description="Mathematical Model used to represent a camera:\n" - " * pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" - " * radial1: Pinhole camera with one radial distortion parameter\n" - " * radial3: Pinhole camera with 3 radial distortion parameters\n" - " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" - " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" - " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n" - " * 3deanamorphic4: Pinhole camera with a 4 anamorphic distortion coefficients.\n" - " * 3declassicld: Pinhole camera with a 10 anamorphic distortion coefficients\n" - " * 3deradial4: Pinhole camera with 3DE radial4 model\n", - value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), - desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)), - desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)), - desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)), - desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]), - desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ + description="Mathematical model used to represent a camera:\n" + " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" + " - radial1: Pinhole camera with one radial distortion parameter.\n" + " - radial3: Pinhole camera with 3 radial distortion parameters.\n" + " - brown: Pinhole camera with 3 radial and 2 tangential distortion parameters.\n" + " - fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV).\n" + " - equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV).\n" + " - 3deanamorphic4: Pinhole camera with 4 anamorphic distortion coefficients.\n" + " - 3declassicld: Pinhole camera with 10 anamorphic distortion coefficients.\n" + " - 3deradial4: Pinhole camera with 3DE radial4 model.\n", + value="", values=["", "pinhole", "radial1", "radial3", "brown", "fisheye4", "equidistant_r3", "3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, uid=[0]), + desc.IntParam(name="width", label="Width", description="Image width.", value=0, uid=[0], range=(0, 10000, 1)), + desc.IntParam(name="height", label="Height", description="Image height.", value=0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor width (in mm).", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)), + desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor height (in mm).", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)), + desc.StringParam(name="serialNumber", label="Serial Number", description="Device serial number (Camera UID and Lens UID combined).", value="", uid=[0]), + desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the optical center in the image (i.e. the sensor surface).", groupDesc=[ desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), - ]), + ]), desc.ChoiceParam(name="initializationMode", label="Initialization Mode", - description="Defines how this Intrinsic was initialized:\n" - " * calibrated: calibrated externally.\n" - " * estimated: estimated from metadata and/or sensor width \n" - " * unknown: unknown camera parameters (can still have default value guess)\n" - " * none: not set", + description="Defines how this intrinsic was initialized:\n" + " - calibrated: calibrated externally.\n" + " - estimated: estimated from metadata and/or sensor width.\n" + " - unknown: unknown camera parameters (can still have default value guess).\n" + " - none: not set.", values=("calibrated", "estimated", "unknown", "none"), value="none", exclusive=True, uid=[0], - ), + ), desc.ChoiceParam(name="distortionInitializationMode", label="Distortion Initialization Mode", - description="Defines how the distortion model and parameters was initialized:\n" - " * calibrated: calibrated externally.\n" - " * estimated: estimated from a database of generic calibration \n" - " * unknown: unknown camera parameters (can still have default value guess)\n" - " * none: not set", + description="Defines how the distortion model and parameters were initialized:\n" + " - calibrated: calibrated externally.\n" + " - estimated: estimated from a database of generic calibration.\n" + " - unknown: unknown camera parameters (can still have default value guess).\n" + " - none: not set.", values=("calibrated", "estimated", "unknown", "none"), value="none", exclusive=True, uid=[0], - ), + ), desc.ListAttribute( name="distortionParams", elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), label="Distortion Params", description="Distortion parameters.", - ), + ), desc.GroupAttribute( name="undistortionOffset", label="Undistortion Offset", @@ -99,16 +101,17 @@ desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), ] - ), + ), desc.ListAttribute( name="undistortionParams", elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), label="Undistortion Params", description="Undistortion parameters." - ), - desc.BoolParam(name='locked', label='Locked', - description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', - value=False, uid=[0]), + ), + desc.BoolParam(name="locked", label="Locked", + description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.", + value=False, uid=[0] + ), ] def readSfMData(sfmFile): @@ -163,151 +166,153 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): category = 'Sparse Reconstruction' documentation = ''' This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length -and which images are sharing the same internal camera parameters, as well as potential cameras rigs. +and which images are sharing the same internal camera parameters, as well as potential camera rigs. -When you import new images into Meshroom, this node is automatically configured from the analysis of the image metadata. +When you import new images into Meshroom, this node is automatically configured from the analysis of the images' metadata. The software can support images without any metadata but it is recommended to have them for robustness. ### Metadata -Metadata allows images to be grouped together and provides an initialization of the focal length (in pixel unit). -The metadata needed are: +Metadata allow images to be grouped together and provide an initialization of the focal length (in pixel unit). +The needed metadata are: * **Focal Length**: the focal length in mm. - * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database. + * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixels using an embedded sensor database. * **Serial Number**: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately (in the photogrammetry case). ''' inputs = [ desc.ListAttribute( name="viewpoints", - elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="", groupDesc=Viewpoint), + elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="Viewpoint.", groupDesc=Viewpoint), label="Viewpoints", - description="Input viewpoints", + description="Input viewpoints.", group="", ), desc.ListAttribute( name="intrinsics", - elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="", groupDesc=Intrinsic), + elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="Intrinsic.", groupDesc=Intrinsic), label="Intrinsics", - description="Camera Intrinsics", + description="Camera intrinsics.", group="", ), desc.File( - name='sensorDatabase', - label='Sensor Database', - description='''Camera sensor width database path.''', - value='${ALICEVISION_SENSOR_DB}', + name="sensorDatabase", + label="Sensor Database", + description="Camera sensor with database path.", + value="${ALICEVISION_SENSOR_DB}", uid=[], ), desc.File( - name='lensCorrectionProfileInfo', - label='Lens Correction Profile Info', - description='''Lens Correction Profile filepath or database directory.''', - value='${ALICEVISION_LENS_PROFILE_INFO}', + name="lensCorrectionProfileInfo", + label="LCP Info", + description="Lens Correction Profile filepath or database directory.", + value="${ALICEVISION_LENS_PROFILE_INFO}", uid=[], ), desc.BoolParam( - name='lensCorrectionProfileSearchIgnoreCameraModel', - label='LCP Generic Search', - description='The lens name and camera maker are used to match the LCP database, but the camera model is ignored.', + name="lensCorrectionProfileSearchIgnoreCameraModel", + label="LCP Generic Search", + description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.", value=True, uid=[0], advanced=True, ), desc.FloatParam( - name='defaultFieldOfView', - label='Default Field Of View', - description='Default value for the field of view (in degree) used as an initialization when there is no focal or field of view in the image metadata.', + name="defaultFieldOfView", + label="Default Field Of View", + description="Default value for the field of view (in degrees) used as an initialization value when there is no focal or field of view in the image metadata.", value=45.0, range=(0.0, 180.0, 1.0), uid=[], ), desc.ChoiceParam( - name='groupCameraFallback', - label='Group Camera Fallback', - description="If there is no serial number in image metadata, devices cannot be accurately identified.\n" + name="groupCameraFallback", + label="Group Camera Fallback", + description="If there is no serial number in the images' metadata, devices cannot be accurately identified.\n" "Therefore, internal camera parameters cannot be shared among images reliably.\n" "A fallback grouping strategy must be chosen:\n" - " * global: group images from comparable devices (same make/model/focal) globally.\n" - " * folder: group images from comparable devices only within the same folder.\n" - " * image: never group images from comparable devices", - values=['global', 'folder', 'image'], - value='folder', + " - global: group images from comparable devices (same make/model/focal) globally.\n" + " - folder: group images from comparable devices only within the same folder.\n" + " - image: never group images from comparable devices.", + values=["global", "folder", "image"], + value="folder", exclusive=True, uid=[], ), desc.ChoiceParam( - name='allowedCameraModels', - label='Allowed Camera Models', - description='the Camera Models that can be attributed.', - value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], - values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], + name="allowedCameraModels", + label="Allowed Camera Models", + description='List of the camera models that can be attributed.', + value=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], + values=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], exclusive=False, uid=[], - joinChar=',', + joinChar=",", advanced=True, ), desc.ChoiceParam( - name='rawColorInterpretation', - label='RAW Color Interpretation', - description='Allows you to choose how raw data are color processed:\n' - 'None: Debayering without any color processing.\n' - 'LibRawNoWhiteBalancing: Simple neutralization.\n' - 'LibRawWhiteBalancing: Use internal white balancing from libraw.\n' - 'DCPLinearProcessing: Use DCP color profile.\n' - 'DCPMetadata: Same as None with DCP info added in metadata.', - value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', - values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], + name="rawColorInterpretation", + label="RAW Color Interpretation", + description="Allows to choose how RAW data are color processed:\n" + " - None: Debayering without any color processing.\n" + " - LibRawNoWhiteBalancing: Simple neutralization.\n" + " - LibRawWhiteBalancing: Use internal white balancing from libraw.\n" + " - DCPLinearProcessing: Use DCP color profile.\n" + " - DCPMetadata: Same as None with DCP info added in metadata.", + value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", + values=["None", "LibRawNoWhiteBalancing", "LibRawWhiteBalancing", "DCPLinearProcessing", "DCPMetadata"], exclusive=True, uid=[0], ), desc.File( - name='colorProfileDatabase', - label='Color Profile Database', - description='''Color Profile database directory path.''', - value='${ALICEVISION_COLOR_PROFILE_DB}', - enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), + name="colorProfileDatabase", + label="Color Profile Database", + description="Color Profile database directory path.", + value="${ALICEVISION_COLOR_PROFILE_DB}", + enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), uid=[], ), desc.BoolParam( - name='errorOnMissingColorProfile', - label='Error On Missing DCP Color Profile', - description='When enabled, if no color profile is found for at least one image, then an error is thrown.\n' - 'When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.', + name="errorOnMissingColorProfile", + label="Error On Missing DCP Color Profile", + description="When enabled, if no color profile is found for at least one image, then an error is thrown.\n" + "When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.", value=True, - enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), + enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), uid=[0], ), desc.ChoiceParam( - name='viewIdMethod', - label='ViewId Method', + name="viewIdMethod", + label="ViewId Method", description="Allows to choose the way the viewID is generated:\n" - " * metadata : Generate viewId from image metadata.\n" - " * filename : Generate viewId from file names using regex.", - value='metadata', - values=['metadata', 'filename'], + " - metadata : Generate viewId from image metadata.\n" + " - filename : Generate viewId from filename using regex.", + value="metadata", + values=["metadata", "filename"], exclusive=True, uid=[], advanced=True, ), desc.StringParam( - name='viewIdRegex', - label='ViewId Regex', - description='Regex used to catch number used as viewId in filename.' - 'You should capture specific parts of the filename with parenthesis to define matching elements. (only number will works)\n' - 'Some examples of patterns:\n' - r' - Match the longest number at the end of filename (default value): ".*?(\d+)"' + '\n' + - r' - Match the first number found in filename : "(\d+).*"', - value=r'.*?(\d+)', + name="viewIdRegex", + label="ViewId Regex", + description="Regex used to catch number used as viewId in filename." + "You should capture specific parts of the filename with parentheses to define matching elements. (only numbers will work)\n" + "Some examples of patterns:\n" + " - Match the longest number at the end of the filename (default value): " + r'".*?(\d+)"' + "\n" + + " - Match the first number found in filename: " + r'"(\d+).*"', + value=r".*?(\d+)", uid=[], advanced=True, - enabled=lambda node: node.viewIdMethod.value == 'filename', + enabled=lambda node: node.viewIdMethod.value == "filename", ), 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'], + 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=[], ), diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 055b7687a9..ab65c4f4d1 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -8,218 +8,229 @@ class CameraLocalization(desc.AVCommandLineNode): commandLine = 'aliceVision_cameraLocalization {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='sfmdata', - label='SfM Data', - description='''The sfm_data.json kind of file generated by AliceVision.''', - value='', + name="sfmdata", + label="SfMData", + description="The SfMData file generated by AliceVision.", + value="", uid=[0], - ), + ), desc.File( - name='mediafile', - label='Media File', - description='''The folder path or the filename for the media to track''', - value='', + name="mediafile", + label="Media File", + description="The folder path or the filename for the media to track.", + value="", uid=[0], - ), + ), desc.File( - name='visualDebug', - label='Visual Debug Folder', - description='''If a folder is provided it enables visual debug and saves all the debugging info in that folder''', - value='', + name="visualDebug", + label="Visual Debug Folder", + description="If a folder is provided, this enables visual debug and all the debugging information will be saved in that folder.", + value="", uid=[0], - ), + ), desc.File( - name='descriptorPath', - label='Descriptor Path', - description='''Folder containing the descriptors for all the images (ie the *.desc.)''', - value='', + name="descriptorPath", + label="Descriptor Path", + description="Folder containing the descriptors for all the images (ie. the *.desc.).", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='matchDescTypes', - label='Match Desc Types', - description='''Describer types to use for the matching.''', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="matchDescTypes", + label="Match Desc Types", + description="Describer types to use for the matching.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='preset', - label='Preset', - description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="preset", + label="Preset", + description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='resectionEstimator', - label='Resection Estimator', - description='''The type of *sac framework to use for resection (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="resectionEstimator", + label="Resection Estimator", + description="The type of *sac framework to use for resection (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='matchingEstimator', - label='Matching Estimator', - description='''The type of *sac framework to use for matching (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="matchingEstimator", + label="Matching Estimator", + description="The type of *sac framework to use for matching (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.File( - name='calibration', - label='Calibration', - description='''Calibration file''', - value='', + name="calibration", + label="Calibration", + description="Calibration file.", + value="", uid=[0], - ), + ), desc.BoolParam( - name='refineIntrinsics', - label='Refine Intrinsics', - description='''Enable/Disable camera intrinsics refinement for each localized image''', + name="refineIntrinsics", + label="Refine Intrinsics", + description="Enable/Disable camera intrinsics refinement for each localized image.", value=False, uid=[0], - ), + ), desc.FloatParam( - name='reprojectionError', - label='Reprojection Error', - description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + name="reprojectionError", + label="Reprojection Error", + description="Maximum reprojection error (in pixels) allowed for resectioning. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.1, 50.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='nbImageMatch', - label='Nb Image Match', - description='''[voctree] Number of images to retrieve in database''', + name="nbImageMatch", + label="Nb Image Match", + description="[voctree] Number of images to retrieve in database.", value=4, range=(1, 1000, 1), uid=[0], - ), + ), desc.IntParam( - name='maxResults', - label='Max Results', - description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + name="maxResults", + label="Max Results", + description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.", value=10, range=(1, 100, 1), uid=[0], - ), + ), desc.IntParam( - name='commonviews', - label='Commonviews', - description='''[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking''', + name="commonviews", + label="Common Views", + description="[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking.", value=3, range=(2, 50, 1), uid=[0], - ), + ), desc.File( - name='voctree', - label='Voctree', - description='''[voctree] Filename for the vocabulary tree''', - value='${ALICEVISION_VOCTREE}', + name="voctree", + label="Voctree", + description="[voctree] Filename for the vocabulary tree.", + value="${ALICEVISION_VOCTREE}", uid=[0], - ), + ), desc.File( - name='voctreeWeights', - label='Voctree Weights', - description='''[voctree] Filename for the vocabulary tree weights''', - value='', + name="voctreeWeights", + label="Voctree Weights", + description="[voctree] Filename for the vocabulary tree weights.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='''[voctree] Algorithm type: FirstBest, AllResults''', - value='AllResults', - values=['FirstBest', 'AllResults'], + name="algorithm", + label="Algorithm", + description="[voctree] Algorithm type: FirstBest, AllResults.", + value="AllResults", + values=["FirstBest", "AllResults"], exclusive=True, uid=[0], - ), + ), desc.FloatParam( - name='matchingError', - label='Matching Error', - description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + name="matchingError", + label="Matching Error", + description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 50.0, 1.0), uid=[0], - ), + ), desc.IntParam( - name='nbFrameBufferMatching', - label='Nb Frame Buffer Matching', - description='''[voctree] Number of previous frame of the sequence to use for matching (0 = Disable)''', + name="nbFrameBufferMatching", + label="Nb Frame Buffer Matching", + description="[voctree] Number of previous frames of the sequence to use for matching (0 = Disable).", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.BoolParam( - name='robustMatching', - label='Robust Matching', - description='''[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.''', + name="robustMatching", + label="Robust Matching", + description="[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.", value=True, uid=[0], - ), + ), desc.IntParam( - name='nNearestKeyFrames', - label='N Nearest Key Frames', - description='''[cctag] Number of images to retrieve in the database Parameters specific for final (optional) bundle adjustment optimization of the sequence:''', + name="nNearestKeyFrames", + label="N Nearest Key Frames", + description="[cctag] Number of images to retrieve in the database. Parameters specific for final (optional) bundle adjustment optimization of the sequence.", value=5, range=(1, 100, 1), uid=[0], - ), + ), desc.StringParam( - name='globalBundle', - label='Global Bundle', - description='''[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.''', - value='', + name="globalBundle", + label="Global Bundle", + description="[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.", + value="", uid=[0], - ), + ), desc.BoolParam( - name='noDistortion', - label='No Distortion', - description='''[bundle adjustment] It does not take into account distortion during the BA, it consider the distortion coefficients all equal to 0''', + name="noDistortion", + label="No Distortion", + description="[bundle adjustment] It does not take into account distortion during the BA, it considers the distortion coefficients to all be equal to 0.", value=False, uid=[0], - ), + ), desc.BoolParam( - name='noBArefineIntrinsics', - label='No BA Refine Intrinsics', - description='''[bundle adjustment] It does not refine intrinsics during BA''', + name="noBArefineIntrinsics", + label="No BA Refine Intrinsics", + description="[bundle adjustment] If set to true, does not refine intrinsics during BA.", value=False, uid=[0], - ), + ), desc.IntParam( - name='minPointVisibility', - label='Min Point Visibility', - description='''[bundle adjustment] Minimum number of observation that a point must have in order to be considered for bundle adjustment''', + name="minPointVisibility", + label="Min Point Visibility", + description="[bundle adjustment] Minimum number of observations that a point must have in order to be considered for bundle adjustment.", value=2, range=(2, 50, 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 = [ desc.File( - name='outputAlembic', - label='Alembic', - description='''Filename for the SfMData export file (where camera poses will be stored)''', - value=desc.Node.internalFolder + 'trackedCameras.abc', + name="outputAlembic", + label="Alembic", + description="Filename for the SfMData export file (where camera poses will be stored).", + value=desc.Node.internalFolder + "trackedCameras.abc", uid=[], - ), + ), desc.File( - name='outputJSON', - label='JSON', - description='''Filename for the localization results as .json''', - value=desc.Node.internalFolder + 'trackedCameras.json', + name="outputJSON", + label="JSON File", + description="Filename for the localization results as .json.", + value=desc.Node.internalFolder + "trackedCameras.json", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index b575ea0db8..ac04acf46e 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -8,166 +8,180 @@ class CameraRigCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_rigCalibration {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='sfmdata', - label='SfM Data', - description='''The sfmData file.''', - value='', + name="sfmdata", + label='SfMData', + description="Input SfMData file.", + value="", uid=[0], - ), + ), desc.File( - name='mediapath', - label='Media Path', - description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', - value='', + name="mediapath", + label="Media Path", + description="The path to the video file, the folder of the image sequence or a text file\n" + "(one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", + value="", uid=[0], - ), + ), desc.File( - name='cameraIntrinsics', - label='Camera Intrinsics', - description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', - value='', + name="cameraIntrinsics", + label="Camera Intrinsics", + description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", + value="", uid=[0], - ), + ), desc.File( - name='export', - label='Export', - description='''Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.''', - value='trackedcameras.abc', + name="export", + label="Export File", + description="Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.", + value="trackedcameras.abc", uid=[0], - ), + ), desc.File( - name='descriptorPath', - label='Descriptor Path', - description='''Folder containing the .desc.''', - value='', + name="descriptorPath", + label="Descriptor Path", + description="Folder containing the .desc.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='matchDescTypes', - label='Match Describer Types', - description='''The describer types to use for the matching''', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="matchDescTypes", + label="Match Describer Types", + description="The describer types to use for the matching.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='preset', - label='Preset', - description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="preset", + label="Preset", + description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='resectionEstimator', - label='Resection Estimator', - description='''The type of *sac framework to use for resection (acransac,loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="resectionEstimator", + label="Resection Estimator", + description="The type of *sac framework to use for resection (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='matchingEstimator', - label='Matching Estimator', - description='''The type of *sac framework to use for matching (acransac,loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="matchingEstimator", + label="Matching Estimator", + description="The type of *sac framework to use for matching (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.StringParam( - name='refineIntrinsics', - label='Refine Intrinsics', - description='''Enable/Disable camera intrinsics refinement for each localized image''', - value='', + name="refineIntrinsics", + label="Refine Intrinsics", + description="Enable/Disable camera intrinsics refinement for each localized image.", + value="", uid=[0], - ), + ), desc.FloatParam( - name='reprojectionError', - label='Reprojection Error', - description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + name="reprojectionError", + label="Reprojection Error", + description="Maximum reprojection error (in pixels) allowed for resectioning.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='maxInputFrames', - label='Max Input Frames', - description='''Maximum number of frames to read in input. 0 means no limit.''', + name="maxInputFrames", + label="Max Input Frames", + description="Maximum number of frames to read in input. 0 means no limit.", value=0, range=(0, 1000, 1), uid=[0], - ), + ), desc.File( - name='voctree', - label='Voctree', - description='''[voctree] Filename for the vocabulary tree''', - value='${ALICEVISION_VOCTREE}', + name="voctree", + label="Voctree", + description="[voctree] Filename for the vocabulary tree.", + value="${ALICEVISION_VOCTREE}", uid=[0], - ), + ), desc.File( - name='voctreeWeights', - label='Voctree Weights', - description='''[voctree] Filename for the vocabulary tree weights''', - value='', + name="voctreeWeights", + label="Voctree Weights", + description="[voctree] Filename for the vocabulary tree weights.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='''[voctree] Algorithm type: {FirstBest,AllResults}''', - value='AllResults', - values=['FirstBest', 'AllResults'], + name="algorithm", + label="Algorithm", + description="[voctree] Algorithm type: {FirstBest, AllResults}.", + value="AllResults", + values=["FirstBest", "AllResults"], exclusive=True, uid=[0], - ), + ), desc.IntParam( - name='nbImageMatch', - label='Nb Image Match', - description='''[voctree] Number of images to retrieve in the database''', + name="nbImageMatch", + label="Nb Image Match", + description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 50, 1), uid=[0], - ), + ), desc.IntParam( - name='maxResults', - label='Max Results', - description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + name="maxResults", + label="Max Results", + description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If set to 0, it is ignored.", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.FloatParam( - name='matchingError', - label='Matching Error', - description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + name="matchingError", + label="Matching Error", + description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='nNearestKeyFrames', - label='N Nearest Key Frames', - description='''[cctag] Number of images to retrieve in database''', + name="nNearestKeyFrames", + label="N Nearest Key Frames", + description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 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 = [ desc.File( - name='outfile', - label='File', - description='''The name of the file where to store the calibration data''', - value=desc.Node.internalFolder + 'cameraRigCalibration.rigCal', + name="outfile", + label="Output File", + description="The name of the file to store the calibration data in.", + value=desc.Node.internalFolder + "cameraRigCalibration.rigCal", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 063acbbe38..e175c0c9c1 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -8,173 +8,187 @@ class CameraRigLocalization(desc.AVCommandLineNode): commandLine = 'aliceVision_rigLocalization {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='sfmdata', - label='Sfm Data', - description='''The sfmData file.''', - value='', + name="sfmdata", + label="SfMData", + description="The input SfMData file.", + value="", uid=[0], - ), + ), desc.File( - name='mediapath', - label='Media Path', - description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', - value='', + name="mediapath", + label="Media Path", + description="The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", + value="", uid=[0], - ), + ), desc.File( - name='calibration', - label='Rig Calibration File', - description='''The file containing the calibration data for the rig (subposes)''', - value='', + name="calibration", + label="Rig Calibration File", + description="The file containing the calibration data for the rig (subposes).", + value="", uid=[0], - ), + ), desc.File( - name='cameraIntrinsics', - label='Camera Intrinsics', - description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', - value='', + name="cameraIntrinsics", + label="Camera Intrinsics", + description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", + value="", uid=[0], - ), + ), desc.File( - name='descriptorPath', - label='Descriptor Path', - description='''Folder containing the .desc.''', - value='', + name="descriptorPath", + label="Descriptor Path", + description="Folder containing the .desc.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='matchDescTypes', - label='Match Describer Types', - description='''The describer types to use for the matching''', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="matchDescTypes", + label="Match Describer Types", + description="The describer types to use for the matching.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='preset', - label='Preset', - description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="preset", + label="Preset", + description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='resectionEstimator', - label='Resection Estimator', - description='''The type of *sac framework to use for resection (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="resectionEstimator", + label="Resection Estimator", + description="The type of *sac framework to use for resection (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='matchingEstimator', - label='Matching Estimator', - description='''The type of *sac framework to use for matching (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="matchingEstimator", + label="Matching Estimator", + description="The type of *sac framework to use for matching (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.StringParam( - name='refineIntrinsics', - label='Refine Intrinsics', - description='''Enable/Disable camera intrinsics refinement for each localized image''', - value='', + name="refineIntrinsics", + label="Refine Intrinsics", + description="Enable/Disable camera intrinsics refinement for each localized image.", + value="", uid=[0], - ), + ), desc.FloatParam( - name='reprojectionError', - label='Reprojection Error', - description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + name="reprojectionError", + label="Reprojection Error", + description="Maximum reprojection error (in pixels) allowed for resectioning.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.BoolParam( - name='useLocalizeRigNaive', - label='Use Localize Rig Naive', - description='''Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.''', + name="useLocalizeRigNaive", + label="Use Localize Rig Naive", + description="Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.", value=False, uid=[0], - ), + ), desc.FloatParam( - name='angularThreshold', - label='Angular Threshold', - description='''The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.''', + name="angularThreshold", + label="Angular Threshold", + description="The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.", value=0.1, range=(0.0, 10.0, 0.01), uid=[0], - ), + ), desc.File( - name='voctree', - label='Voctree', - description='''[voctree] Filename for the vocabulary tree''', - value='${ALICEVISION_VOCTREE}', + name="voctree", + label="Voctree", + description="[voctree] Filename for the vocabulary tree.""", + value="${ALICEVISION_VOCTREE}", uid=[0], - ), + ), desc.File( - name='voctreeWeights', - label='Voctree Weights', - description='''[voctree] Filename for the vocabulary tree weights''', - value='', + name="voctreeWeights", + label="Voctree Weights", + description="[voctree] Filename for the vocabulary tree weights.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='''[voctree] Algorithm type: {FirstBest,AllResults}''', - value='AllResults', - values=['FirstBest', 'AllResults'], + name="algorithm", + label="Algorithm", + description="[voctree] Algorithm type: {FirstBest, AllResults}.", + value="AllResults", + values=["FirstBest", "AllResults"], exclusive=True, uid=[0], - ), + ), desc.IntParam( - name='nbImageMatch', - label='Nb Image Match', - description='''[voctree] Number of images to retrieve in the database''', + name="nbImageMatch", + label="Nb Image Match", + description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 100, 1), uid=[0], - ), + ), desc.IntParam( - name='maxResults', - label='Max Results', - description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + name="maxResults", + label="Max Results", + description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached.\n" + "If set to 0, it is ignored.", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.FloatParam( - name='matchingError', - label='Matching Error', - description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + name="matchingError", + label="Matching Error", + description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='nNearestKeyFrames', - label='N Nearest Key Frames', - description='''[cctag] Number of images to retrieve in database''', + name="nNearestKeyFrames", + label="N Nearest Key Frames", + description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 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 = [ desc.File( - name='outputAlembic', - label='Alembic', - description='''Filename for the SfMData export file (where camera poses will be stored).''', - value=desc.Node.internalFolder + 'trackedcameras.abc', + name="outputAlembic", + label="Alembic", + description="Filename for the SfMData export file (where camera poses will be stored).", + value=desc.Node.internalFolder + "trackedcameras.abc", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 2e879ca6ea..5f53bae573 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -23,56 +23,66 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputData', - label='Color checker data', - description='Position and colorimetric data of the color checker', - value='', + name="inputData", + label="Color Checker Data", + description="Position and colorimetric data of the color checker.", + value="", uid=[0], ), desc.File( - name='input', - label='Input', - description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', - value='', + name="input", + label="Input", + description="Input SfMData file, image filenames or regex(es) on the image file path.\n" + "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", + value="", uid=[0], ), desc.ChoiceParam( - name='extension', - label='Output File Extension', - description='Output Image File Extension.', - value='exr', - values=['exr', ''], + name="extension", + label="Output File Extension", + description="Output image file extension.", + value="exr", + values=["exr", ""], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type for EXR output', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="EXR Storage Data Type", + description="Storage data type for EXR output:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, 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='outSfMData', - label='SfmData', - description='Output sfmData.', - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + name="outSfMData", + label="SfMData", + description="Output SfMData.", + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='output', - label='Folder', - description='Output Images Folder.', + name="output", + label="Folder", + description="Output images folder.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 1c6822e910..d52379738d 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -28,36 +28,46 @@ class ColorCheckerDetection(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', - value='', + name="input", + label="Input", + description="SfMData file input, image filenames or regex(es) on the image file path.\n" + "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", + value="", uid=[0], ), desc.IntParam( - name='maxCount', - label='Max count by image', - description='Max color charts count to detect in a single image', + name="maxCount", + label="Max Count By Image", + description="Maximum color charts count to detect in a single image.", value=1, range=(1, 3, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='debug', - label='Debug', - description='If checked, debug data will be generated', + name="debug", + label="Debug", + description="If checked, debug data will be generated.", value=False, 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='outputData', - label='Color checker data', - description='Output position and colorimetric data extracted from detected color checkers in the images', - value=desc.Node.internalFolder + '/ccheckers.json', + name="outputData", + label="Color Checker Data", + description="Output position and colorimetric data extracted from detected color checkers in the images.", + value=desc.Node.internalFolder + "/ccheckers.json", uid=[], ), ] diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 2bacbac365..d76097a9a1 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -11,28 +11,28 @@ class ConvertMesh(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputMesh', - label='Input Mesh', - description='Input Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', - value='', + name="inputMesh", + label="Input Mesh", + description="Input mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value="", uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='File Type', - description='''Output Mesh Format (*.obj, *.gltf, *.fbx, *.stl).''', - value='obj', - values=('gltf', 'obj', 'fbx', 'stl'), + name="outputMeshFileType", + label="File Type", + description="Output mesh format (*.obj, *.gltf, *.fbx, *.stl).", + value="obj", + values=("gltf", "obj", "fbx", "stl"), exclusive=True, uid=[0], - group='', + group="", ), 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'], + 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=[], ), @@ -40,10 +40,10 @@ class ConvertMesh(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Mesh', - description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', - value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFileTypeValue}', + name="output", + label="Mesh", + description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value=desc.Node.internalFolder + "mesh." + "{outputMeshFileTypeValue}", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 0fd163f6ab..9bd2a8156f 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -15,97 +15,97 @@ class ConvertSfMFormat(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='fileExt', - label='SfM File Format', - description='SfM File Format', - value='abc', - values=['abc', 'sfm', 'json', 'ply', 'baf'], + name="fileExt", + label="SfM File Format", + description="Output SfM file format.", + value="abc", + values=["abc", "sfm", "json", "ply", "baf"], exclusive=True, uid=[0], - group='', # exclude from command line + group="", # exclude from command line ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types to keep.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5', 'unknown'], + name="describerTypes", + label="Describer Types", + description="Describer types to keep.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5", "unknown"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ListAttribute( elementDesc=desc.File( name="imageId", - label="Image id", - description="", + label="Image ID", + description="UID or path of an image to add to the whitelist.", value="", uid=[0], ), name="imageWhiteList", label="Image White List", - description='image white list (uids or image paths).', + description="Image white list (UIDs or image paths).", ), desc.BoolParam( - name='views', - label='Views', - description='Export views.', + name="views", + label="Views", + description="Export views.", value=True, uid=[0], ), desc.BoolParam( - name='intrinsics', - label='Intrinsics', - description='Export intrinsics.', + name="intrinsics", + label="Intrinsics", + description="Export intrinsics.", value=True, uid=[0], ), desc.BoolParam( - name='extrinsics', - label='Extrinsics', - description='Export extrinsics.', + name="extrinsics", + label="Extrinsics", + description="Export extrinsics.", value=True, uid=[0], ), desc.BoolParam( - name='structure', - label='Structure', - description='Export structure.', + name="structure", + label="Structure", + description="Export structure.", value=True, uid=[0], ), desc.BoolParam( - name='observations', - label='Observations', - description='Export observations.', + name="observations", + label="Observations", + description="Export observations.", value=True, 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'], + 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=[0], + uid=[], ), ] outputs = [ desc.File( - name='output', - label='Output', - description='Path to the output SfM Data file.', - value=desc.Node.internalFolder + 'sfm.{fileExtValue}', + name="output", + label="Output", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.{fileExtValue}", uid=[], - ), + ), ] From a0e776806eecb93543f4875422edc3d1c70367d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 16 Jun 2023 10:31:03 +0200 Subject: [PATCH 0825/1093] [nodes] D-G: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/aliceVision/DepthMap.py | 1046 +++++++++-------- meshroom/aliceVision/DepthMapFilter.py | 90 +- meshroom/aliceVision/DistortionCalibration.py | 43 +- meshroom/aliceVision/ExportAnimatedCamera.py | 98 +- .../aliceVision/ExportColoredPointCloud.py | 26 +- meshroom/aliceVision/ExportMatches.py | 44 +- meshroom/aliceVision/ExportMaya.py | 23 +- meshroom/aliceVision/FeatureExtraction.py | 132 +-- meshroom/aliceVision/FeatureMatching.py | 178 +-- meshroom/aliceVision/FeatureRepeatability.py | 108 +- meshroom/aliceVision/GlobalSfM.py | 118 +- 11 files changed, 971 insertions(+), 935 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 7959096567..d4443139d2 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -23,571 +23,579 @@ class DepthMap(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', - value='', + name="imagesFolder", + label="Images Folder", + description="Use images from a specific folder instead of those specified in the SfMData file.\n" + "Filename should be the image UID.", + value="", uid=[0], ), desc.ChoiceParam( - name='downscale', - label='Downscale', - description='Downscale the input images to compute the depth map.\n' - 'Full resolution (downscale=1) gives the best result,\n' - 'but using a larger downscale will reduce computation time at the expense of quality.\n' - 'If the images are noisy, blurry or if the surfaces are challenging (weakly-textured or with specularities) a larger downscale may improve.', + name="downscale", + label="Downscale", + description="Downscale the input images to compute the depth map.\n" + "Full resolution (downscale = 1) gives the best result,\n" + "but using a larger downscale will reduce computation time at the expense of quality.\n" + "If the images are noisy, blurry or if the surfaces are challenging (weakly-textured or with specularities), a larger downscale may improve.", value=2, values=[1, 2, 4, 8, 16], exclusive=True, uid=[0], ), desc.FloatParam( - name='minViewAngle', - label='Min View Angle', - description='Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).', + name="minViewAngle", + label="Min View Angle", + description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxViewAngle', - label='Max View Angle', - description='Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).', + name="maxViewAngle", + label="Max View Angle", + description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=70.0, range=(10.0, 120.0, 1.0), uid=[0], advanced=True, ), desc.GroupAttribute( - name='tiling', - label='Tiling', - description='Tiles are used to split the computation into fixed buffers to best fit the GPU.', + name="tiling", + label="Tiling", + description="Tiles are used to split the computation into fixed buffers to fit the GPU best.", group=None, groupDesc=[ desc.IntParam( - name='tileBufferWidth', - label='Buffer Width', - description='Maximum tile buffer width.', + name="tileBufferWidth", + label="Buffer Width", + description="Maximum tile buffer width.", value=1024, range=(-1, 2000, 10), uid=[0], ), desc.IntParam( - name='tileBufferHeight', - label='Buffer Height', - description='Maximum tile buffer height.', + name="tileBufferHeight", + label="Buffer Height", + description="Maximum tile buffer height.", value=1024, range=(-1, 2000, 10), uid=[0], ), desc.IntParam( - name='tilePadding', - label='Padding', - description='Buffer padding for overlapping tiles.', + name="tilePadding", + label="Padding", + description="Buffer padding for overlapping tiles.", value=64, range=(0, 500, 1), uid=[0], ), desc.BoolParam( - name='autoAdjustSmallImage', - label='Auto Adjust Small Image', - description='Automatically adjust depth map parameters if images are smaller than one tile (maxTCamsPerTile=maxTCams, adjust step if needed).', + name="autoAdjustSmallImage", + label="Auto Adjust Small Image", + description="Automatically adjust depth map parameters if images are smaller than one tile\n" + "(maxTCamsPerTile = maxTCams, adjust step if needed).", value=True, uid=[0], advanced=True, ), ]), desc.BoolParam( - name='chooseTCamsPerTile', - label='Choose Neighbour Cameras Per Tile', - description='Choose neighbour cameras per tile or globally to the image.', + name="chooseTCamsPerTile", + label="Choose Neighbour Cameras Per Tile", + description="Choose neighbour cameras per tile or globally to the image.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='maxTCams', - label='Max Nb Neighbour Cameras', - description='Maximum number of neighbour cameras per image.', + name="maxTCams", + label="Max Nb Neighbour Cameras", + description="Maximum number of neighbour cameras per image.", value=10, range=(1, 20, 1), uid=[0], ), desc.GroupAttribute( - name='sgm', - label='SGM', - description='Semi-Global Matching (SGM) step computes a similarity volume and extracts the initial low-resolution depth map.\n' - 'This method is highly robust but has limited depth precision (banding artifacts due to a limited list of depth planes).', + name="sgm", + label="SGM", + description="The Semi-Global Matching (SGM) step computes a similarity volume and extracts the initial low-resolution depth map.\n" + "This method is highly robust but has limited depth precision (banding artifacts due to a limited list of depth planes).", group=None, groupDesc=[ - desc.IntParam( - name='sgmScale', - label='Downscale Factor', - description='Downscale factor applied on source images for the SGM step (in addition to the global downscale).', - value=2, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmStepXY', - label='Step XY', - description='The step is used to compute the similarity volume for one pixel over N (in the XY image plane).', - value=2, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmStepZ', - label='Step Z', - description='Initial step used to compute the similarity volume on Z axis (every N pixels on the epilolar line).\n' - '-1 means automatic estimation.\n' - 'This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).', - value=-1, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmMaxTCamsPerTile', - label='Max Nb Neighbour Cameras Per Tile', - description='Maximum number of neighbour cameras used per tile.', - value=4, - range=(1, 20, 1), - uid=[0], - ), - desc.IntParam( - name='sgmWSH', - label='WSH', - description='Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.', - value=4, - range=(1, 20, 1), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='sgmUseSfmSeeds', - label='Use SfM Landmarks', - description='Use landmarks from Structure-from-Motion as input seeds to define min/max depth ranges.', - value=True, - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmSeedsRangeInflate', - label='Seeds Range Inflate', - description='Inflate factor to add margins around SfM seeds.', - value=0.2, - range=(0.0, 2.0, 0.1), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmDepthThicknessInflate', - label='Thickness Inflate', - description='Inflate factor to add margins to the depth thickness.', - value=0.0, - range=(0.0, 2.0, 0.1), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmMaxSimilarity', - label='Max Similarity', - description='Maximum similarity threshold (between 0 and 1) used to filter out poorly supported depth values.', - value=1.0, - range=(0.0, 1.0, 0.01), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmGammaC', - label='GammaC', - description='GammaC threshold used for similarity computation.', - value=5.5, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmGammaP', - label='GammaP', - description='GammaP threshold used for similarity computation.', - value=8.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmP1', - label='P1', - description='P1 parameter for SGM filtering.', - value=10.0, - range=(0.0, 255.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmP2Weighting', - label='P2 Weighting', - description='P2 weighting parameter for SGM filtering.', - value=100.0, - range=(-255.0, 255.0, 0.5), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='sgmMaxDepths', - label='Max Depths', - description='Maximum number of depths in the similarity volume.', - value=1500, - range=(1, 5000, 1), - uid=[0], - advanced=True, - ), - desc.StringParam( - name='sgmFilteringAxes', - label='Filtering Axes', - description='Define axes for the filtering of the similarity volume.', - value='YX', - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='sgmDepthListPerTile', - label='Depth List Per Tile', - description='Select the list of depth planes per tile or globally to the image.', - value=True, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='sgmUseConsistentScale', - label='Consistent Scale', - description='Compare patch with consistent scale for similarity volume computation.', - value=False, - uid=[0], - ), - ]), + desc.IntParam( + name="sgmScale", + label="Downscale Factor", + description="Downscale factor applied on source images for the SGM step (in addition to the global downscale).", + value=2, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name="sgmStepXY", + label="Step XY", + description="The step is used to compute the similarity volume for one pixel over N (in the XY image plane).", + value=2, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name="sgmStepZ", + label="Step Z", + description="Initial step used to compute the similarity volume on Z axis (every N pixels on the epilolar line).\n" + "-1 means automatic estimation.\n" + "This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).", + value=-1, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name="sgmMaxTCamsPerTile", + label="Max Nb Neighbour Cameras Per Tile", + description="Maximum number of neighbour cameras used per tile.", + value=4, + range=(1, 20, 1), + uid=[0], + ), + desc.IntParam( + name="sgmWSH", + label="WSH", + description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", + value=4, + range=(1, 20, 1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="sgmUseSfmSeeds", + label="Use SfM Landmarks", + description="Use landmarks from Structure-from-Motion as input seeds to define min/max depth ranges.", + value=True, + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmSeedsRangeInflate", + label="Seeds Range Inflate", + description="Inflate factor to add margins around SfM seeds.", + value=0.2, + range=(0.0, 2.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmDepthThicknessInflate", + label="Thickness Inflate", + description="Inflate factor to add margins to the depth thickness.", + value=0.0, + range=(0.0, 2.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmMaxSimilarity", + label="Max Similarity", + description="Maximum similarity threshold (between 0 and 1) used to filter out poorly supported depth values.", + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmGammaC", + label="GammaC", + description="GammaC threshold used for similarity computation.", + value=5.5, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmGammaP", + label="GammaP", + description="GammaP threshold used for similarity computation.", + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmP1", + label="P1", + description="P1 parameter for SGM filtering.", + value=10.0, + range=(0.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmP2Weighting", + label="P2 Weighting", + description="P2 weighting parameter for SGM filtering.", + value=100.0, + range=(-255.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), + desc.IntParam( + name="sgmMaxDepths", + label="Max Depths", + description="Maximum number of depths in the similarity volume.", + value=1500, + range=(1, 5000, 1), + uid=[0], + advanced=True, + ), + desc.StringParam( + name="sgmFilteringAxes", + label="Filtering Axes", + description="Define axes for the filtering of the similarity volume.", + value="YX", + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="sgmDepthListPerTile", + label="Depth List Per Tile", + description="Select the list of depth planes per tile or globally to the image.", + value=True, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="sgmUseConsistentScale", + label="Consistent Scale", + description="Compare patch with consistent scale for similarity volume computation.", + value=False, + uid=[0], + ), + ] + ), desc.GroupAttribute( - name='refine', - label='Refine', - description='The refine step computes a similarity volume in higher resolution but with a small depth range around the SGM depth map.\n' - 'This allows to compute a depth map with sub-pixel accuracy.', + name="refine", + label="Refine", + description="The refine step computes a similarity volume in higher resolution but with a small depth range around the SGM depth map.\n" + "This allows to compute a depth map with sub-pixel accuracy.", group=None, groupDesc=[ - desc.BoolParam( - name='refineEnabled', - label='Enable', - description='Enable depth/similarity map refinement process.', - value=True, - uid=[0], - ), - desc.IntParam( - name='refineScale', - label='Downscale factor', - description='Downscale factor applied on source images for the Refine step (in addition to the global downscale).', - value=1, - range=(-1, 10, 1), - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineStepXY', - label='Step XY', - description='The step is used to compute the refine volume for one pixel over N (in the XY image plane).', - value=1, - range=(-1, 10, 1), - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineMaxTCamsPerTile', - label='Max Nb Neighbour Cameras Per Tile', - description='Maximum number of neighbour cameras used per tile.', - value=4, - range=(1, 20, 1), - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineSubsampling', - label='Number of Subsamples', - description='The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).', - value=10, - range=(1, 30, 1), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineHalfNbDepths', - label='Half Number of Depths', - description='The thickness of the refine area around the initial depth map.\n' - 'This parameter defines the number of depths in front of and behind the initial value \n' - 'for which we evaluate the similarity with a finer z sampling.', - value=15, - range=(1, 50, 1), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineWSH', - label='WSH', - description='Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.', - value=3, - range=(1, 20, 1), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.FloatParam( - name='refineSigma', - label='Sigma', - description='Sigma (2*sigma^2) of the gaussian filter used to extract the best depth from the refine volume.', - value=15.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.FloatParam( - name='refineGammaC', - label='GammaC', - description='GammaC threshold used for similarity computation.', - value=15.5, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.FloatParam( - name='refineGammaP', - label='GammaP', - description='GammaP threshold used for similarity computation.', - value=8.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.BoolParam( - name='refineInterpolateMiddleDepth', - label='Interpolate Middle Depth', - description='Enable middle depth bilinear interpolation.', - value=False, - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.BoolParam( - name='refineUseConsistentScale', - label='Consistent Scale', - description='Compare patch with consistent scale for similarity volume computation.', - value=False, - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - ]), + desc.BoolParam( + name="refineEnabled", + label="Enable", + description="Enable depth/similarity map refinement process.", + value=True, + uid=[0], + ), + desc.IntParam( + name="refineScale", + label="Downscale Factor", + description="Downscale factor applied on source images for the Refine step (in addition to the global downscale).", + value=1, + range=(-1, 10, 1), + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineStepXY", + label="Step XY", + description="The step is used to compute the refine volume for one pixel over N (in the XY image plane).", + value=1, + range=(-1, 10, 1), + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineMaxTCamsPerTile", + label="Max Nb Neighbour Cameras Per Tile", + description="Maximum number of neighbour cameras used per tile.", + value=4, + range=(1, 20, 1), + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineSubsampling", + label="Number Of Subsamples", + description="The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).", + value=10, + range=(1, 30, 1), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineHalfNbDepths", + label="Half Number Of Depths", + description="The thickness of the refine area around the initial depth map.\n" + "This parameter defines the number of depths in front of and behind the initial value\n" + "for which we evaluate the similarity with a finer z sampling.", + value=15, + range=(1, 50, 1), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineWSH", + label="WSH", + description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", + value=3, + range=(1, 20, 1), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.FloatParam( + name="refineSigma", + label="Sigma", + description="Sigma (2*sigma^2) of the Gaussian filter used to extract the best depth from the refine volume.", + value=15.0, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.FloatParam( + name="refineGammaC", + label="GammaC", + description="GammaC threshold used for similarity computation.", + value=15.5, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.FloatParam( + name="refineGammaP", + label="GammaP", + description="GammaP threshold used for similarity computation.", + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.BoolParam( + name="refineInterpolateMiddleDepth", + label="Interpolate Middle Depth", + description="Enable middle depth bilinear interpolation.", + value=False, + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.BoolParam( + name="refineUseConsistentScale", + label="Consistent Scale", + description="Compare patch with consistent scale for similarity volume computation.", + value=False, + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + ] + ), desc.GroupAttribute( name="colorOptimization", label="Color Optimization", - description='Color optimization post-process parameters.', + description="Color optimization post-process parameters.", group=None, groupDesc=[ - desc.BoolParam( - name='colorOptimizationEnabled', - label='Enable', - description='Enable depth/similarity map post-process color optimization.', - value=True, - uid=[0], - ), - desc.IntParam( - name='colorOptimizationNbIterations', - label='Number of Iterations', - description='Number of iterations of the optimization.', - value=100, - range=(1, 500, 10), - uid=[0], - advanced=True, - enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, - ), - ]), + desc.BoolParam( + name="colorOptimizationEnabled", + label="Enable", + description="Enable depth/similarity map post-process color optimization.", + value=True, + uid=[0], + ), + desc.IntParam( + name="colorOptimizationNbIterations", + label="Number Of Iterations", + description="Number of iterations for the optimization.", + value=100, + range=(1, 500, 10), + uid=[0], + advanced=True, + enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, + ), + ] + ), desc.GroupAttribute( - name='customPatchPattern', - label='Custom Patch Pattern', - description='User custom patch pattern for similarity comparison.', + name="customPatchPattern", + label="Custom Patch Pattern", + description="User custom patch pattern for similarity comparison.", advanced=True, group=None, groupDesc=[ - desc.BoolParam( - name='sgmUseCustomPatchPattern', - label='Enable for SGM', - description='Enable custom patch pattern for similarity volume computation at the SGM step .', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='refineUseCustomPatchPattern', - label='Enable for Refine', - description='Enable custom patch pattern for similarity volume computation at the Refine step .', - value=False, - uid=[0], - advanced=True, - ), - desc.ListAttribute( - name="customPatchPatternSubparts", - label="Subparts", - description='User custom patch pattern subparts for similarity volume computation.', - advanced=True, - enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), - elementDesc=desc.GroupAttribute( - name='customPatchPatternSubpart', - label='Patch Pattern Subpart', - description='', - joinChar=":", - group=None, - groupDesc=[ - desc.ChoiceParam( - name='customPatchPatternSubpartType', - label='Type', - description='Patch pattern subpart type.', - value='full', - values=['full', 'circle'], - exclusive=True, - uid=[0], - ), - desc.FloatParam( - name='customPatchPatternSubpartRadius', - label='Radius / WSH', - description='Patch pattern subpart half-width or circle radius.', - value=2.5, - range=(0.5, 30.0, 0.1), - uid=[0], + desc.BoolParam( + name="sgmUseCustomPatchPattern", + label="Enable For SGM", + description="Enable custom patch pattern for similarity volume computation at the SGM step.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="refineUseCustomPatchPattern", + label="Enable For Refine", + description="Enable custom patch pattern for similarity volume computation at the Refine step.", + value=False, + uid=[0], + advanced=True, + ), + desc.ListAttribute( + name="customPatchPatternSubparts", + label="Subparts", + description="User custom patch pattern subparts for similarity volume computation.", + advanced=True, + enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + elementDesc=desc.GroupAttribute( + name="customPatchPatternSubpart", + label="Patch Pattern Subpart", + description="Custom patch pattern subpart configuration for similarity volume computation.", + joinChar=":", + group=None, + groupDesc=[ + desc.ChoiceParam( + name="customPatchPatternSubpartType", + label="Type", + description="Patch pattern subpart type.", + value="full", + values=["full", "circle"], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name="customPatchPatternSubpartRadius", + label="Radius / WSH", + description="Patch pattern subpart half-width or circle radius.", + value=2.5, + range=(0.5, 30.0, 0.1), + uid=[0], + ), + desc.IntParam( + name="customPatchPatternSubpartNbCoords", + label="Coordinates", + description="Patch pattern subpart number of coordinates (for circle or ignore).", + value=12, + range=(3, 24, 1), + uid=[0], + ), + desc.IntParam( + name="customPatchPatternSubpartLevel", + label="Level", + description="Patch pattern subpart image level.", + value=0, + range=(0, 2, 1), + uid=[0], + ), + desc.FloatParam( + name="customPatchPatternSubpartWeight", + label="Weight", + description="Patch pattern subpart weight.", + value=1.0, + range=(0.0, 1.0, 0.1), + uid=[0], + ), + ] ), - desc.IntParam( - name='customPatchPatternSubpartNbCoords', - label='Coordinates', - description='Patch pattern subpart number of coordinates (for circle or ignore).', - value=12, - range=(3, 24, 1), - uid=[0], - ), - desc.IntParam( - name='customPatchPatternSubpartLevel', - label='Level', - description='Patch pattern subpart image level.', - value=0, - range=(0, 2, 1), - uid=[0], - ), - desc.FloatParam( - name='customPatchPatternSubpartWeight', - label='Weight', - description='Patch pattern subpart weight.', - value=1.0, - range=(0.0, 1.0, 0.1), - uid=[0], - ), - ]), - ), - desc.BoolParam( - name='customPatchPatternGroupSubpartsPerLevel', - label='Group Subparts Per Level', - description='Group all subparts with the same image level.', - value=False, - uid=[0], - advanced=True, - enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), - ), - ]), + ), + desc.BoolParam( + name="customPatchPatternGroupSubpartsPerLevel", + label="Group Subparts Per Level", + description="Group all subparts with the same image level.", + value=False, + uid=[0], + advanced=True, + enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + ), + ] + ), desc.GroupAttribute( - name='intermediateResults', - label='Intermediate Results', - description='Intermediate results parameters for debug purposes.\n' - 'Warning: Dramatically affect performances and use large amount of storage.', + name="intermediateResults", + label="Intermediate Results", + description="Intermediate results parameters for debug purposes.\n" + "Warning: Dramatically affect performances and use large amount of storage.", advanced=True, group=None, groupDesc=[ - desc.BoolParam( - name='exportIntermediateDepthSimMaps', - label='Export Depth Maps', - description='Export intermediate depth/similarity maps from the SGM and Refine steps.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateNormalMaps', - label='Export Normal Maps', - description='Export intermediate normal maps from the SGM and Refine steps.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateVolumes', - label='Export Volumes', - description='Export intermediate full similarity volumes from the SGM and Refine steps.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateCrossVolumes', - label='Export Cross Volumes', - description='Export intermediate similarity cross volumes from the SGM and Refine steps.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateTopographicCutVolumes', - label='Export Cut Volumes', - description='Export intermediate similarity topographic cut volumes from the SGM and Refine steps.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateVolume9pCsv', - label='Export 9 Points', - description='Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportTilePattern', - label='Export Tile Pattern', - description='Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.', - value=False, - uid=[0], - advanced=True, - ), - ]), + desc.BoolParam( + name="exportIntermediateDepthSimMaps", + label="Export Depth Maps", + description="Export intermediate depth/similarity maps from the SGM and Refine steps.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateNormalMaps", + label="Export Normal Maps", + description="Export intermediate normal maps from the SGM and Refine steps.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateVolumes", + label="Export Volumes", + description="Export intermediate full similarity volumes from the SGM and Refine steps.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateCrossVolumes", + label="Export Cross Volumes", + description="Export intermediate similarity cross volumes from the SGM and Refine steps.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateTopographicCutVolumes", + label="Export Cut Volumes", + description="Export intermediate similarity topographic cut volumes from the SGM and Refine steps.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateVolume9pCsv", + label="Export 9 Points", + description="Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportTilePattern", + label="Export Tile Pattern", + description="Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.", + value=False, + uid=[0], + advanced=True, + ), + ] + ), desc.IntParam( - name='nbGPUs', - label='Number of GPUs', - description='Number of GPUs to use (0 means use all available GPUs).', + name="nbGPUs", + label="Number Of GPUs", + description="Number of GPUs to use (0 means that all the available GPUs will be used).", value=0, range=(0, 5, 1), uid=[], advanced=True, ), 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'], + 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=[], ), @@ -595,9 +603,9 @@ class DepthMap(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output folder for generated depth maps.', + name="output", + label="Folder", + description="Output folder for generated depth maps.", value=desc.Node.internalFolder, uid=[], ), @@ -605,60 +613,60 @@ class DepthMap(desc.AVCommandLineNode): # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) desc.File( - name='depth', - label='Depth Maps', - description='Generated depth maps.', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr', + name="depth", + label="Depth Maps", + description="Generated depth maps.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='sim', - label='Sim Maps', - description='Generated sim maps.', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_simMap.exr', + name="sim", + label="Sim Maps", + description="Generated sim maps.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='tilePattern', - label='Tile Pattern', - description='Debug: Tile pattern', - value=desc.Node.internalFolder + '<VIEW_ID>_tilePattern.obj', + name="tilePattern", + label="Tile Pattern", + description="Debug: Tile pattern.", + value=desc.Node.internalFolder + "<VIEW_ID>_tilePattern.obj", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportTilePattern.value, ), desc.File( - name='depthSgm', - label='Depth Maps SGM', - description='Debug: Depth maps SGM', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_sgm.exr', + name="depthSgm", + label="Depth Maps SGM", + description="Debug: Depth maps SGM", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgm.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( - name='depthSgmUpscaled', - label='Depth Maps SGM Upscaled', - description='Debug: Depth maps SGM upscaled', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_sgmUpscaled.exr', + name="depthSgmUpscaled", + label="Depth Maps SGM Upscaled", + description="Debug: Depth maps SGM upscaled.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgmUpscaled.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( - name='depthRefined', - label='Depth Maps Refined', - description='Debug: Depth maps after refinement', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_depthMap_refinedFused.exr', + name="depthRefined", + label="Depth Maps Refined", + description="Debug: Depth maps after refinement", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_refinedFused.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), ] diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 3acebbacc5..487a4074fe 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -18,32 +18,32 @@ class DepthMapFilter(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.File( name="depthMapsFolder", - label="DepthMaps Folder", - description="Input depth maps folder", + label="Depth Maps Folder", + description="Input depth maps folder.", value="", uid=[0], ), desc.FloatParam( - name='minViewAngle', - label='Min View Angle', - description='Minimum angle between two views.', + name="minViewAngle", + label="Min View Angle", + description="Minimum angle between two views.", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxViewAngle', - label='Max View Angle', - description='Maximum angle between two views.', + name="maxViewAngle", + label="Max View Angle", + description="Maximum angle between two views.", value=70.0, range=(10.0, 120.0, 1.0), uid=[0], @@ -51,7 +51,7 @@ class DepthMapFilter(desc.AVCommandLineNode): ), desc.IntParam( name="nNearestCams", - label="Number of Nearest Cameras", + label="Number Of Nearest Cameras", description="Number of nearest cameras used for filtering.", value=10, range=(0, 20, 1), @@ -61,7 +61,7 @@ class DepthMapFilter(desc.AVCommandLineNode): desc.IntParam( name="minNumOfConsistentCams", label="Min Consistent Cameras", - description="Min Number of Consistent Cameras", + description="Minimum number of consistent cameras.", value=3, range=(0, 10, 1), uid=[0], @@ -69,15 +69,15 @@ class DepthMapFilter(desc.AVCommandLineNode): desc.IntParam( name="minNumOfConsistentCamsWithLowSimilarity", label="Min Consistent Cameras Bad Similarity", - description="Min Number of Consistent Cameras for pixels with weak similarity value", + description="Minimum number of consistent cameras for pixels with weak similarity value.", value=4, range=(0, 10, 1), uid=[0], ), desc.FloatParam( - name='pixToleranceFactor', - label='Tolerance Size', - description='Filtering tolerance size factor (in px).', + name="pixToleranceFactor", + label="Tolerance Size", + description="Filtering tolerance size factor, in pixels.", value=2.0, range=(0.001, 10.0, 0.1), uid=[0], @@ -85,8 +85,8 @@ class DepthMapFilter(desc.AVCommandLineNode): ), desc.IntParam( name="pixSizeBall", - label="Filtering Size in Pixels", - description="Filtering size in pixels", + label="Filtering Size", + description="Filtering size in pixels.", value=0, range=(0, 10, 1), uid=[0], @@ -94,27 +94,27 @@ class DepthMapFilter(desc.AVCommandLineNode): ), desc.IntParam( name="pixSizeBallWithLowSimilarity", - label="Filtering Size in Pixels Bad Similarity", - description="Filtering size in pixels", + label="Filtering Size Bad Similarity", + description="Filtering size in pixels for low similarity.", value=0, range=(0, 10, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='computeNormalMaps', - label='Compute Normal Maps', - description='Compute normal maps per depth map.', + name="computeNormalMaps", + label="Compute Normal Maps", + description="Compute normal maps for each depth map.", value=False, uid=[0], advanced=True, ), 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'], + 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=[], ), @@ -122,9 +122,9 @@ class DepthMapFilter(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Filtered DepthMaps Folder', - description='Output folder for generated depth maps.', + name="output", + label="Filtered Depth Maps Folder", + description="Output folder for generated depth maps.", value=desc.Node.internalFolder, uid=[], ), @@ -132,21 +132,21 @@ class DepthMapFilter(desc.AVCommandLineNode): # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) desc.File( - name='depth', - label='Depth Maps', - description='Filtered depth maps.', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr', + name="depth", + label="Depth Maps", + description="Filtered depth maps.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='sim', - label='Sim Maps', - description='Filtered sim maps.', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>_simMap.exr', + name="sim", + label="Sim Maps", + description="Filtered sim maps.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 9bbfaa795c..1ac9c84c45 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -14,36 +14,45 @@ class DistortionCalibration(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file.', - value='', + name="input", + label="Input SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.File( - name='checkerboards', - label='Checkerboards Folder', - description='Folder containing checkerboard JSON files.', - value='', + name="checkerboards", + label="Checkerboards Folder", + description="Folder containing checkerboard JSON files.", + value="", uid=[0], ), desc.ChoiceParam( - name='cameraModel', - label='Camera Model', - description='Camera model used to estimate distortion.', - value='3deanamorphic4', - values=['3deanamorphic4'], + name="cameraModel", + label="Camera Model", + description="Camera model used to estimate distortion.", + value="3deanamorphic4", + values=["3deanamorphic4"], exclusive=True, 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='SfMData File', - description='Path to the output SfMData file.', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="output", + label="SfMData File", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ) ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 644519e0ec..7db62fec63 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -14,71 +14,73 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file containing a complete SfM.', - value='', + name="input", + label="Input SfMData", + description="SfMData file containing a complete SfM.", + value="", uid=[0], ), desc.File( - name='sfmDataFilter', - label='SfMData Filter', - description='Filter out cameras from the export if they are part of this SfMData. Export all cameras if empty.', - value='', + name="sfmDataFilter", + label="SfMData Filter", + description="Filter out cameras from the export if they are part of this SfMData.\n" + "If empty, export all cameras.", + value="", uid=[0], ), desc.File( - name='viewFilter', - label='View Filter', - description='Select the cameras to export using an expression based on the image filepath. Export all cameras if empty.', - value='', + name="viewFilter", + label="View Filter", + description="Select the cameras to export using an expression based on the image filepath.\n" + "If empty, export all cameras.", + value="", uid=[0], ), desc.BoolParam( - name='exportUVMaps', - label='Export UV Maps', - description='Export UV Maps, absolutes values (x,y) of distortion are encoding in UV channels.', + name="exportUVMaps", + label="Export UV Maps", + description="Export UV maps. Absolutes values (x, y) of distortion are encoded in UV channels.", value=True, uid=[0], ), desc.BoolParam( - name='exportUndistortedImages', - label='Export Undistorted Images', - description='Export Undistorted Images.', + name="exportUndistortedImages", + label="Export Undistorted Images", + description="Export undistorted images.", value=False, uid=[0], ), desc.ChoiceParam( - name='undistortedImageType', - label='Undistort Image Format ', - description='Image file format to use for undistorted images ("jpg", "png", "tif", "exr (half)").', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], + name="undistortedImageType", + label="Undistort Image Format", + description="Image file format to use for undistorted images ('jpg', 'png', 'tif', 'exr (half)').", + value="exr", + values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], enabled= lambda node: node.exportUndistortedImages.value, ), desc.BoolParam( - name='exportFullROD', - label='Export Full ROD', - description='Export Full ROD.', + name="exportFullROD", + label="Export Full ROD", + description="Export full ROD.", value=False, - enabled=lambda node: node.exportUndistortedImages.value and node.undistortedImageType.value == 'exr', + enabled=lambda node: node.exportUndistortedImages.value and node.undistortedImageType.value == "exr", uid=[0], ), desc.BoolParam( - name='correctPrincipalPoint', - label='Correct Principal Point ', - description='Correct Principal Point.', + name="correctPrincipalPoint", + label="Correct Principal Point", + description="Correct principal point.", value=True, 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'], + 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=[], ), @@ -86,26 +88,26 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output folder with animated camera and undistorted images.', + name="output", + label="Folder", + description="Output folder with animated camera and undistorted images.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputCamera', - label='Camera', - description='Output filename for the animated camera in Alembic format.', - value=desc.Node.internalFolder + 'camera.abc', - group='', # exclude from command line + name="outputCamera", + label="Camera", + description="Output filename for the animated camera in Alembic format.", + value=desc.Node.internalFolder + "camera.abc", + group="", # exclude from command line uid=[], ), desc.File( - name='outputUndistorted', - label='Undistorted Images', - description='Output Undistorted images.', - value=desc.Node.internalFolder + 'undistort', - group='', # exclude from command line + name="outputUndistorted", + label="Undistorted Images", + description="Output undistorted images.", + value=desc.Node.internalFolder + "undistort", + group="", # exclude from command line uid=[], ), ] diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index 2f18c94cea..dee37d94bf 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -7,21 +7,23 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): commandLine = 'aliceVision_exportColoredPointCloud {allParams}' category = 'Export' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file containing a complete SfM.', - value='', + name="input", + label="Input SfMData", + description="SfMData file containing a complete SfM.", + 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'], + 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=[], ), @@ -29,9 +31,9 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Point Cloud Filepath', - description='Output point cloud with visibilities as SfMData file.', + name="output", + label="Point Cloud Filepath", + description="Output point cloud with visibilities as SfMData file.", value="{cache}/{nodeType}/{uid0}/pointCloud.abc", uid=[], ), diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index b2cd04a39e..ec189d16af 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -8,30 +8,32 @@ class ExportMatches(desc.AVCommandLineNode): size = desc.DynamicNodeSize('input') category = 'Export' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -43,7 +45,7 @@ class ExportMatches(desc.AVCommandLineNode): elementDesc=desc.File( name="matchesFolder", label="Matches Folder", - description="", + description="Folder containing some computed matches.", value="", uid=[0], ), @@ -52,21 +54,21 @@ class ExportMatches(desc.AVCommandLineNode): description="Folder(s) in which computed matches are stored." ), 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'], + 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='Folder', - description='Output path for the features and descriptors files (*.feat, *.desc).', + name="output", + label="Folder", + description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index b297b81cf5..253144a2fb 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -16,19 +16,28 @@ class ExportMaya(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='', - value='', + name="input", + label="Input SfMData", + description="Input SfMData 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='Folder', - description='Folder for MeshroomMaya outputs: undistorted images and thumbnails.', + name="output", + label="Folder", + description="Folder for MeshroomMaya outputs: undistorted images and thumbnails.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 7b744a5e57..f3eff90c80 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -32,126 +32,126 @@ class FeatureExtraction(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='masksFolder', - label='Masks Folder', - description='Use masks to filter features. Filename should be the same or the image uid.', - value='', + name="masksFolder", + label="Masks Folder", + description="Use masks to filter features. Filename should be the same or the image UID.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='describerPreset', - label='Describer Density', - description='Control the ImageDescriber density (low, medium, normal, high, ultra).\n' - 'Warning: Use ULTRA only on small datasets.', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra', 'custom'], + name="describerPreset", + label="Describer Density", + description="Control the ImageDescriber density (low, medium, normal, high, ultra).\n" + "Warning: Use ULTRA only on small datasets.", + value="normal", + values=["low", "medium", "normal", "high", "ultra", "custom"], exclusive=True, uid=[0], group=lambda node: 'allParams' if node.describerPreset.value != 'custom' else None, ), desc.IntParam( - name='maxNbFeatures', - label='Max Nb Features', - description='Max number of features extracted (0 means default value based on Describer Density).', + name="maxNbFeatures", + label="Max Nb Features", + description="Maximum number of features extracted (0 means default value based on Describer Density).", value=0, range=(0, 100000, 1000), uid=[0], advanced=True, - enabled=lambda node: (node.describerPreset.value == 'custom'), + enabled=lambda node: (node.describerPreset.value == "custom"), ), desc.ChoiceParam( - name='describerQuality', - label='Describer Quality', - description='Control the ImageDescriber quality (low, medium, normal, high, ultra).', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="describerQuality", + label="Describer Quality", + description="Control the ImageDescriber quality (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='contrastFiltering', - label='Contrast Filtering', + name="contrastFiltering", + label="Contrast Filtering", description="Contrast filtering method to ignore features with too low contrast that can be considered as noise:\n" - "* Static: Fixed threshold.\n" - "* AdaptiveToMedianVariance: Based on image content analysis.\n" - "* NoFiltering: Disable contrast filtering.\n" - "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" - "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" - "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" - "* NonExtremaFiltering: Filter non-extrema peakValues.\n", - value='GridSort', - values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps', 'NonExtremaFiltering'], + " - Static: Fixed threshold.\n" + " - AdaptiveToMedianVariance: Based on image content analysis.\n" + " - NoFiltering: Disable contrast filtering.\n" + " - GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" + " - GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" + " - GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" + " - NonExtremaFiltering: Filter non-extrema peakValues.\n", + value="GridSort", + values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, uid=[0], ), desc.FloatParam( - name='relativePeakThreshold', - label='Relative Peak Threshold', - description='Peak Threshold relative to median of gradients.', + name="relativePeakThreshold", + label="Relative Peak Threshold", + description="Peak threshold relative to median of gradients.", value=0.01, range=(0.01, 1.0, 0.001), advanced=True, uid=[0], - enabled=lambda node: (node.contrastFiltering.value == 'AdaptiveToMedianVariance'), + enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( - name='gridFiltering', - label='Grid Filtering', - description='Enable grid filtering. Highly recommended to ensure usable number of features.', + name="gridFiltering", + label="Grid Filtering", + description="Enable grid filtering. Highly recommended to ensure usable number of features.", value=True, advanced=True, uid=[0], ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), desc.BoolParam( - name='forceCpuExtraction', - label='Force CPU Extraction', - description='Use only CPU feature extraction.', + name="forceCpuExtraction", + label="Force CPU Extraction", + description="Use only CPU feature extraction.", value=True, uid=[], advanced=True, ), desc.IntParam( - name='maxThreads', - label='Max Nb Threads', - description='Specifies the maximum number of threads to run simultaneously (0 for automatic mode).', + name="maxThreads", + label="Max Nb Threads", + description="Maximum number of threads to run simultaneously (0 for automatic mode).", value=0, range=(0, 24, 1), uid=[], advanced=True, ), 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'], + 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=[], ) @@ -159,9 +159,9 @@ class FeatureExtraction(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Features Folder', - description='Output path for the features and descriptors files (*.feat, *.desc).', + name="output", + label="Features Folder", + description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index cdc5b69eda..bbcab8bc3b 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -34,17 +34,17 @@ class FeatureMatching(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -53,173 +53,177 @@ class FeatureMatching(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.File( - name='imagePairsList', - label='Image Pairs', - description='Path to a file which contains the list of image pairs to match.', - value='', + name="imagePairsList", + label="Image Pairs", + description="Path to a file which contains the list of image pairs to match.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='photometricMatchingMethod', - label='Photometric Matching Method', - description='For Scalar based regions descriptor\n' - ' * BRUTE_FORCE_L2: L2 BruteForce matching\n' - ' * ANN_L2: L2 Approximate Nearest Neighbor matching\n' - ' * CASCADE_HASHING_L2: L2 Cascade Hashing matching\n' - ' * FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory) \n' - 'For Binary based descriptor\n' - ' * BRUTE_FORCE_HAMMING: BruteForce Hamming matching', - value='ANN_L2', - values=('BRUTE_FORCE_L2', 'ANN_L2', 'CASCADE_HASHING_L2', 'FAST_CASCADE_HASHING_L2', 'BRUTE_FORCE_HAMMING'), + name="photometricMatchingMethod", + label="Photometric Matching Method", + description="For scalar based regions descriptors:\n" + " - BRUTE_FORCE_L2: L2 BruteForce matching\n" + " - ANN_L2: L2 Approximate Nearest Neighbor matching\n" + " - CASCADE_HASHING_L2: L2 Cascade Hashing matching\n" + " - FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory)\n" + "For Binary based descriptors:\n" + " - BRUTE_FORCE_HAMMING: BruteForce Hamming matching", + value="ANN_L2", + values=("BRUTE_FORCE_L2", "ANN_L2", "CASCADE_HASHING_L2", "FAST_CASCADE_HASHING_L2", "BRUTE_FORCE_HAMMING"), exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='geometricEstimator', - label='Geometric Estimator', - description='Geometric estimator: (acransac: A-Contrario Ransac, loransac: LO-Ransac (only available for "fundamental_matrix" model)', - value='acransac', - values=['acransac', 'loransac'], + name="geometricEstimator", + label="Geometric Estimator", + description="Geometric estimator:\n" + " - acransac: A-Contrario Ransac.\n" + " - loransac: LO-Ransac (only available for 'fundamental_matrix' model).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='geometricFilterType', - label='Geometric Filter Type', - description='Geometric validation method to filter features matches: \n' - ' * fundamental_matrix\n' - ' * fundamental_with_distortion\n' - ' * essential_matrix\n' - ' * homography_matrix\n' - ' * homography_growing\n' - ' * no_filtering', - value='fundamental_matrix', - values=['fundamental_matrix', 'fundamental_with_distortion', 'essential_matrix', 'homography_matrix', 'homography_growing', 'no_filtering'], + name="geometricFilterType", + label="Geometric Filter Type", + description="Geometric validation method to filter features matches:\n" + " - fundamental_matrix\n" + " - fundamental_with_distortion\n" + " - essential_matrix\n" + " - homography_matrix\n" + " - homography_growing\n" + " - no_filtering", + value="fundamental_matrix", + values=["fundamental_matrix", "fundamental_with_distortion", "essential_matrix", "homography_matrix", "homography_growing", "no_filtering"], exclusive=True, uid=[0], advanced=True, ), desc.FloatParam( - name='distanceRatio', - label='Distance Ratio', - description='Distance ratio to discard non meaningful matches.', + name="distanceRatio", + label="Distance Ratio", + description="Distance ratio to discard non meaningful matches.", value=0.8, range=(0.0, 1.0, 0.01), uid=[0], advanced=True, ), desc.IntParam( - name='maxIteration', - label='Max Iteration', - description='Maximum number of iterations allowed in ransac step.', + name="maxIteration", + label="Max Iterations", + description="Maximum number of iterations allowed in the ransac step.", value=2048, range=(1, 20000, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='geometricError', - label='Geometric Validation Error', - description='Maximum error (in pixels) allowed for features matching during geometric verification.\n' - 'If set to 0, it will select a threshold according to the localizer estimator used\n' - '(if ACRansac, it will analyze the input data to select the optimal value).', + name="geometricError", + label="Geometric Validation Error", + description="Maximum error (in pixels) allowed for features matching during geometric verification.\n" + "If set to 0, it will select a threshold according to the localizer estimator used\n" + "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='knownPosesGeometricErrorMax', - label='Known Poses Geometric Error Max', - description='Maximum error (in pixels) allowed for features matching guided by geometric information from known camera poses.\n' - 'If set to 0 it lets the ACRansac select an optimal value.', + name="knownPosesGeometricErrorMax", + label="Known Poses Geometric Error Max", + description="Maximum error (in pixels) allowed for features matching guided by geometric information from known camera poses.\n" + "If set to 0 it lets the ACRansac select an optimal value.", value=5.0, range=(0.0, 100.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='minRequired2DMotion', - label='Minimal 2D Motion', - description='Filter out matches without enough 2D motion (threshold in pixels). Use -1 to disable this filter. Useful for filtering the background during acquisition with a turntable and a static camera.', + name="minRequired2DMotion", + label="Minimal 2D Motion", + description="Filter out matches without enough 2D motion (threshold in pixels).\n" + "Use -1 to disable this filter.\n" + "Useful for filtering the background during acquisition with a turntable and a static camera.", value=-1.0, range=(0.0, 10.0, 1.0), uid=[0], ), desc.IntParam( - name='maxMatches', - label='Max Matches', - description='Maximum number of matches to keep.', + name="maxMatches", + label="Max Matches", + description="Maximum number of matches to keep.", value=0, range=(0, 10000, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='savePutativeMatches', - label='Save Putative Matches', - description='putative matches.', + name="savePutativeMatches", + label="Save Putative Matches", + description="Save putative matches.", value=False, uid=[0], advanced=True, ), desc.BoolParam( - name='crossMatching', - label='Cross Matching', - description='Make sure that the matching process is symmetric (same matches for I->J than for J->I)', + name="crossMatching", + label="Cross Matching", + description="Ensure that the matching process is symmetric (same matches for I->J than for J->I).", value=False, uid=[0], ), desc.BoolParam( - name='guidedMatching', - label='Guided Matching', - description='the found model to improve the pairwise correspondences.', + name="guidedMatching", + label="Guided Matching", + description="Use the found model to improve the pairwise correspondences.", value=False, uid=[0], ), desc.BoolParam( - name='matchFromKnownCameraPoses', - label='Match From Known Camera Poses', - description='Enable the usage of geometric information from known camera poses to guide the feature matching.\n' - 'If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.', + name="matchFromKnownCameraPoses", + label="Match From Known Camera Poses", + description="Enable the usage of geometric information from known camera poses to guide the feature matching.\n" + "If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.", value=False, uid=[0], ), desc.BoolParam( - name='exportDebugFiles', - label='Export Debug Files', - description='debug files (svg, dot).', + name="exportDebugFiles", + label="Export Debug Files", + description="Expor debug files (svg, dot).", value=False, uid=[], advanced=True ), 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'], + 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='Matches Folder', - description='Path to a folder in which computed matches will be stored.', + name="output", + label="Matches Folder", + description="Path to a folder in which the computed matches are stored.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index 41d9967df5..bfb2061616 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -16,88 +16,88 @@ class FeatureRepeatability(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input Folder', - description='Input Folder with evaluation datasets.', - value='', + name="input", + label="Input Folder", + description="Input folder with evaluation datasets.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["sift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='describerPreset', - label='Describer Density', - description='Control the ImageDescriber density (low, medium, normal, high, ultra).\n' - 'Warning: Use ULTRA only on small datasets.', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="describerPreset", + label="Describer Density", + description="Control the ImageDescriber density (low, medium, normal, high, ultra).\n" + "Warning: Use ULTRA only on small datasets.", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='describerQuality', - label='Describer Quality', - description='Control the ImageDescriber quality (low, medium, normal, high, ultra).', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="describerQuality", + label="Describer Quality", + description="Control the ImageDescriber quality (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='contrastFiltering', - label='Contrast Filtering', + name="contrastFiltering", + label="Contrast Filtering", description="Contrast filtering method to ignore features with too low contrast that can be considered as noise:\n" - "* Static: Fixed threshold.\n" - "* AdaptiveToMedianVariance: Based on image content analysis.\n" - "* NoFiltering: Disable contrast filtering.\n" - "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" - "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" - "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" - "* NonExtremaFiltering: Filter non-extrema peakValues.\n", - value='Static', - values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps', 'NonExtremaFiltering'], + " - Static: Fixed threshold.\n" + " - AdaptiveToMedianVariance: Based on image content analysis.\n" + " - NoFiltering: Disable contrast filtering.\n" + " - GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" + " - GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" + " - GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" + " - NonExtremaFiltering: Filter non-extrema peakValues.", + value="Static", + values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, uid=[0], ), desc.FloatParam( - name='relativePeakThreshold', - label='Relative Peak Threshold', - description='Peak Threshold relative to median of gradients.', + name="relativePeakThreshold", + label="Relative Peak Threshold", + description="Peak threashold relative to the median of gradients.", value=0.01, range=(0.01, 1.0, 0.001), advanced=True, uid=[0], - enabled=lambda node: (node.contrastFiltering.value == 'AdaptiveToMedianVariance'), + enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( - name='gridFiltering', - label='Grid Filtering', - description='Enable grid filtering. Highly recommended to ensure usable number of features.', + name="gridFiltering", + label="Grid Filtering", + description="Enable grid filtering. Highly recommended to ensure a usable number of features.", value=True, advanced=True, uid=[0], ), desc.BoolParam( - name='forceCpuExtraction', - label='Force CPU Extraction', - description='Use only CPU feature extraction.', + name="forceCpuExtraction", + label="Force CPU Extraction", + description="Use only CPU feature extraction.", value=True, uid=[], advanced=True, ), desc.IntParam( - name='invalidate', - label='Invalidate', - description='Invalidate.', + name="invalidate", + label="Invalidate", + description="Invalidate.", value=0, range=(0, 10000, 1), group="", @@ -106,17 +106,17 @@ class FeatureRepeatability(desc.AVCommandLineNode): desc.StringParam( name="comments", label="Comments", - description="Comments", + description="Comments.", value="", group="", uid=[], ), 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'], + 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=[], ) @@ -124,9 +124,9 @@ class FeatureRepeatability(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output path for the features and descriptors files (*.feat, *.desc).', + name="output", + label="Folder", + description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index b3e93aa02a..de7e5cfe5d 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -18,85 +18,85 @@ class GlobalSfM(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( - name='featuresFolder', - label='Features Folder', - description="", - value='', + name="featuresFolder", + label="Features Folder", + description="Folder containing some extracted features.", + value="", uid=[0], ), - name='featuresFolders', - label='Features Folders', + name="featuresFolders", + label="Features Folders", description="Folder(s) containing the extracted features." ), desc.ListAttribute( elementDesc=desc.File( - name='matchesFolder', - label='Matches Folder', - description="", - value='', + name="matchesFolder", + label="Matches Folder", + description="Folder containing some computed matches.", + value="", uid=[0], ), - name='matchesFolders', - label='Matches Folders', + name="matchesFolders", + label="Matches Folders", description="Folder(s) in which computed matches are stored." ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', - 'sift_ocv', 'akaze_ocv'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", + "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='rotationAveraging', - label='Rotation Averaging Method', - description="Method for rotation averaging :\n" - " * L1 minimization\n" - " * L2 minimization\n", - values=['L1_minimization', 'L2_minimization'], - value='L2_minimization', + name="rotationAveraging", + label="Rotation Averaging Method", + description="Method for rotation averaging:\n" + " - L1 minimization\n" + " - L2 minimization", + values=["L1_minimization", "L2_minimization"], + value="L2_minimization", exclusive=True, uid=[0], ), desc.ChoiceParam( - name='translationAveraging', - label='Translation Averaging Method', - description="Method for translation averaging :\n" - " * L1 minimization\n" - " * L2 minimization of sum of squared Chordal distances\n" - " * L1 soft minimization", - values=['L1_minimization', 'L2_minimization', 'L1_soft_minimization'], - value='L1_soft_minimization', + name="translationAveraging", + label="Translation Averaging Method", + description="Method for translation averaging:\n" + " - L1 minimization\n" + " - L2 minimization of sum of squared Chordal distances\n" + " - L1 soft minimization", + values=["L1_minimization", "L2_minimization", "L1_soft_minimization"], + value="L1_soft_minimization", exclusive=True, uid=[0], ), desc.BoolParam( - name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters.', - description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) during the reconstruction.\n' - 'This may be helpful if the input cameras are already fully calibrated.', + name="lockAllIntrinsics", + label="Lock All Intrinsic Camera Parameters", + description="Force to keep all the intrinsics parameters of the cameras (focal length, \n" + "principal point, distortion if any) constant during the reconstruction.\n" + "This may be helpful if the input cameras are already fully calibrated.", value=False, 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'], + 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=[], ) @@ -104,23 +104,23 @@ class GlobalSfM(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.abc', + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Output Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Output Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), desc.File( - name='extraInfoFolder', - label='Folder', - description='Folder for intermediate reconstruction files and additional reconstruction information files.', + name="extraInfoFolder", + label="Folder", + description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, uid=[], ), From 9666fc565b76f24538593ffdf253947ecf73cafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 16 Jun 2023 10:31:18 +0200 Subject: [PATCH 0826/1093] [nodes] I-L: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/aliceVision/ImageMasking.py | 189 ++-- meshroom/aliceVision/ImageMatching.py | 108 +-- meshroom/aliceVision/ImageMatchingMultiSfM.py | 135 +-- meshroom/aliceVision/ImageProcessing.py | 836 ++++++++++-------- meshroom/aliceVision/ImportKnownPoses.py | 33 +- meshroom/aliceVision/KeyframeSelection.py | 24 +- meshroom/aliceVision/LdrToHdrCalibration.py | 117 +-- meshroom/aliceVision/LdrToHdrMerge.py | 189 ++-- meshroom/aliceVision/LdrToHdrSampling.py | 102 +-- meshroom/aliceVision/LightingCalibration.py | 53 +- meshroom/aliceVision/LightingEstimation.py | 79 +- 11 files changed, 977 insertions(+), 888 deletions(-) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index e52ce5caeb..48a810169a 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -9,138 +9,143 @@ class ImageMasking(desc.AVCommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentaiton = ''' + ''' + inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file.''', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='', - value='HSV', - values=['HSV', 'AutoGrayscaleThreshold'], + name="algorithm", + label="Algorithm", + description="", + value="HSV", + values=["HSV", "AutoGrayscaleThreshold"], exclusive=True, uid=[0], ), desc.GroupAttribute( name="hsv", label="HSV Parameters", - description="""Values to select: - - Green: default values - - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1 - - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 - """, + description="Values to select:\n" + " - Green: default values\n" + " - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1\n" + " - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2", group=None, - enabled=lambda node: node.algorithm.value == 'HSV', + enabled=lambda node: node.algorithm.value == "HSV", groupDesc=[ - desc.FloatParam( - name='hsvHue', - label='Hue', - description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', - semantic='color/hue', - value=0.33, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvHueRange', - label='Tolerance', - description='Tolerance around the hue value to isolate.', - value=0.1, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMinSaturation', - label='Min Saturation', - description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', - value=0.3, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMaxSaturation', - label='Max Saturation', - description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', - value=1.0, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMinValue', - label='Min Value', - description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', - value=0.3, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMaxValue', - label='Max Value', - description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', - value=1.0, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - ]), + desc.FloatParam( + name="hsvHue", + label="Hue", + description="Hue value to isolate in [0,1] range.\n" + "0 = red, 0.33 = green, 0.66 = blue, 1 = red.", + semantic="color/hue", + value=0.33, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvHueRange", + label="Tolerance", + description="Tolerance around the hue value to isolate.", + value=0.1, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMinSaturation", + label="Min Saturation", + description="Hue is meaningless if saturation is low. Do not mask pixels below this threshold.", + value=0.3, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMaxSaturation", + label="Max Saturation", + description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMinValue", + label="Min Value", + description="Hue is meaningless if the value is low. Do not mask pixels below this threshold.", + value=0.3, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMaxValue", + label="Max Value", + description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + ] + ), desc.BoolParam( - name='invert', - label='Invert', - description='''If ticked, the selected area is ignored. - If not, only the selected area is considered.''', + name="invert", + label="Invert", + description="If selected, the selected area is ignored.\n" + "If not, only the selected area is considered.", value=True, uid=[0] ), desc.IntParam( - name='growRadius', - label='Grow Radius', - description='Grow the selected area. It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.', + name="growRadius", + label="Grow Radius", + description="Grow the selected area.\n" + "It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.", value=0, range=(0, 50, 1), uid=[0] ), desc.IntParam( - name='shrinkRadius', - label='Shrink Radius', - description='Shrink the selected area.', + name="shrinkRadius", + label="Shrink Radius", + description="Shrink the selected area.", value=0, range=(0, 50, 1), uid=[0] ), desc.File( - name='depthMapFolder', - label='Depth Mask Folder', - description='''Depth Mask Folder''', - value='', + name="depthMapFolder", + label="Depth Mask Folder", + description="Depth mask folder.", + value="", uid=[0], ), desc.StringParam( - name='depthMapExp', - label='Depth Mask Expression', - description='''Depth Mask Expression, like "{inputFolder}/{stem}-depth.{ext}".''', - value='', + name="depthMapExp", + label="Depth Mask Expression", + description="Depth mask expression, like '{inputFolder}/{stem}-depth.{ext}'.", + 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'], + 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', - description='''Output folder.''', + name="output", + label="Output", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 60992785ac..64c05330cd 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -35,17 +35,17 @@ class ImageMatching(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfmData', - description='SfMData file .', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -54,85 +54,87 @@ class ImageMatching(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.ChoiceParam( - name='method', - label='Method', - description='Method used to select the image pairs to match:\n' - ' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' - 'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' - 'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' - ' * Sequential: If your input is a video sequence, you can use this option to link images between them over time.\n' - ' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' - ' * Exhaustive: Export all image pairs.\n' - ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' - ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', - value='SequentialAndVocabularyTree', - values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum', 'FrustumOrVocabularyTree'], + name="method", + label="Method", + description="Method used to select the image pairs to match:\n" + " - VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n" + "feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n" + "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal Number of Images', all image pairs will be selected.\n" + " - Sequential: If your input is a video sequence, you can use this option to link images between them over time.\n" + " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n" + " - Exhaustive: Export all image pairs.\n" + " - Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n" + " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n", + value="SequentialAndVocabularyTree", + values=["VocabularyTree", "Sequential", "SequentialAndVocabularyTree", "Exhaustive", "Frustum", "FrustumOrVocabularyTree"], exclusive=True, uid=[0], ), desc.File( - name='tree', - label='Voc Tree: Tree', - description='Input name for the vocabulary tree file.', - value='${ALICEVISION_VOCTREE}', + name="tree", + label="Voc Tree: Tree", + description="Input name for the vocabulary tree file.", + value="${ALICEVISION_VOCTREE}", uid=[], - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.File( - name='weights', - label='Voc Tree: Weights', - description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', - value='', + name="weights", + label="Voc Tree: Weights", + description="Input name for the weight file.\n" + "If not provided, the weights will be computed on the database built with the provided set.", + value="", uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='minNbImages', - label='Voc Tree: Minimal Number of Images', - description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', + name="minNbImages", + label="Voc Tree: Minimum Number Of Images", + description="Minimum number of images to use the vocabulary tree.\n" + "If we have less features than this threshold, we will compute all matching combinations.", value=200, range=(0, 500, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='maxDescriptors', - label='Voc Tree: Max Descriptors', - description='Limit the number of descriptors you load per image. Zero means no limit.', + name="maxDescriptors", + label="Voc Tree: Max Descriptors", + description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbMatches', - label='Voc Tree: Nb Matches', - description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', + name="nbMatches", + label="Voc Tree: Nb Matches", + description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbNeighbors', - label='Sequential: Nb Neighbors', - description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', + name="nbNeighbors", + label="Sequential: Nb Neighbors", + description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'Sequential' in node.method.value, + enabled=lambda node: "Sequential" in node.method.value, ), 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'], + 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=[], ) @@ -140,10 +142,10 @@ class ImageMatching(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Image Pairs', - description='Filepath to the output file with the list of selected image pairs.', - value=desc.Node.internalFolder + 'imageMatches.txt', + name="output", + label="Image Pairs", + description="Filepath to the output file with the list of selected image pairs.", + value=desc.Node.internalFolder + "imageMatches.txt", uid=[], ), ] diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 6b25cb66af..5d834eb99e 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -20,24 +20,24 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): ''' inputs = [ desc.File( - name='input', - label='Input A', - description='SfMData file .', - value='', + name="input", + label="Input A", + description="First input SfMData file.", + value="", uid=[0], ), desc.File( - name='inputB', - label='Input B', - description='SfMData file .', - value='', + name="inputB", + label="Input B", + description="Second input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -46,93 +46,98 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.ChoiceParam( - name='method', - label='Method', - description='Method used to select the image pairs to match:\n' - ' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' - 'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' - 'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' - ' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' - ' * Exhaustive: Export all image pairs.\n' - ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' - ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', - value='SequentialAndVocabularyTree', - values=['VocabularyTree', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum'], + name="method", + label="Method", + description="Method used to select the image pairs to match:\n" + " - VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n" + "feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n" + "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal Number of Images', all image pairs will be selected.\n" + " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n" + " - Exhaustive: Export all image pairs.\n" + " - Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n" + " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection. Otherwise, use VocabularyTree.\n", + value="SequentialAndVocabularyTree", + values=["VocabularyTree", "SequentialAndVocabularyTree", "Exhaustive", "Frustum"], exclusive=True, uid=[0], ), desc.File( - name='tree', - label='Voc Tree: Tree', - description='Input name for the vocabulary tree file.', - value='${ALICEVISION_VOCTREE}', + name="tree", + label="Voc Tree: Tree", + description="Input name for the vocabulary tree file.", + value="${ALICEVISION_VOCTREE}", uid=[], - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.File( - name='weights', - label='Voc Tree: Weights', - description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', - value='', + name="weights", + label="Voc Tree: Weights", + description="Input name for the weight file.\n" + "If not provided, the weights will be computed on the database built with the provided set.", + value="", uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.ChoiceParam( - name='matchingMode', - label='Matching Mode', - description='The mode to combine image matching between the input SfMData A and B:\n"a/a+a/b" for A with A + A with B.\n"a/ab" for A with A and B.\n"a/b" for A with B.', - value='a/a+a/b', - values=['a/a+a/b','a/ab', 'a/b'], + name="matchingMode", + label="Matching Mode", + description="The mode to combine image matching between the input SfMData A and B:\n" + "- 'a/a+a/b' for A with A + A with B.\n" + "- 'a/ab' for A with A and B.\n" + "- 'a/b' for A with B.", + value="a/a+a/b", + values=["a/a+a/b","a/ab", "a/b"], exclusive=True, uid=[0], ), desc.IntParam( - name='minNbImages', - label='Voc Tree: Minimal Number of Images', - description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', + name="minNbImages", + label="Voc Tree: Minimum Number Of Images", + description="Minimum number of images to use the vocabulary tree.\n" + "If we have less features than this threshold, we will compute all the matching combinations.", value=200, range=(0, 500, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='maxDescriptors', - label='Voc Tree: Max Descriptors', - description='Limit the number of descriptors you load per image. Zero means no limit.', + name="maxDescriptors", + label="Voc Tree: Max Descriptors", + description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbMatches', - label='Voc Tree: Nb Matches', - description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', + name="nbMatches", + label="Voc Tree: Nb Matches", + description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbNeighbors', - label='Sequential: Nb Neighbors', - description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', + name="nbNeighbors", + label="Sequential: Nb Neighbors", + description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'Sequential' in node.method.value, + enabled=lambda node: "Sequential" in node.method.value, ), 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'], + 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=[], ) @@ -140,17 +145,17 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='List File', - description='Filepath to the output file with the list of selected image pairs.', - value=desc.Node.internalFolder + 'imageMatches.txt', + name="output", + label="List File", + description="Filepath to the output file with the list of selected image pairs.", + value=desc.Node.internalFolder + "imageMatches.txt", uid=[], ), desc.File( - name='outputCombinedSfM', - label='Combined SfM', - description='Path for the combined SfMData file', - value=desc.Node.internalFolder + 'combineSfM.sfm', + name="outputCombinedSfM", + label="Combined SfM", + description="Path for the combined SfMData file.", + value=desc.Node.internalFolder + "combineSfM.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index c68c41413c..ad12c8cf02 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -41,467 +41,520 @@ class ImageProcessing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', - value='', + name="input", + label="Input", + description="SfMData file input, image filenames or regex(es) on the image file path.\n" + "Supported regex:\n" + " - '#' matches a single digit.\n" + " - '@' matches one or more digits.\n" + " - '?' matches one character.\n" + " - '*' matches zero character or more.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="inputFolder", - label="input Folder", - description="", + label="Input Folder", + description="Folder containing images.", value="", uid=[0], ), name="inputFolders", - label="Images input Folders", - description='Use images from specific folder(s).', + label="Input Images Folders", + description="Use images from specific folder(s).", ), desc.ListAttribute( elementDesc=desc.StringParam( name="metadataFolder", label="Metadata Folder", - description="", + description="Specific folder containing images with metadata.", value="", uid=[0], ), name="metadataFolders", - label="Metadata input Folders", - description='Use images metadata from specific folder(s).', + label="Input Metadata Folders", + description="Use images metadata from specific folder(s).", ), desc.ChoiceParam( - name='extension', - label='Output File Extension', - description='Output Image File Extension.', - value='', - values=['', 'exr', 'jpg', 'tiff', 'png'], + name="extension", + label="Output File Extension", + description="Output image file extension.\n" + "If unset, the output file extension will match the input's if possible.", + value="", + values=["", "exr", "jpg", "tiff", "png"], exclusive=True, uid=[0], ), desc.BoolParam( - name='reconstructedViewsOnly', - label='Only Reconstructed Views', - description='Process Only Reconstructed Views', + name="reconstructedViewsOnly", + label="Only Reconstructed Views", + description="Only process reconstructed views.", value=False, uid=[0], ), desc.BoolParam( - name='keepImageFilename', - label='Keep Image Name', - description='Keep original image name instead of view name', + name="keepImageFilename", + label="Keep Image Name", + description="Keep the original image name instead of the view name.", value=False, uid=[0], ), desc.BoolParam( - name='fixNonFinite', - label='Fix Non-Finite', - description='Fix non-finite pixels based on neighboring pixels average.', + name="fixNonFinite", + label="Fix Non-Finite", + description="Fix non-finite pixels based on neighboring pixels average.", value=False, uid=[0], ), desc.BoolParam( - name='exposureCompensation', - label='Exposure Compensation', - description='Exposure compensation (only valid for SfMData)', + name="exposureCompensation", + label="Exposure Compensation", + description="Exposure compensation (only valid for SfMData).", value=False, uid=[0], ), desc.BoolParam( - name='rawAutoBright', - label='RAW Auto Bright', - description='Enable automatic exposure adjustment for RAW images', + name="rawAutoBright", + label="RAW Auto Bright", + description="Enable automatic exposure adjustment for RAW images.", value=False, uid=[0], ), desc.FloatParam( - name='rawExposureAdjust', - label='RAW Exposure Adjustment', - description='Manual exposure adjustment in fstops for RAW images', + name="rawExposureAdjust", + label="RAW Exposure Adjustment", + description="Manual exposure adjustment in fstops for RAW images.", value=0.0, range=(-2.0, 3.0, 0.125), uid=[0], ), - desc.GroupAttribute(name="lensCorrection", label="Lens Correction", description="Automatic lens correction settings.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='lensCorrectionEnabled', - label='Enable', - description='Enable lens correction.', - value=False, - uid=[0], - ), - desc.BoolParam( - name='geometry', - label='Geometry', - description='Geometry correction if a model is available in SfM data.', - value=False, - uid=[0], - enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, - ), - desc.BoolParam( - name='vignetting', - label='Vignetting', - description='Vignetting correction if model parameters are available in metadata.', - value=False, - uid=[0], - enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, - ), - desc.BoolParam( - name='chromaticAberration', - label='Chromatic Aberration', - description='Chromatic aberration (fringing) correction if model parameters are available in metadata.', - value=False, - uid=[0], - enabled=False # To replace with the line below when the correction of chromatic aberration will be available - # enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value - ) - ]), + desc.GroupAttribute( + name="lensCorrection", + label="Lens Correction", + description="Automatic lens correction settings.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="lensCorrectionEnabled", + label="Enable", + description="Enable lens correction.", + value=False, + uid=[0], + ), + desc.BoolParam( + name="geometry", + label="Geometry", + description="Geometry correction if a model is available in the SfMData.", + value=False, + uid=[0], + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + desc.BoolParam( + name="vignetting", + label="Vignetting", + description="Vignetting correction if the model parameters are available in the metadata.", + value=False, + uid=[0], + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + desc.BoolParam( + name="chromaticAberration", + label="Chromatic Aberration", + description="Chromatic aberration (fringing) correction if the model parameters are available in the metadata.", + value=False, + uid=[0], + enabled=False # To replace with the line below when the correction of chromatic aberration will be available + # enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value + ) + ] + ), desc.FloatParam( - name='scaleFactor', - label='Scale Factor', - description='Scale Factor.', + name="scaleFactor", + label="Scale Factor", + description="Scale factor.", value=1.0, range=(0.0, 1.0, 0.01), uid=[0], ), desc.IntParam( - name='maxWidth', - label='Max Width', - description='Maximal width of the output images (0: ignored).', + name="maxWidth", + label="Max Width", + description="Maximum width of the output images (0: ignored).", value=0, range=(0, 10000, 1), uid=[0], ), desc.IntParam( - name='maxHeight', - label='Max Height', - description='Maximal height of the output images (0: ignored).', + name="maxHeight", + label="Max Height", + description="Maximum height of the output images (0: ignored).", value=0, range=(0, 10000, 1), uid=[0], ), desc.FloatParam( - name='contrast', - label='Contrast', - description='Contrast.', + name="contrast", + label="Contrast", + description="Contrast.", value=1.0, range=(0.0, 100.0, 0.1), uid=[0], ), desc.IntParam( - name='medianFilter', - label='Median Filter', - description='Median Filter.', + name="medianFilter", + label="Median Filter", + description="Median filter.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='fillHoles', - label='Fill Holes', - description='Fill holes based on the alpha channel.\n' - 'Note: It will enable fixNonFinite, as it is required for the image pyramid construction used to fill holes.', + name="fillHoles", + label="Fill Holes", + description="Fill holes based on the alpha channel.\n" + "Note: It will enable 'fixNonFinite', as it is required for the image pyramid construction used to fill holes.", value=False, uid=[0], ), - desc.GroupAttribute(name="sharpenFilter", label="Sharpen Filter", description="Sharpen Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='sharpenFilterEnabled', - label='Enable', - description='Use sharpen.', - value=False, - uid=[0], - ), - desc.IntParam( - name='width', - label='Width', - description='Sharpen Width.', - value=3, - range=(1, 9, 2), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - desc.FloatParam( - name='contrast', - label='Contrast', - description='Sharpen Contrast.', - value=1.0, - range=(0.0, 100.0, 0.1), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - desc.FloatParam( - name='threshold', - label='Threshold', - description='Sharpen Threshold.', - value=0.0, - range=(0.0, 1.0, 0.01), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - ]), - desc.GroupAttribute(name="bilateralFilter", label="Bilateral Filter", description="Bilateral Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='bilateralFilterEnabled', - label='Enable', - description='Bilateral Filter.', - value=False, - uid=[0], - ), - desc.IntParam( - name='bilateralFilterDistance', - label='Distance', - description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', - value=0, - range=(0, 9, 1), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - desc.FloatParam( - name='bilateralFilterSigmaSpace', - label='Sigma Coordinate Space', - description='Bilateral Filter sigma in the coordinate space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - desc.FloatParam( - name='bilateralFilterSigmaColor', - label='Sigma Color Space', - description='Bilateral Filter sigma in the color space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - ]), - desc.GroupAttribute(name="claheFilter", label="Clahe Filter", description="Clahe Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='claheEnabled', - label='Enable', - description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', - value=False, - uid=[0], - ), - desc.FloatParam( - name='claheClipLimit', - label='Clip Limit', - description='Sets Threshold For Contrast Limiting.', - value=4.0, - range=(0.0, 8.0, 1.0), - uid=[0], - enabled=lambda node: node.claheFilter.claheEnabled.value, - ), - desc.IntParam( - name='claheTileGridSize', - label='Tile Grid Size', - description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', - value=8, - range=(4, 64, 4), - uid=[0], - enabled=lambda node: node.claheFilter.claheEnabled.value, - ), - ]), - desc.GroupAttribute(name="noiseFilter", label="Noise Filter", description="Noise Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='noiseEnabled', - label='Enable', - description='Add Noise.', - value=False, - uid=[0], - ), - desc.ChoiceParam( - name='noiseMethod', - label='Method', - description=" * method: There are several noise types to choose from:\n" - " * uniform: adds noise values uninformly distributed on range [A,B).\n" - " * gaussian: adds Gaussian (normal distribution) noise values with mean value A and standard deviation B.\n" - " * salt: changes to value A a portion of pixels given by B.\n", - value='uniform', - values=['uniform', 'gaussian', 'salt'], - exclusive=True, - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.FloatParam( - name='noiseA', - label='A', - description='Parameter that have a different interpretation depending on the method chosen.', - value=0.0, - range=(0.0, 1.0, 0.0001), - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.FloatParam( - name='noiseB', - label='B', - description='Parameter that have a different interpretation depending on the method chosen.', - value=1.0, - range=(0.0, 1.0, 0.0001), - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.BoolParam( - name='noiseMono', - label='Mono', - description='If is Checked, a single noise value will be applied to all channels otherwise a separate noise value will be computed for each channel.', - value=True, - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - ]), - desc.GroupAttribute(name="nlmFilter", label="NL Means Denoising (8 bits)", - description="NL Means Denoising Parameters.\n This implementation only works on 8-bit images, so the colors can be reduced and clamped.", - joinChar=":", groupDesc=[ - desc.BoolParam( - name='nlmFilterEnabled', - label='Enable', - description='Use Non-local Mean Denoising from OpenCV to denoise images', - value=False, - uid=[0], - ), - desc.FloatParam( - name='nlmFilterH', - label='H', - description='Parameter regulating filter strength for luminance component.\n' - 'Bigger H value perfectly removes noise but also removes image details, smaller H value preserves details but also preserves some noise.', - value=5.0, - range=(1.0, 1000.0, 0.01), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - desc.FloatParam( - name='nlmFilterHColor', - label='HColor', - description='Parameter regulating filter strength for color components. Not necessary for grayscale images.\n' - 'Bigger HColor value perfectly removes noise but also removes image details, smaller HColor value preserves details but also preserves some noise.', - value=10.0, - range=(0.0, 1000.0, 0.01), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - desc.IntParam( - name='nlmFilterTemplateWindowSize', - label='Template Window Size', - description='Size in pixels of the template patch that is used to compute weights. Should be odd.', - value=7, - range=(1, 101, 2), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - desc.IntParam( - name='nlmFilterSearchWindowSize', - label='Search Window Size', - description='Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.', - value=21, - range=(1, 1001, 2), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - ]), + desc.GroupAttribute( + name="sharpenFilter", + label="Sharpen Filter", + description="Sharpen filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="sharpenFilterEnabled", + label="Enable", + description="Use sharpen filter.", + value=False, + uid=[0], + ), + desc.IntParam( + name="width", + label="Width", + description="Sharpening width.", + value=3, + range=(1, 9, 2), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + desc.FloatParam( + name="contrast", + label="Contrast", + description="Sharpening contrast.", + value=1.0, + range=(0.0, 100.0, 0.1), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + desc.FloatParam( + name="threshold", + label="Threshold", + description="Sharpening threshold.", + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="bilateralFilter", + label="Bilateral Filter", + description="Bilateral filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="bilateralFilterEnabled", + label="Enable", + description="Use bilateral filter.", + value=False, + uid=[0], + ), + desc.IntParam( + name="bilateralFilterDistance", + label="Distance", + description="Diameter of each pixel neighborhood that is used during bilateral filtering.\n" + "Could be very slow for large filters, so it is recommended to use 5.", + value=0, + range=(0, 9, 1), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + desc.FloatParam( + name="bilateralFilterSigmaSpace", + label="Sigma Coordinate Space", + description="Bilateral filter sigma in the coordinate space.", + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + desc.FloatParam( + name="bilateralFilterSigmaColor", + label="Sigma Color Space", + description="Bilateral filter sigma in the color space.", + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="claheFilter", + label="Clahe Filter", + description="Clahe filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="claheEnabled", + label="Enable", + description="Use Contrast Limited Adaptive Histogram Equalization (CLAHE) filter.", + value=False, + uid=[0], + ), + desc.FloatParam( + name="claheClipLimit", + label="Clip Limit", + description="Threshold for contrast limiting.", + value=4.0, + range=(0.0, 8.0, 1.0), + uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, + ), + desc.IntParam( + name="claheTileGridSize", + label="Tile Grid Size", + description="Size of the grid for histogram equalization.\n" + "Input image will be divided into equally sized rectangular tiles.", + value=8, + range=(4, 64, 4), + uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="noiseFilter", + label="Noise Filter", + description="Noise filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="noiseEnabled", + label="Enable", + description="Add noise.", + value=False, + uid=[0], + ), + desc.ChoiceParam( + name="noiseMethod", + label="Method", + description="There are several noise types to choose from:\n" + " - uniform: adds noise values uniformly distributed on range [A,B).\n" + " - gaussian: adds Gaussian (normal distribution) noise values with mean value A and standard deviation B.\n" + " - salt: changes to value A a portion of pixels given by B.\n", + value="uniform", + values=["uniform", "gaussian", "salt"], + exclusive=True, + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.FloatParam( + name="noiseA", + label="A", + description="Parameter that has a different interpretation depending on the chosen method:\n" + " - uniform: lower bound of the range on which the noise is uniformly distributed.\n" + " - gaussian: the mean value of the Gaussian noise.\n" + " - salt: the value of the specified portion of pixels.", + value=0.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.FloatParam( + name="noiseB", + label="B", + description="Parameter that has a different interpretation depending on the chosen method:\n" + " - uniform: higher bound of the range on which the noise is uniformly distributed.\n" + " - gaussian: the standard deviation of the Gaussian noise.\n" + " - salt: the portion of pixels to set to a specified value.", + value=1.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.BoolParam( + name="noiseMono", + label="Mono", + description="If selected, a single noise value will be applied to all channels.\n" + "Otherwise, a separate noise value will be computed for each channel.", + value=True, + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="nlmFilter", + label="NL Means Denoising (8 bits)", + description="NL Means Denoising Parameters.\n" + "This implementation only works on 8-bit images, so the colors can be reduced and clamped.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="nlmFilterEnabled", + label="Enable", + description='Use Non-Local Mean Denoising from OpenCV to denoise images.', + value=False, + uid=[0], + ), + desc.FloatParam( + name="nlmFilterH", + label="H", + description="Parameter regulating the filter strength for the luminance component.\n" + "Bigger H value perfectly removes noise but also removes image details,\n" + "smaller H value preserves details but also preserves some noise.", + value=5.0, + range=(1.0, 1000.0, 0.01), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + desc.FloatParam( + name="nlmFilterHColor", + label="HColor", + description="Parameter regulating filter strength for color components. Not necessary for grayscale images.\n" + "Bigger HColor value perfectly removes noise but also removes image details,\n" + "smaller HColor value preserves details but also preserves some noise.", + value=10.0, + range=(0.0, 1000.0, 0.01), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + desc.IntParam( + name="nlmFilterTemplateWindowSize", + label="Template Window Size", + description="Size in pixels of the template patch that is used to compute weights. Should be odd.", + value=7, + range=(1, 101, 2), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + desc.IntParam( + name="nlmFilterSearchWindowSize", + label="Search Window Size", + description="Size in pixels of the window that is used to compute weighted average for a given pixel.\n" + "Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.", + value=21, + range=(1, 1001, 2), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + ] + ), desc.ChoiceParam( - name='outputFormat', - label='Output Image Format', - description='Allows you to choose the format of the output image.', - value='rgba', - values=['rgba', 'rgb', 'grayscale'], - exclusive=True, - uid=[0], + name="outputFormat", + label="Output Image Format", + description="Allows you to choose the format of the output image.", + value="rgba", + values=["rgba", "rgb", "grayscale"], + exclusive=True, + uid=[0], ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', - description='Allows you to choose the color space of the output image.', - value='AUTO', - values=['AUTO', 'sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], - exclusive=True, - uid=[0], + name="outputColorSpace", + label="Output Color Space", + description="Allows you to choose the color space of the output image.", + value="AUTO", + values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + exclusive=True, + uid=[0], ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='Linear', - values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], - exclusive=True, - uid=[0], - enabled=lambda node: not node.applyDcpMetadata.value, + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="Linear", + values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + exclusive=True, + uid=[0], + enabled=lambda node: not node.applyDcpMetadata.value, ), desc.ChoiceParam( - name='rawColorInterpretation', - label='RAW Color Interpretation', - description='Allows you to choose how raw data are color processed.', - value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', - values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata', 'Auto'], - exclusive=True, - uid=[0], + name="rawColorInterpretation", + label="RAW Color Interpretation", + description="Allows you to choose how RAW data are color processed.", + value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", + values=["None", "LibRawNoWhiteBalancing", "LibRawWhiteBalancing", "DCPLinearProcessing", "DCPMetadata", "Auto"], + exclusive=True, + uid=[0], ), desc.BoolParam( - name='applyDcpMetadata', - label='Apply DCP metadata', - description='If the image contains some DCP metadata then generate a DCP profile from them and apply it on the image content', + name="applyDcpMetadata", + label="Apply DCP Metadata", + description="If the image contains some DCP metadata, then generate a DCP profile from them and apply it to the image content.", value=False, uid=[0], ), desc.File( - name='colorProfileDatabase', - label='Color Profile Database', - description='''Color Profile database directory path.''', - value='${ALICEVISION_COLOR_PROFILE_DB}', + name="colorProfileDatabase", + label="Color Profile Database", + description="Color profile database directory path.", + value="${ALICEVISION_COLOR_PROFILE_DB}", uid=[], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( - name='errorOnMissingColorProfile', - label='Error On Missing DCP Color Profile', - description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown', + name="errorOnMissingColorProfile", + label="Error On Missing DCP Color Profile", + description="If a color profile database is specified but no color profile is found for at least one image, then an error is thrown.", value=True, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( - name='useDCPColorMatrixOnly', - label='Use DCP Color Matrix Only', - description='Use only the Color Matrix information from the DCP and ignore the Forward Matrix.', + name="useDCPColorMatrixOnly", + label="Use DCP Color Matrix Only", + description="Use only the Color Matrix information from the DCP and ignore the Forward Matrix.", value=True, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( - name='doWBAfterDemosaicing', - label='WB After Demosaicing', - description='Do White Balance after demosaicing, just before DCP profile application', + name="doWBAfterDemosaicing", + label="WB After Demosaicing", + description="Do White Balance after demosaicing, just before DCP profile application.", value=False, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.ChoiceParam( - name='demosaicingAlgo', - label='Demosaicing Algorithm', - description='LibRaw Demosaicing Algorithm', - value='AHD', - values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'], + name="demosaicingAlgo", + label="Demosaicing Algorithm", + description="LibRaw demosaicing algorithm to use.", + value="AHD", + values=["linear", "VNG", "PPG", "AHD", "DCB", "AHD-Mod", "AFD", "VCD", "Mixed", "LMMSE", "AMaZE", "DHT", "AAHD", "none"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='highlightMode', - label='Highlight Mode', - description='LibRaw highlight mode:\n' - ' * 0: Clip (default)\n' - ' * 1: Unclip\n' - ' * 2: Blend\n' - ' * 3-9: Rebuild', + name="highlightMode", + label="Highlight Mode", + description="LibRaw highlight mode:\n" + " - 0: Clip (default)\n" + " - 1: Unclip\n" + " - 2: Blend\n" + " - 3-9: Rebuild", value=0, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], exclusive=True, @@ -509,62 +562,63 @@ class ImageProcessing(desc.AVCommandLineNode): ), desc.FloatParam( - name='correlatedColorTemperature', - label='Illuminant Color Temperature', - description='Scene illuminant color temperature in Kelvin. A negative or null value indicates that the metadata information will be used.', + name="correlatedColorTemperature", + label="Illuminant Color Temperature", + description="Scene illuminant color temperature in Kelvin.\n" + "A negative or null value indicates that the metadata information will be used.", value=-1.0, range=(-1.0, 10000.0, 1.0), uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type For EXR Output', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type For EXR Output", + description="Storage image data type for EXR outputs:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='exrCompressionMethod', - label='EXR Compression Method', - description='Compression method for EXR images.', - value='auto', - values=['none', 'auto', 'rle', 'zip', 'zips', 'piz', 'pxr24', 'b44', 'b44a', 'dwaa', 'dwab'], + name="exrCompressionMethod", + label="EXR Compression Method", + description="Compression method for EXR output images.", + value="auto", + values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, uid=[0], ), desc.IntParam( - name='exrCompressionLevel', - label='EXR Compression Level', - description='Level of compression for EXR images, range depends on method used.\n' - 'For zip/zips methods, values must be between 1 and 9.\n' - 'A value of 0 will be ignored, default value for the selected method will be used.', + name="exrCompressionLevel", + label="EXR Compression Level", + description="Level of compression for EXR images. The range depends on the used method.\n" + "For the zip/zips methods, values must be between 1 and 9.\n" + "A value of 0 will be ignored, and the default value for the selected method will be used.", value=0, range=(0, 500, 1), uid=[0], - enabled=lambda node: node.exrCompressionMethod.value in ['dwaa', 'dwab', 'zip', 'zips'] + enabled=lambda node: node.exrCompressionMethod.value in ["dwaa", "dwab", "zip", "zips"] ), desc.BoolParam( - name='jpegCompress', - label='JPEG Compress', - description='Enable JPEG compression.', + name="jpegCompress", + label="JPEG Compress", + description="Enable JPEG compression.", value=True, uid=[0], ), desc.IntParam( - name='jpegQuality', - label='JPEG Quality', - description='JPEG images quality after compression.', + name="jpegQuality", + label="JPEG Quality", + description="JPEG images quality after compression.", value=90, range=(0, 100, 1), uid=[0], @@ -572,11 +626,11 @@ class ImageProcessing(desc.AVCommandLineNode): ), 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'], + 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=[], ) @@ -584,27 +638,27 @@ class ImageProcessing(desc.AVCommandLineNode): outputs = [ desc.File( - name='outSfMData', - label='SfMData', - description='Output SfMData.', - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + name="outSfMData", + label="SfMData", + description="Output SfMData file.", + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='output', - label='Folder', - description='Output Images Folder.', + name="output", + label="Folder", + description="Output images folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputImages', - label='Images', - description='Output Image Files.', - semantic='image', + name="outputImages", + label="Images", + description="Output images.", + semantic="image", value= outputImagesValueFunct, - group='', # do not export on the command line + group="", # do not export on the command line uid=[], ), ] diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index 2568953599..e2ad7c4b02 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -13,28 +13,37 @@ class ImportKnownPoses(desc.AVCommandLineNode): inputs = [ desc.File( - name='sfmData', - label='SfmData', - description='SfMData file.', - value='', + name="sfmData", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='knownPosesData', - label='KnownPosesData', - description='KnownPoses data in the json or xmp format', - value='', + name="knownPosesData", + label="Known Poses Data", + description="Known poses data in the JSON or XMP format.", + 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', - description='Path to the output smfData file.', + name="output", + label="Output", + description="Path to the output SfMData file.", value=desc.Node.internalFolder + "/sfmData.abc", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 6dc0f62916..fcc2a6a717 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -102,14 +102,14 @@ class KeyframeSelection(desc.AVCommandLineNode): desc.ListAttribute( elementDesc=desc.FloatParam( name="mmFocal", - label="mmFocal", + label="Focal", description="Focal in mm (will be used if not 0).", value=0.0, range=(0.0, 500.0, 1.0), uid=[0], ), name="mmFocals", - label="mmFocals", + label="Focals", description="Focals in mm (will be used if not 0)." ), desc.File( @@ -128,8 +128,8 @@ class KeyframeSelection(desc.AVCommandLineNode): group=None, # skip group from command line groupDesc=[ desc.BoolParam( - name='useSmartSelection', - label='Use Smart Keyframe Selection', + name="useSmartSelection", + label="Use Smart Keyframe Selection", description="Use the smart keyframe selection.", value=True, uid=[0] @@ -137,7 +137,8 @@ class KeyframeSelection(desc.AVCommandLineNode): desc.GroupAttribute( name="regularSelection", label="Regular Keyframe Selection", - description="Parameters for the regular keyframe selection.\nKeyframes are selected regularly over the sequence with respect to the set parameters.", + description="Parameters for the regular keyframe selection.\n" + "Keyframes are selected regularly over the sequence with respect to the set parameters.", group=None, # skip group from command line enabled=lambda node: node.selectionMethod.useSmartSelection.value is False, groupDesc=[ @@ -175,14 +176,15 @@ class KeyframeSelection(desc.AVCommandLineNode): desc.GroupAttribute( name="smartSelection", label="Smart Keyframe Selection", - description="Parameters for the smart keyframe selection.\nKeyframes are selected based on their sharpness and optical flow scores.", + description="Parameters for the smart keyframe selection.\n" + "Keyframes are selected based on their sharpness and optical flow scores.", group=None, # skip group from command line enabled=lambda node: node.selectionMethod.useSmartSelection.value, groupDesc=[ desc.FloatParam( name="pxDisplacement", label="Pixel Displacement", - description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection", + description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection.", value=10.0, range=(0.0, 100.0, 1.0), uid=[0], @@ -277,10 +279,10 @@ class KeyframeSelection(desc.AVCommandLineNode): name="storageDataType", label="EXR Storage Data Type", description="Storage image data type for keyframes written to EXR files:\n" - " * float: Use full floating point (32 bits per channel)\n" - " * half: Use half float (16 bits per channel)\n" - " * halfFinite: Use half float, but clamp values to avoid non-finite values\n" - " * auto: Use half float if all values can fit, else use full float\n", + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", value="float", values=["float", "half", "halfFinite", "auto"], exclusive=True, diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 55e445c90d..5d1c61d469 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -36,76 +36,78 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='samples', - label='Samples folder', - description='Samples folder', + name="samples", + label="Samples Folder", + description="Samples folder.", value=desc.Node.internalFolder, uid=[0], ), desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', + name="userNbBrackets", + label="Number Of Brackets", + description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + name="nbBrackets", + label="Automatic Nb Brackets", + description="Number of exposure brackets used per HDR image.\n" + "It is detected automatically from input Viewpoints metadata if 'userNbBrackets' is 0,\n" + "else it is equal to 'userNbBrackets'.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='byPass', - label='Bypass', - description="Bypass HDR creation and use the medium bracket as the source for the next steps", + name="byPass", + label="Bypass", + description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], enabled= lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( - name='calibrationMethod', - label='Calibration Method', - description="Method used for camera calibration \n" - " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" - " * Debevec: This is the standard method for HDR calibration. \n" - " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" - " * Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=['linear', 'debevec', 'grossberg', 'laguerre'], - value='debevec', + name="calibrationMethod", + label="Calibration Method", + description="Method used for camera calibration:\n" + " - Linear: Disables the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" + " - Debevec: This is the standard method for HDR calibration.\n" + " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" + " - Laguerre: Simple but robust method estimating the minimal number of parameters.", + values=["linear", "debevec", "grossberg", "laguerre"], + value="debevec", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='calibrationWeight', - label='Calibration Weight', - description="Weight function used to calibrate camera response \n" - " * default (automatically selected according to the calibrationMethod) \n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='default', - values=['default', 'gaussian', 'triangle', 'plateau'], + name="calibrationWeight", + label="Calibration Weight", + description="Weight function used to calibrate camera response:\n" + " - default (automatically selected according to the calibrationMethod)\n" + " - gaussian\n" + " - triangle\n" + " - plateau", + value="default", + values=["default", "gaussian", "triangle", "plateau"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='channelQuantizationPower', - label='Channel Quantization Power', - description='Quantization level like 8 bits or 10 bits.', + name="channelQuantizationPower", + label="Channel Quantization Power", + description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), uid=[0], @@ -113,21 +115,22 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='maxTotalPoints', - label='Max Number of Points', - description='Max number of points used from the sampling. This ensures that the number of pixels values extracted by the sampling\n' - 'can be managed by the calibration step (in term of computation time and memory usage).', + name="maxTotalPoints", + label="Max Number Of Points", + description="Maximum number of points used from the sampling.\n" + "This ensures that the number of pixels values extracted by the sampling\n" + "can be managed by the calibration step (in term of computation time and memory usage).", value=1000000, range=(8, 10000000, 1000), uid=[0], @@ -135,11 +138,11 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), 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'], + 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=[], ) @@ -147,10 +150,10 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): outputs = [ desc.File( - name='response', - label='Response File', - description='Path to the output response file', - value=desc.Node.internalFolder + 'response.csv', + name="response", + label="Response File", + description="Path to the output response file.", + value=desc.Node.internalFolder + "response.csv", uid=[], ) ] diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 5b71849f68..ba738e7abf 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -35,94 +35,97 @@ class LdrToHdrMerge(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='response', - label='Response file', - description='Response file', - value='', + name="response", + label="Response File", + description="Response file.", + value="", uid=[0], ), desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', + name="userNbBrackets", + label="Number Of Brackets", + description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + name="nbBrackets", + label="Automatic Nb Brackets", + description="Number of exposure brackets used per HDR image.\n" + "It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n" + "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='offsetRefBracketIndexEnabled', - label='Manually Specify Ref Bracket', - description='Manually specify the reference bracket index to control the exposure of the HDR image.', + name="offsetRefBracketIndexEnabled", + label="Manually Specify Ref Bracket", + description="Manually specify the reference bracket index to control the exposure of the HDR image.", value=False, uid=[0], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='offsetRefBracketIndex', - label='Offset Ref Bracket Index', - description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', + name="offsetRefBracketIndex", + label="Offset Ref Bracket Index", + description="0 to use the center bracket.\n" + "+N to use a more exposed bracket or -N to use a less exposed bracket.", value=1, range=(-4, 4, 1), uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( - name='meanTargetedLumaForMerging', - label='Targeted Luminance For Merging', - description='Expected mean luminance of the HDR images used to compute the final panorama', + name="meanTargetedLumaForMerging", + label="Targeted Luminance For Merging", + description="Expected mean luminance of the HDR images used to compute the final panorama.", value=0.4, range=(0.0, 1.0, 0.01), uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), desc.BoolParam( - name='byPass', - label='Bypass', + name="byPass", + label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], enabled= lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( - name='keepSourceImageName', - label='Keep Source Image Name', + name="keepSourceImageName", + label="Keep Source Image Name", description="Keep the filename of the input image selected as central image for the output image filename.", value=False, uid=[0], ), desc.ChoiceParam( - name='fusionWeight', - label='Fusion Weight', + name="fusionWeight", + label="Fusion Weight", description="Weight function used to fuse all LDR images together:\n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='gaussian', - values=['gaussian', 'triangle', 'plateau'], + " - gaussian\n" + " - triangle\n" + " - plateau", + value="gaussian", + values=["gaussian", "triangle", "plateau"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='channelQuantizationPower', - label='Channel Quantization Power', - description='Quantization level like 8 bits or 10 bits.', + name="channelQuantizationPower", + label="Channel Quantization Power", + description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), uid=[0], @@ -130,79 +133,79 @@ class LdrToHdrMerge(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( - name='enableHighlight', - label='Enable Highlight', + name="enableHighlight", + label="Enable Highlight", description="Enable highlights correction.", value=False, uid=[0], - group='user', # not used directly on the command line + group="user", # not used directly on the command line enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.FloatParam( - name='highlightCorrectionFactor', - label='Highlights Correction', - description='Pixels saturated in all input images have a partial information about their real luminance.\n' - 'We only know that the value should be >= to the standard hdr fusion.\n' - 'This parameter allows to perform a post-processing step to put saturated pixels to a constant\n' - 'value defined by the `highlightsMaxLuminance` parameter.\n' - 'This parameter is float to enable to weight this correction.', + name="highlightCorrectionFactor", + label="Highlights Correction", + description="Pixels saturated in all input images have a partial information about their real luminance.\n" + "We only know that the value should be >= to the standard HDRfusion.\n" + "This parameter allows to perform a post-processing step to put saturated pixels to a constant\n" + "value defined by the `highlightsMaxLuminance` parameter.\n" + "This parameter is float to enable to weight this correction.", value=1.0, range=(0.0, 1.0, 0.01), uid=[0], enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value, ), desc.FloatParam( - name='highlightTargetLux', - label='Highlight Target Luminance (Lux)', - description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n' - '\n' - 'Some Outdoor Reference Light Levels:\n' - ' * 120,000 lux: Brightest sunlight\n' - ' * 110,000 lux: Bright sunlight\n' - ' * 20,000 lux: Shade illuminated by entire clear blue sky, midday\n' - ' * 1,000 lux: Typical overcast day, midday\n' - ' * 400 lux: Sunrise or sunset on a clear day\n' - ' * 40 lux: Fully overcast, sunset/sunrise\n' - '\n' - 'Some Indoor Reference Light Levels:\n' - ' * 20000 lux: Max Usually Used Indoor\n' - ' * 750 lux: Supermarkets\n' - ' * 500 lux: Office Work\n' - ' * 150 lux: Home\n', + name="highlightTargetLux", + label="Highlight Target Luminance (Lux)", + description="This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n" + "\n" + "Some Outdoor Reference Light Levels:\n" + " - 120,000 lux: Brightest sunlight\n" + " - 110,000 lux: Bright sunlight\n" + " - 20,000 lux: Shade illuminated by entire clear blue sky, midday\n" + " - 1,000 lux: Typical overcast day, midday\n" + " - 400 lux: Sunrise or sunset on a clear day\n" + " - 40 lux: Fully overcast, sunset/sunrise\n" + "\n" + "Some Indoor Reference Light Levels:\n" + " - 20000 lux: Max Usually Used Indoor\n" + " - 750 lux: Supermarkets\n" + " - 500 lux: Office Work\n" + " - 150 lux: Home\n", value=120000.0, range=(1000.0, 150000.0, 1.0), uid=[0], enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, 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'], + 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=[], ) @@ -210,18 +213,18 @@ class LdrToHdrMerge(desc.AVCommandLineNode): outputs = [ desc.File( - name='outputFolder', - label='Output Folder', - description='Path to the folder containing the merged HDR images.', + name="outputFolder", + label="Folder", + description="Path to the folder containing the merged HDR images.", value=desc.Node.internalFolder, uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='outSfMData', - label='SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="outSfMData", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ) ] diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 7cd19ffbac..ae2708e5db 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -53,55 +53,57 @@ class LdrToHdrSampling(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', + name="userNbBrackets", + label="Number Of Brackets", + description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + name="nbBrackets", + label="Automatic Nb Brackets", + description="Number of exposure brackets used per HDR image.\n" + "It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n" + "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='byPass', - label='Bypass', - description="Bypass HDR creation and use the medium bracket as the source for the next steps", + name="byPass", + label="Bypass", + description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], enabled= lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( - name='calibrationMethod', - label='Calibration Method', - description="Method used for camera calibration \n" - " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" - " * Debevec: This is the standard method for HDR calibration. \n" - " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" - " * Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=['linear', 'debevec', 'grossberg', 'laguerre'], - value='debevec', + name="calibrationMethod", + label="Calibration Method", + description="Method used for camera calibration:\n" + " - Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" + " - Debevec: This is the standard method for HDR calibration.\n" + " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" + " - Laguerre: Simple but robust method estimating the minimal number of parameters.", + values=["linear", "debevec", "grossberg", "laguerre"], + value="debevec", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='channelQuantizationPower', - label='Channel Quantization Power', - description='Quantization level like 8 bits or 10 bits.', + name="channelQuantizationPower", + label="Channel Quantization Power", + description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), uid=[0], @@ -109,19 +111,19 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='blockSize', - label='Block Size', - description='Size of the image tile to extract a sample.', + name="blockSize", + label="Block Size", + description="Size of the image tile to extract a sample.", value=256, range=(8, 1024, 1), uid=[0], @@ -129,9 +131,9 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='radius', - label='Patch Radius', - description='Radius of the patch used to analyze the sample statistics.', + name="radius", + label="Patch Radius", + description="Radius of the patch used to analyze the sample statistics.", value=5, range=(0, 10, 1), uid=[0], @@ -139,9 +141,9 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='maxCountSample', - label='Max Number of Samples', - description='Max number of samples per image group.', + name="maxCountSample", + label="Max Number Of Samples", + description="Maximum number of samples per image group.", value=200, range=(10, 1000, 10), uid=[0], @@ -149,19 +151,19 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( - name='debug', - label='Export Debug Files', + name="debug", + label="Export Debug Files", description="Export debug files to analyze the sampling strategy.", value=False, uid=[], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), 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'], + 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=[], ) @@ -169,9 +171,9 @@ class LdrToHdrSampling(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output path for the samples.', + name="output", + label="Folder", + description="Output path for the samples.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index b96a7acddb..ddeb72ec92 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -13,52 +13,53 @@ class LightingCalibration(desc.CommandLineNode): inputs = [ desc.File( - name='inputPath', - label='SfMData', - description='Input SfMData file.', - value='', + name="inputPath", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0] ), desc.File( - name='inputJSON', - label='Sphere Detection File', - description='Input JSON file containing sphere centers and radiuses.', - value='', + name="inputJSON", + label="Sphere Detection File", + description="Input JSON file containing sphere centers and radiuses.", + value="", uid=[0] ), desc.BoolParam( - name='saveAsModel', - label='Save As Model', - description='Check if this calibration file will be used with other datasets.', + name="saveAsModel", + label="Save As Model", + description="Check if this calibration file will be used with other datasets.", value=False, uid=[0] ), desc.ChoiceParam( - name='method', - label='Calibration Method', - description='Method used for light calibration. Use "brightestPoint" for shiny spheres and "whiteSphere" for white matte spheres.', - values=['brightestPoint', 'whiteSphere'], - value='brightestPoint', + name="method", + label="Calibration Method", + description="Method used for light calibration.\n" + "Use 'brightestPoint' for shiny spheres and 'whiteSphere' for white matte spheres.", + values=["brightestPoint", "whiteSphere"], + value="brightestPoint", exclusive=True, 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'], + 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=[] + uid=[], ) ] outputs = [ desc.File( - name='outputFile', - label='Light File', - description='Light information will be written here.', - value=desc.Node.internalFolder +'/lights.json' , + name="outputFile", + label="Light File", + description="Light information will be written here.", + value=desc.Node.internalFolder + "/lights.json", uid=[] ) ] diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index b55883f4e2..e7a4a8ccc6 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -7,84 +7,87 @@ class LightingEstimation(desc.AVCommandLineNode): commandLine = 'aliceVision_lightingEstimation {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( name="depthMapsFilterFolder", - label='Filtered Depth Maps Folder', - description='Input filtered depth maps folder', - value='', + label="Filtered Depth Maps Folder", + description="Input filtered depth maps folder.", + value="", uid=[0], ), desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', - value='', + name="imagesFolder", + label="Images Folder", + description="Use images from a specific folder instead of those specify in the SfMData file.\n" + "Filename should be the image UID.", + value="", uid=[0], ), desc.ChoiceParam( - name='lightingEstimationMode', - label='Lighting Estimation Mode', - description='Lighting Estimation Mode.', - value='global', - values=['global', 'per_image'], + name="lightingEstimationMode", + label="Lighting Estimation Mode", + description="Lighting estimation mode.", + value="global", + values=["global", "per_image"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='lightingColor', - label='Lighting Color Mode', - description='Lighting Color Mode.', - value='RGB', - values=['RGB', 'Luminance'], + name="lightingColor", + label="Lighting Color Mode", + description="Lighting color mode.", + value="RGB", + values=["RGB", "Luminance"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='albedoEstimationName', - label='Albedo Estimation Name', - description='Albedo estimation method used for light estimation.', - value='constant', - values=['constant', 'picture', 'median_filter', 'blur_filter'], + name="albedoEstimationName", + label="Albedo Estimation Name", + description="Albedo estimation method used for light estimation.", + value="constant", + values=["constant", "picture", "median_filter", "blur_filter"], exclusive=True, uid=[0], advanced=True, ), desc.IntParam( - name='albedoEstimationFilterSize', - label='Albedo Estimation Filter Size', - description='Albedo filter size for estimation method using filter.', + name="albedoEstimationFilterSize", + label="Albedo Estimation Filter Size", + description="Albedo filter size for estimation method using filter.", value=3, range=(0, 100, 1), uid=[0], advanced=True, ), 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'], + 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='Folder', - description='Folder for output lighting vector files.', + name="output", + label="Folder", + description="Folder for output lighting vector files.", value=desc.Node.internalFolder, uid=[], ), From ec94720a31efac9da2d1937e4c76e8e9784ee24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 16 Jun 2023 10:31:42 +0200 Subject: [PATCH 0827/1093] [nodes] M-P: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/aliceVision/MergeMeshes.py | 60 ++-- meshroom/aliceVision/MeshDecimate.py | 60 ++-- meshroom/aliceVision/MeshDenoising.py | 96 +++--- meshroom/aliceVision/MeshFiltering.py | 129 +++---- meshroom/aliceVision/MeshMasking.py | 88 ++--- meshroom/aliceVision/MeshResampling.py | 59 ++-- meshroom/aliceVision/Meshing.py | 323 +++++++++--------- meshroom/aliceVision/NormalIntegration.py | 40 +-- meshroom/aliceVision/PanoramaCompositing.py | 114 +++---- meshroom/aliceVision/PanoramaEstimation.py | 164 ++++----- meshroom/aliceVision/PanoramaInit.py | 138 ++++---- meshroom/aliceVision/PanoramaMerging.py | 72 ++-- .../aliceVision/PanoramaPostProcessing.py | 85 +++-- meshroom/aliceVision/PanoramaPrepareImages.py | 26 +- meshroom/aliceVision/PanoramaSeams.py | 56 +-- meshroom/aliceVision/PanoramaWarping.py | 90 ++--- meshroom/aliceVision/PhotometricStereo.py | 142 ++++---- meshroom/aliceVision/PrepareDenseScene.py | 70 ++-- meshroom/aliceVision/Publish.py | 14 +- 19 files changed, 920 insertions(+), 906 deletions(-) diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 2aef0ea659..3c84420351 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -19,59 +19,59 @@ class MergeMeshes(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputFirstMesh', - label='Input First Mesh', - description='Input First Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', - value='', + name="inputFirstMesh", + label="First Mesh", + description="Input first mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value="", uid=[0], ), desc.File( - name='inputSecondMesh', - label='Input Second Mesh', - description='Input Second Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', - value='', + name="inputSecondMesh", + label="Second Mesh", + description="Input second mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value="", uid=[0], ), desc.ChoiceParam( - name='mergeOperation', - label='Merge Operation', - description='''Operation types used to merge two meshes.''', - value='boolean_union', - values=['boolean_union', 'boolean_intersection', 'boolean_difference'], + name="mergeOperation", + label="Merge Operation", + description="Operation types used to merge two meshes.", + value="boolean_union", + values=["boolean_union", "boolean_intersection", "boolean_difference"], exclusive=True, uid=[0], ), desc.BoolParam( - name='preProcess', - label='Pre-Process', - description='''Pre-process input meshes in order to avoid geometric errors in the merging process''', + name="preProcess", + label="Pre-Process", + description="Pre-process the input meshes in order to avoid geometric errors in the merging process.", value=True, uid=[0], ), desc.BoolParam( - name='postProcess', - label='Post-Process', - description='''Post-process output mesh in order to avoid future geometric errors.''', + name="postProcess", + label="Post-Process", + description="Post-process the output mesh in order to avoid future geometric errors.", value=True, 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'], + 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='Mesh', - description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', - value=desc.Node.internalFolder + 'mesh.stl', + name="output", + label="Mesh", + description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value=desc.Node.internalFolder + "mesh.stl", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 2c42e401dc..824cc85e75 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -16,70 +16,70 @@ class MeshDecimate(desc.AVCommandLineNode): inputs = [ desc.File( name="input", - label='Input Mesh (OBJ file format).', - description='', - value='', + label="Mesh", + description="Input mesh in the OBJ format.", + value="", uid=[0], - ), + ), desc.FloatParam( - name='simplificationFactor', - label='Simplification factor', - description='Simplification factor', + name="simplificationFactor", + label="Simplification Factor", + description="Simplification factor for the decimation.", value=0.5, range=(0.0, 1.0, 0.01), uid=[0], ), desc.IntParam( - name='nbVertices', - label='Fixed Number of Vertices', - description='Fixed number of output vertices.', + name="nbVertices", + label="Fixed Number of Vertices", + description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='minVertices', - label='Min Vertices', - description='Min number of output vertices.', + name="minVertices", + label="Min Vertices", + description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='maxVertices', - label='Max Vertices', - description='Max number of output vertices.', + name="maxVertices", + label="Max Vertices", + description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.BoolParam( - name='flipNormals', - label='Flip Normals', - description='Option to flip face normals.\n' - 'It can be needed as it depends on the vertices order in triangles\n' - 'and the convention change from one software to another.', + name="flipNormals", + label="Flip Normals", + description="Option to flip face normals.\n" + "It can be needed as it depends on the vertices order in triangles\n" + "and the convention changes from one software to another.", value=False, uid=[0], advanced=True, ), 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'], + 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="Mesh", - description="Output mesh (OBJ file format).", - value=desc.Node.internalFolder + 'mesh.obj', + description="Output mesh in the OBJ file format.", + value=desc.Node.internalFolder + "mesh.obj", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 3fbf3592a6..f85a30f635 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -14,90 +14,90 @@ class MeshDenoising(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''Input Mesh (OBJ file format).''', - value='', + name="input", + label="Mesh", + description="Input mesh in the OBJ file format.", + value="", uid=[0], - ), + ), desc.IntParam( - name='denoisingIterations', - label='Denoising Iterations', - description='''Number of denoising iterations.''', + name="denoisingIterations", + label="Denoising Iterations", + description="Number of denoising iterations.", value=5, range=(0, 30, 1), uid=[0], - ), + ), desc.FloatParam( - name='meshUpdateClosenessWeight', - label='Mesh Update Closeness Weight', - description='''Closeness weight for mesh update, must be positive.''', + name="meshUpdateClosenessWeight", + label="Mesh Update Closeness Weight", + description="Closeness weight for mesh update. Must be positive.", value=0.001, range=(0.0, 0.1, 0.001), uid=[0], - ), + ), desc.FloatParam( - name='lambda', - label='Lambda', - description='''Regularization weight.''', + name="lambda", + label="Lambda", + description="Regularization weight.", value=2.0, range=(0.0, 10.0, 0.01), uid=[0], - ), + ), desc.FloatParam( - name='eta', - label='Eta', - description='Gaussian standard deviation for spatial weight, ' - 'scaled by the average distance between adjacent face centroids.\n' - 'Must be positive.', + name="eta", + label="Eta", + description="Gaussian standard deviation for spatial weight, \n" + "scaled by the average distance between adjacent face centroids.\n" + "Must be positive.", value=1.5, range=(0.0, 20.0, 0.01), uid=[0], - ), + ), desc.FloatParam( - name='mu', - label='Mu', - description='''Gaussian standard deviation for guidance weight.''', + name="mu", + label="Mu", + description="Gaussian standard deviation for guidance weight.", value=1.5, range=(0.0, 10.0, 0.01), uid=[0], - ), + ), desc.FloatParam( - name='nu', - label='Nu', - description='''Gaussian standard deviation for signal weight.''', + name="nu", + label="Nu", + description="Gaussian standard deviation for signal weight.", value=0.3, range=(0.0, 5.0, 0.01), uid=[0], - ), + ), desc.ChoiceParam( - name='meshUpdateMethod', - label='Mesh Update Method', - description='Mesh Update Method\n' - ' * ITERATIVE_UPDATE (default): ShapeUp styled iterative solver \n' - ' * POISSON_UPDATE: Poisson-based update from [Wang et al. 2015] "Rolling guidance normal filter for geometric processing"', + name="meshUpdateMethod", + label="Mesh Update Method", + description="Mesh ppdate method:\n" + " - ITERATIVE_UPDATE (default): ShapeUp styled iterative solver.\n" + " - POISSON_UPDATE: Poisson-based update from [Wang et al. 2015] 'Rolling guidance normal filter for geometric processing'.", value=0, - values=(0, 1), + values=[0, 1], exclusive=True, 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'], + 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', - description='''Output mesh (OBJ file format).''', - value=desc.Node.internalFolder + 'mesh.obj', + name="output", + label="Output", + description="Output mesh in the OBJ file format.", + value=desc.Node.internalFolder + "mesh.obj", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index c17e666eeb..56369f39a6 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -13,118 +13,121 @@ class MeshFiltering(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputMesh', - label='Mesh', - description='''Input Mesh''', - value='', + name="inputMesh", + label="Mesh", + description="Input mesh file.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='outputMeshFileType', - label='File Type', - description='Output Mesh File Type', - value='obj', - values=('gltf', 'obj', 'fbx', 'stl'), + name="outputMeshFileType", + label="Mesh Type", + description="File type for the output mesh.", + value="obj", + values=("gltf", "obj", "fbx", "stl"), exclusive=True, uid=[0], - group='', - ), + group="", + ), desc.BoolParam( - name='keepLargestMeshOnly', - label='Keep Only the Largest Mesh', - description='Keep only the largest connected triangles group.', + name="keepLargestMeshOnly", + label="Keep Only The Largest Mesh", + description="Keep only the largest connected triangles group.", value=False, uid=[0], - ), + ), desc.ChoiceParam( - name='smoothingSubset', - label='Smoothing Subset', - description='Subset for smoothing (all, surface_boundaries, surface_inner_part).', - value='all', - values=['all', 'surface_boundaries', 'surface_inner_part'], + name="smoothingSubset", + label="Smoothing Subset", + description="Subset for smoothing (all, surface_boundaries, surface_inner_part).", + value="all", + values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, uid=[0], advanced=True, - ), + ), desc.IntParam( - name='smoothingBoundariesNeighbours', - label='Smoothing Boundaries Neighbours', - description='Neighbours of the boundaries to consider.', + name="smoothingBoundariesNeighbours", + label="Smoothing Boundaries Neighbours", + description="Neighbours of the boundaries to consider.", value=0, range=(0, 20, 1), uid=[0], advanced=True, - ), + ), desc.IntParam( - name='smoothingIterations', - label='Smoothing Iterations', - description='Number of smoothing iterations', + name="smoothingIterations", + label="Smoothing Iterations", + description="Number of smoothing iterations.", value=5, range=(0, 50, 1), uid=[0], - ), + ), desc.FloatParam( - name='smoothingLambda', - label='Smoothing Lambda', - description='Smoothing size.', + name="smoothingLambda", + label="Smoothing Lambda", + description="Smoothing size.", value=1.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, - ), + ), desc.ChoiceParam( - name='filteringSubset', - label='Filtering Subset', - description='Subset for filtering (all, surface_boundaries, surface_inner_part).', - value='all', - values=['all', 'surface_boundaries', 'surface_inner_part'], + name="filteringSubset", + label="Filtering Subset", + description="Subset for filtering (all, surface_boundaries, surface_inner_part).", + value="all", + values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, uid=[0], advanced=True, - ), + ), desc.IntParam( - name='filteringIterations', - label='Filtering Iterations', - description='Number of filtering iterations.', + name="filteringIterations", + label="Filtering Iterations", + description="Number of filtering iterations.", value=1, range=(0, 20, 1), uid=[0], advanced=True, - ), + ), desc.FloatParam( - name='filterLargeTrianglesFactor', - label='Filter Large Triangles Factor', - description='Remove all large triangles. We consider a triangle as large if one edge is bigger than N times the average edge length. Put zero to disable it.', + name="filterLargeTrianglesFactor", + label="Filter Large Triangles Factor", + description="Remove all large triangles.\n" + "We consider a triangle as large if one edge is bigger than N times the average edge length.\n" + "0 disables the filtering.", value=60.0, range=(0.0, 100.0, 0.1), uid=[0], - ), + ), desc.FloatParam( - name='filterTrianglesRatio', - label='Filter Triangles Ratio', - description='Remove all triangles by ratio (largest edge /smallest edge). Put zero to disable it.', + name="filterTrianglesRatio", + label="Filter Triangles Ratio", + description="Remove all triangles by ratio (largest edge /smallest edge).\n" + "0 disables the filtering.", value=0.0, range=(1.0, 50.0, 0.1), uid=[0], advanced=True, - ), + ), 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'], + 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='outputMesh', - label='Mesh', - description='''Output mesh.''', - value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}', + name="outputMesh", + label="Mesh", + description="Output mesh file.", + value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 5cbe4b864e..193d23610c 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -12,97 +12,97 @@ class MeshMasking(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Dense SfMData', - description='SfMData file.', - value='', + name="input", + label="Dense SfMData", + description="Dense SfMData file.", + value="", uid=[0], ), desc.File( - name='inputMesh', - label='Input Mesh', - description='''Input Mesh''', - value='', + name="inputMesh", + label="Input Mesh", + description="Input mesh.", + value="", uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='Output File Type', - description='File Type', - value='obj', - values=('obj', 'gltf', 'fbx', 'stl'), + name="outputMeshFileType", + label="Output Mesh Type", + description="File type of the output mesh.", + value="obj", + values=("obj", "gltf", "fbx", "stl"), exclusive=True, uid=[0], - group='', + group="", ), desc.ListAttribute( elementDesc=desc.File( name="masksFolder", label="Masks Folder", - description="", + description="Folder containing some masks.", value="", uid=[0], ), name="masksFolders", label="Masks Folders", - description='Use masks from specific folder(s). Filename should be the same or the image uid.', + description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), desc.IntParam( - name='threshold', - label='Threshold', - description='The minimum number of visibility to keep a vertex.', + name="threshold", + label="Threshold", + description="The minimum number of visibilities to keep a vertex.", value=1, range=(1, 100, 1), uid=[0] ), desc.BoolParam( - name='smoothBoundary', - label='Smooth Boundary', - description='Modify the triangles at the boundary to fit the masks.', + name="smoothBoundary", + label="Smooth Boundary", + description="Modify the triangles at the boundary to fit the masks.", value=False, uid=[0] ), desc.BoolParam( - name='invert', - label='Invert', - description='''If ticked, the selected area is ignored. - If not, only the selected area is considered.''', + name="invert", + label="Invert", + description="If ticked, the selected area is ignored.\n" + "If not, only the selected area is considered.", value=False, uid=[0] ), desc.BoolParam( - name='undistortMasks', - label='Undistort Masks', - description='''Undistort the masks with the same parameters as the matching image. - Tick it if the masks are drawn on the original images.''', + name="undistortMasks", + label="Undistort Masks", + description="Undistort the masks with the same parameters as the matching image.\n" + "Select it if the masks are drawn on the original images.", value=False, uid=[0] ), desc.BoolParam( - name='usePointsVisibilities', - label='Use points visibilities', - description='''Use the points visibilities from the meshing to filter triangles. - Example: when they are occluded, back-face, etc.''', + name="usePointsVisibilities", + label="Use Points visibilities", + description="Use the points visibilities from the meshing to filter triangles.\n" + "Example: when they are occluded, back-face, etc.", value=False, 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'], + 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='outputMesh', - label='Mesh', - description='''Output mesh.''', - value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}', + name="outputMesh", + label="Mesh", + description="Output mesh file.", + value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", uid=[], ), ] diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index b9bbeed491..5e9eda6fab 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -16,75 +16,76 @@ class MeshResampling(desc.AVCommandLineNode): inputs = [ desc.File( name="input", - label='Input Mesh (OBJ file format).', - description='', - value='', + label="Input Mesh", + description="Input mesh in the OBJ file format.", + value="", uid=[0], ), desc.FloatParam( - name='simplificationFactor', - label='Simplification factor', - description='Simplification factor', + name="simplificationFactor", + label="Simplification Factor", + description="Simplification factor for the resampling.", value=0.5, range=(0.0, 1.0, 0.01), uid=[0], ), desc.IntParam( - name='nbVertices', - label='Fixed Number of Vertices', - description='Fixed number of output vertices.', + name="nbVertices", + label="Fixed Number Of Vertices", + description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='minVertices', + name="minVertices", label='Min Vertices', - description='Min number of output vertices.', + description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='maxVertices', - label='Max Vertices', - description='Max number of output vertices.', + name="maxVertices", + label="Max Vertices", + description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='nbLloydIter', - label='Number of Pre-Smoothing Iteration', - description='Number of iterations for Lloyd pre-smoothing.', + name="nbLloydIter", + label="Number Of Pre-Smoothing Iteration", + description="Number of iterations for Lloyd pre-smoothing.", value=40, range=(0, 100, 1), uid=[0], ), desc.BoolParam( - name='flipNormals', - label='Flip Normals', - description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + name="flipNormals", + label="Flip Normals", + description="Option to flip face normals.\n" + "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", value=False, 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'], + 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="Mesh", - description="Output mesh (OBJ file format).", - value=desc.Node.internalFolder + 'mesh.obj', + description="Output mesh in the OBJ file format.", + value=desc.Node.internalFolder + "mesh.obj", uid=[], - ), + ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 364b25145f..7fb7406c9e 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -23,36 +23,38 @@ class Meshing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfmData', - description='SfMData file.', - value='', + name="input", + label="SfmData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( name="depthMapsFolder", - label='Depth Maps Folder', - description='Input depth maps folder.', - value='', + label="Depth Maps Folder", + description="Input depth maps folder.", + value="", uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='File Type', - description='Output Mesh File Type', - value='obj', - values=('gltf', 'obj', 'fbx', 'stl'), + name="outputMeshFileType", + label="Mesh Type", + description="File type for the output mesh.", + value="obj", + values=["gltf", "obj", "fbx", "stl"], exclusive=True, uid=[0], - group='', + group="", ), desc.BoolParam( - name='useBoundingBox', - label='Custom Bounding Box', - description='Edit the meshing bounding box. If enabled, it takes priority over the Estimate From SfM option. Parameters can be adjusted in advanced settings.', + name="useBoundingBox", + label="Custom Bounding Box", + description="Edit the meshing bounding box.\n" + "If enabled, it takes priority over the 'Estimate Space From SfM' option.\n" + "Parameters can be adjusted in advanced settings.", value=False, uid=[0], - group='' + group="" ), desc.GroupAttribute( name="boundingBox", @@ -65,19 +67,19 @@ class Meshing(desc.AVCommandLineNode): description="Position in space.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Offset", + name="x", label="x", description="X offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="y", label="y", description="Y Offset", + name="y", label="y", description="Y offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="z", label="z", description="Z Offset", + name="z", label="z", description="Z offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) @@ -91,19 +93,19 @@ class Meshing(desc.AVCommandLineNode): description="Rotation in Euler degrees.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="Euler X Rotation", + name="x", label="x", description="Euler X rotation.", value=0.0, uid=[0], range=(-90.0, 90.0, 1.0) ), desc.FloatParam( - name="y", label="y", description="Euler Y Rotation", + name="y", label="y", description="Euler Y rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) ), desc.FloatParam( - name="z", label="z", description="Euler Z Rotation", + name="z", label="z", description="Euler Z rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) @@ -117,19 +119,19 @@ class Meshing(desc.AVCommandLineNode): description="Scale of the bounding box.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Scale", + name="x", label="x", description="X scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) ), desc.FloatParam( - name="y", label="y", description="Y Scale", + name="y", label="y", description="Y scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) ), desc.FloatParam( - name="z", label="z", description="Z Scale", + name="z", label="z", description="Z scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) @@ -142,17 +144,17 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.useBoundingBox.value, ), desc.BoolParam( - name='estimateSpaceFromSfM', - label='Estimate Space From SfM', - description='Estimate the 3d space from the SfM', + name="estimateSpaceFromSfM", + label="Estimate Space From SfM", + description="Estimate the 3D space from the SfM.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='estimateSpaceMinObservations', - label='Min Observations For SfM Space Estimation', - description='Minimum number of observations for SfM space estimation.', + name="estimateSpaceMinObservations", + label="Min Observations For SfM Space Estimation", + description="Minimum number of observations for the space estimation from the SfM.", value=3, range=(0, 100, 1), uid=[0], @@ -160,181 +162,181 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.FloatParam( - name='estimateSpaceMinObservationAngle', - label='Min Observations Angle For SfM Space Estimation', - description='Minimum angle between two observations for SfM space estimation.', + name="estimateSpaceMinObservationAngle", + label="Min Observations Angle For SfM Space Estimation", + description="Minimum angle between two observations for the space estimation from the SfM.", value=10.0, range=(0.0, 120.0, 1.0), uid=[0], enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.IntParam( - name='maxInputPoints', - label='Max Input Points', - description='Max input points loaded from depth map images.', + name="maxInputPoints", + label="Max Input Points", + description="Maximum input points loaded from depth map images.", value=50000000, range=(500000, 500000000, 1000), uid=[0], ), desc.IntParam( - name='maxPoints', - label='Max Points', - description='Max points at the end of the depth maps fusion.', + name="maxPoints", + label="Max Points", + description="Maximum points at the end of the depth maps fusion.", value=5000000, range=(100000, 10000000, 1000), uid=[0], ), desc.IntParam( - name='maxPointsPerVoxel', - label='Max Points Per Voxel', - description='Max points per voxel', + name="maxPointsPerVoxel", + label="Max Points Per Voxel", + description="Maximum points per voxel.", value=1000000, range=(500000, 30000000, 1000), uid=[0], advanced=True, ), desc.IntParam( - name='minStep', - label='Min Step', - description='The step used to load depth values from depth maps is computed from maxInputPts. ' - 'Here we define the minimal value for this step, so on small datasets we will not spend ' - 'too much time at the beginning loading all depth values.', + name="minStep", + label="Min Step", + description="The step used to load depth values from depth maps is computed from 'maxInputPoints'.\n" + "Here we define the minimum value for this step, so on small datasets we will not spend " + "too much time at the beginning loading all the depth values.", value=2, range=(1, 20, 1), uid=[0], advanced=True, ), desc.ChoiceParam( - name='partitioning', - label='Partitioning', - description='', - value='singleBlock', - values=('singleBlock', 'auto'), + name="partitioning", + label="Partitioning", + description="Single block or auto partitioning.", + value="singleBlock", + values=("singleBlock", "auto"), exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='repartition', - label='Repartition', - description='', - value='multiResolution', - values=('multiResolution', 'regularGrid'), + name="repartition", + label="Repartition", + description="Multi-resolution or regular grid-based repartition.", + value="multiResolution", + values=("multiResolution", "regularGrid"), exclusive=True, uid=[0], advanced=True, ), desc.FloatParam( - name='angleFactor', - label='angleFactor', - description='angleFactor', + name="angleFactor", + label="Angle Factor", + description="Angle factor.", value=15.0, range=(0.0, 200.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='simFactor', - label='simFactor', - description='simFactor', + name="simFactor", + label="Sim Factor", + description="Sim factor.", value=15.0, range=(0.0, 200.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='pixSizeMarginInitCoef', - label='pixSizeMarginInitCoef', - description='pixSizeMarginInitCoef', + name="pixSizeMarginInitCoef", + label="Pix Size Margin Init Coef", + description="Size of the margin init coefficient, in pixels.", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='pixSizeMarginFinalCoef', - label='pixSizeMarginFinalCoef', - description='pixSizeMarginFinalCoef', + name="pixSizeMarginFinalCoef", + label="Pix Size Margin Final Coef", + description="Size of the margin final coefficient, in pixels.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='voteMarginFactor', - label='voteMarginFactor', - description='voteMarginFactor', + name="voteMarginFactor", + label="Vote Margin Factor", + description="Vote margin factor.", value=4.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='contributeMarginFactor', - label='contributeMarginFactor', - description='contributeMarginFactor', + name="contributeMarginFactor", + label="Contribute Margin Factor", + description="Contribute margin factor.", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='simGaussianSizeInit', - label='simGaussianSizeInit', - description='simGaussianSizeInit', + name="simGaussianSizeInit", + label="Sim Gaussian Size Init", + description="Sim Gaussian size init.", value=10.0, range=(0.0, 50.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='simGaussianSize', - label='simGaussianSize', - description='simGaussianSize', + name="simGaussianSize", + label="Sim Gaussian Size", + description="Sim Gaussian size.", value=10.0, range=(0.0, 50.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleThreshold', - label='minAngleThreshold', - description='minAngleThreshold', + name="minAngleThreshold", + label="Min Angle Threshold", + description="Minimum angle threshold.", value=1.0, range=(0.0, 10.0, 0.01), uid=[0], advanced=True, ), desc.BoolParam( - name='refineFuse', - label='Refine Fuse', - description='Refine depth map fusion with the new pixels size defined by angle and similarity scores.', + name="refineFuse", + label="Refine Fuse", + description="Refine depth map fusion with the new pixels size defined by angle and similarity scores.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='helperPointsGridSize', + name="helperPointsGridSize", label='Helper Points Grid Size', - description='Grid Size for the helper points.', + description="Grid size for the helper points.", value=10, range=(0, 50, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='densify', - label='Densify', - description='Densify scene with helper points around vertices.', + name="densify", + label="Densify", + description="Densify scene with helper points around vertices.", value=False, uid=[], advanced=True, - group='', + group="", ), desc.IntParam( - name='densifyNbFront', - label='Densify: Front', - description='Densify vertices: front.', + name="densifyNbFront", + label="Densify: Front", + description="Densify vertices: front.", value=1, range=(0, 5, 1), uid=[0], @@ -342,9 +344,9 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.densify.value, ), desc.IntParam( - name='densifyNbBack', - label='Densify: Back', - description='Densify vertices: back.', + name="densifyNbBack", + label="Densify: Back", + description="Densify vertices: back.", value=1, range=(0, 5, 1), uid=[0], @@ -352,9 +354,9 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.densify.value, ), desc.FloatParam( - name='densifyScale', - label='Densify Scale', - description='Scale between points used to densify the scene.', + name="densifyScale", + label="Densify Scale", + description="Scale between points used to densify the scene.", value=20.0, range=(0.0, 10.0, 0.1), uid=[0], @@ -362,85 +364,88 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.densify.value, ), desc.FloatParam( - name='nPixelSizeBehind', - label='Nb Pixel Size Behind', - description='Number of pixel size units to vote behind the vertex as FULL status.', + name="nPixelSizeBehind", + label="Nb Pixel Size Behind", + description="Number of pixel size units to vote behind the vertex as FULL status.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='fullWeight', - label='Full Weight', - description='Weighting for full status.', + name="fullWeight", + label="Full Weight", + description="Weighting for full status.", value=1.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='voteFilteringForWeaklySupportedSurfaces', - label='Weakly Supported Surface Support', - description='Improve support of weakly supported surfaces with a tetrahedra fullness score filtering.', + name="voteFilteringForWeaklySupportedSurfaces", + label="Weakly Supported Surface Support", + description="Improve support of weakly supported surfaces with a tetrahedra fullness score filtering.", value=True, uid=[0], ), desc.BoolParam( - name='addLandmarksToTheDensePointCloud', - label='Add Landmarks To The Dense Point Cloud', - description='Add SfM Landmarks to the dense point cloud.', + name="addLandmarksToTheDensePointCloud", + label="Add Landmarks To The Dense Point Cloud", + description="Add SfM landmarks to the dense point cloud.", value=False, uid=[0], advanced=True, ), desc.IntParam( - name='invertTetrahedronBasedOnNeighborsNbIterations', - label='Tretrahedron Neighbors Coherency Nb Iterations', - description='Invert cells status around surface to improve smoothness. Zero to disable.', + name="invertTetrahedronBasedOnNeighborsNbIterations", + label="Tretrahedron Neighbors Coherency Nb Iterations", + description="Invert cells status around surface to improve smoothness.\n" + "Set to 0 to disable.", value=10, range=(0, 30, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='minSolidAngleRatio', - label='minSolidAngleRatio', - description='Change cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + name="minSolidAngleRatio", + label="Min Solid Angle Ratio", + description="Change cells status on surface around vertices to improve smoothness using solid angle \n" + "ratio between full/empty parts. Set to 0 to disable.", value=0.2, range=(0.0, 0.5, 0.01), uid=[0], advanced=True, ), desc.IntParam( - name='nbSolidAngleFilteringIterations', - label='Nb Solid Angle Filtering Iterations', - description='Filter cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + name="nbSolidAngleFilteringIterations", + label="Nb Solid Angle Filtering Iterations", + description="Filter cells status on surface around vertices to improve smoothness using solid angle ratio \n" + "between full/empty parts. Set to 0 to disable.", value=2, range=(0, 30, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='colorizeOutput', - label='Colorize Output', - description='Whether to colorize output dense point cloud and mesh.', + name="colorizeOutput", + label="Colorize Output", + description="Whether to colorize output dense point cloud and mesh.", value=False, uid=[0], ), desc.BoolParam( - name='addMaskHelperPoints', - label='Add Mask Helper Points', - description='Add Helper points on the outline of the depth maps masks.', + name="addMaskHelperPoints", + label="Add Mask Helper Points", + description="Add Helper points on the outline of the depth maps masks.", value=False, uid=[], advanced=True, - group='', + group="", ), desc.FloatParam( - name='maskHelperPointsWeight', - label='Mask Helper Points Weight', - description='Weight value for mask helper points. Zero means no helper point.', + name="maskHelperPointsWeight", + label="Mask Helper Points Weight", + description="Weight value for mask helper points. 0 means no helper point.", value=1.0, range=(0.0, 20.0, 1.0), uid=[0], @@ -448,9 +453,9 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.addMaskHelperPoints.value, ), desc.IntParam( - name='maskBorderSize', - label='Mask Border Size', - description='How many pixels on mask borders?', + name="maskBorderSize", + label="Mask Border Size", + description="Number of pixels on mask borders.", value=4, range=(0, 20, 1), uid=[0], @@ -458,55 +463,59 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.addMaskHelperPoints.value, ), desc.IntParam( - name='maxNbConnectedHelperPoints', - label='Helper Points: Max Segment Size', - description='Maximum size of a segment of connected helper points before we remove it. Small segments of helper points can be on the real surface and should not be removed to avoid the creation of holes. 0 means that we remove all helper points. -1 means that we do not filter helper points at all.', + name="maxNbConnectedHelperPoints", + label="Helper Points: Max Segment Size", + description="Maximum size of a segment of connected helper points before we remove it.\n" + "Small segments of helper points can be on the real surface and should not be removed to avoid the creation of holes.\n" + "0 means that all helper points are removed. -1 means that helper points are not filtered at all.", value=50, range=(-1, 100, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='saveRawDensePointCloud', - label='Save Raw Dense Point Cloud', - description='Save dense point cloud before cut and filtering.', + name="saveRawDensePointCloud", + label="Save Raw Dense Point Cloud", + description="Save dense point cloud before cut and filtering.", value=False, uid=[], advanced=True, ), desc.BoolParam( - name='exportDebugTetrahedralization', - label='Export DEBUG Tetrahedralization', - description='Export debug cells score as tetrahedral mesh.\nWARNING: Could create HUGE meshes, only use on very small datasets.', + name="exportDebugTetrahedralization", + label="Export Debug Tetrahedralization", + description="Export debug cells score as tetrahedral mesh.\n" + "WARNING: Could create HUGE meshes, only use on very small datasets.", value=False, uid=[], advanced=True, ), desc.IntParam( - name='seed', - label='Seed', - description='Seed used for random operations. Zero means use of random device instead of a fixed seed.', + name="seed", + label="Seed", + description="Seed used for random operations.\n" + "0 means use of random device instead of a fixed seed.", value=0, range=(0, 10000, 1), uid=[0], advanced=True, ), 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'], + 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="outputMesh", label="Mesh", - description="Output mesh", + description="Output mesh.", value="{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}", uid=[], ), diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 6fbe440742..be909bb645 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -11,44 +11,44 @@ class NormalIntegration(desc.CommandLineNode): inputs = [ desc.File( - name='inputPath', - label='Normal Maps Folder', - description='Path to the folder containing the normal maps and the masks.', - value='', + name="inputPath", + label="Normal Maps Folder", + description="Path to the folder containing the normal maps and the masks.", + value="", uid=[0] ), desc.File( - name='sfmDataFile', - label='SfMData', - description='Input SfMData file.', - value='', + name="sfmDataFile", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.IntParam( - name='downscale', - label='Downscale Factor', - description='Downscale factor for faster results.', + name="downscale", + label="Downscale Factor", + description="Downscale factor for faster results.", value=1, range=(1, 10, 1), advanced=True, 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'], + 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=[] + uid=[], ) ] outputs = [ desc.File( - name='outputPath', - label='Output Path', - description='Path to the output folder.', + name="outputPath", + label="Output Path", + description="Path to the output folder.", value=desc.Node.internalFolder, uid=[] ) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 77abd49805..1076cab657 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -24,106 +24,106 @@ class PanoramaCompositing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description="Input SfMData.", - value='', + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='warpingFolder', - label='Warping Folder', - description="Panorama Warping results", - value='', + name="warpingFolder", + label="Warping Folder", + description="Panorama warping results folder.", + value="", uid=[0], ), desc.File( - name='labels', - label='Labels image', - description="Panorama Seams results", - value='', + name="labels", + label="Labels Images", + description="Panorama seams results images.", + value="", uid=[0], ), desc.ChoiceParam( - name='compositerType', - label='Compositer Type', - description='Which compositer should be used to blend images:\n' - ' * multiband: high quality transition by fusing images by frequency bands\n' - ' * replace: debug option with straight transitions\n' - ' * alpha: debug option with linear transitions\n', - value='multiband', - values=['replace', 'alpha', 'multiband'], + name="compositerType", + label="Compositer Type", + description="Which compositer should be used to blend images:\n" + " - multiband: high quality transition by fusing images by frequency bands.\n" + " - replace: debug option with straight transitions.\n" + " - alpha: debug option with linear transitions.", + value="multiband", + values=["replace", "alpha", "multiband"], exclusive=True, uid=[0] ), desc.IntParam( - name='forceMinPyramidLevels', - label='Min Pyramid Levels', - description='Force the minimal number of levels in the pyramid for multiband compositer.', + name="forceMinPyramidLevels", + label="Min Pyramid Levels", + description="Force the minimal number of levels in the pyramid for multiband compositer.", value=0, range=(0, 16, 1), uid=[0], - enabled=lambda node: node.compositerType.value and node.compositerType.value == 'multiband', + enabled=lambda node: node.compositerType.value and node.compositerType.value == "multiband", ), desc.IntParam( - name='maxThreads', - label='Max Nb Threads', - description='Specifies the maximum number of threads to run simultaneously.', + name="maxThreads", + label="Max Nb Threads", + description="Specifies the maximum number of threads to run simultaneously.", value=4, range=(0, 48, 1), uid=[], advanced=True, ), desc.BoolParam( - name='useTiling', - label='Use tiling', - description='''Enable tiling mode for parallelization''', + name="useTiling", + label="Use Tiling", + description="Enable tiling mode for parallelization.", value=True, uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='overlayType', - label='Overlay Type', - description='Overlay on top of panorama to analyze transitions:\n' - ' * none: no overlay\n' - ' * borders: display image borders\n' - ' * seams: display transitions between images\n' - ' * all: display borders and seams\n', - value='none', - values=['none', 'borders', 'seams', 'all'], + name="overlayType", + label="Overlay Type", + description="Overlay on top of panorama to analyze transitions:\n" + " - none: no overlay.\n" + " - borders: display image borders.\n" + " - seams: display transitions between images.\n" + " - all: display borders and seams.", + value="none", + values=["none", "borders", "seams", "all"], exclusive=True, advanced=True, 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'], + 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='Folder', - description='', + name="output", + label="Folder", + description="Output folder containing the composited panorama.", value=desc.Node.internalFolder, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 2882d37a18..fb1de15af8 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -17,177 +17,177 @@ class PanoramaEstimation(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( - name='featuresFolder', - label='Features Folder', - description="", - value='', + name="featuresFolder", + label="Features Folder", + description="Folder containing some extracted features.", + value="", uid=[0], ), - name='featuresFolders', - label='Features Folders', + name="featuresFolders", + label="Features Folders", description="Folder(s) containing the extracted features." ), desc.ListAttribute( elementDesc=desc.File( - name='matchesFolder', - label='Matches Folder', - description="", - value='', + name="matchesFolder", + label="Matches Folder", + description="Folder containing some matches.", + value="", uid=[0], ), - name='matchesFolders', - label='Matches Folders', + name="matchesFolders", + label="Matches Folders", description="Folder(s) in which computed matches are stored." ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', - 'sift_ocv', 'akaze_ocv'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["sift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", + "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.FloatParam( - name='offsetLongitude', - label='Longitude offset (deg.)', - description='''Offset to the panorama longitude''', + name="offsetLongitude", + label="Longitude Offset", + description="Offset to the panorama longitude (in degrees).", value=0.0, range=(-180.0, 180.0, 1.0), uid=[0], ), desc.FloatParam( - name='offsetLatitude', - label='Latitude offset (deg.)', - description='''Offset to the panorama latitude''', + name="offsetLatitude", + label="Latitude Offset", + description="Offset to the panorama latitude (in degrees).", value=0.0, range=(-90.0, 90.0, 1.0), uid=[0], ), desc.ChoiceParam( - name='rotationAveraging', - label='Rotation Averaging Method', + name="rotationAveraging", + label="Rotation Averaging Method", description="Method for rotation averaging :\n" - " * L1 minimization\n" - " * L2 minimization\n", - values=['L1_minimization', 'L2_minimization'], - value='L2_minimization', + " - L1 minimization\n" + " - L2 minimization", + values=["L1_minimization", "L2_minimization"], + value="L2_minimization", exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='relativeRotation', - label='Relative Rotation Method', + name="relativeRotation", + label="Relative Rotation Method", description="Method for relative rotation :\n" - " * from essential matrix\n" - " * from homography matrix\n" - " * from rotation matrix", - values=['essential_matrix', 'homography_matrix', 'rotation_matrix'], - value='rotation_matrix', + " - from essential matrix\n" + " - from homography matrix\n" + " - from rotation matrix", + values=["essential_matrix", "homography_matrix", "rotation_matrix"], + value="rotation_matrix", exclusive=True, uid=[0], advanced=True, ), desc.BoolParam( - name='rotationAveragingWeighting', - label='Rotation Averaging Weighting', - description='Rotation averaging weighting based on the number of feature matches.', + name="rotationAveragingWeighting", + label="Rotation Averaging Weighting", + description="Rotation averaging weighting based on the number of feature matches.", value=True, uid=[0], advanced=True, ), desc.BoolParam( - name='filterMatches', - label='Filter Matches', - description='Filter Matches', + name="filterMatches", + label="Filter Matches", + description="Filter the matches.", value=False, uid=[0], ), desc.BoolParam( - name='refine', - label='Refine', - description='Refine camera relative poses, points and optionally internal camera parameter', + name="refine", + label="Refine", + description="Refine camera relative poses, points and optionally internal camera parameters.", value=True, uid=[0], ), desc.BoolParam( - name='lockAllIntrinsics', - label='Force Lock of All Intrinsics', - description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) during the reconstruction.\n' - 'This may be helpful if the input cameras are already fully calibrated.', + name="lockAllIntrinsics", + label="Lock All Intrinsics", + description="Force to keep all the intrinsics parameters of the cameras (focal length, \n" + "principal point, distortion if any) constant during the reconstruction.\n" + "This may be helpful if the input cameras are already fully calibrated.", value=False, uid=[0], ), desc.FloatParam( - name='maxAngleToPrior', - label='Max Angle To Priors (deg.)', - description='''Maximal angle allowed regarding the input prior (in degrees).''', + name="maxAngleToPrior", + label="Max Angle To Priors", + description="Maximum angle allowed regarding the input prior (in degrees).", value=20.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='maxAngularError', - label='Max Angular Error (deg.)', - description='''Maximal angular error in global rotation averging (in degrees).''', + name="maxAngularError", + label="Max Angular Error", + description="Maximum angular error in global rotation averging (in degrees).", value=100.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, ), desc.BoolParam( - name='intermediateRefineWithFocal', - label='Intermediate Refine: Focal', - description='Intermediate refine with rotation and focal length only.', + name="intermediateRefineWithFocal", + label="Intermediate Refine: Focal", + description="Intermediate refine with rotation and focal length only.", value=False, uid=[0], advanced=True, ), desc.BoolParam( - name='intermediateRefineWithFocalDist', - label='Intermediate Refine: Focal And Distortion', - description='Intermediate refine with rotation, focal length and distortion.', + name="intermediateRefineWithFocalDist", + label="Intermediate Refine: Focal And Distortion", + description="Intermediate refine with rotation, focal length and distortion.", value=False, uid=[0], advanced=True, ), 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'], + 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='SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'panorama.abc', + name="output", + label="SfM File", + description="Path to the output SfM file.", + value=desc.Node.internalFolder + "panorama.abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Views And Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 08894c64bf..e9527f24f6 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -22,85 +22,87 @@ class PanoramaInit(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='initializeCameras', - label='Initialize Cameras', - description='Initialize cameras.', - value='No', - values=['No', 'File', 'Horizontal', 'Horizontal+Zenith', 'Zenith+Horizontal', 'Spherical'], + name="initializeCameras", + label="Initialize Cameras", + description="Initialize cameras.", + value="No", + values=["No", "File", "Horizontal", "Horizontal+Zenith", "Zenith+Horizontal", "Spherical"], exclusive=True, uid=[0], ), desc.File( - name='config', - label='Xml Config', - description="XML Data File", - value='', + name="config", + label="XML Config", + description="XML data file.", + value="", uid=[0], - enabled=lambda node: node.initializeCameras.value == 'File', + enabled=lambda node: node.initializeCameras.value == "File", ), desc.BoolParam( - name='yawCW', - label='Yaw CW', - description="Yaw ClockWise or CounterClockWise", + name="yawCW", + label="Yaw CW", + description="If selected, the yaw rotation will be clockwise. Otherwise, it will be counter-clockwise.", value=True, uid=[0], - enabled=lambda node: ('Horizontal' in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), + enabled=lambda node: ("Horizontal" in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), ), desc.BoolParam( - name='buildContactSheet', - label='Build Contact Sheet', - description='Build the contact sheet for the panorama if an XML data file is provided.\n' - 'The contact sheet consists in a preview of the panorama using the input images.', + name="buildContactSheet", + label="Build Contact Sheet", + description="Build the contact sheet for the panorama if an XML data file is provided.\n" + "The contact sheet consists in a preview of the panorama using the input images.", value=True, uid=[0], - enabled=lambda node: node.config.enabled and node.config.value != '' + enabled=lambda node: node.config.enabled and node.config.value != "" ), desc.ListAttribute( elementDesc=desc.IntParam( - name='nbViews', - label='', - description='', + name="nbViews", + label="Number of Views", + description="Number of views for a line.", value=-1, - range=[-1, 20], + range=(-1, 20, 1), uid=[0], ), - name='nbViewsPerLine', - label='Spherical: Nb Views Per Line', - description='Number of views per line in Spherical acquisition. Assumes angles from [-90,+90deg] for pitch and [-180,+180deg] for yaw. Use -1 to estimate the number of images automatically.', - joinChar=',', - enabled=lambda node: node.initializeCameras.value == 'Spherical', + name="nbViewsPerLine", + label="Spherical: Nb Views Per Line", + description="Number of views per line in Spherical acquisition.\n" + "Assumes angles from [-90,+90deg] for pitch and [-180,+180deg] for yaw.\n" + "Use -1 to estimate the number of images automatically.", + joinChar=",", + enabled=lambda node: node.initializeCameras.value == "Spherical", ), desc.ListAttribute( elementDesc=desc.File( - name='dependency', - label='', + name="dependency", + label="", description="", - value='', + value="", uid=[], ), - name='dependency', - label='Dependency', + name="dependency", + label="Dependency", description="Folder(s) in which computed features are stored. (WORKAROUND for valid Tractor graph submission)", - group='forDependencyOnly', # not a command line argument + group="forDependencyOnly", # not a command line argument ), desc.BoolParam( - name='useFisheye', - label='Full Fisheye', - description='To declare a full fisheye panorama setup', + name="useFisheye", + label="Full Fisheye", + description="Set this option to declare a full fisheye panorama setup.", value=False, uid=[0], ), desc.BoolParam( - name='estimateFisheyeCircle', - label='Estimate Fisheye Circle', - description='Automatically estimate the Fisheye Circle center and radius instead of using user values.', + name="estimateFisheyeCircle", + label="Estimate Fisheye Circle", + description="Automatically estimate the fisheye circle center and radius instead of using user values.", value=True, uid=[0], enabled=lambda node: node.useFisheye.value, @@ -108,15 +110,15 @@ class PanoramaInit(desc.AVCommandLineNode): desc.GroupAttribute( name="fisheyeCenterOffset", label="Fisheye Center", - description="Center of the Fisheye circle (XY offset to the center in pixels).", + description="Center of the fisheye circle (XY offset to the center in pixels).", groupDesc=[ desc.FloatParam( - name="fisheyeCenterOffset_x", label="x", description="X Offset in pixels", + name="fisheyeCenterOffset_x", label="x", description="X offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), desc.FloatParam( - name="fisheyeCenterOffset_y", label="y", description="Y Offset in pixels", + name="fisheyeCenterOffset_y", label="y", description="Y offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), @@ -125,49 +127,49 @@ class PanoramaInit(desc.AVCommandLineNode): enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.FloatParam( - name='fisheyeRadius', - label='Radius', - description='Fisheye visibillity circle radius (% of image shortest side).', + name="fisheyeRadius", + label="Fisheye Radius", + description="Fisheye visibillity circle radius (in % of image's shortest side).", value=96.0, range=(0.0, 150.0, 0.01), uid=[0], enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.ChoiceParam( - name='inputAngle', - label='input Angle offset', - description='Add a rotation to the input XML given poses (CCW).', - value='None', - values=['None', 'rotate90', 'rotate180', 'rotate270'], + name="inputAngle", + label="Input Angle Offset", + description="Add a rotation to the input XML given poses (CCW).", + value="None", + values=["None", "rotate90", "rotate180", "rotate270"], exclusive=True, uid=[0] ), desc.BoolParam( - name='debugFisheyeCircleEstimation', - label='Debug Fisheye Circle Detection', - description='Debug fisheye circle detection.', + name="debugFisheyeCircleEstimation", + label="Debug Fisheye Circle Detection", + description="Debug fisheye circle detection.", value=False, uid=[0], enabled=lambda node: node.useFisheye.value, advanced=True, ), 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'], + 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='outSfMData', - label='SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="outSfMData", + label="SfMData File", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ) ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 2f1721ecb4..3e12c4e2cd 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -19,67 +19,67 @@ class PanoramaMerging(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description="Input SfMData.", + name="input", + label="Input SfMData", + description="Input SfMData file.", value='', uid=[0], ), desc.File( - name='compositingFolder', - label='compositing Folder', - description="Panorama Compositing results", - value='', + name="compositingFolder", + label="Compositing Folder", + description="Panorama compositing results.", + value="", uid=[0], ), desc.ChoiceParam( - name='outputFileType', - label='Output File Type', - description='Output file type for the undistorted images.', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], + name="outputFileType", + label="Output File Type", + description="Output file type for the merged panorama.", + value="exr", + values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], - group='', # not part of allParams, as this is not a parameter for the command line + group="", # not part of allParams, as this is not a parameter for the command line ), desc.BoolParam( - name='useTiling', - label='Use tiling', - description='''Enable tiling mode for parallelization''', + name="useTiling", + label="Use Tiling", + description="Enable tiling mode for parallelization.", value=True, uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.\n", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, 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'], + 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='outputPanorama', - label='Panorama', - description='', - semantic='image', - value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', + name="outputPanorama", + label="Panorama", + description="Output merged panorama image.", + semantic="image", + value=desc.Node.internalFolder + "panorama.{outputFileTypeValue}", uid=[], ), ] diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 0f105104e2..a85d76092d 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -18,83 +18,82 @@ class PanoramaPostProcessing(desc.CommandLineNode): inputs = [ desc.File( - name='inputPanorama', - label='Input Panorama', - description="Input Panorama.", - value='', + name="inputPanorama", + label="Input Panorama", + description="Input panorama image.", + value="", uid=[0], ), desc.BoolParam( - name='fillHoles', - label='Use fill holes algorithm', - description='Fill the non attributed pixels with push pull algorithm.', + name="fillHoles", + label="Fill Holes Algorithm", + description="Fill the non attributed pixels with push pull algorithm if set.", value=False, uid=[0], ), desc.IntParam( - name='previewSize', - label='Panorama Preview Width', - description='The width (in pixels) of the output panorama preview.', + name="previewSize", + label="Panorama Preview Width", + description="The width (in pixels) of the output panorama preview.", value=1000, range=(0, 5000, 100), uid=[0] ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', - description='Allows you to choose the color space of the output image.', - value='Linear', - values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg'], + name="outputColorSpace", + label="Output Color Space", + description="The color space of the output image.", + value="Linear", + values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='compressionMethod', - label='Compression Method', - description='Compression method for output EXR image.', - value='auto', - values=['none', 'auto', 'rle', 'zip', 'zips', 'piz', 'pxr24', 'b44', 'b44a', 'dwaa', 'dwab'], + name="compressionMethod", + label="Compression Method", + description="Compression method for output EXR image.", + value="auto", + values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, uid=[0], ), desc.IntParam( - name='compressionLevel', - label='Compression Level', - description='Level of compression for output EXR image, range depends on method used.\n' - 'For zip/zips methods, values must be between 1 and 9.\n' - 'A value of 0 will be ignored, default value for the selected method will be used.', + name="compressionLevel", + label="Compression Level", + description="Level of compression for the output EXR image. The range depends on method used.\n" + "For zip/zips methods, values must be between 1 and 9.\n" + "A value of 0 will be ignored, default value for the selected method will be used.", value=0, range=(0, 500, 1), uid=[0], - enabled=lambda node: node.compressionMethod.value in ['dwaa', 'dwab', 'zip', 'zips'] + enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"] ), - 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'], + 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='outputPanorama', - label='Output Panorama', - description='Generated panorama in EXR format.', - semantic='image', - value=desc.Node.internalFolder + 'panorama.exr', + name="outputPanorama", + label="Output Panorama", + description="Generated panorama in EXR format.", + semantic="image", + value=desc.Node.internalFolder + "panorama.exr", uid=[], ), desc.File( - name='outputPanoramaPreview', - label='Output Panorama Preview', - description='Preview of the generated panorama in JPG format.', - semantic='image', - value=desc.Node.internalFolder + 'panoramaPreview.jpg', + name="outputPanoramaPreview", + label="Output Panorama Preview", + description="Preview of the generated panorama in JPG format.", + semantic="image", + value=desc.Node.internalFolder + "panoramaPreview.jpg", uid=[], ), ] diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index e738e9c0c8..0c709a4295 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -16,28 +16,28 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="Input", + description="SfMData 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'], + 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='SfmData', - description='Output sfmData.', + name="output", + label="SfMData", + description="Output SfMData file.", value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value), uid=[], ), diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 27e01369ad..4bc35453c3 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -19,40 +19,40 @@ class PanoramaSeams(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description="Input SfMData.", - value='', + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='warpingFolder', - label='Warping Folder', - description="Panorama Warping results", - value='', + name="warpingFolder", + label="Warping Folder", + description="Panorama warping results.", + value="", uid=[0], ), desc.IntParam( - name='maxWidth', - label='Max Resolution', - description='Maximal resolution for the panorama seams estimation.', + name="maxWidth", + label="Max Resolution", + description="Maximal resolution for the panorama seams estimation.", value=5000, range=(0, 100000, 1), uid=[0], ), desc.BoolParam( - name='useGraphCut', - label='Use Smart Seams', - description='Use a graphcut algorithm to optimize seams for better transitions between images.', + name="useGraphCut", + label="Use Smart Seams", + description="Use a graphcut algorithm to optimize seams for better transitions between images.", value=True, 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'], + 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=[], ) @@ -60,18 +60,18 @@ class PanoramaSeams(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Labels', - description='', - semantic='image', - value=desc.Node.internalFolder + 'labels.exr', + name="output", + label="Labels", + description="", + semantic="image", + value=desc.Node.internalFolder + "labels.exr", uid=[], ), desc.File( - name='outputSfm', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'panorama.sfm', + name="outputSfm", + label="Output SfMData File", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "panorama.sfm", uid=[], ) ] diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 2d09e69c86..cc29771d9b 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -19,80 +19,80 @@ class PanoramaWarping(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.BoolParam( - name='estimateResolution', - label='Estimate Resolution', - description='Estimate output panorama resolution automatically based on the input images resolution.', + name="estimateResolution", + label="Estimate Resolution", + description="Estimate output panorama resolution automatically based on the resolution of input images.", value=True, uid=[0], group=None, # skip group from command line ), desc.IntParam( - name='panoramaWidth', - label='Panorama Width', - description='Choose the output panorama width (in pixels).', + name="panoramaWidth", + label="Panorama Width", + description="Choose the output panorama width (in pixels).", value=10000, range=(0, 50000, 1000), uid=[0], enabled=lambda node: (not node.estimateResolution.value), ), desc.IntParam( - name='percentUpscale', - label='Upscale Ratio', - description='Percentage of upscaled pixels.\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', + name="percentUpscale", + label="Upscale Ratio", + description="Percentage of upscaled pixels.\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.estimateResolution.value), uid=[0] ), desc.IntParam( - name='maxPanoramaWidth', - label='Max Panorama Width', - description='Choose the maximal output panorama width (in pixels). Zero means no limit.', + name="maxPanoramaWidth", + label="Max Panorama Width", + description="Choose the maximum width for the output panorama (in pixels). 0 means no limit.", value=70000, range=(0, 100000, 1000), uid=[0], enabled=lambda node: (node.estimateResolution.value), ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Colorspace in which the panorama warping will be performed.', - value='Linear', - values=['Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], - exclusive=True, - uid=[0], + name="workingColorSpace", + label="Working Color Space", + description="Colorspace in which the panorama warping will be performed.", + value="Linear", + values=["Linear", "ACES2065-1", "ACEScg", "no_conversion"], + exclusive=True, + uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, 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'], + 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=[], ), @@ -100,9 +100,9 @@ class PanoramaWarping(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='', + name="output", + label="Folder", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 33c753a2ba..047865bc14 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -12,71 +12,71 @@ class PhotometricStereo(desc.CommandLineNode): inputs = [ desc.File( - name='inputPath', - label='SfMData', - description='Input file. Could be an SfMData file or folder containing images.', - value='', + name="inputPath", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0] ), desc.File( - name='pathToJSONLightFile', - label='Light File', - description='Path to a JSON file containing the lighting information.\n' - 'If empty, .txt files are expected in the image folder.', - value='defaultJSON.txt', + name="pathToJSONLightFile", + label="Light File", + description="Path to a JSON file containing the lighting information.\n" + "If empty, .txt files are expected in the image folder.", + value="defaultJSON.txt", uid=[0] ), desc.File( - name='maskPath', - label='Mask Folder Path', - description='Path to a folder containing masks or to a mask directly.', - value='', + name="maskPath", + label="Mask Folder Path", + description="Path to a folder containing masks or to a mask directly.", + value="", uid=[0] ), desc.ChoiceParam( - name='SHOrder', - label='Spherical Harmonics Order', - description='Order of the spherical harmonics.\n' - '- 0: directional\n' - '- 1: directional + ambiant\n' - '- 2: second order spherical harmonics', - values=['0', '1', '2'], - value='0', + name="SHOrder", + label="Spherical Harmonics Order", + description="Order of the spherical harmonics:\n" + " - 0: directional.\n" + " - 1: directional + ambiant.\n" + " - 2: second order spherical harmonics.", + values=["0", "1", "2"], + value="0", exclusive=True, advanced=True, uid=[0] ), desc.BoolParam( - name='removeAmbiant', - label='Remove Ambiant Light', - description='True if the ambiant light is to be removed on the PS images, false otherwise.', + name="removeAmbiant", + label="Remove Ambiant Light", + description="True if the ambiant light is to be removed on the PS images, false otherwise.", value=False, advanced=True, uid=[0] ), desc.BoolParam( - name='isRobust', - label='Use Robust Algorithm', - description='True to use the robust algorithm, false otherwise.', + name="isRobust", + label="Use Robust Algorithm", + description="True to use the robust algorithm, false otherwise.", value=False, advanced=True, uid=[0] ), desc.IntParam( - name='downscale', - label='Downscale Factor', - description='Downscale factor for faster results.', + name="downscale", + label="Downscale Factor", + description="Downscale factor for faster results.", value=1, range=(1, 10, 1), advanced=True, 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'], + 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=[], ) @@ -84,64 +84,64 @@ class PhotometricStereo(desc.CommandLineNode): outputs = [ desc.File( - name='outputPath', - label='Output Folder', - description='Path to the output folder', + name="outputPath", + label="Output Folder", + description="Path to the output folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputSfmData', - label='SfMData', - description='Output path for the Sfm', - value=desc.Node.internalFolder + '/sfmData.sfm', + name="outputSfmData", + label="SfMData", + description="Output path for the SfMData file.", + value=desc.Node.internalFolder + "/sfmData.sfm", uid=[], - group='', # remove from command line + group="", # remove from command line ), desc.File( - name='outputSfmDataAlbedo', - label='SfMData Albedo', - description='', - value=desc.Node.internalFolder + '/albedoMaps.sfm', + name="outputSfmDataAlbedo", + label="SfMData Albedo", + description="Output SfMData file containing the albedo information.", + value=desc.Node.internalFolder + "/albedoMaps.sfm", uid=[], - group='', # remove from command line + group="", # remove from command line ), desc.File( - name='outputSfmDataNormal', - label='SfMData Normal', - description='', - value=desc.Node.internalFolder + '/normalMaps.sfm', + name="outputSfmDataNormal", + label="SfMData Normal", + description="Output SfMData file containing the normal maps information.", + value=desc.Node.internalFolder + "/normalMaps.sfm", uid=[], - group='', # remove from command line + group="", # remove from command line ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) desc.File( - name='normals', - label='Normal Maps Camera', - description='Generated normal maps in the camera coordinate system.', - semantic='image', - value=desc.Node.internalFolder + '<POSE_ID>_normals.exr', + name="normals", + label="Normal Maps Camera", + description="Generated normal maps in the camera coordinate system.", + semantic="image", + value=desc.Node.internalFolder + "<POSE_ID>_normals.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='normalsWorld', - label='Normal Maps World', - description='Generated normal maps in the world coordinate system.', - semantic='image', - value=desc.Node.internalFolder + '<POSE_ID>_normals_w.exr', + name="normalsWorld", + label="Normal Maps World", + description="Generated normal maps in the world coordinate system.", + semantic="image", + value=desc.Node.internalFolder + "<POSE_ID>_normals_w.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='albedo', - label='Albedo Maps', - description='Generated albedo maps.', - semantic='image', - value=desc.Node.internalFolder + '<POSE_ID>_albedo.exr', + name="albedo", + label="Albedo Maps", + description="Generated albedo maps.", + semantic="image", + value=desc.Node.internalFolder + "<POSE_ID>_albedo.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index eb511533c9..a1e1a7c0ca 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -16,10 +16,10 @@ class PrepareDenseScene(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='''SfMData file.''', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( @@ -32,7 +32,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): ), name="imagesFolders", label="Images Folders", - description='Use images from specific folder(s). Filename should be the same or the image uid.', + description="Use images from specific folder(s). Filename should be the same or the image UID.", ), desc.ListAttribute( elementDesc=desc.File( @@ -44,48 +44,48 @@ class PrepareDenseScene(desc.AVCommandLineNode): ), name="masksFolders", label="Masks Folders", - description='Use masks from specific folder(s). Filename should be the same or the image uid.', + description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), desc.ChoiceParam( - name='outputFileType', - label='Output File Type', - description='Output file type for the undistorted images.', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], + name="outputFileType", + label="Output File Type", + description="Output file type for the undistorted images.", + value="exr", + values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], advanced=True ), desc.BoolParam( - name='saveMetadata', - label='Save Metadata', - description='Save projections and intrinsics information in images metadata (only for .exr images).', + name="saveMetadata", + label="Save Metadata", + description="Save projections and intrinsics information in images metadata (only for .exr images).", value=True, uid=[0], advanced=True ), desc.BoolParam( - name='saveMatricesTxtFiles', - label='Save Matrices Text Files', - description='Save projections and intrinsics information in text files.', + name="saveMatricesTxtFiles", + label="Save Matrices Text Files", + description="Save projections and intrinsics information in text files.", value=False, uid=[0], advanced=True ), desc.BoolParam( - name='evCorrection', - label='Correct images exposure', - description='Apply a correction on images Exposure Value', + name="evCorrection", + label="Correct Images Exposure", + description="Apply a correction on images' exposure value.", value=False, uid=[0], advanced=True ), 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'], + 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=[], ), @@ -93,20 +93,20 @@ class PrepareDenseScene(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Images Folder', - description='''Output folder.''', + name="output", + label="Images Folder", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='undistorted', - label='Undistorted Images', - description='List of undistorted images.', - semantic='image', - value=desc.Node.internalFolder + '<VIEW_ID>.{outputFileTypeValue}', + name="undistorted", + label="Undistorted Images", + description="List of undistorted images.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>.{outputFileTypeValue}", uid=[], - group='', + group="", advanced=True - ), + ), ] diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index dd65306783..9ec86f5e15 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -39,15 +39,15 @@ class Publish(desc.Node): uid=[0], ), desc.ChoiceParam( - name='verboseLevel', - label='Verbose Level', - description='''verbosity level (critical, error, warning, info, debug).''', - value='info', - values=['critical', 'error', 'warning', 'info', 'debug'], + 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=[], - ), - ] + ), + ] def resolvedPaths(self, inputFiles, outDir): paths = {} From d6bef3c672e4b49da1258456669e549ccdccacb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 16 Jun 2023 10:32:01 +0200 Subject: [PATCH 0828/1093] [nodes] S-T: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/aliceVision/SfMAlignment.py | 106 +++---- meshroom/aliceVision/SfMDistances.py | 67 ++--- meshroom/aliceVision/SfMTransfer.py | 101 +++---- meshroom/aliceVision/SfMTransform.py | 138 ++++----- meshroom/aliceVision/SfMTriangulation.py | 117 ++++---- meshroom/aliceVision/SketchfabUpload.py | 134 ++++----- meshroom/aliceVision/SphereDetection.py | 48 ++-- meshroom/aliceVision/Split360Images.py | 102 +++---- meshroom/aliceVision/StructureFromMotion.py | 286 +++++++++---------- meshroom/aliceVision/Texturing.py | 298 ++++++++++---------- meshroom/aliceVision/TracksBuilding.py | 64 ++--- meshroom/blender/ScenePreview.py | 114 ++++---- 12 files changed, 798 insertions(+), 777 deletions(-) diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index f834e636b7..1ea6be1580 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -24,43 +24,46 @@ class SfMAlignment(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file .''', - value='', + name="input", + label="Input", + description="Input SfMData file .", + value="", uid=[0], ), desc.File( - name='reference', - label='Reference', - description='''Path to the scene used as the reference coordinate system.''', - value='', + name="reference", + label="Reference", + description="Path to the scene used as the reference coordinate system.", + value="", uid=[0], ), desc.ChoiceParam( - name='method', - label='Alignment Method', - description="Alignment Method:\n" - " * from_cameras_viewid: Align cameras with same view Id\n" - " * from_cameras_poseid: Align cameras with same pose Id\n" - " * from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n" - " * from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n" - " * from_markers: Align from markers with the same Id\n", - value='from_cameras_viewid', - values=['from_cameras_viewid', 'from_cameras_poseid', 'from_cameras_filepath', 'from_cameras_metadata', 'from_markers'], + name="method", + label="Alignment Method", + description="Alignment method:\n" + " - from_cameras_viewid: Align cameras with same view ID.\n" + " - from_cameras_poseid: Align cameras with same pose ID.\n" + " - from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'.\n" + " - from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'.\n" + " - from_markers: Align from markers with the same ID.\n", + value="from_cameras_viewid", + values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers"], exclusive=True, uid=[0], ), desc.StringParam( - name='fileMatchingPattern', - label='File Matching Pattern', - description='Matching regular expression for the "from_cameras_filepath" method. ' - 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' - 'Some examples of patterns:\n' - r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' + - r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' + - r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"', - value=r'.*\/(.*?)\.\w{3}', + name="fileMatchingPattern", + label="File Matching Pattern", + description="Matching regular expression for the 'from_cameras_filepath' method.\n" + "You should capture specific parts of the filepath with parentheses to define matching elements.\n" + "Some examples of patterns:\n" + " - Match the filename without extension (default value): " + r'".*\/(.*?)\.\w{3}"' + "\n" + " - Match the filename suffix after '_': " + r'".*\/.*(_.*?\.\w{3})"' + "\n" + " - Match the filename prefix before '_': " + r'".*\/(.*?)_.*\.\w{3}"', + value=r".*\/(.*?)\.\w{3}", uid=[0], ), desc.ListAttribute( @@ -68,40 +71,41 @@ class SfMAlignment(desc.AVCommandLineNode): name="metadataMatching", label="Metadata", description="", - value="", + value="Metadata that should match to create the correspondences.", uid=[0], ), name="metadataMatchingList", label="Metadata Matching List", - description='List of metadata that should match to create the correspondences. If the list is empty, the default value will be used: ["Make", "Model", "Exif:BodySerialNumber", "Exif:LensSerialNumber"].', + description="List of metadata that should match to create the correspondences.\n" + "If the list is empty, the default value will be used: ['Make', 'Model', 'Exif:BodySerialNumber', 'Exif:LensSerialNumber'].", ), desc.BoolParam( - name='applyScale', - label='Scale', - description='Apply scale transformation.', + name="applyScale", + label="Scale", + description="Apply scale transformation.", value=True, uid=[0] ), desc.BoolParam( - name='applyRotation', - label='Rotation', - description='Apply rotation transformation.', + name="applyRotation", + label="Rotation", + description="Apply rotation transformation.", value=True, uid=[0] ), desc.BoolParam( - name='applyTranslation', - label='Translation', - description='Apply translation transformation.', + name="applyTranslation", + label="Translation", + description="Apply translation transformation.", value=True, 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'], + 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=[], ), @@ -109,17 +113,17 @@ class SfMAlignment(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData File', - description='SfMData file.', - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + name="output", + label="SfMData File", + description="Output SfMData file.", + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py index 433c7a8d1d..b0fc9760c3 100644 --- a/meshroom/aliceVision/SfMDistances.py +++ b/meshroom/aliceVision/SfMDistances.py @@ -7,57 +7,60 @@ class SfMDistances(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmDistances {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' + ''' + inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file.''', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='objectType', - label='Type', - description='', - value='landmarks', - values=['landmarks', 'cameras'], + name="objectType", + label="Type", + description="", + value="landmarks", + values=["landmarks", "cameras"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='landmarksDescriberTypes', - label='Describer Types', - description='Describer types used to describe an image (only used when using "landmarks").', - value=['cctag3'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="landmarksDescriberTypes", + label="Describer Types", + description="Describer types used to describe an image (only used when using 'landmarks').", + value=["cctag3"], + values=["sift", "sift_float", "sift_upright", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.StringParam( - name='A', - label='A IDs', - description='It will display the distances between A and B elements.\n' - 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' - 'It will list all elements if empty.', - value='', + name="A", + label="A IDs", + description="It will display the distances between A and B elements.\n" + "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" + "It will list all elements if empty.", + value="", uid=[0], ), desc.StringParam( - name='B', - label='B IDs', - description='It will display the distances between A and B elements.\n' - 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' - 'It will list all elements if empty.', - value='', + name="B", + label="B IDs", + description="It will display the distances between A and B elements.\n" + "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" + "It will list all elements if empty.", + 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'], + 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=[], ), diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index c88dee13d7..4a68045100 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -16,41 +16,44 @@ class SfMTransfer(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file .''', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.File( - name='reference', - label='Reference', - description='''Path to the scene used as the reference to retrieve resolved poses and intrinsics.''', - value='', + name="reference", + label="Reference", + description="Path to the scene used as the reference to retrieve resolved poses and intrinsics.", + value="", uid=[0], ), desc.ChoiceParam( - name='method', - label='Matching Method', + name="method", + label="Matching Method", description="Matching Method:\n" - " * from_viewid: Align cameras with same view Id\n" - " * from_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n" - " * from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n" - " * from_intrinsicid: Copy intrinsics parameters\n", - value='from_viewid', - values=['from_viewid', 'from_filepath', 'from_metadata', 'from_intrinsicid'], + " - from_viewid: Align cameras with same view ID.\n" + " - from_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'.\n" + " - from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'.\n" + " - from_intrinsicid: Copy intrinsics parameters.\n", + value="from_viewid", + values=["from_viewid", "from_filepath", "from_metadata", "from_intrinsicid"], exclusive=True, uid=[0], ), desc.StringParam( - name='fileMatchingPattern', - label='File Matching Pattern', - description='Matching regular expression for the "from_cameras_filepath" method. ' - 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' - 'Some examples of patterns:\n' - r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' + - r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' + - r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"', + name="fileMatchingPattern", + label="File Matching Pattern", + description="Matching regular expression for the 'from_cameras_filepath' method.\n" + "You should capture specific parts of the filepath with parentheses to define matching elements.\n" + "Some examples of patterns:\n" + " - Match the filename without extension (default value): " + r'".*\/(.*?)\.\w{3}"' + "\n" + " - Match the filename suffix after \"_\": " + r'".*\/.*(_.*?\.\w{3})"' + "\n" + " - Match the filename prefix before \"_\": " + r'".*\/(.*?)_.*\.\w{3}"', value=r'.*\/(.*?)\.\w{3}', uid=[0], ), @@ -58,41 +61,43 @@ class SfMTransfer(desc.AVCommandLineNode): elementDesc=desc.File( name="metadataMatching", label="Metadata", - description="", + description="Metadata that should match to create correspondences.", value="", uid=[0], ), name="metadataMatchingList", label="Metadata Matching List", - description='List of metadata that should match to create the correspondences. If the list is empty, the default value will be used: ["Make", "Model", "Exif:BodySerialNumber", "Exif:LensSerialNumber"].', + description="List of metadata that should match to create the correspondences.\n" + "If the list is empty, the default value will be used:\n" + "['Make', 'Model', 'Exif:BodySerialNumber', 'Exif:LensSerialNumber'].", ), desc.BoolParam( - name='transferPoses', - label='Poses', - description='Transfer poses.', + name="transferPoses", + label="Poses", + description="Transfer poses.", value=True, uid=[0] ), desc.BoolParam( - name='transferIntrinsics', - label='Intrinsics', - description='Transfer cameras intrinsics.', + name="transferIntrinsics", + label="Intrinsics", + description="Transfer cameras intrinsics.", value=True, uid=[0] ), desc.BoolParam( - name='transferLandmarks', - label='Landmarks', - description='Transfer landmarks.', + name="transferLandmarks", + label="Landmarks", + description="Transfer landmarks.", value=True, 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'], + 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=[], ), @@ -100,17 +105,17 @@ class SfMTransfer(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData File', - description='SfMData file.', - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + name="output", + label="SfMData", + description="Path to the output SfM point cloud file (in SfMData format).", + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index a15d93d294..b179583242 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -26,39 +26,39 @@ class SfMTransform(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file .''', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='method', - label='Transformation Method', + name="method", + label="Transformation Method", description="Transformation method:\n" - " * transformation: Apply a given transformation.\n" - " * manual: Apply the gizmo transformation (show the transformed input).\n" - " * auto: Determines scene orientation from the cameras' X axis, determines north and scale from GPS information if available, and defines ground level from the point cloud.\n" - " * auto_from_cameras: Defines coordinate system from cameras.\n" - " * auto_from_cameras_x_axis: Determines scene orientation from the cameras' X axis.\n" - " * auto_from_landmarks: Defines coordinate system from landmarks.\n" - " * from_single_camera: Defines the coordinate system from the camera specified by --tranformation.\n" - " * from_center_camera: Defines the coordinate system from the camera closest to the center of the reconstruction.\n" - " * from_markers: Defines the coordinate system from markers specified by --markers.\n" - " * from_gps: Defines coordinate system from GPS metadata.\n" - " * align_ground: Defines ground level from the point cloud density. It assumes that the scene is oriented.", - value='auto', - values=['transformation', 'manual', 'auto', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps', 'align_ground'], + " - transformation: Apply a given transformation.\n" + " - manual: Apply the gizmo transformation (show the transformed input).\n" + " - auto: Determines scene orientation from the cameras' X axis, determines north and scale from GPS information if available, and defines ground level from the point cloud.\n" + " - auto_from_cameras: Defines coordinate system from cameras.\n" + " - auto_from_cameras_x_axis: Determines scene orientation from the cameras' X axis.\n" + " - auto_from_landmarks: Defines coordinate system from landmarks.\n" + " - from_single_camera: Defines the coordinate system from the camera specified by --tranformation.\n" + " - from_center_camera: Defines the coordinate system from the camera closest to the center of the reconstruction.\n" + " - from_markers: Defines the coordinate system from markers specified by --markers.\n" + " - from_gps: Defines coordinate system from GPS metadata.\n" + " - align_ground: Defines ground level from the point cloud density. It assumes that the scene is oriented.", + value="auto", + values=["transformation", "manual", "auto", "auto_from_cameras", "auto_from_cameras_x_axis", "auto_from_landmarks", "from_single_camera", "from_center_camera", "from_markers", "from_gps", "align_ground"], exclusive=True, uid=[0], ), desc.StringParam( - name='transformation', - label='Transformation', + name="transformation", + label="Transformation", description="Required only for 'transformation' and 'from_single_camera' methods:\n" - " * transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" - " * from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg')", - value='', + " - transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" + " - from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg').", + value="", uid=[0], enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera" or node.method.value == "auto_from_cameras_x_axis", ), @@ -73,19 +73,19 @@ class SfMTransform(desc.AVCommandLineNode): description="Translation in space.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Offset", + name="x", label="x", description="X offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="y", label="y", description="Y Offset", + name="y", label="y", description="Y offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="z", label="z", description="Z Offset", + name="z", label="z", description="Z offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) @@ -96,22 +96,22 @@ class SfMTransform(desc.AVCommandLineNode): desc.GroupAttribute( name="manualRotation", label="Euler Rotation", - description="Rotation in Euler degrees.", + description="Rotation in Euler angles.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="Euler X Rotation", + name="x", label="x", description="Euler X rotation.", value=0.0, uid=[0], range=(-90.0, 90.0, 1.0) ), desc.FloatParam( - name="y", label="y", description="Euler Y Rotation", + name="y", label="y", description="Euler Y rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) ), desc.FloatParam( - name="z", label="z", description="Euler Z Rotation", + name="z", label="z", description="Euler Z rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) @@ -122,7 +122,7 @@ class SfMTransform(desc.AVCommandLineNode): desc.FloatParam( name="manualScale", label="Scale", - description="Uniform Scale.", + description="Uniform scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) @@ -132,19 +132,19 @@ class SfMTransform(desc.AVCommandLineNode): enabled=lambda node: node.method.value == "manual", ), desc.ChoiceParam( - name='landmarksDescriberTypes', - label='Landmarks Describer Types', - description='Image describer types used to compute the mean of the point cloud. (only for "landmarks" method).', - value=['sift', 'dspsift', 'akaze'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5', 'unknown'], + name="landmarksDescriberTypes", + label="Landmarks Describer Types", + description="Image describer types used to compute the mean of the point cloud (only for 'landmarks' method).", + value=["sift", "dspsift", "akaze"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5", "unknown"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.FloatParam( - name='scale', - label='Additional Scale', - description='Additional scale to apply.', + name="scale", + label="Additional Scale", + description="Additional scale to apply.", value=1.0, range=(0.0, 100.0, 0.1), uid=[0], @@ -152,46 +152,46 @@ class SfMTransform(desc.AVCommandLineNode): desc.ListAttribute( name="markers", elementDesc=desc.GroupAttribute(name="markerAlign", label="Marker Align", description="", joinChar=":", groupDesc=[ - desc.IntParam(name="markerId", label="Marker", description="Marker Id", value=0, uid=[0], range=(0, 32, 1)), - desc.GroupAttribute(name="markerCoord", label="Coord", description="", joinChar=",", groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), - desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), - desc.FloatParam(name="z", label="z", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.IntParam(name="markerId", label="Marker", description="Marker ID.", value=0, uid=[0], range=(0, 32, 1)), + desc.GroupAttribute(name="markerCoord", label="Coord", description="Marker coordinates.", joinChar=",", groupDesc=[ + desc.FloatParam(name="x", label="x", description="X coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.FloatParam(name="y", label="y", description="Y coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.FloatParam(name="z", label="z", description="Z coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), ]) ]), label="Markers", - description="Markers alignment points", + description="Markers alignment points.", ), desc.BoolParam( - name='applyScale', - label='Scale', - description='Apply scale transformation.', + name="applyScale", + label="Scale", + description="Apply scale transformation.", value=True, uid=[0], enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( - name='applyRotation', - label='Rotation', - description='Apply rotation transformation.', + name="applyRotation", + label="Rotation", + description="Apply rotation transformation.", value=True, uid=[0], enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( - name='applyTranslation', - label='Translation', - description='Apply translation transformation.', + name="applyTranslation", + label="Translation", + description="Apply translation transformation.", value=True, uid=[0], enabled=lambda node: node.method.value != "manual", ), 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'], + 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=[], ), @@ -199,17 +199,17 @@ class SfMTransform(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData File', - description='''Aligned SfMData file .''', - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + name="output", + label="SfMData File", + description="Aligned SfMData file.", + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index aad874bc82..d2d877f7ec 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -15,17 +15,17 @@ class SfMTriangulation(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file. Must contain the camera calibration.', - value='', + name="input", + label="SfMData", + description="SfMData file. Must contain the camera calibration.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -37,7 +37,7 @@ class SfMTriangulation(desc.AVCommandLineNode): elementDesc=desc.File( name="matchesFolder", label="Matches Folder", - description="", + description="Folder in which some computed matches are stored.", value="", uid=[0], ), @@ -46,104 +46,105 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Folder(s) in which computed matches are stored." ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.IntParam( - name='maxNumberOfMatches', - label='Maximum Number of Matches', - description='Maximum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a quick reconstruction overview. \n' - '0 means no limit.', + name="maxNumberOfMatches", + label="Maximum Number Of Matches", + description="Maximum number of matches per image pair (and per feature type).\n" + "This can be useful to have a quick reconstruction overview.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minNumberOfMatches', - label='Minimum Number of Matches', - description='Minimum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a meaningful reconstruction with accurate keypoints. 0 means no limit.', + name="minNumberOfMatches", + label="Minimum Number Of Matches", + description="Minimum number of matches per image pair (and per feature type).\n" + "This can be useful to have a meaningful reconstruction with accurate keypoints.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minNumberOfObservationsForTriangulation', - label='Min Observation For Triangulation', - description='Minimum number of observations to triangulate a point.\n' - 'Set it to 3 (or more) reduces drastically the noise in the point cloud,\n' - 'but the number of final poses is a little bit reduced\n' - '(from 1.5% to 11% on the tested datasets).', + name="minNumberOfObservationsForTriangulation", + label="Min Observations For Triangulation", + description="Minimum number of observations to triangulate a point.\n" + "Setting it to 3 (or more) reduces drastically the noise in the point cloud,\n" + "but the number of final poses is a little bit reduced\n" + "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForTriangulation', - label='Min Angle For Triangulation', - description='Minimum angle for triangulation.', + name="minAngleForTriangulation", + label="Min Angle For Triangulation", + description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForLandmark', - label='Min Angle For Landmark', - description='Minimum angle for landmark.', + name="minAngleForLandmark", + label="Min Angle For Landmark", + description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='useRigConstraint', - label='Use Rig Constraint', - description='Enable/Disable rig constraint.', + name="useRigConstraint", + label="Use Rig Constraint", + description="Enable/Disable rig constraint.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='rigMinNbCamerasForCalibration', - label='Min Nb Cameras For Rig Calibration', - description='Minimal number of cameras to start the calibration of the rig', + name="rigMinNbCamerasForCalibration", + label="Min Nb Cameras For Rig Calibration", + description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='computeStructureColor', - label='Compute Structure Color', - description='Enable/Disable color computation of each 3D point.', + name="computeStructureColor", + label="Compute Structure Color", + description="Enable/Disable color computation of each 3D point.", value=True, uid=[0], ), desc.ChoiceParam( - name='interFileExtension', + name="interFileExtension", label='Inter File Extension', - description='Extension of the intermediate file export.', - value='.abc', - values=('.abc', '.ply'), + description="Extension of the intermediate file export.", + value=".abc", + values=(".abc", ".ply"), exclusive=True, uid=[], advanced=True, ), 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'], + 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=[], ) @@ -151,16 +152,16 @@ class SfMTriangulation(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.abc', + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", uid=[], ), desc.File( - name='extraInfoFolder', - label='Folder', - description='Folder for intermediate reconstruction files and additional reconstruction information files.', + name="extraInfoFolder", + label="Folder", + description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 69d75aa26b..670e88019b 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -72,46 +72,46 @@ class SketchfabUpload(desc.Node): group="", ), desc.StringParam( - name='apiToken', - label='API Token', - description='Get your token from https://sketchfab.com/settings/password', - value='', + name="apiToken", + label="API Token", + description="Get your token from https://sketchfab.com/settings/password.", + value="", uid=[0], ), desc.StringParam( - name='title', - label='Title', - description='Title cannot be longer than 48 characters.', - value='', + name="title", + label="Title", + description="Title cannot be longer than 48 characters.", + value="", uid=[0], ), desc.StringParam( - name='description', - label='Description', - description='Description cannot be longer than 1024 characters.', - value='', + name="description", + label="Description", + description="Description cannot be longer than 1024 characters.", + value="", uid=[0], ), desc.ChoiceParam( - name='license', - label='License', - description='License label.', - value='CC Attribution', - values=['CC Attribution', - 'CC Attribution-ShareAlike', - 'CC Attribution-NoDerivs', - 'CC Attribution-NonCommercial', - 'CC Attribution-NonCommercial-ShareAlike', - 'CC Attribution-NonCommercial-NoDerivs'], + name="license", + label="License", + description="License label.", + value="CC Attribution", + values=["CC Attribution", + "CC Attribution-ShareAlike", + "CC Attribution-NoDerivs", + "CC Attribution-NonCommercial", + "CC Attribution-NonCommercial-ShareAlike", + "CC Attribution-NonCommercial-NoDerivs"], exclusive=True, uid=[0], ), desc.ListAttribute( elementDesc=desc.StringParam( - name='tag', - label='Tag', - description='Tag cannot be longer than 48 characters.', - value='', + name="tag", + label="Tag", + description="Tag cannot be longer than 48 characters.", + value="", uid=[0], ), name="tags", @@ -120,66 +120,66 @@ class SketchfabUpload(desc.Node): group="", ), desc.ChoiceParam( - name='category', - label='Category', - description='Adding categories helps improve the discoverability of your model.', - value='none', - values=['none', - 'animals-pets', - 'architecture', - 'art-abstract', - 'cars-vehicles', - 'characters-creatures', - 'cultural-heritage-history', - 'electronics-gadgets', - 'fashion-style', - 'food-drink', - 'furniture-home', - 'music', - 'nature-plants', - 'news-politics', - 'people', - 'places-travel', - 'science-technology', - 'sports-fitness', - 'weapons-military'], + name="category", + label="Category", + description="Adding categories helps improve the discoverability of your model.", + value="none", + values=["none", + "animals-pets", + "architecture", + "art-abstract", + "cars-vehicles", + "characters-creatures", + "cultural-heritage-history", + "electronics-gadgets", + "fashion-style", + "food-drink", + "furniture-home", + "music", + "nature-plants", + "news-politics", + "people", + "places-travel", + "science-technology", + "sports-fitness", + "weapons-military"], exclusive=True, uid=[0], ), desc.BoolParam( - name='isPublished', - label='Publish', - description='If the model is not published it will be saved as a draft.', + name="isPublished", + label="Publish", + description="If the model is not published, it will be saved as a draft.", value=False, uid=[0], ), desc.BoolParam( - name='isInspectable', - label='Inspectable', - description='Allow 2D view in model inspector.', + name="isInspectable", + label="Inspectable", + description="Allow 2D view in model inspector.", value=True, uid=[0], ), desc.BoolParam( - name='isPrivate', - label='Private', - description='Requires a pro account.', + name="isPrivate", + label="Private", + description="Requires a pro account.", value=False, uid=[0], ), desc.StringParam( - name='password', - label='Password', - description='Requires a pro account.', - value='', + name="password", + label="Password", + description="Requires a pro account.", + value="", uid=[0], ), desc.ChoiceParam( - name='verboseLevel', - label='Verbose Level', - description='''verbosity level (critical, error, warning, info, debug).''', - value='info', - values=['critical', 'error', 'warning', 'info', 'debug'], + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (critical, error, warning, info, debug).", + value="info", + values=["critical", "error", "warning", "info", "debug"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 9f11616c41..90d078774d 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -13,23 +13,23 @@ class SphereDetection(desc.CommandLineNode): inputs = [ desc.File( - name='input', + name="input", label="SfMData", - description='Input SfMData file.', - value='', + description="Input SfMData file.", + value="", uid=[0] ), desc.File( - name='modelPath', - label='Detection Network', - description='Deep learning network for automatic calibration sphere detection.', - value='${ALICEVISION_SPHERE_DETECTION_MODEL}', + name="modelPath", + label="Detection Network", + description="Deep learning network for automatic calibration sphere detection.", + value="${ALICEVISION_SPHERE_DETECTION_MODEL}", uid=[0] ), desc.BoolParam( - name='autoDetect', - label='Automatic Sphere Detection', - description='Automatic detection of calibration spheres', + name="autoDetect", + label="Automatic Sphere Detection", + description="Automatic detection of calibration spheres.", value=False, uid=[0] ), @@ -48,12 +48,12 @@ class SphereDetection(desc.CommandLineNode): description="Center of the circle (XY offset to the center of the image in pixels).", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Offset in pixels", + name="x", label="x", description="X offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), desc.FloatParam( - name="y", label="y", description="Y Offset in pixels", + name="y", label="y", description="Y offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), @@ -62,30 +62,30 @@ class SphereDetection(desc.CommandLineNode): group=None # skip group from command line ), desc.FloatParam( - name='sphereRadius', - label='Radius', - description='Sphere radius in pixels.', + name="sphereRadius", + label="Radius", + description="Sphere radius in pixels.", value=500.0, range=(0.0, 1000.0, 0.1), enabled=lambda node: not node.autoDetect.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'], + 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=[] + uid=[], ) ] outputs = [ desc.File( - name='output', - label='Output Folder', - description='Sphere detection information will be written here.', + name="output", + label="Output Folder", + description="Sphere detection information will be written here.", value=desc.Node.internalFolder, uid=[] ) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index ccdfa7eb03..40197dbb11 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -28,83 +28,83 @@ class Split360Images(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', + name="input", + label="Input", description="Single image, image folder or SfMData file.", value='', uid=[0], ), desc.ChoiceParam( - name='splitMode', - label='Split Mode', - description="Split mode (equirectangular, dualfisheye)", - value='equirectangular', - values=['equirectangular', 'dualfisheye'], + name="splitMode", + label="Split Mode", + description="Split mode (equirectangular, dualfisheye).", + value="equirectangular", + values=["equirectangular", "dualfisheye"], exclusive=True, uid=[0], ), - desc.GroupAttribute(name="dualFisheyeGroup", label="Dual Fisheye", description="Dual Fisheye", group=None, - enabled=lambda node: node.splitMode.value == 'dualfisheye', + desc.GroupAttribute(name="dualFisheyeGroup", label="Dual Fisheye", description="Dual Fisheye.", group=None, + enabled=lambda node: node.splitMode.value == "dualfisheye", groupDesc=[ desc.ChoiceParam( - name='dualFisheyeOffsetPresetX', - label='X Offset Preset', - description="Dual-Fisheye X offset preset", - value='center', - values=['center', 'left', 'right'], + name="dualFisheyeOffsetPresetX", + label="X Offset Preset", + description="Dual-Fisheye X offset preset.", + value="center", + values=["center", "left", "right"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='dualFisheyeOffsetPresetY', - label='Y Offset Preset', - description="Dual-Fisheye Y offset preset", - value='center', - values=['center', 'top', 'bottom'], + name="dualFisheyeOffsetPresetY", + label="Y Offset Preset", + description="Dual-Fisheye Y offset preset.", + value="center", + values=["center", "top", "bottom"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='dualFisheyeCameraModel', - label='Camera Model', - description="Dual-Fisheye camera model", - value='fisheye4', - values=['fisheye4', 'equidistant_r3'], + name="dualFisheyeCameraModel", + label="Camera Model", + description="Dual-Fisheye camera model.", + value="fisheye4", + values=["fisheye4", "equidistant_r3"], exclusive=True, uid=[0], ), ] ), desc.GroupAttribute(name="equirectangularGroup", label="Equirectangular", description="Equirectangular", group=None, - enabled=lambda node: node.splitMode.value == 'equirectangular', + enabled=lambda node: node.splitMode.value == "equirectangular", groupDesc=[ desc.IntParam( - name='equirectangularNbSplits', + name="equirectangularNbSplits", label='Nb Splits', - description="Equirectangular number of splits", + description="Equirectangular number of splits.", value=2, range=(1, 100, 1), uid=[0], ), desc.IntParam( - name='equirectangularSplitResolution', - label='Split Resolution', - description="Equirectangular split resolution", + name="equirectangularSplitResolution", + label="Split Resolution", + description="Equirectangular split resolution.", value=1200, range=(100, 10000, 1), uid=[0], ), desc.BoolParam( - name='equirectangularPreviewMode', - label='Preview Mode', - description="Export a SVG file that simulates the split", + name="equirectangularPreviewMode", + label="Preview Mode", + description="Export a SVG file that simulates the split.", value=False, uid=[0], ), desc.FloatParam( - name='fov', - label='Field of View', - description="Field of View to extract (in degree)", + name="fov", + label="Field Of View", + description="Field of View to extract (in degrees).", value=110.0, range=(0.0, 180.0, 1.0), uid=[0], @@ -112,20 +112,20 @@ class Split360Images(desc.AVCommandLineNode): ] ), desc.ChoiceParam( - name='extension', - label='Output File Extension', - description='Output Image File Extension.', - value='', - values=['', 'exr', 'jpg', 'tiff', 'png'], + name="extension", + label="Output File Extension", + description="Output image file extension.", + value="", + values=["", "exr", "jpg", "tiff", "png"], exclusive=True, 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'], + 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=[], ), @@ -133,17 +133,17 @@ class Split360Images(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', + name="output", + label="Folder", description="Output folder for extracted frames.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outSfMData', - label='SfMData file', + name="outSfMData", + label="SfMData File", description="Output SfMData file.", - value=desc.Node.internalFolder + 'rig.sfm', + value=desc.Node.internalFolder + "rig.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index a78f9dd650..0dac53002a 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -63,10 +63,10 @@ class StructureFromMotion(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', + name="input", + label="SfMData", description='SfMData file.', - value='', + value="", uid=[0], ), desc.ListAttribute( @@ -91,291 +91,293 @@ class StructureFromMotion(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which computed matches are stored." + description="Folder(s) in which the computed matches are stored." ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='localizerEstimator', - label='Localizer Estimator', - description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', - value='acransac', - values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], + name="localizerEstimator", + label="Localizer Estimator", + description="Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).", + value="acransac", + values=["acransac", "ransac", "lsmeds", "loransac", "maxconsensus"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='observationConstraint', - label='Observation Constraint', - description='Observation constraint mode used in the optimization:\n' - ' * Basic: Use standard reprojection error in pixel coordinates\n' - ' * Scale: Use reprojection error in pixel coordinates but relative to the feature scale', - value='Scale', - values=['Basic', 'Scale'], + name="observationConstraint", + label="Observation Constraint", + description="Observation constraint mode used in the optimization:\n" + " - Basic: Use standard reprojection error in pixel coordinates.\n" + " - Scale: Use reprojection error in pixel coordinates but relative to the feature scale.", + value="Scale", + values=["Basic", "Scale"], exclusive=True, uid=[0], advanced=True, ), desc.IntParam( - name='localizerEstimatorMaxIterations', - label='Localizer Max Ransac Iterations', - description='Maximum number of iterations allowed in ransac step.', + name="localizerEstimatorMaxIterations", + label="Localizer Max Ransac Iterations", + description="Maximum number of iterations allowed in the Ransac step.", value=4096, range=(1, 20000, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='localizerEstimatorError', - label='Localizer Max Ransac Error', - description='Maximum error (in pixels) allowed for camera localization (resectioning).\n' - 'If set to 0, it will select a threshold according to the localizer estimator used\n' - '(if ACRansac, it will analyze the input data to select the optimal value).', + name="localizerEstimatorError", + label="Localizer Max Ransac Error", + description="Maximum error (in pixels) allowed for camera localization (resectioning).\n" + "If set to 0, it will select a threshold according to the localizer estimator used\n" + "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 100.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='lockScenePreviouslyReconstructed', - label='Lock Scene Previously Reconstructed', - description='This option is useful for SfM augmentation. Lock previously reconstructed poses and intrinsics.', + name="lockScenePreviouslyReconstructed", + label="Lock Previously Reconstructed Scene", + description="Lock previously reconstructed poses and intrinsics.\n" + "This option is useful for SfM augmentation.", value=False, uid=[0], ), desc.BoolParam( - name='useLocalBA', - label='Local Bundle Adjustment', - description='It reduces the reconstruction time, especially for large datasets (500+ images),\n' - 'by avoiding computation of the Bundle Adjustment on areas that are not changing.', + name="useLocalBA", + label="Local Bundle Adjustment", + description="It reduces the reconstruction time, especially for large datasets (500+ images),\n" + "by avoiding computation of the Bundle Adjustment on areas that are not changing.", value=True, uid=[0], ), desc.IntParam( - name='localBAGraphDistance', - label='LocalBA Graph Distance', - description='Graph-distance limit to define the Active region in the Local Bundle Adjustment strategy.', + name="localBAGraphDistance", + label="LocalBA Graph Distance", + description="Graph-distance limit to define the active region in the Local Bundle Adjustment strategy.", value=1, range=(2, 10, 1), uid=[0], advanced=True, ), desc.IntParam( - name='nbFirstUnstableCameras', - label='First Unstable Cameras Nb', - description='Number of cameras for which the bundle adjustment is performed every single time a camera is added.\n' - 'This leads to more stable results while computations are not too expensive, as there is little data.\n' - 'Past this number, the bundle adjustment will only be performed once for N added cameras.', + name="nbFirstUnstableCameras", + label="First Unstable Cameras Nb", + description="Number of cameras for which the bundle adjustment is performed every single time a camera is added.\n" + "This leads to more stable results while computations are not too expensive, as there is little data.\n" + "Past this number, the bundle adjustment will only be performed once for N added cameras.", value=30, range=(0, 100, 1), uid=[0], advanced=True ), desc.IntParam( - name='maxImagesPerGroup', - label='Max Images Per Group', - description='Maximum number of cameras that can be added before the bundle adjustment has to be performed again.\n' - 'This prevents adding too much data at once without performing the bundle adjustment.', + name="maxImagesPerGroup", + label="Max Images Per Group", + description="Maximum number of cameras that can be added before the bundle adjustment has to be performed again.\n" + "This prevents adding too much data at once without performing the bundle adjustment.", value=30, range=(0, 100, 1), uid=[0], advanced=True ), desc.IntParam( - name='bundleAdjustmentMaxOutliers', - label='Max Nb of Outliers after BA', - description='Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.\n' - 'Using a negative value for this threshold will disable BA iterations.', + name="bundleAdjustmentMaxOutliers", + label="Max Nb Of Outliers After BA", + description="Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.\n" + "Using a negative value for this threshold will disable BA iterations.", value=50, range=(-1, 1000, 1), uid=[0], advanced=True ), desc.IntParam( - name='maxNumberOfMatches', - label='Maximum Number of Matches', - description='Maximum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a quick reconstruction overview. \n' - '0 means no limit.', + name="maxNumberOfMatches", + label="Maximum Number Of Matches", + description="Maximum number of matches per image pair (and per feature type).\n" + "This can be useful to have a quick reconstruction overview.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minNumberOfMatches', - label='Minimum Number of Matches', - description='Minimum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a meaningful reconstruction with accurate keypoints. 0 means no limit.', + name="minNumberOfMatches", + label="Minimum Number Of Matches", + description="Minimum number of matches per image pair (and per feature type).\n" + "This can be useful to have a meaningful reconstruction with accurate keypoints.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minInputTrackLength', - label='Min Input Track Length', - description='Minimum track length in input of SfM', + name="minInputTrackLength", + label="Min Input Track Length", + description="Minimum track length in input of SfM.", value=2, range=(2, 10, 1), uid=[0], ), desc.IntParam( - name='minNumberOfObservationsForTriangulation', - label='Min Observation For Triangulation', - description='Minimum number of observations to triangulate a point.\n' - 'Set it to 3 (or more) reduces drastically the noise in the point cloud,\n' - 'but the number of final poses is a little bit reduced\n' - '(from 1.5% to 11% on the tested datasets).', + name="minNumberOfObservationsForTriangulation", + label="Min Observations For Triangulation", + description="Minimum number of observations to triangulate a point.\n" + "Setting it to 3 (or more) reduces drastically the noise in the point cloud,\n" + "but the number of final poses is a little bit reduced\n" + "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForTriangulation', - label='Min Angle For Triangulation', - description='Minimum angle for triangulation.', + name="minAngleForTriangulation", + label="Min Angle For Triangulation", + description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForLandmark', - label='Min Angle For Landmark', - description='Minimum angle for landmark.', + name="minAngleForLandmark", + label="Min Angle For Landmark", + description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxReprojectionError', - label='Max Reprojection Error', - description='Maximum reprojection error.', + name="maxReprojectionError", + label="Max Reprojection Error", + description="Maximum reprojection error.", value=4.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleInitialPair', - label='Min Angle Initial Pair', - description='Minimum angle for the initial pair.', + name="minAngleInitialPair", + label="Min Angle Initial Pair", + description="Minimum angle for the initial pair.", value=5.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxAngleInitialPair', - label='Max Angle Initial Pair', - description='Maximum angle for the initial pair.', + name="maxAngleInitialPair", + label="Max Angle Initial Pair", + description="Maximum angle for the initial pair.", value=40.0, range=(0.1, 60.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='useOnlyMatchesFromInputFolder', - label='Use Only Matches From Input Folder', - description='Use only matches from the input matchesFolder parameter.\n' - 'Matches folders previously added to the SfMData file will be ignored.', + name="useOnlyMatchesFromInputFolder", + label="Use Only Matches From Input Folder", + description="Use only matches from the input matchesFolder parameter.\n" + "Matches folders previously added to the SfMData file will be ignored.", value=False, uid=[], advanced=True, ), desc.BoolParam( - name='useRigConstraint', - label='Use Rig Constraint', - description='Enable/Disable rig constraint.', + name="useRigConstraint", + label="Use Rig Constraint", + description="Enable/Disable rig constraint.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='rigMinNbCamerasForCalibration', - label='Min Nb Cameras For Rig Calibration', - description='Minimal number of cameras to start the calibration of the rig', + name="rigMinNbCamerasForCalibration", + label="Min Nb Cameras For Rig Calibration", + description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters', - description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) during the reconstruction.\n' - 'This may be helpful if the input cameras are already fully calibrated.', + name="lockAllIntrinsics", + label="Lock All Intrinsic Camera Parameters", + description="Force to keep all the intrinsic parameters of the cameras (focal length, \n" + "principal point, distortion if any) constant during the reconstruction.\n" + "This may be helpful if the input cameras are already fully calibrated.", value=False, uid=[0], ), desc.IntParam( - name='minNbCamerasToRefinePrincipalPoint', + name="minNbCamerasToRefinePrincipalPoint", label='Min Nb Cameras To Refine Principal Point', - description='Minimal number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera). ' - 'If we do not have enough cameras, the principal point in consider is considered in the center of the image. ' - 'If minNbCamerasToRefinePrincipalPoint<=0, the principal point is never refined. ' - 'If minNbCamerasToRefinePrincipalPoint==1, the principal point is always refined.', + description="Minimum number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera).\n" + "If we do not have enough cameras, the principal point is considered to be in the center of the image.\n" + "If minNbCamerasToRefinePrincipalPoint <= 0, the principal point is never refined." + "If minNbCamerasToRefinePrincipalPoint is set to 1, the principal point is always refined.", value=3, range=(0, 20, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='filterTrackForks', - label='Filter Track Forks', - description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' - 'lead to multiple features in the same image for a single track. \n', + name="filterTrackForks", + label="Filter Track Forks", + description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n" + "lead to multiple features in the same image for a single track.", value=False, uid=[0], ), desc.BoolParam( - name='computeStructureColor', - label='Compute Structure Color', - description='Enable/Disable color computation of each 3D point.', + name="computeStructureColor", + label="Compute Structure Color", + description="Enable/Disable color computation of every 3D point.", value=True, uid=[0], ), desc.File( - name='initialPairA', - label='Initial Pair A', - description='View ID or filename of the first image (either with or without the full path).', - value='', + name="initialPairA", + label="Initial Pair A", + description="View ID or filename of the first image (either with or without the full path).", + value="", uid=[0], ), desc.File( - name='initialPairB', - label='Initial Pair B', - description='View ID or filename of the second image (either with or without the full path).', - value='', + name="initialPairB", + label="Initial Pair B", + description="View ID or filename of the second image (either with or without the full path).", + value="", uid=[0], ), desc.ChoiceParam( - name='interFileExtension', - label='Inter File Extension', - description='Extension of the intermediate file export.', - value='.abc', - values=('.abc', '.ply'), + name="interFileExtension", + label="Inter File Extension", + description="Extension of the intermediate file export.", + value=".abc", + values=(".abc", ".ply"), exclusive=True, uid=[], advanced=True, ), 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'], + 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=[], ) @@ -383,23 +385,23 @@ class StructureFromMotion(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.abc', + name="output", + label="SfMData", + description="Path to the output SfM point cloud file (in SfMData format).", + value=desc.Node.internalFolder + "sfm.abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Views and Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Views And Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), desc.File( - name='extraInfoFolder', - label='Folder', - description='Folder for intermediate reconstruction files and additional reconstruction information files.', + name="extraInfoFolder", + label="Folder", + description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 4daf3ecc92..631ab8f4bf 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -25,146 +25,148 @@ class Texturing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Dense SfMData', - description='SfMData file.', - value='', + name="input", + label="Dense SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', - value='', + name="imagesFolder", + label="Images Folder", + description="Use images from a specific folder instead of those specified in the SfMData file.\n" + "Filename should be the image UID.", + value="", uid=[0], ), desc.File( - name='inputMesh', - label='Mesh', - description='Optional input mesh to texture. By default, it will texture the result of the reconstruction.', - value='', + name="inputMesh", + label="Mesh", + description="Optional input mesh to texture. By default, it will texture the result of the reconstruction.", + value="", uid=[0], ), desc.File( - name='inputRefMesh', - label='Ref Mesh', - description='Optional input mesh to compute height maps and normal maps. If not provided, no additional maps with geometric information will be generated.', - value='', + name="inputRefMesh", + label="Ref Mesh", + description="Optional input mesh to compute height maps and normal maps.\n" + "If not provided, no additional map with geometric information will be generated.", + value="", uid=[0], ), desc.ChoiceParam( - name='textureSide', - label='Texture Side', - description='''Output texture size''', + name="textureSide", + label="Texture Side", + description="Output texture size.", value=8192, values=(1024, 2048, 4096, 8192, 16384), exclusive=True, uid=[0], ), desc.ChoiceParam( - name='downscale', - label='Texture Downscale', - description='''Texture downscale factor''', + name="downscale", + label="Texture Downscale", + description="Texture downscale factor.", value=2, values=(1, 2, 4, 8), exclusive=True, uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='Mesh File Type', - description='File Type', - value='obj', - values=('obj', 'gltf', 'fbx', 'stl'), + name="outputMeshFileType", + label="Mesh File Type", + description="File type for the mesh output.", + value="obj", + values=("obj", "gltf", "fbx", "stl"), exclusive=True, uid=[0], ), - desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color Map Parameters", + desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color map parameters.", enabled=lambda node: (node.imagesFolder.value != ''), group=None, groupDesc=[ desc.BoolParam( - name='enable', - label='Enable', - description='Generate Textures', + name="enable", + label="Enable", + description="Generate textures if set to true.", value=True, uid=[], group=None, ), desc.ChoiceParam( - name='colorMappingFileType', - label='File Type', - description='Texture File Type', - value='exr', - values=('exr', 'png', 'tiff', 'jpg'), + name="colorMappingFileType", + label="File Type", + description="Texture file type.", + value="exr", + values=("exr", "png", "tiff", "jpg"), exclusive=True, uid=[0], enabled=lambda node: node.colorMapping.enable.value, ), ], ), - desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump Mapping Parameters", + desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump mapping parameters.", enabled=lambda node: (node.inputRefMesh.value != ''), group=None, groupDesc=[ desc.BoolParam( - name='enable', - label='Enable', - description='Generate Normal / Bump Maps', + name="enable", + label="Enable", + description="Generate normal / bump maps if set to true.", value=True, uid=[], group=None, ), desc.ChoiceParam( - name='bumpType', - label='Bump Type', - description='Export Normal Map or Height Map', - value='Normal', - values=('Height', 'Normal'), + name="bumpType", + label="Bump Type", + description="Export normal map or height map.", + value="Normal", + values=("Height", "Normal"), exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value, ), desc.ChoiceParam( - name='normalFileType', - label='File Type', - description='NormalMap Texture File Type', - value='exr', - values = ('exr', 'png', 'tiff', 'jpg'), + name="normalFileType", + label="File Type", + description="File type for the normal map texture.", + value="exr", + values = ("exr", "png", "tiff", "jpg"), exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal", ), desc.ChoiceParam( - name='heightFileType', - label='File Type', - description='HeightMap Texture File Type', - value='exr', - values=('exr',), + name="heightFileType", + label="File Type", + description="File type for the height map texture.", + value="exr", + values=("exr",), exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height", ), ], ), - desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement Mapping Parameters", - enabled=lambda node: (node.inputRefMesh.value != ''), + desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement mapping parameters.", + enabled=lambda node: (node.inputRefMesh.value != ""), group=None, groupDesc=[ desc.BoolParam( - name='enable', - label='Enable', - description='Generate Height Maps for Displacement', + name="enable", + label="Enable", + description="Generate height maps for displacement.", value=True, uid=[], group=None, ), desc.ChoiceParam( - name='displacementMappingFileType', - label='File Type', - description='HeightMap Texture File Type', - value='exr', - values=('exr',), + name="displacementMappingFileType", + label="File Type", + description="File type for the height map texture.", + value="exr", + values=("exr",), exclusive=True, uid=[0], enabled=lambda node: node.displacementMapping.enable.value, @@ -172,44 +174,44 @@ class Texturing(desc.AVCommandLineNode): ], ), desc.ChoiceParam( - name='unwrapMethod', - label='Unwrap Method', - description='Method to unwrap input mesh if it does not have UV coordinates.\n' - ' * Basic (> 600k faces) fast and simple. Can generate multiple atlases.\n' - ' * LSCM (<= 600k faces): optimize space. Generates one atlas.\n' - ' * ABF (<= 300k faces): optimize space and stretch. Generates one atlas.', + name="unwrapMethod", + label="Unwrap Method", + description="Method to unwrap input mesh if it does not have UV coordinates.\n" + " - Basic (> 600k faces) fast and simple. Can generate multiple atlases.\n" + " - LSCM (<= 600k faces): optimize space. Generates one atlas.\n" + " - ABF (<= 300k faces): optimize space and stretch. Generates one atlas.", value="Basic", values=("Basic", "LSCM", "ABF"), exclusive=True, uid=[0], ), desc.BoolParam( - name='useUDIM', - label='Use UDIM', - description='Use UDIM UV mapping.', + name="useUDIM", + label="Use UDIM", + description="Use UDIM UV mapping.", value=True, uid=[0], ), desc.BoolParam( - name='fillHoles', - label='Fill Holes', - description='Fill Texture holes with plausible values', + name="fillHoles", + label="Fill Holes", + description="Fill texture holes with plausible values.", value=False, uid=[0], ), desc.IntParam( - name='padding', - label='Padding', - description='''Texture edge padding size in pixel''', + name="padding", + label="Padding", + description="Texture edge padding size in pixels.", value=5, range=(0, 20, 1), uid=[0], advanced=True, ), desc.IntParam( - name='multiBandDownscale', - label='Multi Band Downscale', - description='''Width of frequency bands for multiband blending''', + name="multiBandDownscale", + label="Multi Band Downscale", + description="Width of frequency bands for multiband blending.", value=4, range=(0, 8, 2), uid=[0], @@ -217,109 +219,113 @@ class Texturing(desc.AVCommandLineNode): ), desc.GroupAttribute( name="multiBandNbContrib", - label="MultiBand contributions", + label="Multi-Band Contributions", groupDesc=[ - desc.IntParam(name="high", label="High Freq", description="High Frequency Band", value=1, uid=[0], range=None), - desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-High Frequency Band", value=5, uid=[0], range=None), - desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-Low Frequency Band", value=10, uid=[0], range=None), - desc.IntParam(name="low", label="Low Freq", description="Low Frequency Band", value=0, uid=[0], range=None), + desc.IntParam(name="high", label="High Freq", description="High frequency band.", value=1, uid=[0], range=None), + desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-high frequency band.", value=5, uid=[0], range=None), + desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-low frequency band.", value=10, uid=[0], range=None), + desc.IntParam(name="low", label="Low Freq", description="Low frequency band", value=0, uid=[0], range=None), ], - description='''Number of contributions per frequency band for multiband blending (each frequency band also contributes to lower bands)''', + description="Number of contributions per frequency band for multi-band blending (each frequency band also contributes to lower bands).", advanced=True, ), desc.BoolParam( - name='useScore', - label='Use Score', - description='Use triangles scores (ie. reprojection area) for multiband blending.', + name="useScore", + label="Use Score", + description="Use triangles scores (ie. reprojection area) for multi-band blending.", value=True, uid=[0], advanced=True, ), desc.FloatParam( - name='bestScoreThreshold', - label='Best Score Threshold', - description='''(0.0 to disable filtering based on threshold to relative best score)''', + name="bestScoreThreshold", + label="Best Score Threshold", + description="Setting this parameter to 0.0 disables filtering based on threshold to relative best score.", value=0.1, range=(0.0, 1.0, 0.01), uid=[0], advanced=True, ), desc.FloatParam( - name='angleHardThreshold', - label='Angle Hard Threshold', - description='''(0.0 to disable angle hard threshold filtering)''', + name="angleHardThreshold", + label="Angle Hard Threshold", + description="Setting this parameter to 0.0 disables angle hard threshold filtering.", value=90.0, range=(0.0, 180.0, 0.01), uid=[0], advanced=True, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', + name="workingColorSpace", + label="Working Color Space", description="Color space for the texturing internal computation (does not impact the output file color space).", - value='sRGB', - values=('sRGB', 'Linear', 'ACES2065-1', 'ACEScg'), + value="sRGB", + values=("sRGB", "Linear", "ACES2065-1", "ACEScg"), exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', + name="outputColorSpace", + label="Output Color Space", description="Color space for the output texture files.", - value='AUTO', - values=('sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'AUTO'), + value="AUTO", + values=("sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "AUTO"), exclusive=True, uid=[0], ), desc.BoolParam( - name='correctEV', - label='Correct Exposure', - description='Uniformize images exposure values.', + name="correctEV", + label="Correct Exposure", + description="Uniformize images exposure values.", value=False, uid=[0], ), desc.BoolParam( - name='forceVisibleByAllVertices', - label='Force Visible By All Vertices', - description='''Triangle visibility is based on the union of vertices visibility.''', + name="forceVisibleByAllVertices", + label="Force Visible By All Vertices", + description="Triangle visibility is based on the union of vertices visibility.", value=False, uid=[0], advanced=True, ), desc.BoolParam( - name='flipNormals', - label='Flip Normals', - description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + name="flipNormals", + label="Flip Normals", + description="Option to flip face normals.\n" + "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", value=False, uid=[0], advanced=True, ), desc.ChoiceParam( - name='visibilityRemappingMethod', - label='Visibility Remapping Method', - description='''Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).''', - value='PullPush', - values=['Pull', 'Push', 'PullPush', 'MeshItself'], + name="visibilityRemappingMethod", + label="Visibility Remapping Method", + description="Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).", + value="PullPush", + values=["Pull", "Push", "PullPush", "MeshItself"], exclusive=True, uid=[0], advanced=True, ), desc.FloatParam( - name='subdivisionTargetRatio', - label='Subdivision Target Ratio', - description='''Percentage of the density of the reconstruction as the target for the subdivision (0: disable subdivision, 0.5: half density of the reconstruction, 1: full density of the reconstruction).''', + name="subdivisionTargetRatio", + label="Subdivision Target Ratio", + description="Percentage of the density of the reconstruction as the target for the subdivision:\n" + " - 0: disable subdivision.\n" + " - 0.5: half density of the reconstruction.\n" + " - 1: full density of the reconstruction).", value=0.8, range=(0.0, 1.0, 0.001), uid=[0], advanced=True, ), 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'], + 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=[], ), @@ -328,36 +334,36 @@ class Texturing(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Folder for output mesh: OBJ, material and texture files.', + name="output", + label="Folder", + description="Folder for output mesh: OBJ, material and texture files.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputMesh', - label='Mesh', - description='Output Mesh file.', - value=desc.Node.internalFolder + 'texturedMesh.{outputMeshFileTypeValue}', + name="outputMesh", + label="Mesh", + description="Output mesh file.", + value=desc.Node.internalFolder + "texturedMesh.{outputMeshFileTypeValue}", uid=[], - group='', + group="", ), desc.File( - name='outputMaterial', + name="outputMaterial", enabled= lambda node: node.outputMeshFileType.value == "obj", - label='Material', - description='Output Material file.', - value=desc.Node.internalFolder + 'texturedMesh.mtl', + label="Material", + description="Output material file.", + value=desc.Node.internalFolder + "texturedMesh.mtl", uid=[], - group='', + group="", ), desc.File( - name='outputTextures', - label='Textures', - description='Output Texture files.', - value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '', + name="outputTextures", + label="Textures", + description="Output texture files.", + value= lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", uid=[], - group='' + group="" ) ] diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index 3cfb49c422..73e5fcc5ec 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -14,17 +14,17 @@ class TracksBuilding(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -36,7 +36,7 @@ class TracksBuilding(desc.AVCommandLineNode): elementDesc=desc.File( name="matchesFolder", label="Matches Folder", - description="", + description="Folder containing some matches.", value="", uid=[0], ), @@ -45,46 +45,46 @@ class TracksBuilding(desc.AVCommandLineNode): description="Folder(s) in which computed matches are stored." ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.IntParam( - name='minInputTrackLength', - label='Min Input Track Length', - description='Minimum track length', + name="minInputTrackLength", + label="Min Input Track Length", + description="Minimum track length.", value=2, range=(2, 10, 1), uid=[0], ), desc.BoolParam( - name='useOnlyMatchesFromInputFolder', - label='Use Only Matches From Input Folder', - description='Use only matches from the input matchesFolder parameter.\n' - 'Matches folders previously added to the SfMData file will be ignored.', + name="useOnlyMatchesFromInputFolder", + label="Use Only Matches From Input Folder", + description="Use only matches from the input 'matchesFolder' parameter.\n" + "Matches folders previously added to the SfMData file will be ignored.", value=False, uid=[], advanced=True, ), desc.BoolParam( - name='filterTrackForks', - label='Filter Track Forks', - description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' - 'lead to multiple features in the same image for a single track. \n', + name="filterTrackForks", + label="Filter Track Forks", + description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches\n" + "lead to multiple features in the same image for a single track.", value=False, 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'], + 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=[], ) @@ -92,10 +92,10 @@ class TracksBuilding(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Tracks', - description='Path to the output tracks file', - value=desc.Node.internalFolder + 'tracksFile.json', + name="output", + label="Tracks", + description="Path to the output tracks file.", + value=desc.Node.internalFolder + "tracksFile.json", uid=[], ), ] diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 84a0eb5bab..6fc3d7796c 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -18,48 +18,48 @@ class ScenePreview(desc.CommandLineNode): inputs = [ desc.File( - name='blenderCmd', - label='Blender Command', - description='Command to launch Blender', - value='blender', + name="blenderCmd", + label="Blender Command", + description="Command to launch Blender.", + value="blender", uid=[], - group='', + group="", ), desc.File( - name='script', - label='Script', - description='Path to the internal script for rendering in Blender', - value=os.path.join(currentDir, 'scripts' ,'preview.py'), + name="script", + label="Script", + description="Path to the internal script for rendering in Blender.", + value=os.path.join(currentDir, "scripts", "preview.py"), uid=[], - group='', + group="", advanced=True, ), desc.File( - name='cameras', - label='Cameras', - description='SfmData with the views, poses and intrinsics to use (in JSON format)', - value='', + name="cameras", + label="Cameras", + description="SfMData with the views, poses and intrinsics to use (in JSON format).", + value="", uid=[0], ), desc.File( - name='model', - label='Model', - description='Point cloud (.abc) or mesh (.obj) to render', - value='', + name="model", + label="Model", + description="Point cloud (.abc) or mesh (.obj) to render.", + value="", uid=[0], ), desc.BoolParam( - name='useBackground', - label='Display Background', - description='Use the undistorted images as background', + name="useBackground", + label="Display Background", + description="Use the undistorted images as background.", value=True, uid=[0], ), desc.File( - name='undistortedImages', - label='Undistorted Images', - description='Folder containing the undistorted images', - value='', + name="undistortedImages", + label="Undistorted Images", + description="Folder containing the undistorted images.", + value="", uid=[0], enabled=lambda node: node.useBackground.value, ), @@ -67,23 +67,23 @@ class ScenePreview(desc.CommandLineNode): name="pointCloudParams", label="Point Cloud Settings", group=None, - enabled=lambda node: node.model.value.lower().endswith('.abc'), - description="Settings for point cloud rendering", + enabled=lambda node: node.model.value.lower().endswith(".abc"), + description="Settings for point cloud rendering.", groupDesc=[ desc.FloatParam( - name='particleSize', - label='Particle Size', - description='Scale of particles used for the point cloud', + name="particleSize", + label="Particle Size", + description="Scale of particles used for the point cloud.", value=0.01, range=(0.01, 1.0, 0.01), uid=[0], ), desc.ChoiceParam( - name='particleColor', - label='Particle Color', - description='Color of particles used for the point cloud', - value='Red', - values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + name="particleColor", + label="Particle Color", + description="Color of particles used for the point cloud.", + value="Red", + values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, uid=[0], ), @@ -93,24 +93,24 @@ class ScenePreview(desc.CommandLineNode): name="meshParams", label="Mesh Settings", group=None, - enabled=lambda node: node.model.value.lower().endswith('.obj'), - description="Setting for mesh rendering", + enabled=lambda node: node.model.value.lower().endswith(".obj"), + description="Setting for mesh rendering.", groupDesc=[ desc.ChoiceParam( - name='shading', - label='Shading', - description='Shading method for visualizing the mesh', - value='wireframe', - values=['wireframe', 'line_art'], + name="shading", + label="Shading", + description="Shading method for visualizing the mesh.", + value="wireframe", + values=["wireframe", "line_art"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='edgeColor', - label='Edge Color', - description='Color of the mesh edges', - value='Red', - values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + name="edgeColor", + label="Edge Color", + description="Color of the mesh edges.", + value="Red", + values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, uid=[0], ), @@ -120,19 +120,19 @@ class ScenePreview(desc.CommandLineNode): outputs = [ desc.File( - name='output', - label='Output', - description='Output folder', + name="output", + label="Output", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='frames', - label='Frames', - description='Frames rendered in Blender', - semantic='image', - value=desc.Node.internalFolder + '<FILENAME>_preview.jpg', + name="frames", + label="Frames", + description="Frames rendered in Blender.", + semantic="image", + value=desc.Node.internalFolder + "<FILENAME>_preview.jpg", uid=[], - group='', + group="", ), - ] \ No newline at end of file + ] From a346c91342b7a08e2bb8bb27dac70fc3a88506a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 16 Jun 2023 06:39:25 -0700 Subject: [PATCH 0829/1093] [blender] preview: use cycles render engine --- meshroom/blender/scripts/preview.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 64bb72ee13..9b2055a37f 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -116,6 +116,11 @@ def initScene(): bpy.data.objects.remove(bpy.data.objects['Light']) # Set output format bpy.context.scene.render.image_settings.file_format = 'JPEG' + # Setup rendering engine + bpy.context.scene.render.engine = 'CYCLES' + bpy.context.scene.cycles.samples = 1 + bpy.context.scene.cycles.use_adaptative_sampling = False + bpy.context.scene.cycles.use_denoising = False def initCompositing(): From c9e2483f03ea7284748485c79d36ef4e5580588d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 16 Jun 2023 08:47:21 -0700 Subject: [PATCH 0830/1093] [blender] preview: add range arguments for parallelization --- meshroom/blender/scripts/preview.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 9b2055a37f..e35a2aef96 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -22,6 +22,14 @@ def createParser(): "--cameras", metavar='FILE', required=True, help="sfmData with the animated camera.", ) + parser.add_argument( + "--rangeStart", type=int, required=False, + help="Range start for processing views. Set to -1 to process all views.", + ) + parser.add_argument( + "--rangeSize", type=int, required=False, + help="Range size for processing views.", + ) parser.add_argument( "--useBackground", type=lambda x: (str(x).lower() == 'true'), required=True, help="Display the background image or not.", @@ -328,8 +336,21 @@ def main(): color = palette[args.particleColor] setupPointCloudShading(sceneObj, color, args.particleSize) + print("Retrieve range") + rangeStart = args.rangeStart if args.rangeStart else -1 + rangeSize = args.rangeSize if args.rangeSize else -1 + if rangeStart != -1: + if rangeStart < 0 or rangeSize < 0 or rangeStart > len(views): + print("Invalid range") + return 0 + if rangeStart + rangeSize > len(views): + rangeSize = len(views) - rangeStart + else: + rangeStart = 0 + rangeSize = len(views) + print("Render viewpoints") - for view in views: + for view in views[rangeStart:rangeStart+rangeSize]: intrinsic = getFromId(intrinsics, 'intrinsicId', view['intrinsicId']) if not intrinsic: continue From 6b02592f2837f0c207c6922eb983e2de53b5249a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 16 Jun 2023 08:49:18 -0700 Subject: [PATCH 0831/1093] [nodes] ScenePreview: parallelize node --- meshroom/blender/ScenePreview.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 6fc3d7796c..e002c2fc15 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -7,6 +7,9 @@ class ScenePreview(desc.CommandLineNode): commandLine = '{blenderCmdValue} -b --python {scriptValue} -- {allParams}' + size = desc.DynamicNodeSize('cameras') + parallelization = desc.Parallelization(blockSize=10) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' category = 'Utils' documentation = ''' From 5dd9a34d3cbf486d5304da343c19d2208290a3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 16 Jun 2023 08:49:53 -0700 Subject: [PATCH 0832/1093] [nodes] ExportAnimatedCamera: propagate input size --- meshroom/aliceVision/ExportAnimatedCamera.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 7db62fec63..6a79b1c561 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -5,6 +5,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): commandLine = 'aliceVision_exportAnimatedCamera {allParams}' + size = desc.DynamicNodeSize('input') category = 'Export' documentation = ''' From b93fdb036aef464a171213b00af00211f2479940 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 19 Jun 2023 14:38:11 +0200 Subject: [PATCH 0833/1093] [Node] LdrToHdrMerging: Add option and parameters for advanced pixelwise merging. --- meshroom/aliceVision/LdrToHdrMerge.py | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 5b71849f68..fe18fa4379 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -91,6 +91,59 @@ class LdrToHdrMerge(desc.AVCommandLineNode): uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), + desc.FloatParam( + name='minLumaForMerging', + label='Minimum Luminance For Merging', + description='Minimum mean luminance of LDR images for merging.', + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + enabled= lambda node: (node.nbBrackets.value != 1), + ), + desc.BoolParam( + name='enablePixelwiseAdvancedMerging', + label='Pixelwise Advanced Merging', + description="Enable pixelwise advanced merging to reduce noise.", + value=True, + uid=[0], + enabled= lambda node: node.nbBrackets.value != 1, + ), + desc.FloatParam( + name='noiseThreshold', + label='Noise Threshold', + description='Value under which input channel value is considered as noise.', + value=0.1, + range=(0.0, 1.0, 0.001), + uid=[0], + enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + ), + desc.FloatParam( + name='minSignificantValue', + label='Minimum Significant Value', + description='Minimum channel input value to be considered in advanced pixelwise merging.', + value=0.05, + range=(0.0, 1.0, 0.001), + uid=[0], + enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + ), + desc.FloatParam( + name='maxSignificantValue', + label='Maximum Significant Value', + description='Maximum channel input value to be considered in advanced pixelwise merging.', + value=0.999, + range=(0.0, 1.0, 0.001), + uid=[0], + enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + ), + desc.FloatParam( + name='toleranceOnRatio', + label='Tolerance On Ratio', + description='Tolerance on ratio between two input channel values at two consecutive exposures.', + value=0.75, + range=(0.0, 1.0, 0.01), + uid=[0], + enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + ), desc.BoolParam( name='byPass', label='Bypass', From e22bb396598b4ce5f3ad63876670c3e768d0118a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 19 Jun 2023 11:25:59 +0200 Subject: [PATCH 0834/1093] [blender] preview: use Holdout instead of TransparentBSDF for wireframe occlusions --- meshroom/blender/scripts/preview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index e35a2aef96..a54f22c566 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -199,15 +199,15 @@ def setupWireframeShading(mesh, color): # Emission node nodeEmission = material.node_tree.nodes.new(type='ShaderNodeEmission') nodeEmission.inputs['Color'].default_value = color - # Transparent BSDF node - nodeTransparent = material.node_tree.nodes.new(type='ShaderNodeBsdfTransparent') + # Holdout node + nodeHoldout = material.node_tree.nodes.new(type='ShaderNodeHoldout') # Max Shader node nodeMix = material.node_tree.nodes.new(type='ShaderNodeMixShader') # Retrieve ouput node nodeOutput = material.node_tree.nodes['Material Output'] # Connect nodes material.node_tree.links.new(nodeWireframe.outputs['Fac'], nodeMix.inputs['Fac']) - material.node_tree.links.new(nodeTransparent.outputs['BSDF'], nodeMix.inputs[1]) + material.node_tree.links.new(nodeHoldout.outputs['Holdout'], nodeMix.inputs[1]) material.node_tree.links.new(nodeEmission.outputs['Emission'], nodeMix.inputs[2]) material.node_tree.links.new(nodeMix.outputs['Shader'], nodeOutput.inputs['Surface']) # Apply material to mesh From bfd9f75f0097592a729c519606da6e0282d4ee1e Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <fabien.servant@technicolor.com> Date: Wed, 14 Jun 2023 10:47:10 +0200 Subject: [PATCH 0835/1093] imageSegmentation node --- meshroom/aliceVision/ImageSegmentation.py | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 meshroom/aliceVision/ImageSegmentation.py diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py new file mode 100644 index 0000000000..e3eb8949b0 --- /dev/null +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -0,0 +1,56 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class ImageSegmentation(desc.AVCommandLineNode): + commandLine = 'aliceVision_imageSegmentation {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' + Generate a mask with segmented labels for each pixel + ''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData file input', + value='', + uid=[0], + ), + + desc.ListAttribute( + elementDesc=desc.StringParam( + name='className', + label='Class Name', + description='Class name to be added to the mask', + value='classname', + uid=[0]), + name="validClasses", + label="Valid classes", + description="Classes names which are to be considered" + ), + + 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='Masks Folder', + description='Output path for the masks.', + value=desc.Node.internalFolder, + uid=[], + ), + ] + From 529f34c2fa19348a12eeb1fb925526a5d2df4ca9 Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <fabien.servant@technicolor.com> Date: Tue, 20 Jun 2023 14:43:03 +0200 Subject: [PATCH 0836/1093] Parameterize model path --- meshroom/aliceVision/ImageSegmentation.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index e3eb8949b0..703c73f9bd 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -21,6 +21,14 @@ class ImageSegmentation(desc.AVCommandLineNode): uid=[0], ), + desc.File( + name="modelPath", + label="Segmentation model path", + description="Weights file for the internal model", + value="${ALICEVISION_SEMANTIC_SEGMENTATION_MODEL}", + uid=[0] + ), + desc.ListAttribute( elementDesc=desc.StringParam( name='className', From f4c66aa4b9cfb80481b3e5b498784a65222be035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 19 Jun 2023 15:48:23 +0200 Subject: [PATCH 0837/1093] [blender] preview: use Freestyle for line art shading --- meshroom/blender/scripts/preview.py | 43 +++++++++-------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index e35a2aef96..d01389ee0e 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -216,37 +216,20 @@ def setupWireframeShading(mesh, color): def setupLineArtShading(obj, mesh, color): - '''Setup materials and Solidify modifier for line art shading.''' - # Transparent filling material - matFill = bpy.data.materials.new('Fill') - matFill.use_backface_culling = True - matFill.use_nodes = True - matFill.blend_method = 'BLEND' - matFill.show_transparent_back = False - matFill.node_tree.links.clear() - nodeTransparent = matFill.node_tree.nodes.new(type='ShaderNodeBsdfTransparent') - nodeOutputFill = matFill.node_tree.nodes['Material Output'] - matFill.node_tree.links.new(nodeTransparent.outputs['BSDF'], nodeOutputFill.inputs['Surface']) - # Colored edge material - matEdge = bpy.data.materials.new('Edge') - matEdge.use_backface_culling = True - matEdge.use_nodes = True - matEdge.blend_method = 'BLEND' - matEdge.node_tree.links.clear() - nodeEmission = matEdge.node_tree.nodes.new(type='ShaderNodeEmission') - nodeEmission.inputs['Color'].default_value = color - nodeOutputEdge = matEdge.node_tree.nodes['Material Output'] - matEdge.node_tree.links.new(nodeEmission.outputs['Emission'], nodeOutputEdge.inputs['Surface']) - # Apply materials to mesh + '''Setup line art shading using Freestyle.''' + # Freestyle + bpy.context.scene.render.use_freestyle = True + bpy.data.linestyles["LineStyle"].color = (color[0], color[1], color[2]) + # Holdout material + material = bpy.data.materials.new('Holdout') + material.use_nodes = True + material.node_tree.links.clear() + nodeHoldout = material.node_tree.nodes.new(type='ShaderNodeHoldout') + nodeOutput = material.node_tree.nodes['Material Output'] + material.node_tree.links.new(nodeHoldout.outputs['Holdout'], nodeOutput.inputs['Surface']) + # Apply material to mesh mesh.materials.clear() - mesh.materials.append(matFill) - mesh.materials.append(matEdge) - # Solidify modifier - solidify = obj.modifiers.new('Solidify', type='SOLIDIFY') - solidify.thickness = -0.01 - solidify.use_rim = False - solidify.use_flip_normals = True - solidify.material_offset = 1 + mesh.materials.append(material) def setupPointCloudShading(obj, color, size): From 8f039e03f74216eafca3a661c7d497fd5df08ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 21 Jun 2023 15:29:18 +0200 Subject: [PATCH 0838/1093] [nodes] ImageSegmentation: cosmetic changes --- meshroom/aliceVision/ImageSegmentation.py | 46 +++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 703c73f9bd..1d831b3746 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -9,44 +9,44 @@ class ImageSegmentation(desc.AVCommandLineNode): category = 'Utils' documentation = ''' - Generate a mask with segmented labels for each pixel - ''' +Generate a mask with segmented labels for each pixel. +''' inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file input', - value='', + name="input", + label="Input", + description="SfMData file input.", + value="", uid=[0], ), desc.File( name="modelPath", - label="Segmentation model path", - description="Weights file for the internal model", + label="Segmentation Model", + description="Weights file for the internal model.", value="${ALICEVISION_SEMANTIC_SEGMENTATION_MODEL}", uid=[0] ), desc.ListAttribute( elementDesc=desc.StringParam( - name='className', - label='Class Name', - description='Class name to be added to the mask', - value='classname', - uid=[0]), + name="className", + label="Class Name", + description="Class name to be added to the mask.", + value="classname", + uid=[0]), name="validClasses", - label="Valid classes", - description="Classes names which are to be considered" + label="Classes", + description="Classes names which are to be considered." ), 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'], + 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=[], ) @@ -54,9 +54,9 @@ class ImageSegmentation(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Masks Folder', - description='Output path for the masks.', + name="output", + label="Masks Folder", + description="Output path for the masks.", value=desc.Node.internalFolder, uid=[], ), From 42cb3bfa506b47a327c251c828bc05510ab0c2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 21 Jun 2023 15:37:17 +0200 Subject: [PATCH 0839/1093] [nodes] ImageSegmentation: image output attr to visualize masks in Viewer2D --- meshroom/aliceVision/ImageSegmentation.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 1d831b3746..092e363f45 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -60,5 +60,14 @@ class ImageSegmentation(desc.AVCommandLineNode): value=desc.Node.internalFolder, uid=[], ), + desc.File( + name="masks", + label="Masks", + description="Generated segmentation masks.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>.exr", + group="", + uid=[], + ), ] From f6bb029f5632c12e75da18bb358f1461422bad26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 21 Jun 2023 15:57:14 +0200 Subject: [PATCH 0840/1093] [nodes] ImageSegmentation: ChoiceParam instead of StringParam for classe names --- meshroom/aliceVision/ImageSegmentation.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 092e363f45..a647e2c1b8 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -30,11 +30,24 @@ class ImageSegmentation(desc.AVCommandLineNode): ), desc.ListAttribute( - elementDesc=desc.StringParam( + elementDesc=desc.ChoiceParam( name="className", label="Class Name", description="Class name to be added to the mask.", - value="classname", + value="person", + values=[ + "__background__", + "aeroplane", + "bicycle", "bird", "boat", "bottle", "bus", + "car", "cat", "chair", "cow", + "diningtable", "dog", + "horse", + "motorbike", + "person", "pottedplant", + "sheep", "sofa", + "train", "tvmonitor" + ], + exclusive=True, uid=[0]), name="validClasses", label="Classes", From 8c48c1160b954468fd188c8c79d218169c097b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 21 Jun 2023 18:18:22 +0200 Subject: [PATCH 0841/1093] [nodes] FeatureExtraction: add maskExtension and maskInvert params --- meshroom/aliceVision/FeatureExtraction.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index f3eff90c80..16f87081f6 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -1,4 +1,4 @@ -__version__ = "1.2" +__version__ = "1.3" from meshroom.core import desc @@ -45,6 +45,22 @@ class FeatureExtraction(desc.AVCommandLineNode): value="", uid=[0], ), + desc.ChoiceParam( + name="maskExtension", + label="Mask Extension", + description="File extension for masks.", + value="png", + values=["png", "exr", "jpg"], + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name="maskInvert", + label="Invert Masks", + description="Invert mask values.", + value=False, + uid=[0], + ), desc.ChoiceParam( name="describerTypes", label="Describer Types", From aa0d1899b17229cd5670e75d25f89a06d366fb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 21 Jun 2023 18:24:58 +0200 Subject: [PATCH 0842/1093] [nodes] ImageSegmentation: set GPU level for farm submission --- meshroom/aliceVision/ImageSegmentation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index a647e2c1b8..7f583e6bf8 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -6,6 +6,7 @@ class ImageSegmentation(desc.AVCommandLineNode): commandLine = 'aliceVision_imageSegmentation {allParams}' size = desc.DynamicNodeSize('input') + gpu = desc.Level.NORMAL category = 'Utils' documentation = ''' From c4a1ee953963ce7ab17efe1eee59021f82113c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Thu, 22 Jun 2023 00:14:41 -0700 Subject: [PATCH 0843/1093] [nodes] ImageSegmentation: parallelization --- meshroom/aliceVision/ImageSegmentation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 7f583e6bf8..46aea78081 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -7,6 +7,8 @@ class ImageSegmentation(desc.AVCommandLineNode): commandLine = 'aliceVision_imageSegmentation {allParams}' size = desc.DynamicNodeSize('input') gpu = desc.Level.NORMAL + parallelization = desc.Parallelization(blockSize=50) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' category = 'Utils' documentation = ''' From c831667171976b47173c0757abd2d4e04047f028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 16 Jun 2023 11:58:21 +0200 Subject: [PATCH 0844/1093] [pipelines] Update release version Additionally update all the version of all the nodes, in case some nodes' minor was not up-to-date. --- meshroom/cameraTracking.mg | 38 +-- meshroom/distortionCalibration.mg | 12 +- meshroom/hdrFusion.mg | 8 +- meshroom/panoramaFisheyeHdr.mg | 316 ++++++++++---------- meshroom/panoramaHdr.mg | 312 +++++++++---------- meshroom/photogrammetry.mg | 209 +++++++------ meshroom/photogrammetryAndCameraTracking.mg | 36 +-- meshroom/photogrammetryDraft.mg | 140 ++++----- 8 files changed, 535 insertions(+), 536 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 4c950d6d8f..12c996016b 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,34 +1,34 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0-develop", + "releaseVersion": "2023.2.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "ImageMatching": "2.0", - "ConvertSfMFormat": "2.0", - "ExportDistortion": "1.0", - "SfMTransfer": "2.1", + "DepthMapFilter": "3.0", + "DepthMap": "4.0", "KeyframeSelection": "4.1", - "FeatureExtraction": "1.2", - "DistortionCalibration": "3.0", "Meshing": "7.0", - "MeshDecimate": "1.0", - "DepthMap": "4.0", - "MeshFiltering": "3.0", - "SfMTriangulation": "1.0", + "DistortionCalibration": "3.0", + "ScenePreview": "1.0", + "CheckerboardDetection": "1.0", + "FeatureExtraction": "1.2", + "FeatureMatching": "2.0", + "CameraInit": "9.0", "Texturing": "6.0", + "Publish": "1.3", "StructureFromMotion": "3.1", - "CameraInit": "9.0", + "ConvertSfMFormat": "2.0", + "SfMTriangulation": "1.0", + "MeshDecimate": "1.0", "ApplyCalibration": "1.0", - "PrepareDenseScene": "3.0", - "Publish": "1.3", - "ExportAnimatedCamera": "2.0", - "DepthMapFilter": "3.0", - "ScenePreview": "1.0", + "MeshFiltering": "3.0", + "ImageMatching": "2.0", "ImageMatchingMultiSfM": "1.0", - "CheckerboardDetection": "1.0", - "FeatureMatching": "2.0" + "ExportAnimatedCamera": "2.0", + "SfMTransfer": "2.1", + "PrepareDenseScene": "3.0", + "ExportDistortion": "1.0" } }, "graph": { diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index de9a29a1ab..f5d03b32ac 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -1,15 +1,15 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0-develop", + "releaseVersion": "2023.2.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "Publish": "1.2", - "ExportDistortion": "1.0", - "CameraInit": "9.0", + "DistortionCalibration": "3.0", "CheckerboardDetection": "1.0", - "DistortionCalibration": "3.0" + "CameraInit": "9.0", + "Publish": "1.3", + "ExportDistortion": "1.0" } }, "graph": { @@ -66,4 +66,4 @@ "inputs": {} } } -} +} \ No newline at end of file diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 253a69c643..aaedec5ae2 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -2,12 +2,12 @@ "header": { "nodesVersions": { "Publish": "1.3", - "LdrToHdrSampling": "4.0", "LdrToHdrMerge": "4.1", - "LdrToHdrCalibration": "3.0", - "CameraInit": "9.0" + "CameraInit": "9.0", + "LdrToHdrSampling": "4.0", + "LdrToHdrCalibration": "3.0" }, - "releaseVersion": "2023.2.0-develop", + "releaseVersion": "2023.2.0", "fileVersion": "1.1", "template": true }, diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 84f8131d20..14969e67d7 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,237 +1,237 @@ { "header": { "nodesVersions": { - "PanoramaMerging": "1.0", - "PanoramaSeams": "2.0", - "FeatureMatching": "2.0", - "PanoramaCompositing": "2.0", - "LdrToHdrMerge": "4.1", - "LdrToHdrSampling": "4.0", - "LdrToHdrCalibration": "3.0", - "PanoramaEstimation": "1.0", - "PanoramaInit": "2.0", - "CameraInit": "9.0", - "SfMTransform": "3.0", - "PanoramaPostProcessing": "1.0", - "ImageMatching": "2.0", + "PanoramaCompositing": "2.0", + "SfMTransform": "3.1", + "PanoramaPrepareImages": "1.1", "FeatureExtraction": "1.2", - "PanoramaPrepareImages": "1.1", + "Publish": "1.3", + "LdrToHdrMerge": "4.1", + "CameraInit": "9.0", + "FeatureMatching": "2.0", + "PanoramaMerging": "1.0", "PanoramaWarping": "1.1", - "Publish": "1.3" - }, - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", + "LdrToHdrSampling": "4.0", + "ImageMatching": "2.0", + "PanoramaPostProcessing": "1.0", + "PanoramaSeams": "2.0", + "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", + "PanoramaInit": "2.0" + }, + "releaseVersion": "2023.2.0", + "fileVersion": "1.1", "template": true - }, + }, "graph": { "LdrToHdrMerge_1": { + "nodeType": "LdrToHdrMerge", + "position": [ + 800, + 0 + ], "inputs": { - "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", - "byPass": "{LdrToHdrCalibration_1.byPass}", - "input": "{LdrToHdrCalibration_1.input}", - "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "input": "{LdrToHdrCalibration_1.input}", "response": "{LdrToHdrCalibration_1.response}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "byPass": "{LdrToHdrCalibration_1.byPass}", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" - }, - "nodeType": "LdrToHdrMerge", + } + }, + "PanoramaWarping_1": { + "nodeType": "PanoramaWarping", "position": [ - 800, + 2200, 0 - ] - }, - "PanoramaWarping_1": { + ], "inputs": { "input": "{SfMTransform_1.output}" - }, - "nodeType": "PanoramaWarping", + } + }, + "LdrToHdrCalibration_1": { + "nodeType": "LdrToHdrCalibration", "position": [ - 2200, + 600, 0 - ] - }, - "LdrToHdrCalibration_1": { + ], "inputs": { - "samples": "{LdrToHdrSampling_1.output}", - "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", - "byPass": "{LdrToHdrSampling_1.byPass}", - "input": "{LdrToHdrSampling_1.input}", + "input": "{LdrToHdrSampling_1.input}", + "samples": "{LdrToHdrSampling_1.output}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", - "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}", - "calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}" - }, - "nodeType": "LdrToHdrCalibration", + "byPass": "{LdrToHdrSampling_1.byPass}", + "calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}", + "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", + "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" + } + }, + "LdrToHdrSampling_1": { + "nodeType": "LdrToHdrSampling", "position": [ - 600, + 400, 0 - ] - }, - "LdrToHdrSampling_1": { + ], "inputs": { "input": "{PanoramaPrepareImages_1.output}" - }, - "nodeType": "LdrToHdrSampling", + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", "position": [ - 400, + 1400, 0 - ] - }, - "ImageMatching_1": { + ], "inputs": { - "input": "{PanoramaInit_1.outSfMData}", - "method": "FrustumOrVocabularyTree", + "input": "{PanoramaInit_1.outSfMData}", "featuresFolders": [ "{FeatureExtraction_1.output}" - ] - }, - "nodeType": "ImageMatching", + ], + "method": "FrustumOrVocabularyTree" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 1400, + 1000, 0 - ] - }, - "FeatureExtraction_1": { + ], "inputs": { + "input": "{LdrToHdrMerge_1.outSfMData}", "describerTypes": [ "sift" - ], - "describerQuality": "high", - "input": "{LdrToHdrMerge_1.outSfMData}", - "describerPreset": "high" - }, - "nodeType": "FeatureExtraction", + ], + "describerPreset": "high", + "describerQuality": "high" + } + }, + "PanoramaMerging_1": { + "nodeType": "PanoramaMerging", "position": [ - 1000, + 2800, 0 - ] - }, - "PanoramaMerging_1": { + ], "inputs": { - "compositingFolder": "{PanoramaCompositing_1.output}", "input": "{PanoramaCompositing_1.input}", + "compositingFolder": "{PanoramaCompositing_1.output}", "useTiling": "{PanoramaCompositing_1.useTiling}" - }, - "nodeType": "PanoramaMerging", + } + }, + "PanoramaCompositing_1": { + "nodeType": "PanoramaCompositing", "position": [ - 2800, + 2600, 0 - ] - }, - "PanoramaCompositing_1": { + ], "inputs": { - "warpingFolder": "{PanoramaSeams_1.warpingFolder}", - "labels": "{PanoramaSeams_1.output}", "input": "{PanoramaSeams_1.outputSfm}", + "warpingFolder": "{PanoramaSeams_1.warpingFolder}", + "labels": "{PanoramaSeams_1.output}", "useTiling": false - }, - "nodeType": "PanoramaCompositing", + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 2600, + 0, 0 - ] - }, - "CameraInit_1": { + ], "inputs": { "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye1", - "3deanamorphic4", - "3deradial4", + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye1", + "3deanamorphic4", + "3deradial4", "3declassicld" ] - }, - "nodeType": "CameraInit", + } + }, + "PanoramaPostProcessing_1": { + "nodeType": "PanoramaPostProcessing", "position": [ - 0, + 3000, 0 - ] - }, - "PanoramaPostProcessing_1": { + ], "inputs": { - "inputPanorama": "{PanoramaMerging_1.outputPanorama}", + "inputPanorama": "{PanoramaMerging_1.outputPanorama}", "fillHoles": true - }, - "nodeType": "PanoramaPostProcessing", + } + }, + "PanoramaPrepareImages_1": { + "nodeType": "PanoramaPrepareImages", "position": [ - 3000, + 200, 0 - ] - }, - "PanoramaPrepareImages_1": { + ], "inputs": { "input": "{CameraInit_1.output}" - }, - "nodeType": "PanoramaPrepareImages", + } + }, + "SfMTransform_1": { + "nodeType": "SfMTransform", "position": [ - 200, + 2000, 0 - ] - }, - "SfMTransform_1": { + ], "inputs": { - "method": "manual", - "input": "{PanoramaEstimation_1.output}" - }, - "nodeType": "SfMTransform", + "input": "{PanoramaEstimation_1.output}", + "method": "manual" + } + }, + "PanoramaSeams_1": { + "nodeType": "PanoramaSeams", "position": [ - 2000, + 2400, 0 - ] - }, - "PanoramaSeams_1": { + ], "inputs": { - "input": "{PanoramaWarping_1.input}", + "input": "{PanoramaWarping_1.input}", "warpingFolder": "{PanoramaWarping_1.output}" - }, - "nodeType": "PanoramaSeams", + } + }, + "PanoramaEstimation_1": { + "nodeType": "PanoramaEstimation", "position": [ - 2400, + 1800, 0 - ] - }, - "PanoramaEstimation_1": { + ], "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", "matchesFolders": [ "{FeatureMatching_1.output}" - ], - "input": "{FeatureMatching_1.input}", - "describerTypes": "{FeatureMatching_1.describerTypes}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}" - }, - "nodeType": "PanoramaEstimation", + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + }, + "PanoramaInit_1": { + "nodeType": "PanoramaInit", "position": [ - 1800, + 1200, 0 - ] - }, - "PanoramaInit_1": { + ], "inputs": { - "useFisheye": true, + "input": "{FeatureExtraction_1.input}", "dependency": [ "{FeatureExtraction_1.output}" - ], - "input": "{FeatureExtraction_1.input}" - }, - "nodeType": "PanoramaInit", - "position": [ - 1200, - 0 - ] - }, + ], + "useFisheye": true + } + }, "FeatureMatching_1": { - "inputs": { - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "imagePairsList": "{ImageMatching_1.output}", - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}" - }, - "nodeType": "FeatureMatching", + "nodeType": "FeatureMatching", "position": [ - 1600, + 1600, 0 - ] + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } }, "Publish_1": { "nodeType": "Publish", @@ -246,4 +246,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 5e77f91e89..f858491d6f 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,231 +1,231 @@ { "header": { "nodesVersions": { - "PanoramaMerging": "1.0", - "PanoramaSeams": "2.0", - "FeatureMatching": "2.0", - "PanoramaCompositing": "2.0", - "LdrToHdrMerge": "4.1", - "LdrToHdrSampling": "4.0", - "LdrToHdrCalibration": "3.0", - "PanoramaEstimation": "1.0", - "PanoramaInit": "2.0", - "CameraInit": "9.0", - "SfMTransform": "3.0", - "PanoramaPostProcessing": "1.0", - "ImageMatching": "2.0", + "PanoramaCompositing": "2.0", + "SfMTransform": "3.1", + "PanoramaPrepareImages": "1.1", "FeatureExtraction": "1.2", - "PanoramaPrepareImages": "1.1", + "Publish": "1.3", + "LdrToHdrMerge": "4.1", + "CameraInit": "9.0", + "FeatureMatching": "2.0", + "PanoramaMerging": "1.0", "PanoramaWarping": "1.1", - "Publish": "1.3" - }, - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", + "LdrToHdrSampling": "4.0", + "ImageMatching": "2.0", + "PanoramaPostProcessing": "1.0", + "PanoramaSeams": "2.0", + "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", + "PanoramaInit": "2.0" + }, + "releaseVersion": "2023.2.0", + "fileVersion": "1.1", "template": true - }, + }, "graph": { "LdrToHdrMerge_1": { + "nodeType": "LdrToHdrMerge", + "position": [ + 800, + 0 + ], "inputs": { - "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", - "byPass": "{LdrToHdrCalibration_1.byPass}", - "input": "{LdrToHdrCalibration_1.input}", - "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "input": "{LdrToHdrCalibration_1.input}", "response": "{LdrToHdrCalibration_1.response}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "byPass": "{LdrToHdrCalibration_1.byPass}", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" - }, - "nodeType": "LdrToHdrMerge", + } + }, + "PanoramaWarping_1": { + "nodeType": "PanoramaWarping", "position": [ - 800, + 2200, 0 - ] - }, - "PanoramaWarping_1": { + ], "inputs": { "input": "{SfMTransform_1.output}" - }, - "nodeType": "PanoramaWarping", + } + }, + "LdrToHdrCalibration_1": { + "nodeType": "LdrToHdrCalibration", "position": [ - 2200, + 600, 0 - ] - }, - "LdrToHdrCalibration_1": { + ], "inputs": { - "samples": "{LdrToHdrSampling_1.output}", - "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", - "byPass": "{LdrToHdrSampling_1.byPass}", - "input": "{LdrToHdrSampling_1.input}", + "input": "{LdrToHdrSampling_1.input}", + "samples": "{LdrToHdrSampling_1.output}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", - "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}", - "calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}" - }, - "nodeType": "LdrToHdrCalibration", + "byPass": "{LdrToHdrSampling_1.byPass}", + "calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}", + "channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}", + "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" + } + }, + "LdrToHdrSampling_1": { + "nodeType": "LdrToHdrSampling", "position": [ - 600, + 400, 0 - ] - }, - "LdrToHdrSampling_1": { + ], "inputs": { "input": "{PanoramaPrepareImages_1.output}" - }, - "nodeType": "LdrToHdrSampling", + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", "position": [ - 400, + 1400, 0 - ] - }, - "ImageMatching_1": { + ], "inputs": { - "input": "{PanoramaInit_1.outSfMData}", - "method": "FrustumOrVocabularyTree", + "input": "{PanoramaInit_1.outSfMData}", "featuresFolders": [ "{FeatureExtraction_1.output}" - ] - }, - "nodeType": "ImageMatching", + ], + "method": "FrustumOrVocabularyTree" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 1400, + 1000, 0 - ] - }, - "FeatureExtraction_1": { + ], "inputs": { - "describerQuality": "high", - "input": "{LdrToHdrMerge_1.outSfMData}" - }, - "nodeType": "FeatureExtraction", + "input": "{LdrToHdrMerge_1.outSfMData}", + "describerQuality": "high" + } + }, + "PanoramaMerging_1": { + "nodeType": "PanoramaMerging", "position": [ - 1000, + 2800, 0 - ] - }, - "PanoramaMerging_1": { + ], "inputs": { - "compositingFolder": "{PanoramaCompositing_1.output}", "input": "{PanoramaCompositing_1.input}", + "compositingFolder": "{PanoramaCompositing_1.output}", "useTiling": "{PanoramaCompositing_1.useTiling}" - }, - "nodeType": "PanoramaMerging", + } + }, + "PanoramaCompositing_1": { + "nodeType": "PanoramaCompositing", "position": [ - 2800, + 2600, 0 - ] - }, - "PanoramaCompositing_1": { + ], "inputs": { - "warpingFolder": "{PanoramaSeams_1.warpingFolder}", - "labels": "{PanoramaSeams_1.output}", - "input": "{PanoramaSeams_1.outputSfm}" - }, - "nodeType": "PanoramaCompositing", + "input": "{PanoramaSeams_1.outputSfm}", + "warpingFolder": "{PanoramaSeams_1.warpingFolder}", + "labels": "{PanoramaSeams_1.output}" + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 2600, + 0, 0 - ] - }, - "CameraInit_1": { + ], "inputs": { "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye1", - "3deanamorphic4", - "3deradial4", + "pinhole", + "radial1", + "radial3", + "brown", + "fisheye1", + "3deanamorphic4", + "3deradial4", "3declassicld" ] - }, - "nodeType": "CameraInit", + } + }, + "PanoramaPostProcessing_1": { + "nodeType": "PanoramaPostProcessing", "position": [ - 0, + 3000, 0 - ] - }, - "PanoramaPostProcessing_1": { + ], "inputs": { - "inputPanorama": "{PanoramaMerging_1.outputPanorama}", + "inputPanorama": "{PanoramaMerging_1.outputPanorama}", "fillHoles": true - }, - "nodeType": "PanoramaPostProcessing", + } + }, + "PanoramaPrepareImages_1": { + "nodeType": "PanoramaPrepareImages", "position": [ - 3000, + 200, 0 - ] - }, - "PanoramaPrepareImages_1": { + ], "inputs": { "input": "{CameraInit_1.output}" - }, - "nodeType": "PanoramaPrepareImages", + } + }, + "SfMTransform_1": { + "nodeType": "SfMTransform", "position": [ - 200, + 2000, 0 - ] - }, - "SfMTransform_1": { + ], "inputs": { - "method": "manual", - "input": "{PanoramaEstimation_1.output}" - }, - "nodeType": "SfMTransform", + "input": "{PanoramaEstimation_1.output}", + "method": "manual" + } + }, + "PanoramaSeams_1": { + "nodeType": "PanoramaSeams", "position": [ - 2000, + 2400, 0 - ] - }, - "PanoramaSeams_1": { + ], "inputs": { - "input": "{PanoramaWarping_1.input}", + "input": "{PanoramaWarping_1.input}", "warpingFolder": "{PanoramaWarping_1.output}" - }, - "nodeType": "PanoramaSeams", + } + }, + "PanoramaEstimation_1": { + "nodeType": "PanoramaEstimation", "position": [ - 2400, + 1800, 0 - ] - }, - "PanoramaEstimation_1": { + ], "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", "matchesFolders": [ "{FeatureMatching_1.output}" - ], - "input": "{FeatureMatching_1.input}", - "describerTypes": "{FeatureMatching_1.describerTypes}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}" - }, - "nodeType": "PanoramaEstimation", + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + }, + "PanoramaInit_1": { + "nodeType": "PanoramaInit", "position": [ - 1800, + 1200, 0 - ] - }, - "PanoramaInit_1": { + ], "inputs": { + "input": "{FeatureExtraction_1.input}", "dependency": [ "{FeatureExtraction_1.output}" - ], - "input": "{FeatureExtraction_1.input}" - }, - "nodeType": "PanoramaInit", - "position": [ - 1200, - 0 - ] - }, + ] + } + }, "FeatureMatching_1": { - "inputs": { - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "imagePairsList": "{ImageMatching_1.output}", - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}" - }, - "nodeType": "FeatureMatching", + "nodeType": "FeatureMatching", "position": [ - 1600, + 1600, 0 - ] + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } }, "Publish_1": { "nodeType": "Publish", @@ -240,4 +240,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 78112c3b72..0602a9362d 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -1,163 +1,162 @@ { "header": { - "pipelineVersion": "2.2", - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", - "template": true, + "pipelineVersion": "2.2", + "releaseVersion": "2023.2.0", + "fileVersion": "1.1", + "template": true, "nodesVersions": { - "FeatureMatching": "2.0", - "MeshFiltering": "3.0", - "Texturing": "6.0", - "PrepareDenseScene": "3.0", + "DepthMapFilter": "3.0", + "Meshing": "7.0", "DepthMap": "4.0", - "StructureFromMotion": "3.0", - "CameraInit": "9.0", - "ImageMatching": "2.0", "FeatureExtraction": "1.2", - "Meshing": "7.0", - "DepthMapFilter": "3.0", + "PrepareDenseScene": "3.0", + "CameraInit": "9.0", + "FeatureMatching": "2.0", + "MeshFiltering": "3.0", + "Texturing": "6.0", + "StructureFromMotion": "3.1", + "ImageMatching": "2.0", "Publish": "1.3" } - }, + }, "graph": { "Publish_1": { + "nodeType": "Publish", + "position": [ + 2200, + 0 + ], "inputs": { - "output": "", "inputFiles": [ "{Texturing_1.outputMesh}", "{Texturing_1.outputMaterial}", "{Texturing_1.outputTextures}" ] - }, - "nodeType": "Publish", - "position": [ - 2200, - 0 - ] + } }, "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 2000, + 0 + ], "inputs": { - "imagesFolder": "{DepthMap_1.imagesFolder}", - "input": "{Meshing_1.output}", + "input": "{Meshing_1.output}", + "imagesFolder": "{DepthMap_1.imagesFolder}", "inputMesh": "{MeshFiltering_1.outputMesh}" - }, - "nodeType": "Texturing", + } + }, + "Meshing_1": { + "nodeType": "Meshing", "position": [ - 2000, + 1600, 0 - ] - }, - "Meshing_1": { + ], "inputs": { - "depthMapsFolder": "{DepthMapFilter_1.output}", - "input": "{DepthMapFilter_1.input}" - }, - "nodeType": "Meshing", + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}" + } + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", "position": [ - 1600, + 1400, 0 - ] - }, - "DepthMapFilter_1": { + ], "inputs": { - "depthMapsFolder": "{DepthMap_1.output}", - "input": "{DepthMap_1.input}" - }, - "nodeType": "DepthMapFilter", + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", "position": [ - 1400, + 400, 0 - ] - }, - "ImageMatching_1": { + ], "inputs": { - "input": "{FeatureExtraction_1.input}", + "input": "{FeatureExtraction_1.input}", "featuresFolders": [ "{FeatureExtraction_1.output}" ] - }, - "nodeType": "ImageMatching", + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 400, + 200, 0 - ] - }, - "FeatureExtraction_1": { + ], "inputs": { "input": "{CameraInit_1.output}" - }, - "nodeType": "FeatureExtraction", + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", "position": [ - 200, + 800, 0 - ] - }, - "StructureFromMotion_1": { + ], "inputs": { - "describerTypes": "{FeatureMatching_1.describerTypes}", - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", "matchesFolders": [ "{FeatureMatching_1.output}" - ] - }, - "nodeType": "StructureFromMotion", + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", "position": [ - 800, + 1000, 0 - ] - }, - "PrepareDenseScene_1": { + ], "inputs": { "input": "{StructureFromMotion_1.output}" - }, - "nodeType": "PrepareDenseScene", - "position": [ - 1000, - 0 - ] - }, + } + }, "CameraInit_1": { - "inputs": {}, - "nodeType": "CameraInit", + "nodeType": "CameraInit", "position": [ - 0, + 0, 0 - ] - }, + ], + "inputs": {} + }, "DepthMap_1": { - "inputs": { - "imagesFolder": "{PrepareDenseScene_1.output}", - "input": "{PrepareDenseScene_1.input}" - }, - "nodeType": "DepthMap", + "nodeType": "DepthMap", "position": [ - 1200, + 1200, 0 - ] - }, - "MeshFiltering_1": { + ], "inputs": { - "inputMesh": "{Meshing_1.outputMesh}" - }, - "nodeType": "MeshFiltering", + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}" + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", "position": [ - 1800, + 1800, 0 - ] - }, - "FeatureMatching_1": { + ], "inputs": { - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "imagePairsList": "{ImageMatching_1.output}", - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}" - }, - "nodeType": "FeatureMatching", + "inputMesh": "{Meshing_1.outputMesh}" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 600, + 600, 0 - ] + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } } } -} +} \ No newline at end of file diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 8d5d9fd692..301a37b46c 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,28 +5,28 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "MeshDecimate": "1.0", - "DepthMap": "4.0", - "MeshFiltering": "3.0", - "ApplyCalibration": "1.0", - "CameraInit": "9.0", + "Meshing": "7.0", + "KeyframeSelection": "4.1", + "DistortionCalibration": "3.0", "ScenePreview": "1.0", - "StructureFromMotion": "3.1", - "PrepareDenseScene": "3.0", - "Publish": "1.3", - "ExportAnimatedCamera": "2.0", - "Texturing": "6.0", "DepthMapFilter": "3.0", - "ImageMatchingMultiSfM": "1.0", + "DepthMap": "4.0", "CheckerboardDetection": "1.0", - "ExportDistortion": "1.0", + "FeatureExtraction": "1.2", + "CameraInit": "9.0", "FeatureMatching": "2.0", - "ImageMatching": "2.0", + "Texturing": "6.0", + "Publish": "1.3", + "StructureFromMotion": "3.1", "ConvertSfMFormat": "2.0", - "FeatureExtraction": "1.2", - "KeyframeSelection": "4.1", - "Meshing": "7.0", - "DistortionCalibration": "3.0" + "MeshDecimate": "1.0", + "ApplyCalibration": "1.0", + "MeshFiltering": "3.0", + "ImageMatching": "2.0", + "ImageMatchingMultiSfM": "1.0", + "ExportAnimatedCamera": "2.0", + "PrepareDenseScene": "3.0", + "ExportDistortion": "1.0" } }, "graph": { @@ -482,4 +482,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index cc7cac1c17..78268b0456 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -1,110 +1,110 @@ { "header": { "nodesVersions": { - "FeatureMatching": "2.0", - "MeshFiltering": "3.0", - "Texturing": "6.0", - "StructureFromMotion": "3.0", - "CameraInit": "9.0", - "ImageMatching": "2.0", - "FeatureExtraction": "1.2", "Meshing": "7.0", + "FeatureExtraction": "1.2", + "CameraInit": "9.0", + "FeatureMatching": "2.0", + "MeshFiltering": "3.0", + "Texturing": "6.0", + "StructureFromMotion": "3.1", + "ImageMatching": "2.0", "Publish": "1.3" - }, - "releaseVersion": "2023.1.0", - "fileVersion": "1.1", + }, + "releaseVersion": "2023.2.0", + "fileVersion": "1.1", "template": true - }, + }, "graph": { "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 1400, + 0 + ], "inputs": { - "input": "{Meshing_1.output}", + "input": "{Meshing_1.output}", "inputMesh": "{MeshFiltering_1.outputMesh}" - }, - "nodeType": "Texturing", + } + }, + "Meshing_1": { + "nodeType": "Meshing", "position": [ - 1400, + 1000, 0 - ] - }, - "Meshing_1": { + ], "inputs": { "input": "{StructureFromMotion_1.output}" - }, - "nodeType": "Meshing", + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", "position": [ - 1000, + 400, 0 - ] - }, - "ImageMatching_1": { + ], "inputs": { - "input": "{FeatureExtraction_1.input}", + "input": "{FeatureExtraction_1.input}", "featuresFolders": [ "{FeatureExtraction_1.output}" ] - }, - "nodeType": "ImageMatching", + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 400, + 200, 0 - ] - }, - "FeatureExtraction_1": { + ], "inputs": { "input": "{CameraInit_1.output}" - }, - "nodeType": "FeatureExtraction", + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", "position": [ - 200, + 800, 0 - ] - }, - "StructureFromMotion_1": { + ], "inputs": { - "describerTypes": "{FeatureMatching_1.describerTypes}", - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", "matchesFolders": [ "{FeatureMatching_1.output}" - ] - }, - "nodeType": "StructureFromMotion", - "position": [ - 800, - 0 - ] - }, + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + }, "CameraInit_1": { - "inputs": {}, - "nodeType": "CameraInit", + "nodeType": "CameraInit", "position": [ - 0, + 0, 0 - ] - }, + ], + "inputs": {} + }, "MeshFiltering_1": { - "inputs": { - "inputMesh": "{Meshing_1.outputMesh}" - }, - "nodeType": "MeshFiltering", + "nodeType": "MeshFiltering", "position": [ - 1200, + 1200, 0 - ] - }, - "FeatureMatching_1": { + ], "inputs": { - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "imagePairsList": "{ImageMatching_1.output}", - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}" - }, - "nodeType": "FeatureMatching", + "inputMesh": "{Meshing_1.outputMesh}" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 600, + 600, 0 - ] + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } }, "Publish_1": { "nodeType": "Publish", @@ -121,4 +121,4 @@ } } } -} +} \ No newline at end of file From 3963288f58e5e6a930fd2c902aa2f7be1dea6bde Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 27 Jun 2023 11:47:43 +0200 Subject: [PATCH 0845/1093] [Node] ldrToHdrMerge: Update interface options --- meshroom/aliceVision/LdrToHdrMerge.py | 40 ++++++++------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index fe18fa4379..a6209f7762 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -91,31 +91,14 @@ class LdrToHdrMerge(desc.AVCommandLineNode): uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), - desc.FloatParam( - name='minLumaForMerging', - label='Minimum Luminance For Merging', - description='Minimum mean luminance of LDR images for merging.', - value=0.0, - range=(0.0, 1.0, 0.01), - uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1), - ), - desc.BoolParam( - name='enablePixelwiseAdvancedMerging', - label='Pixelwise Advanced Merging', - description="Enable pixelwise advanced merging to reduce noise.", - value=True, - uid=[0], - enabled= lambda node: node.nbBrackets.value != 1, - ), desc.FloatParam( name='noiseThreshold', label='Noise Threshold', description='Value under which input channel value is considered as noise.', - value=0.1, + value=0.05, range=(0.0, 1.0, 0.001), uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + enabled= lambda node: (node.nbBrackets.value != 1), ), desc.FloatParam( name='minSignificantValue', @@ -124,25 +107,24 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=0.05, range=(0.0, 1.0, 0.001), uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + enabled= lambda node: (node.nbBrackets.value != 1), ), desc.FloatParam( name='maxSignificantValue', label='Maximum Significant Value', description='Maximum channel input value to be considered in advanced pixelwise merging.', - value=0.999, + value=0.995, range=(0.0, 1.0, 0.001), uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + enabled= lambda node: (node.nbBrackets.value != 1), ), - desc.FloatParam( - name='toleranceOnRatio', - label='Tolerance On Ratio', - description='Tolerance on ratio between two input channel values at two consecutive exposures.', - value=0.75, - range=(0.0, 1.0, 0.01), + desc.BoolParam( + name='computeLightMasks', + label='Compute Light Masks', + description="Compute masks of low and high lights and missing info.", + value=False, uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1 and node.enablePixelwiseAdvancedMerging.value), + enabled= lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( name='byPass', From a8f084042fef113e588798fb398cec742532a03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 23 Jun 2023 01:55:28 -0700 Subject: [PATCH 0846/1093] [blender] preview: apply pixelRatio metadata --- meshroom/blender/scripts/preview.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 641396b6d2..ef32b337df 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -91,6 +91,7 @@ def setupCamera(intrinsic, pose): bpy.context.scene.render.resolution_x = int(intrinsic['width']) bpy.context.scene.render.resolution_y = int(intrinsic['height']) + bpy.context.scene.render.pixel_aspect_x = float(intrinsic['pixelRatio']) camData.sensor_width = float(intrinsic['sensorWidth']) camData.lens = float(intrinsic['focalLength']) From 7b31c75da94ca9eb0efa1a1e3c11425351dc0f70 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 28 Jun 2023 11:42:00 +0200 Subject: [PATCH 0847/1093] [Nodes] ldrToHdrMerge: remove noise param --- meshroom/aliceVision/LdrToHdrMerge.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index a6209f7762..b7c9b4e636 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -91,15 +91,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), - desc.FloatParam( - name='noiseThreshold', - label='Noise Threshold', - description='Value under which input channel value is considered as noise.', - value=0.05, - range=(0.0, 1.0, 0.001), - uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1), - ), desc.FloatParam( name='minSignificantValue', label='Minimum Significant Value', From 28eb9b4cb9976dfef621d05f066858e0fca31375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 28 Jun 2023 16:58:15 +0200 Subject: [PATCH 0848/1093] [nodes] CameraInit: bump viewpoints file version to 1.2.5 --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 84764376ef..be0dab26d4 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -449,7 +449,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 2], + "version": [1, 2, 5], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From 9e5451b4d3e8f78a8b52130a12a8d25966a11748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 7 Jul 2023 18:07:45 +0200 Subject: [PATCH 0849/1093] [nodes] HDR Fusion: Correctly detect number of brackets The detection of the number of brackets used to only work in a case where there was a single dataset / a single camera intrinsics. If two datasets with the same number of brackets were provided, the detection was failing because we expected the exposure levels to be uniform across all the images. If more than one dataset is provided, there is no guarantee that the exposure groups will be identical although the number of brackets is the same. The inputs are however sorted, and the shutter speeds are expected to be decreasing, meaning that a shutter speed N superior to a shutter speed N-1 indicates a new group. In the same manner, ISO or aperture values that change from one input to the next one indicate a new group. For the comparison between exposure levels to be valid, the aperture, shutter speed and ISO values need to be stored in tuples as floats instead of strings. --- meshroom/aliceVision/LdrToHdrCalibration.py | 31 +++++++++++++-------- meshroom/aliceVision/LdrToHdrMerge.py | 31 +++++++++++++-------- meshroom/aliceVision/LdrToHdrSampling.py | 31 +++++++++++++-------- 3 files changed, 57 insertions(+), 36 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 5d1c61d469..4ce2f77867 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -168,33 +168,31 @@ def update(cls, node): if not isinstance(node.nodeDesc, cls): raise ValueError("Node {} is not an instance of type {}".format(node, cls)) # TODO: use Node version for this test - if 'userNbBrackets' not in node.getAttributes().keys(): + if "userNbBrackets" not in node.getAttributes().keys(): # Old version of the node return if node.userNbBrackets.value != 0: node.nbBrackets.value = node.userNbBrackets.value return - # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) cameraInitOutput = node.input.getLinkParam(recursive=True) if not cameraInitOutput: node.nbBrackets.value = 0 return - if not cameraInitOutput.node.hasAttribute('viewpoints'): - if cameraInitOutput.node.hasAttribute('input'): + if not cameraInitOutput.node.hasAttribute("viewpoints"): + if cameraInitOutput.node.hasAttribute("input"): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) - if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute('viewpoints'): + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute("viewpoints"): viewpoints = cameraInitOutput.node.viewpoints.value else: # No connected CameraInit node.nbBrackets.value = 0 return - # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) inputs = [] for viewpoint in viewpoints: jsonMetadata = viewpoint.metadata.value if not jsonMetadata: - # no metadata, we cannot found the number of brackets + # no metadata, we cannot find the number of brackets node.nbBrackets.value = 0 return d = json.loads(jsonMetadata) @@ -206,18 +204,30 @@ def update(cls, node): # We assume that there is no multi-bracketing, so nothing to do. node.nbBrackets.value = 1 return - inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) + inputs.append((viewpoint.path.value, (float(fnumber), float(shutterSpeed), float(iso)))) inputs.sort() exposureGroups = [] exposures = [] + prevFnumber = 0.0 + prevShutterSpeed = 0.0 + prevIso = 0.0 for path, exp in inputs: - if exposures and exp != exposures[-1] and exp == exposures[0]: + # A new group is created if the current image's exposure level is larger than the previous image's, or if there + # were any changes in the ISO or aperture value. + # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger + # than the previous one indicates the start of a new exposure group. + fnumber, shutterSpeed, iso = exp + if exposures: + prevFnumber, prevShutterSpeed, prevIso = exposures[-1] + if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso): exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) + exposureGroups.append(exposures) + exposures = None bracketSizes = set() if len(exposureGroups) == 1: @@ -232,8 +242,5 @@ def update(cls, node): bracketSizes.add(len(expGroup)) if len(bracketSizes) == 1: node.nbBrackets.value = bracketSizes.pop() - # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) else: node.nbBrackets.value = 0 - # logging.info("[LDRToHDR] Update end") - diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index b1c80ae558..7c78826cfe 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -260,33 +260,31 @@ def update(cls, node): if not isinstance(node.nodeDesc, cls): raise ValueError("Node {} is not an instance of type {}".format(node, cls)) # TODO: use Node version for this test - if 'userNbBrackets' not in node.getAttributes().keys(): + if "userNbBrackets" not in node.getAttributes().keys(): # Old version of the node return if node.userNbBrackets.value != 0: node.nbBrackets.value = node.userNbBrackets.value return - # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) cameraInitOutput = node.input.getLinkParam(recursive=True) if not cameraInitOutput: node.nbBrackets.value = 0 return - if not cameraInitOutput.node.hasAttribute('viewpoints'): - if cameraInitOutput.node.hasAttribute('input'): + if not cameraInitOutput.node.hasAttribute("viewpoints"): + if cameraInitOutput.node.hasAttribute("input"): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) - if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute('viewpoints'): + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute("viewpoints"): viewpoints = cameraInitOutput.node.viewpoints.value else: # No connected CameraInit node.nbBrackets.value = 0 return - # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) inputs = [] for viewpoint in viewpoints: jsonMetadata = viewpoint.metadata.value if not jsonMetadata: - # no metadata, we cannot found the number of brackets + # no metadata, we cannot find the number of brackets node.nbBrackets.value = 0 return d = json.loads(jsonMetadata) @@ -298,18 +296,30 @@ def update(cls, node): # We assume that there is no multi-bracketing, so nothing to do. node.nbBrackets.value = 1 return - inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) + inputs.append((viewpoint.path.value, (float(fnumber), float(shutterSpeed), float(iso)))) inputs.sort() exposureGroups = [] exposures = [] + prevFnumber = 0.0 + prevShutterSpeed = 0.0 + prevIso = 0.0 for path, exp in inputs: - if exposures and exp != exposures[-1] and exp == exposures[0]: + # A new group is created if the current image's exposure level is larger than the previous image's, or if there + # were any changes in the ISO or aperture value. + # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger + # than the previous one indicates the start of a new exposure group. + fnumber, shutterSpeed, iso = exp + if exposures: + prevFnumber, prevShutterSpeed, prevIso = exposures[-1] + if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso): exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) + exposureGroups.append(exposures) + exposures = None bracketSizes = set() if len(exposureGroups) == 1: @@ -324,8 +334,5 @@ def update(cls, node): bracketSizes.add(len(expGroup)) if len(bracketSizes) == 1: node.nbBrackets.value = bracketSizes.pop() - # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) else: node.nbBrackets.value = 0 - # logging.info("[LDRToHDR] Update end") - diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index ae2708e5db..cd4dc0feba 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -189,33 +189,31 @@ def update(cls, node): if not isinstance(node.nodeDesc, cls): raise ValueError("Node {} is not an instance of type {}".format(node, cls)) # TODO: use Node version for this test - if 'userNbBrackets' not in node.getAttributes().keys(): + if "userNbBrackets" not in node.getAttributes().keys(): # Old version of the node return if node.userNbBrackets.value != 0: node.nbBrackets.value = node.userNbBrackets.value return - # logging.info("[LDRToHDR] Update start: version:" + str(node.packageVersion)) cameraInitOutput = node.input.getLinkParam(recursive=True) if not cameraInitOutput: node.nbBrackets.value = 0 return - if not cameraInitOutput.node.hasAttribute('viewpoints'): - if cameraInitOutput.node.hasAttribute('input'): + if not cameraInitOutput.node.hasAttribute("viewpoints"): + if cameraInitOutput.node.hasAttribute("input"): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) - if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute('viewpoints'): + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute("viewpoints"): viewpoints = cameraInitOutput.node.viewpoints.value else: # No connected CameraInit node.nbBrackets.value = 0 return - # logging.info("[LDRToHDR] Update start: nb viewpoints:" + str(len(viewpoints))) inputs = [] for viewpoint in viewpoints: jsonMetadata = viewpoint.metadata.value if not jsonMetadata: - # no metadata, we cannot found the number of brackets + # no metadata, we cannot find the number of brackets node.nbBrackets.value = 0 return d = json.loads(jsonMetadata) @@ -227,18 +225,30 @@ def update(cls, node): # We assume that there is no multi-bracketing, so nothing to do. node.nbBrackets.value = 1 return - inputs.append((viewpoint.path.value, (fnumber, shutterSpeed, iso))) + inputs.append((viewpoint.path.value, (float(fnumber), float(shutterSpeed), float(iso)))) inputs.sort() exposureGroups = [] exposures = [] + prevFnumber = 0.0 + prevShutterSpeed = 0.0 + prevIso = 0.0 for path, exp in inputs: - if exposures and exp != exposures[-1] and exp == exposures[0]: + # A new group is created if the current image's exposure level is larger than the previous image's, or if there + # were any changes in the ISO or aperture value. + # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger + # than the previous one indicates the start of a new exposure group. + fnumber, shutterSpeed, iso = exp + if exposures: + prevFnumber, prevShutterSpeed, prevIso = exposures[-1] + if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso): exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) + exposureGroups.append(exposures) + exposures = None bracketSizes = set() if len(exposureGroups) == 1: @@ -253,8 +263,5 @@ def update(cls, node): bracketSizes.add(len(expGroup)) if len(bracketSizes) == 1: node.nbBrackets.value = bracketSizes.pop() - # logging.info("[LDRToHDR] nb bracket size:" + str(node.nbBrackets.value)) else: node.nbBrackets.value = 0 - # logging.info("[LDRToHDR] Update end") - From 7970936eff8a0a843c99079e25494733c62a700f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 10 Jul 2023 10:18:15 +0200 Subject: [PATCH 0850/1093] [pipelines] Panorama: Publish the panorama preview --- meshroom/panoramaFisheyeHdr.mg | 29 +++++++++++++++-------------- meshroom/panoramaHdr.mg | 29 +++++++++++++++-------------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 14969e67d7..12aec80f01 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,25 +1,25 @@ { "header": { "nodesVersions": { - "PanoramaCompositing": "2.0", "SfMTransform": "3.1", - "PanoramaPrepareImages": "1.1", - "FeatureExtraction": "1.2", - "Publish": "1.3", - "LdrToHdrMerge": "4.1", - "CameraInit": "9.0", - "FeatureMatching": "2.0", + "FeatureExtraction": "1.3", + "LdrToHdrSampling": "4.0", + "PanoramaPostProcessing": "1.0", "PanoramaMerging": "1.0", + "FeatureMatching": "2.0", + "Publish": "1.3", + "PanoramaPrepareImages": "1.1", + "PanoramaEstimation": "1.0", "PanoramaWarping": "1.1", - "LdrToHdrSampling": "4.0", + "PanoramaInit": "2.0", + "PanoramaCompositing": "2.0", "ImageMatching": "2.0", - "PanoramaPostProcessing": "1.0", - "PanoramaSeams": "2.0", "LdrToHdrCalibration": "3.0", - "PanoramaEstimation": "1.0", - "PanoramaInit": "2.0" + "PanoramaSeams": "2.0", + "CameraInit": "9.0", + "LdrToHdrMerge": "4.1" }, - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", "template": true }, @@ -241,7 +241,8 @@ ], "inputs": { "inputFiles": [ - "{PanoramaPostProcessing_1.outputPanorama}" + "{PanoramaPostProcessing_1.outputPanorama}", + "{PanoramaPostProcessing_1.outputPanoramaPreview}" ] } } diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index f858491d6f..923e435335 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,25 +1,25 @@ { "header": { "nodesVersions": { - "PanoramaCompositing": "2.0", "SfMTransform": "3.1", - "PanoramaPrepareImages": "1.1", - "FeatureExtraction": "1.2", - "Publish": "1.3", - "LdrToHdrMerge": "4.1", - "CameraInit": "9.0", - "FeatureMatching": "2.0", + "FeatureExtraction": "1.3", + "LdrToHdrSampling": "4.0", + "PanoramaPostProcessing": "1.0", "PanoramaMerging": "1.0", + "FeatureMatching": "2.0", + "Publish": "1.3", + "PanoramaPrepareImages": "1.1", + "PanoramaEstimation": "1.0", "PanoramaWarping": "1.1", - "LdrToHdrSampling": "4.0", + "PanoramaInit": "2.0", + "PanoramaCompositing": "2.0", "ImageMatching": "2.0", - "PanoramaPostProcessing": "1.0", - "PanoramaSeams": "2.0", "LdrToHdrCalibration": "3.0", - "PanoramaEstimation": "1.0", - "PanoramaInit": "2.0" + "PanoramaSeams": "2.0", + "CameraInit": "9.0", + "LdrToHdrMerge": "4.1" }, - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", "template": true }, @@ -235,7 +235,8 @@ ], "inputs": { "inputFiles": [ - "{PanoramaPostProcessing_1.outputPanorama}" + "{PanoramaPostProcessing_1.outputPanorama}", + "{PanoramaPostProcessing_1.outputPanoramaPreview}" ] } } From 04cf1e22ce3d2faebef8095b445d7c49c32f217c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 10 Jul 2023 17:00:02 +0200 Subject: [PATCH 0851/1093] [blender] preview: fix first chunk behaviour --- meshroom/blender/scripts/preview.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index ef32b337df..e9e7a2758e 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -23,11 +23,11 @@ def createParser(): help="sfmData with the animated camera.", ) parser.add_argument( - "--rangeStart", type=int, required=False, + "--rangeStart", type=int, required=False, default=-1, help="Range start for processing views. Set to -1 to process all views.", ) parser.add_argument( - "--rangeSize", type=int, required=False, + "--rangeSize", type=int, required=False, default=0, help="Range size for processing views.", ) parser.add_argument( @@ -321,8 +321,8 @@ def main(): setupPointCloudShading(sceneObj, color, args.particleSize) print("Retrieve range") - rangeStart = args.rangeStart if args.rangeStart else -1 - rangeSize = args.rangeSize if args.rangeSize else -1 + rangeStart = args.rangeStart + rangeSize = args.rangeSize if rangeStart != -1: if rangeStart < 0 or rangeSize < 0 or rangeStart > len(views): print("Invalid range") From 237d59deaa53d62b8b3ba187b996487efb423ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 10 Jul 2023 17:54:12 +0200 Subject: [PATCH 0852/1093] [nodes] ScenePreview: increase block size to 40 --- meshroom/blender/ScenePreview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index e002c2fc15..fb39467e5e 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -8,7 +8,7 @@ class ScenePreview(desc.CommandLineNode): commandLine = '{blenderCmdValue} -b --python {scriptValue} -- {allParams}' size = desc.DynamicNodeSize('cameras') - parallelization = desc.Parallelization(blockSize=10) + parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' category = 'Utils' From fbcc07f1f24da90df5b8bd56b11a05e64b984143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 10 Jul 2023 18:08:31 +0200 Subject: [PATCH 0853/1093] [nodes] ImageSegmentation: use ChoiceParam instead of ListAttribute for validClasses --- meshroom/aliceVision/ImageSegmentation.py | 38 ++++++++++------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 46aea78081..8912820b9a 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -32,29 +32,25 @@ class ImageSegmentation(desc.AVCommandLineNode): uid=[0] ), - desc.ListAttribute( - elementDesc=desc.ChoiceParam( - name="className", - label="Class Name", - description="Class name to be added to the mask.", - value="person", - values=[ - "__background__", - "aeroplane", - "bicycle", "bird", "boat", "bottle", "bus", - "car", "cat", "chair", "cow", - "diningtable", "dog", - "horse", - "motorbike", - "person", "pottedplant", - "sheep", "sofa", - "train", "tvmonitor" - ], - exclusive=True, - uid=[0]), + desc.ChoiceParam( name="validClasses", label="Classes", - description="Classes names which are to be considered." + description="Classes names which are to be considered.", + value=["person"], + values=[ + "__background__", + "aeroplane", + "bicycle", "bird", "boat", "bottle", "bus", + "car", "cat", "chair", "cow", + "diningtable", "dog", + "horse", + "motorbike", + "person", "pottedplant", + "sheep", "sofa", + "train", "tvmonitor" + ], + exclusive=False, + uid=[0], ), desc.ChoiceParam( From 7a6477498e8cf40c3b7fca26c83a7e61062eff7d Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 9 Mar 2023 15:12:43 +0100 Subject: [PATCH 0854/1093] [panoramaEstimation] add max angle to prior --- meshroom/aliceVision/PanoramaEstimation.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index fb1de15af8..3392b4d9bc 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -131,18 +131,27 @@ class PanoramaEstimation(desc.AVCommandLineNode): uid=[0], ), desc.FloatParam( - name="maxAngleToPrior", - label="Max Angle To Priors", - description="Maximum angle allowed regarding the input prior (in degrees).", + name='maxAngleToPrior', + label='Max Angle To Priors (deg.)', + description='''Maximal angle allowed regarding the input prior (in degrees) before refinement.''', value=20.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name="maxAngularError", - label="Max Angular Error", - description="Maximum angular error in global rotation averging (in degrees).", + name='maxAngleToPriorRefined', + label='Max Refined Angle To Priors (deg.)', + description='''Maximal angle allowed regarding the input prior (in degrees) after refinement.''', + value=2.0, + range=(0.0, 360.0, 1.0), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name='maxAngularError', + label='Max Angular Error (deg.)', + description='''Maximal angular error in global rotation averging (in degrees).''', value=100.0, range=(0.0, 360.0, 1.0), uid=[0], From 2c3692428f47d7ea72d06cb8c2cd4b12face47c8 Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <fabien.servant@technicolor.com> Date: Thu, 13 Jul 2023 15:04:56 +0200 Subject: [PATCH 0855/1093] tolerant bracket size selection --- meshroom/aliceVision/LdrToHdrCalibration.py | 19 ++++++++++++++----- meshroom/aliceVision/LdrToHdrMerge.py | 19 ++++++++++++++----- meshroom/aliceVision/LdrToHdrSampling.py | 19 ++++++++++++++----- 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 4ce2f77867..aa61b1f1ac 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,6 +1,7 @@ __version__ = "3.0" import json +from collections import Counter from meshroom.core import desc @@ -229,7 +230,7 @@ def update(cls, node): exposureGroups.append(exposures) exposures = None - bracketSizes = set() + bracketSizes = Counter() if len(exposureGroups) == 1: if len(set(exposureGroups[0])) == 1: # Single exposure and multiple views @@ -239,8 +240,16 @@ def update(cls, node): node.nbBrackets.value = len(exposureGroups[0]) else: for expGroup in exposureGroups: - bracketSizes.add(len(expGroup)) - if len(bracketSizes) == 1: - node.nbBrackets.value = bracketSizes.pop() - else: + bracketSizes[len(expGroup)] += 1 + + if len(bracketSizes) == 0: node.nbBrackets.value = 0 + else: + bestTuple = bracketSizes.most_common(1)[0] + bestBracketSize = bestTuple[0] + bestCount = bestTuple[1] + total = bestBracketSize * bestCount + if len(inputs) - total < 2: + node.nbBrackets.value = bestBracketSize + else: + node.nbBrackets.value = 0 diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 7c78826cfe..ddd53ff121 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,6 +1,7 @@ __version__ = "4.1" import json +from collections import Counter from meshroom.core import desc @@ -321,7 +322,7 @@ def update(cls, node): exposureGroups.append(exposures) exposures = None - bracketSizes = set() + bracketSizes = Counter() if len(exposureGroups) == 1: if len(set(exposureGroups[0])) == 1: # Single exposure and multiple views @@ -331,8 +332,16 @@ def update(cls, node): node.nbBrackets.value = len(exposureGroups[0]) else: for expGroup in exposureGroups: - bracketSizes.add(len(expGroup)) - if len(bracketSizes) == 1: - node.nbBrackets.value = bracketSizes.pop() - else: + bracketSizes[len(expGroup)] += 1 + + if len(bracketSizes) == 0: node.nbBrackets.value = 0 + else: + bestTuple = bracketSizes.most_common(1)[0] + bestBracketSize = bestTuple[0] + bestCount = bestTuple[1] + total = bestBracketSize * bestCount + if len(inputs) - total < 2: + node.nbBrackets.value = bestBracketSize + else: + node.nbBrackets.value = 0 diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index cd4dc0feba..06388fd76a 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,6 +1,7 @@ __version__ = "4.0" import json +from collections import Counter from meshroom.core import desc @@ -250,7 +251,7 @@ def update(cls, node): exposureGroups.append(exposures) exposures = None - bracketSizes = set() + bracketSizes = Counter() if len(exposureGroups) == 1: if len(set(exposureGroups[0])) == 1: # Single exposure and multiple views @@ -260,8 +261,16 @@ def update(cls, node): node.nbBrackets.value = len(exposureGroups[0]) else: for expGroup in exposureGroups: - bracketSizes.add(len(expGroup)) - if len(bracketSizes) == 1: - node.nbBrackets.value = bracketSizes.pop() - else: + bracketSizes[len(expGroup)] += 1 + + if len(bracketSizes) == 0: node.nbBrackets.value = 0 + else: + bestTuple = bracketSizes.most_common(1)[0] + bestBracketSize = bestTuple[0] + bestCount = bestTuple[1] + total = bestBracketSize * bestCount + if len(inputs) - total < 2: + node.nbBrackets.value = bestBracketSize + else: + node.nbBrackets.value = 0 From 9b702c1a24f06e9eb0bc1440f7a7c47ecfa54b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 13 Jul 2023 17:19:36 +0200 Subject: [PATCH 0856/1093] [nodes] PanoramaEstimation: Use double-quotes instead of single ones --- meshroom/aliceVision/PanoramaEstimation.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 3392b4d9bc..be142378ff 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -131,27 +131,27 @@ class PanoramaEstimation(desc.AVCommandLineNode): uid=[0], ), desc.FloatParam( - name='maxAngleToPrior', - label='Max Angle To Priors (deg.)', - description='''Maximal angle allowed regarding the input prior (in degrees) before refinement.''', + name="maxAngleToPrior", + label="Max Angle To Priors (deg.)", + description="Maximum angle allowed regarding the input prior (in degrees) before refinement.", value=20.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='maxAngleToPriorRefined', - label='Max Refined Angle To Priors (deg.)', - description='''Maximal angle allowed regarding the input prior (in degrees) after refinement.''', + name="maxAngleToPriorRefined", + label="Max Refined Angle To Priors (deg.)", + description="Maximum angle allowed regarding the input prior (in degrees) after refinement.", value=2.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='maxAngularError', - label='Max Angular Error (deg.)', - description='''Maximal angular error in global rotation averging (in degrees).''', + name="maxAngularError", + label="Max Angular Error (deg.)", + description="Maximum angular error in global rotation averging (in degrees).", value=100.0, range=(0.0, 360.0, 1.0), uid=[0], From d42f956b054558ba2bd1703bba653f8111764440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 6 Jul 2023 10:42:23 +0200 Subject: [PATCH 0857/1093] [pipelines] Add colors for CameraTracking and Photog+CamTrack templates --- meshroom/cameraTracking.mg | 120 ++++++++++++++---- meshroom/photogrammetryAndCameraTracking.mg | 129 ++++++++++++++++---- 2 files changed, 199 insertions(+), 50 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 12c996016b..97ffcbcadb 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,34 +1,34 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { - "DepthMapFilter": "3.0", "DepthMap": "4.0", + "PrepareDenseScene": "3.0", + "Publish": "1.3", "KeyframeSelection": "4.1", - "Meshing": "7.0", - "DistortionCalibration": "3.0", + "SfMTransfer": "2.1", + "ApplyCalibration": "1.0", + "ImageMatchingMultiSfM": "1.0", + "DepthMapFilter": "3.0", + "Texturing": "6.0", + "ImageMatching": "2.0", + "MeshFiltering": "3.0", + "FeatureMatching": "2.0", "ScenePreview": "1.0", + "SfMTriangulation": "1.0", "CheckerboardDetection": "1.0", - "FeatureExtraction": "1.2", - "FeatureMatching": "2.0", + "ConvertSfMFormat": "2.0", "CameraInit": "9.0", - "Texturing": "6.0", - "Publish": "1.3", "StructureFromMotion": "3.1", - "ConvertSfMFormat": "2.0", - "SfMTriangulation": "1.0", "MeshDecimate": "1.0", - "ApplyCalibration": "1.0", - "MeshFiltering": "3.0", - "ImageMatching": "2.0", - "ImageMatchingMultiSfM": "1.0", "ExportAnimatedCamera": "2.0", - "SfMTransfer": "2.1", - "PrepareDenseScene": "3.0", - "ExportDistortion": "1.0" + "DistortionCalibration": "3.0", + "Meshing": "7.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3" } }, "graph": { @@ -38,7 +38,10 @@ -200, 0 ], - "inputs": {} + "inputs": {}, + "internalInputs": { + "color": "#575963" + } }, "DepthMapFilter_1": { "nodeType": "DepthMapFilter", @@ -49,6 +52,9 @@ "inputs": { "input": "{DepthMap_1.input}", "depthMapsFolder": "{DepthMap_1.output}" + }, + "internalInputs": { + "color": "#3f3138" } }, "DepthMap_1": { @@ -60,6 +66,9 @@ "inputs": { "input": "{PrepareDenseScene_1.input}", "imagesFolder": "{PrepareDenseScene_1.output}" + }, + "internalInputs": { + "color": "#3f3138" } }, "FeatureExtraction_1": { @@ -70,6 +79,9 @@ ], "inputs": { "input": "{ApplyCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" } }, "FeatureMatching_1": { @@ -85,7 +97,8 @@ "describerTypes": "{FeatureExtraction_1.describerTypes}" }, "internalInputs": { - "label": "FeatureMatchingKeyframes" + "label": "FeatureMatchingKeyframes", + "color": "#575963" } }, "ImageMatchingMultiSfM_1": { @@ -103,6 +116,9 @@ "method": "VocabularyTree", "matchingMode": "a/b", "nbMatches": 20 + }, + "internalInputs": { + "color": "#80766f" } }, "ImageMatching_1": { @@ -119,7 +135,8 @@ "method": "Exhaustive" }, "internalInputs": { - "label": "ImageMatchingKeyframes" + "label": "ImageMatchingKeyframes", + "color": "#575963" } }, "KeyframeSelection_1": { @@ -132,6 +149,9 @@ "inputPaths": [ "{ApplyCalibration_1.output}" ] + }, + "internalInputs": { + "color": "#575963" } }, "MeshDecimate_1": { @@ -143,6 +163,9 @@ "inputs": { "input": "{MeshFiltering_1.outputMesh}", "simplificationFactor": 0.05 + }, + "internalInputs": { + "color": "#3f3138" } }, "MeshFiltering_1": { @@ -154,6 +177,9 @@ "inputs": { "inputMesh": "{Meshing_1.outputMesh}", "filterLargeTrianglesFactor": 10.0 + }, + "internalInputs": { + "color": "#3f3138" } }, "PrepareDenseScene_1": { @@ -164,6 +190,9 @@ ], "inputs": { "input": "{SfMTriangulation_1.output}" + }, + "internalInputs": { + "color": "#3f3138" } }, "SfMTransfer_1": { @@ -178,7 +207,8 @@ "transferLandmarks": false }, "internalInputs": { - "comment": "Transfer pose from final camera tracking into the keyframes-only scene." + "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", + "color": "#3f3138" } }, "SfMTriangulation_1": { @@ -191,6 +221,9 @@ "input": "{SfMTransfer_1.output}", "featuresFolders": "{StructureFromMotion_2.featuresFolders}", "matchesFolders": "{StructureFromMotion_2.matchesFolders}" + }, + "internalInputs": { + "color": "#3f3138" } }, "Texturing_1": { @@ -203,6 +236,9 @@ "input": "{Meshing_1.output}", "imagesFolder": "{PrepareDenseScene_1.output}", "inputMesh": "{MeshDecimate_1.output}" + }, + "internalInputs": { + "color": "#3f3138" } }, "Publish_1": { @@ -229,6 +265,9 @@ "inputs": { "input": "{StructureFromMotion_1.output}", "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" } }, "Meshing_1": { @@ -244,6 +283,9 @@ "minStep": 1, "fullWeight": 10.0, "saveRawDensePointCloud": true + }, + "internalInputs": { + "color": "#3f3138" } }, "CheckerboardDetection_1": { @@ -256,6 +298,9 @@ "input": "{CameraInit_2.output}", "useNestedGrids": true, "exportDebugImages": true + }, + "internalInputs": { + "color": "#302e2e" } }, "DistortionCalibration_1": { @@ -267,6 +312,9 @@ "inputs": { "input": "{CheckerboardDetection_1.input}", "checkerboards": "{CheckerboardDetection_1.output}" + }, + "internalInputs": { + "color": "#302e2e" } }, "ExportDistortion_1": { @@ -277,6 +325,9 @@ ], "inputs": { "input": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#302e2e" } }, "ApplyCalibration_1": { @@ -288,6 +339,9 @@ "inputs": { "input": "{CameraInit_1.output}", "calibration": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" } }, "ScenePreview_1": { @@ -300,6 +354,9 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" + }, + "internalInputs": { + "color": "#4c594c" } }, "ConvertSfMFormat_1": { @@ -314,6 +371,9 @@ "describerTypes": "{StructureFromMotion_1.describerTypes}", "structure": false, "observations": false + }, + "internalInputs": { + "color": "#4c594c" } }, "StructureFromMotion_1": { @@ -339,7 +399,8 @@ "minAngleForLandmark": 0.5 }, "internalInputs": { - "comment": "Estimate cameras parameters for the complete camera tracking sequence." + "comment": "Estimate cameras parameters for the complete camera tracking sequence.", + "color": "#80766f" } }, "StructureFromMotion_2": { @@ -358,7 +419,8 @@ }, "internalInputs": { "comment": "Solve all keyframes first.", - "label": "StructureFromMotionKeyframes" + "label": "StructureFromMotionKeyframes", + "color": "#575963" } }, "FeatureMatching_2": { @@ -373,7 +435,8 @@ "imagePairsList": "{ImageMatching_2.output}" }, "internalInputs": { - "label": "FeatureMatchingAllFrames" + "label": "FeatureMatchingAllFrames", + "color": "#80766f" } }, "ImageMatching_2": { @@ -389,6 +452,9 @@ ], "method": "Sequential", "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" } }, "CameraInit_2": { @@ -399,7 +465,8 @@ ], "inputs": {}, "internalInputs": { - "label": "CameraInitLensGrid" + "label": "CameraInitLensGrid", + "color": "#302e2e" } }, "FeatureMatching_3": { @@ -415,7 +482,8 @@ "describerTypes": "{FeatureExtraction_1.describerTypes}" }, "internalInputs": { - "label": "FeatureMatchingFramesToKeyframes" + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" } } } diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 301a37b46c..4fee741f4b 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,32 +1,32 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { + "FeatureMatching": "2.0", + "ConvertSfMFormat": "2.0", + "PrepareDenseScene": "3.0", "Meshing": "7.0", "KeyframeSelection": "4.1", + "FeatureExtraction": "1.3", + "MeshFiltering": "3.0", + "DepthMap": "4.0", + "ImageMatching": "2.0", "DistortionCalibration": "3.0", - "ScenePreview": "1.0", + "Texturing": "6.0", "DepthMapFilter": "3.0", - "DepthMap": "4.0", - "CheckerboardDetection": "1.0", - "FeatureExtraction": "1.2", "CameraInit": "9.0", - "FeatureMatching": "2.0", - "Texturing": "6.0", - "Publish": "1.3", + "ScenePreview": "1.0", "StructureFromMotion": "3.1", - "ConvertSfMFormat": "2.0", - "MeshDecimate": "1.0", + "ExportDistortion": "1.0", "ApplyCalibration": "1.0", - "MeshFiltering": "3.0", - "ImageMatching": "2.0", - "ImageMatchingMultiSfM": "1.0", + "Publish": "1.3", "ExportAnimatedCamera": "2.0", - "PrepareDenseScene": "3.0", - "ExportDistortion": "1.0" + "MeshDecimate": "1.0", + "ImageMatchingMultiSfM": "1.0", + "CheckerboardDetection": "1.0" } }, "graph": { @@ -38,7 +38,8 @@ ], "inputs": {}, "internalInputs": { - "label": "InitShot" + "label": "InitShot", + "color": "#575963" } }, "FeatureExtraction_1": { @@ -49,6 +50,9 @@ ], "inputs": { "input": "{ApplyCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" } }, "FeatureMatching_1": { @@ -64,7 +68,8 @@ "describerTypes": "{FeatureExtraction_1.describerTypes}" }, "internalInputs": { - "label": "FeatureMatchingKeyframes" + "label": "FeatureMatchingKeyframes", + "color": "#575963" } }, "ImageMatchingMultiSfM_1": { @@ -82,6 +87,9 @@ "method": "VocabularyTree", "matchingMode": "a/b", "nbMatches": 20 + }, + "internalInputs": { + "color": "#80766f" } }, "ImageMatching_1": { @@ -98,7 +106,8 @@ "method": "Exhaustive" }, "internalInputs": { - "label": "ImageMatchingKeyframes" + "label": "ImageMatchingKeyframes", + "color": "#575963" } }, "KeyframeSelection_1": { @@ -111,6 +120,9 @@ "inputPaths": [ "{ApplyCalibration_1.output}" ] + }, + "internalInputs": { + "color": "#575963" } }, "MeshDecimate_1": { @@ -122,6 +134,9 @@ "inputs": { "input": "{MeshFiltering_2.outputMesh}", "simplificationFactor": 0.05 + }, + "internalInputs": { + "color": "#4c594c" } }, "Publish_1": { @@ -149,6 +164,9 @@ "input": "{StructureFromMotion_1.output}", "sfmDataFilter": "{ImageMatchingMultiSfM_2.inputB}", "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" } }, "CheckerboardDetection_1": { @@ -161,6 +179,9 @@ "input": "{CameraInit_2.output}", "useNestedGrids": true, "exportDebugImages": true + }, + "internalInputs": { + "color": "#302e2e" } }, "DistortionCalibration_1": { @@ -172,6 +193,9 @@ "inputs": { "input": "{CheckerboardDetection_1.input}", "checkerboards": "{CheckerboardDetection_1.output}" + }, + "internalInputs": { + "color": "#302e2e" } }, "ExportDistortion_1": { @@ -182,6 +206,9 @@ ], "inputs": { "input": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#302e2e" } }, "ApplyCalibration_1": { @@ -193,6 +220,9 @@ "inputs": { "input": "{CameraInit_1.output}", "calibration": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" } }, "ScenePreview_1": { @@ -205,6 +235,9 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" + }, + "internalInputs": { + "color": "#4c594c" } }, "ConvertSfMFormat_1": { @@ -219,6 +252,9 @@ "describerTypes": "{StructureFromMotion_1.describerTypes}", "structure": false, "observations": false + }, + "internalInputs": { + "color": "#4c594c" } }, "StructureFromMotion_1": { @@ -244,7 +280,8 @@ "minAngleForLandmark": 0.5 }, "internalInputs": { - "comment": "Estimate cameras parameters for the complete camera tracking sequence." + "comment": "Estimate cameras parameters for the complete camera tracking sequence.", + "color": "#80766f" } }, "StructureFromMotion_2": { @@ -265,7 +302,8 @@ }, "internalInputs": { "comment": "Solve all keyframes first.", - "label": "StructureFromMotionKeyframes" + "label": "StructureFromMotionKeyframes", + "color": "#575963" } }, "FeatureMatching_2": { @@ -280,7 +318,8 @@ "imagePairsList": "{ImageMatching_2.output}" }, "internalInputs": { - "label": "FeatureMatchingAllFrames" + "label": "FeatureMatchingAllFrames", + "color": "#80766f" } }, "ImageMatching_2": { @@ -296,6 +335,9 @@ ], "method": "Sequential", "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" } }, "CameraInit_2": { @@ -306,7 +348,8 @@ ], "inputs": {}, "internalInputs": { - "label": "InitLensGrid" + "label": "InitLensGrid", + "color": "#302e2e" } }, "Texturing_2": { @@ -319,6 +362,9 @@ "input": "{Meshing_2.output}", "imagesFolder": "{DepthMap_2.imagesFolder}", "inputMesh": "{MeshFiltering_2.outputMesh}" + }, + "internalInputs": { + "color": "#384a55" } }, "Meshing_2": { @@ -330,6 +376,9 @@ "inputs": { "input": "{DepthMapFilter_2.input}", "depthMapsFolder": "{DepthMapFilter_2.output}" + }, + "internalInputs": { + "color": "#384a55" } }, "DepthMapFilter_2": { @@ -341,6 +390,9 @@ "inputs": { "input": "{DepthMap_2.input}", "depthMapsFolder": "{DepthMap_2.output}" + }, + "internalInputs": { + "color": "#384a55" } }, "FeatureExtraction_2": { @@ -351,6 +403,9 @@ ], "inputs": { "input": "{CameraInit_3.output}" + }, + "internalInputs": { + "color": "#384a55" } }, "PrepareDenseScene_2": { @@ -361,6 +416,9 @@ ], "inputs": { "input": "{StructureFromMotion_3.output}" + }, + "internalInputs": { + "color": "#384a55" } }, "DepthMap_2": { @@ -372,6 +430,9 @@ "inputs": { "input": "{PrepareDenseScene_2.input}", "imagesFolder": "{PrepareDenseScene_2.output}" + }, + "internalInputs": { + "color": "#384a55" } }, "MeshFiltering_2": { @@ -382,6 +443,9 @@ ], "inputs": { "inputMesh": "{Meshing_2.outputMesh}" + }, + "internalInputs": { + "color": "#384a55" } }, "ImageMatchingMultiSfM_2": { @@ -398,6 +462,9 @@ ], "method": "VocabularyTree", "matchingMode": "a/b" + }, + "internalInputs": { + "color": "#575963" } }, "FeatureMatching_3": { @@ -413,7 +480,8 @@ "describerTypes": "{FeatureExtraction_1.describerTypes}" }, "internalInputs": { - "label": "FeatureMatchingFramesToKeyframes" + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" } }, "ImageMatching_3": { @@ -427,6 +495,9 @@ "featuresFolders": [ "{FeatureExtraction_2.output}" ] + }, + "internalInputs": { + "color": "#384a55" } }, "StructureFromMotion_3": { @@ -442,6 +513,9 @@ "{FeatureMatching_4.output}" ], "describerTypes": "{FeatureMatching_4.describerTypes}" + }, + "internalInputs": { + "color": "#384a55" } }, "CameraInit_3": { @@ -452,7 +526,8 @@ ], "inputs": {}, "internalInputs": { - "label": "InitPhotogrammetry" + "label": "InitPhotogrammetry", + "color": "#384a55" } }, "FeatureMatching_4": { @@ -466,6 +541,9 @@ "featuresFolders": "{ImageMatching_3.featuresFolders}", "imagePairsList": "{ImageMatching_3.output}", "describerTypes": "{FeatureExtraction_2.describerTypes}" + }, + "internalInputs": { + "color": "#384a55" } }, "FeatureMatching_5": { @@ -479,6 +557,9 @@ "featuresFolders": "{ImageMatchingMultiSfM_2.featuresFolders}", "imagePairsList": "{ImageMatchingMultiSfM_2.output}", "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "color": "#575963" } } } From 2eb0645a3dd4d201166b39b2cc88061bc9374f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 17 Jul 2023 16:45:21 +0200 Subject: [PATCH 0858/1093] [nodes] HDR Fusion: Detect new exposure groups when inputs' paths change In addition to comparing the exposure levels of the sorted input images to determine whether a new exposure group must be created, this commit adds a detection based on the path of the image: if the directory containing the current image is not the same as the one of the previous image, then we assume the dataset is different, and there is no point in comparing the current image's exposure level with the previous one's. Instead, we directly create a new exposure group. In cases where images from different datasets have very similar exposure levels, this prevents having outliers identified as being part of the current exposure group. --- meshroom/aliceVision/LdrToHdrCalibration.py | 21 +++++++++++++++++---- meshroom/aliceVision/LdrToHdrMerge.py | 21 +++++++++++++++++---- meshroom/aliceVision/LdrToHdrSampling.py | 21 +++++++++++++++++---- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index aa61b1f1ac..ef5a6c55f1 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,6 +1,7 @@ __version__ = "3.0" import json +import os from collections import Counter from meshroom.core import desc @@ -213,20 +214,32 @@ def update(cls, node): prevFnumber = 0.0 prevShutterSpeed = 0.0 prevIso = 0.0 + prevPath = None # Stores the dirname of the previous parsed image + newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) for path, exp in inputs: - # A new group is created if the current image's exposure level is larger than the previous image's, or if there - # were any changes in the ISO or aperture value. + # If the dirname of the previous image and the dirname of the current image do not match, this means that the + # dataset that is being parsed has changed. A new group needs to be created but will fail to be detected in the + # next "if" statement if the new dataset's exposure levels are different. Setting "newGroup" to True prevents this + # from happening. + if prevPath is not None and prevPath != os.path.dirname(path): + newGroup = True + + # A new group is created if the current image's exposure level is larger than the previous image's, if there + # were any changes in the ISO or aperture value, or if a new dataset has been detected with the path. # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger # than the previous one indicates the start of a new exposure group. fnumber, shutterSpeed, iso = exp if exposures: prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso): + if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso) or newGroup: exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) + prevPath = os.path.dirname(path) + newGroup = False + exposureGroups.append(exposures) exposures = None @@ -249,7 +262,7 @@ def update(cls, node): bestBracketSize = bestTuple[0] bestCount = bestTuple[1] total = bestBracketSize * bestCount - if len(inputs) - total < 2: + if total >= len(inputs) - 2: node.nbBrackets.value = bestBracketSize else: node.nbBrackets.value = 0 diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index ddd53ff121..b86d46b9c1 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,6 +1,7 @@ __version__ = "4.1" import json +import os from collections import Counter from meshroom.core import desc @@ -305,20 +306,32 @@ def update(cls, node): prevFnumber = 0.0 prevShutterSpeed = 0.0 prevIso = 0.0 + prevPath = None # Stores the dirname of the previous parsed image + newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) for path, exp in inputs: - # A new group is created if the current image's exposure level is larger than the previous image's, or if there - # were any changes in the ISO or aperture value. + # If the dirname of the previous image and the dirname of the current image do not match, this means that the + # dataset that is being parsed has changed. A new group needs to be created but will fail to be detected in the + # next "if" statement if the new dataset's exposure levels are different. Setting "newGroup" to True prevents this + # from happening. + if prevPath is not None and prevPath != os.path.dirname(path): + newGroup = True + + # A new group is created if the current image's exposure level is larger than the previous image's, if there + # were any changes in the ISO or aperture value, or if a new dataset has been detected with the path. # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger # than the previous one indicates the start of a new exposure group. fnumber, shutterSpeed, iso = exp if exposures: prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso): + if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso) or newGroup: exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) + prevPath = os.path.dirname(path) + newGroup = False + exposureGroups.append(exposures) exposures = None @@ -341,7 +354,7 @@ def update(cls, node): bestBracketSize = bestTuple[0] bestCount = bestTuple[1] total = bestBracketSize * bestCount - if len(inputs) - total < 2: + if total >= len(inputs) - 2: node.nbBrackets.value = bestBracketSize else: node.nbBrackets.value = 0 diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 06388fd76a..443e93a9db 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,6 +1,7 @@ __version__ = "4.0" import json +import os from collections import Counter from meshroom.core import desc @@ -234,20 +235,32 @@ def update(cls, node): prevFnumber = 0.0 prevShutterSpeed = 0.0 prevIso = 0.0 + prevPath = None # Stores the dirname of the previous parsed image + newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) for path, exp in inputs: - # A new group is created if the current image's exposure level is larger than the previous image's, or if there - # were any changes in the ISO or aperture value. + # If the dirname of the previous image and the dirname of the current image do not match, this means that the + # dataset that is being parsed has changed. A new group needs to be created but will fail to be detected in the + # next "if" statement if the new dataset's exposure levels are different. Setting "newGroup" to True prevents this + # from happening. + if prevPath is not None and prevPath != os.path.dirname(path): + newGroup = True + + # A new group is created if the current image's exposure level is larger than the previous image's, if there + # were any changes in the ISO or aperture value, or if a new dataset has been detected with the path. # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger # than the previous one indicates the start of a new exposure group. fnumber, shutterSpeed, iso = exp if exposures: prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso): + if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso) or newGroup: exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) + prevPath = os.path.dirname(path) + newGroup = False + exposureGroups.append(exposures) exposures = None @@ -270,7 +283,7 @@ def update(cls, node): bestBracketSize = bestTuple[0] bestCount = bestTuple[1] total = bestBracketSize * bestCount - if len(inputs) - total < 2: + if total >= len(inputs) - 2: node.nbBrackets.value = bestBracketSize else: node.nbBrackets.value = 0 From 1ac909434c7bc3e4c1f60663d76dcb425749bb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 18 Jul 2023 17:53:06 +0200 Subject: [PATCH 0859/1093] [nodes] HDR Fusion: Don't send `nbBrackets` param for automatic detections Reset the command line at every iteration to ensure that there is no "--nbBrackets" leftovers when we are switching between the automatic bracket detection and the manually specified brackets number. --- meshroom/aliceVision/LdrToHdrCalibration.py | 7 +++++++ meshroom/aliceVision/LdrToHdrMerge.py | 10 ++++++++++ meshroom/aliceVision/LdrToHdrSampling.py | 7 +++++++ 3 files changed, 24 insertions(+) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index ef5a6c55f1..5093d4fdb2 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -69,6 +69,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): value=0, range=(0, 10, 1), uid=[0], + group="bracketsParams" ), desc.BoolParam( name="byPass", @@ -163,6 +164,12 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): def processChunk(self, chunk): if chunk.node.nbBrackets.value == 1: return + # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. + # Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic + # or if it was hard-set by the user. + self.commandLine = "aliceVision_LdrToHdrCalibration {allParams}" + if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value: + self.commandLine += "{bracketsParams}" super(LdrToHdrCalibration, self).processChunk(chunk) @classmethod diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index b86d46b9c1..1cae31c6bf 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -68,6 +68,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=0, range=(0, 10, 1), uid=[0], + group="bracketsParams" ), desc.BoolParam( name="offsetRefBracketIndexEnabled", @@ -358,3 +359,12 @@ def update(cls, node): node.nbBrackets.value = bestBracketSize else: node.nbBrackets.value = 0 + + def processChunk(self, chunk): + # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. + # Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic + # or if it was hard-set by the user. + self.commandLine = "aliceVision_LdrToHdrMerge {allParams}" + if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value: + self.commandLine += "{bracketsParams}" + super(LdrToHdrMerge, self).processChunk(chunk) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 443e93a9db..fb62a6ef0d 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -79,6 +79,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): value=0, range=(0, 10, 1), uid=[0], + group="bracketsParams" ), desc.BoolParam( name="byPass", @@ -184,6 +185,12 @@ class LdrToHdrSampling(desc.AVCommandLineNode): def processChunk(self, chunk): if chunk.node.nbBrackets.value == 1: return + # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. + # Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic + # or if it was hard-set by the user. + self.commandLine = "aliceVision_LdrToHdrSampling {allParams}" + if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value: + self.commandLine += "{bracketsParams}" super(LdrToHdrSampling, self).processChunk(chunk) @classmethod From 40a269a9fc5a023a1ab5eea3869c17743938ac27 Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <fabien.servant@technicolor.com> Date: Wed, 19 Jul 2023 10:09:42 +0200 Subject: [PATCH 0860/1093] remove limits on brackets detection --- meshroom/aliceVision/LdrToHdrCalibration.py | 7 +------ meshroom/aliceVision/LdrToHdrMerge.py | 7 +------ meshroom/aliceVision/LdrToHdrSampling.py | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 5093d4fdb2..f6f78840d4 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -267,9 +267,4 @@ def update(cls, node): else: bestTuple = bracketSizes.most_common(1)[0] bestBracketSize = bestTuple[0] - bestCount = bestTuple[1] - total = bestBracketSize * bestCount - if total >= len(inputs) - 2: - node.nbBrackets.value = bestBracketSize - else: - node.nbBrackets.value = 0 + node.nbBrackets.value = bestBracketSize diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 1cae31c6bf..ad55ac2ce3 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -353,12 +353,7 @@ def update(cls, node): else: bestTuple = bracketSizes.most_common(1)[0] bestBracketSize = bestTuple[0] - bestCount = bestTuple[1] - total = bestBracketSize * bestCount - if total >= len(inputs) - 2: - node.nbBrackets.value = bestBracketSize - else: - node.nbBrackets.value = 0 + node.nbBrackets.value = bestBracketSize def processChunk(self, chunk): # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index fb62a6ef0d..b5b491dad2 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -288,9 +288,4 @@ def update(cls, node): else: bestTuple = bracketSizes.most_common(1)[0] bestBracketSize = bestTuple[0] - bestCount = bestTuple[1] - total = bestBracketSize * bestCount - if total >= len(inputs) - 2: - node.nbBrackets.value = bestBracketSize - else: - node.nbBrackets.value = 0 + node.nbBrackets.value = bestBracketSize From 30e33b3807f80d6e7b762a36b8268b6192140add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 19 Jul 2023 16:59:08 +0200 Subject: [PATCH 0861/1093] [nodes] LdrToHdrSampling: Exclude outliers from size computation Outliers are now supported for the HDR fusion nodes and are excluded from the computations as soon as they have been detected. However, the chunks' size computation still includes them, as it simply uses the number of detected brackets and the total number of input images. With this commit, the detected outliers are excluded from the chunks' size computation, thus preventing any error that might occur because there are too many chunks compared to the number of images that actually need to be processed. --- meshroom/aliceVision/LdrToHdrSampling.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index b5b491dad2..ca289397ca 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -39,7 +39,9 @@ def computeSize(self, node): divParam = node.attribute(self._divParam) if divParam.value == 0: return s - return s / divParam.value + # s is the total number of inputs and may include outliers, that will not be used + # during computations and should thus be excluded from the size computation + return (s - node.outliersNb) / divParam.value class LdrToHdrSampling(desc.AVCommandLineNode): @@ -53,6 +55,8 @@ class LdrToHdrSampling(desc.AVCommandLineNode): Sample pixels from Low range images for HDR creation. ''' + outliersNb = 0 # Number of detected outliers among the input images + inputs = [ desc.File( name="input", @@ -201,6 +205,7 @@ def update(cls, node): if "userNbBrackets" not in node.getAttributes().keys(): # Old version of the node return + node.outliersNb = 0 # Reset the number of detected outliers if node.userNbBrackets.value != 0: node.nbBrackets.value = node.userNbBrackets.value return @@ -288,4 +293,6 @@ def update(cls, node): else: bestTuple = bracketSizes.most_common(1)[0] bestBracketSize = bestTuple[0] + bestCount = bestTuple[1] + node.outliersNb = len(inputs) - (bestBracketSize * bestCount) # Compute number of outliers node.nbBrackets.value = bestBracketSize From 16c3f16a0f1759b90e07abada39fcab084a5a207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 20 Jul 2023 11:44:57 +0200 Subject: [PATCH 0862/1093] [nodes] HDR Fusion: Select group with largest bracket number in case of equality If there are several groups with different bracket numbers but identical counts (e.g. 3 groups with 7 brackets, and 3 groups with 3 brackets), select the groups with the largest bracket number (e.g. groups with 7 brackets instead of 3). --- meshroom/aliceVision/LdrToHdrCalibration.py | 9 ++++++++- meshroom/aliceVision/LdrToHdrMerge.py | 9 ++++++++- meshroom/aliceVision/LdrToHdrSampling.py | 8 +++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index f6f78840d4..5dbd7530db 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -265,6 +265,13 @@ def update(cls, node): if len(bracketSizes) == 0: node.nbBrackets.value = 0 else: - bestTuple = bracketSizes.most_common(1)[0] + bestTuple = None + for tuple in bracketSizes.most_common(): + if bestTuple is None or tuple[1] > bestTuple[1]: + bestTuple = tuple + elif tuple[1] == bestTuple[1]: + bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple + bestBracketSize = bestTuple[0] + bestCount = bestTuple[1] node.nbBrackets.value = bestBracketSize diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index ad55ac2ce3..62dbc43417 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -351,8 +351,15 @@ def update(cls, node): if len(bracketSizes) == 0: node.nbBrackets.value = 0 else: - bestTuple = bracketSizes.most_common(1)[0] + bestTuple = None + for tuple in bracketSizes.most_common(): + if bestTuple is None or tuple[1] > bestTuple[1]: + bestTuple = tuple + elif tuple[1] == bestTuple[1]: + bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple + bestBracketSize = bestTuple[0] + bestCount = bestTuple[1] node.nbBrackets.value = bestBracketSize def processChunk(self, chunk): diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index ca289397ca..61e097148c 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -291,7 +291,13 @@ def update(cls, node): if len(bracketSizes) == 0: node.nbBrackets.value = 0 else: - bestTuple = bracketSizes.most_common(1)[0] + bestTuple = None + for tuple in bracketSizes.most_common(): + if bestTuple is None or tuple[1] > bestTuple[1]: + bestTuple = tuple + elif tuple[1] == bestTuple[1]: + bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple + bestBracketSize = bestTuple[0] bestCount = bestTuple[1] node.outliersNb = len(inputs) - (bestBracketSize * bestCount) # Compute number of outliers From 69d9bfbc0b8a74cbe613d20ad95b28c346b0a4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 26 Jul 2023 11:55:23 +0200 Subject: [PATCH 0863/1093] [nodes] PanoramaPostProcessing: add exportLevels option --- meshroom/aliceVision/PanoramaPostProcessing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index a85d76092d..527fdee3df 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -31,6 +31,13 @@ class PanoramaPostProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name="exportLevels", + label="Export Downscaled Levels", + description="Export downscaled panorama levels.", + value=False, + uid=[0], + ), desc.IntParam( name="previewSize", label="Panorama Preview Width", From e73a6c93a6201a52605627316a3c943327806692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 26 Jul 2023 11:56:11 +0200 Subject: [PATCH 0864/1093] [pipelines] toggle exportLevels in panorama pipelines --- meshroom/panoramaFisheyeHdr.mg | 27 ++++++++++++++------------- meshroom/panoramaHdr.mg | 27 ++++++++++++++------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 12aec80f01..3902b919d5 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "SfMTransform": "3.1", - "FeatureExtraction": "1.3", - "LdrToHdrSampling": "4.0", - "PanoramaPostProcessing": "1.0", - "PanoramaMerging": "1.0", - "FeatureMatching": "2.0", - "Publish": "1.3", + "ImageMatching": "2.0", + "PanoramaInit": "2.0", "PanoramaPrepareImages": "1.1", - "PanoramaEstimation": "1.0", + "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", - "PanoramaInit": "2.0", + "PanoramaEstimation": "1.0", "PanoramaCompositing": "2.0", - "ImageMatching": "2.0", - "LdrToHdrCalibration": "3.0", + "SfMTransform": "3.1", + "PanoramaPostProcessing": "1.0", + "PanoramaMerging": "1.0", "PanoramaSeams": "2.0", + "LdrToHdrCalibration": "3.0", "CameraInit": "9.0", - "LdrToHdrMerge": "4.1" + "FeatureMatching": "2.0", + "FeatureExtraction": "1.3", + "LdrToHdrMerge": "4.1", + "Publish": "1.3" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", @@ -156,7 +156,8 @@ ], "inputs": { "inputPanorama": "{PanoramaMerging_1.outputPanorama}", - "fillHoles": true + "fillHoles": true, + "exportLevels": true } }, "PanoramaPrepareImages_1": { diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 923e435335..8cf2431fca 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "SfMTransform": "3.1", - "FeatureExtraction": "1.3", - "LdrToHdrSampling": "4.0", - "PanoramaPostProcessing": "1.0", - "PanoramaMerging": "1.0", - "FeatureMatching": "2.0", - "Publish": "1.3", + "ImageMatching": "2.0", + "PanoramaInit": "2.0", "PanoramaPrepareImages": "1.1", - "PanoramaEstimation": "1.0", + "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", - "PanoramaInit": "2.0", + "PanoramaEstimation": "1.0", "PanoramaCompositing": "2.0", - "ImageMatching": "2.0", - "LdrToHdrCalibration": "3.0", + "SfMTransform": "3.1", + "PanoramaPostProcessing": "1.0", + "PanoramaMerging": "1.0", "PanoramaSeams": "2.0", + "LdrToHdrCalibration": "3.0", "CameraInit": "9.0", - "LdrToHdrMerge": "4.1" + "FeatureMatching": "2.0", + "FeatureExtraction": "1.3", + "LdrToHdrMerge": "4.1", + "Publish": "1.3" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", @@ -151,7 +151,8 @@ ], "inputs": { "inputPanorama": "{PanoramaMerging_1.outputPanorama}", - "fillHoles": true + "fillHoles": true, + "exportLevels": true } }, "PanoramaPrepareImages_1": { From 45cc1a55493efb49224937e151c57f5720b75a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 31 Jul 2023 09:40:16 +0200 Subject: [PATCH 0865/1093] [nodes] PanoramaPostProcessing: update version --- meshroom/aliceVision/PanoramaPostProcessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 527fdee3df..437fb5159e 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" import json import os From 57535edacd89eb3e62e54bf9a977945a8326e445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 31 Jul 2023 12:14:38 +0200 Subject: [PATCH 0866/1093] [nodes] PanoramaPostProcessing: add parameter for maximum width of last level --- meshroom/aliceVision/PanoramaPostProcessing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 437fb5159e..91edede7a0 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -38,6 +38,14 @@ class PanoramaPostProcessing(desc.CommandLineNode): value=False, uid=[0], ), + desc.IntParam( + name="lastLevelMaxSize", + label="Last Level Max Size", + description="Maximum width of smallest downscaled panorama level.", + value=3840, + range=(1, 100000), + uid=[0], + ), desc.IntParam( name="previewSize", label="Panorama Preview Width", From 5809465b2930b5a5df5e03c96bb4b20781ebe742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 31 Jul 2023 12:31:33 +0200 Subject: [PATCH 0867/1093] [pipelines] Panorama: Update version of `PanoramaPostProcessing` nodes --- meshroom/panoramaFisheyeHdr.mg | 24 ++++++++++++------------ meshroom/panoramaHdr.mg | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 3902b919d5..d938f6883b 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { + "SfMTransform": "3.1", + "PanoramaEstimation": "1.0", "ImageMatching": "2.0", - "PanoramaInit": "2.0", - "PanoramaPrepareImages": "1.1", - "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", - "PanoramaEstimation": "1.0", - "PanoramaCompositing": "2.0", - "SfMTransform": "3.1", - "PanoramaPostProcessing": "1.0", "PanoramaMerging": "1.0", - "PanoramaSeams": "2.0", - "LdrToHdrCalibration": "3.0", - "CameraInit": "9.0", + "PanoramaCompositing": "2.0", + "LdrToHdrSampling": "4.0", + "PanoramaPrepareImages": "1.1", "FeatureMatching": "2.0", - "FeatureExtraction": "1.3", "LdrToHdrMerge": "4.1", - "Publish": "1.3" + "PanoramaPostProcessing": "2.0", + "CameraInit": "9.0", + "LdrToHdrCalibration": "3.0", + "Publish": "1.3", + "PanoramaInit": "2.0", + "FeatureExtraction": "1.3", + "PanoramaSeams": "2.0" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 8cf2431fca..4043ab9464 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { + "SfMTransform": "3.1", + "PanoramaEstimation": "1.0", "ImageMatching": "2.0", - "PanoramaInit": "2.0", - "PanoramaPrepareImages": "1.1", - "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", - "PanoramaEstimation": "1.0", - "PanoramaCompositing": "2.0", - "SfMTransform": "3.1", - "PanoramaPostProcessing": "1.0", "PanoramaMerging": "1.0", - "PanoramaSeams": "2.0", - "LdrToHdrCalibration": "3.0", - "CameraInit": "9.0", + "PanoramaCompositing": "2.0", + "LdrToHdrSampling": "4.0", + "PanoramaPrepareImages": "1.1", "FeatureMatching": "2.0", - "FeatureExtraction": "1.3", "LdrToHdrMerge": "4.1", - "Publish": "1.3" + "PanoramaPostProcessing": "2.0", + "CameraInit": "9.0", + "LdrToHdrCalibration": "3.0", + "Publish": "1.3", + "PanoramaInit": "2.0", + "FeatureExtraction": "1.3", + "PanoramaSeams": "2.0" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", From 7d3321658c39a5f95254fec11c7fd4f470489acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 4 Aug 2023 12:08:38 +0200 Subject: [PATCH 0868/1093] [nodes] HDR Fusion: Fix bracket detection Prior to this commit, only the shutter speed was compared between two images to determine whether they belonged to the same group. The fnumber and ISO were assumed to be fixed within a group, which is not always true, and differs from what is done on the AliceVision's side. This commit aligns Meshroom's bracket detection with AliceVision's. --- meshroom/aliceVision/LdrToHdrCalibration.py | 3 +-- meshroom/aliceVision/LdrToHdrMerge.py | 3 +-- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 5dbd7530db..3d10baac8b 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -238,7 +238,7 @@ def update(cls, node): fnumber, shutterSpeed, iso = exp if exposures: prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso) or newGroup: + if exposures and len(exposures) > 1 and (fnumber > prevFnumber or shutterSpeed > prevShutterSpeed or iso < prevIso) or newGroup: exposureGroups.append(exposures) exposures = [exp] else: @@ -273,5 +273,4 @@ def update(cls, node): bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple bestBracketSize = bestTuple[0] - bestCount = bestTuple[1] node.nbBrackets.value = bestBracketSize diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 62dbc43417..1a4ad8377e 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -324,7 +324,7 @@ def update(cls, node): fnumber, shutterSpeed, iso = exp if exposures: prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso) or newGroup: + if exposures and len(exposures) > 1 and (fnumber > prevFnumber or shutterSpeed > prevShutterSpeed or iso < prevIso) or newGroup: exposureGroups.append(exposures) exposures = [exp] else: @@ -359,7 +359,6 @@ def update(cls, node): bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple bestBracketSize = bestTuple[0] - bestCount = bestTuple[1] node.nbBrackets.value = bestBracketSize def processChunk(self, chunk): diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 61e097148c..36c0c78db2 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -264,7 +264,7 @@ def update(cls, node): fnumber, shutterSpeed, iso = exp if exposures: prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso) or newGroup: + if exposures and len(exposures) > 1 and (fnumber > prevFnumber or shutterSpeed > prevShutterSpeed or iso < prevIso) or newGroup: exposureGroups.append(exposures) exposures = [exp] else: From 169334c6b738d9db711d6ab41de686db471e4fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 8 Aug 2023 10:28:28 +0200 Subject: [PATCH 0869/1093] [pipelines] publish downscaled panorama levels --- .../aliceVision/PanoramaPostProcessing.py | 8 ++++++ meshroom/panoramaFisheyeHdr.mg | 25 ++++++++++--------- meshroom/panoramaHdr.mg | 25 ++++++++++--------- 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 91edede7a0..f361561235 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -111,4 +111,12 @@ class PanoramaPostProcessing(desc.CommandLineNode): value=desc.Node.internalFolder + "panoramaPreview.jpg", uid=[], ), + desc.File( + name="downscaledPanoramaLevels", + label="Downscaled Panorama Levels", + description="Downscaled versions of the generated panorama.", + value=desc.Node.internalFolder + "level_*.exr", + uid=[], + group='', + ), ] diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index d938f6883b..083922612b 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "SfMTransform": "3.1", "PanoramaEstimation": "1.0", - "ImageMatching": "2.0", - "PanoramaWarping": "1.1", - "PanoramaMerging": "1.0", - "PanoramaCompositing": "2.0", - "LdrToHdrSampling": "4.0", - "PanoramaPrepareImages": "1.1", "FeatureMatching": "2.0", - "LdrToHdrMerge": "4.1", - "PanoramaPostProcessing": "2.0", + "PanoramaCompositing": "2.0", "CameraInit": "9.0", + "FeatureExtraction": "1.3", "LdrToHdrCalibration": "3.0", + "PanoramaSeams": "2.0", + "PanoramaPostProcessing": "2.0", + "LdrToHdrMerge": "4.1", + "ImageMatching": "2.0", + "PanoramaMerging": "1.0", + "PanoramaPrepareImages": "1.1", "Publish": "1.3", "PanoramaInit": "2.0", - "FeatureExtraction": "1.3", - "PanoramaSeams": "2.0" + "PanoramaWarping": "1.1", + "LdrToHdrSampling": "4.0", + "SfMTransform": "3.1" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", @@ -243,7 +243,8 @@ "inputs": { "inputFiles": [ "{PanoramaPostProcessing_1.outputPanorama}", - "{PanoramaPostProcessing_1.outputPanoramaPreview}" + "{PanoramaPostProcessing_1.outputPanoramaPreview}", + "{PanoramaPostProcessing_1.downscaledPanoramaLevels}" ] } } diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 4043ab9464..d8de2d184e 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "SfMTransform": "3.1", "PanoramaEstimation": "1.0", - "ImageMatching": "2.0", - "PanoramaWarping": "1.1", - "PanoramaMerging": "1.0", - "PanoramaCompositing": "2.0", - "LdrToHdrSampling": "4.0", - "PanoramaPrepareImages": "1.1", "FeatureMatching": "2.0", - "LdrToHdrMerge": "4.1", - "PanoramaPostProcessing": "2.0", + "PanoramaCompositing": "2.0", "CameraInit": "9.0", + "FeatureExtraction": "1.3", "LdrToHdrCalibration": "3.0", + "PanoramaSeams": "2.0", + "PanoramaPostProcessing": "2.0", + "LdrToHdrMerge": "4.1", + "ImageMatching": "2.0", + "PanoramaMerging": "1.0", + "PanoramaPrepareImages": "1.1", "Publish": "1.3", "PanoramaInit": "2.0", - "FeatureExtraction": "1.3", - "PanoramaSeams": "2.0" + "PanoramaWarping": "1.1", + "LdrToHdrSampling": "4.0", + "SfMTransform": "3.1" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", @@ -237,7 +237,8 @@ "inputs": { "inputFiles": [ "{PanoramaPostProcessing_1.outputPanorama}", - "{PanoramaPostProcessing_1.outputPanoramaPreview}" + "{PanoramaPostProcessing_1.outputPanoramaPreview}", + "{PanoramaPostProcessing_1.downscaledPanoramaLevels}" ] } } From 810f77129d618aa8528f96b0a0ca4ad94795fa7f Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 6 Jun 2023 08:10:21 +0200 Subject: [PATCH 0870/1093] [Nodes] imageProcessing: Add LCP related parameters --- meshroom/aliceVision/ImageProcessing.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index ad12c8cf02..9e17b6b238 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -571,6 +571,23 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], ), + desc.File( + name='lensCorrectionProfileInfo', + label='Lens Correction Profile Info', + description='''Lens Correction Profile filepath or database directory.''', + value='${ALICEVISION_LENS_PROFILE_INFO}', + uid=[], + ), + + desc.BoolParam( + name='lensCorrectionProfileSearchIgnoreCameraModel', + label='LCP Generic Search', + description='The lens name and camera maker are used to match the LCP database, but the camera model is ignored.', + value=True, + uid=[0], + advanced=True, + ), + desc.ChoiceParam( name="storageDataType", label="Storage Data Type For EXR Output", From b3a6a265915b434d6a8129642862d485a5c0f713 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 14 Aug 2023 14:09:10 +0200 Subject: [PATCH 0871/1093] [Node] imageProcessing: Add chromatic aberration correction option. --- meshroom/aliceVision/ImageProcessing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 9e17b6b238..8cae5f5b82 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -164,8 +164,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Chromatic aberration (fringing) correction if the model parameters are available in the metadata.", value=False, uid=[0], - enabled=False # To replace with the line below when the correction of chromatic aberration will be available - # enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value ) ] ), From 5e7cddf3f2292a2e72fee48913bf904feab11094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 16 Aug 2023 16:57:23 +0200 Subject: [PATCH 0872/1093] [nodes] HDR Fusion: Align bracket detection with AliceVision's The bracket detection performed in Meshroom used to differ from the one performed in AliceVision. The metadata that were retrieved to perform the exposure comparisons were not the same, and where AliceVision was actually computing an exposure value, Meshroom was just performing a comparison between the shutter speed, fnumber and ISO values, which resulted in less accurate groups. The `getExposure` static method that is added to the `LdrToHdrSampling`, `LdrToHdrCalibration` and `LdrToHdrMerge` node is the pythonic version of the `getExposure` method from the View class in AliceVision. --- meshroom/aliceVision/LdrToHdrCalibration.py | 67 +++++++++++++++++---- meshroom/aliceVision/LdrToHdrMerge.py | 67 +++++++++++++++++---- meshroom/aliceVision/LdrToHdrSampling.py | 67 +++++++++++++++++---- 3 files changed, 168 insertions(+), 33 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 3d10baac8b..6655f81702 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,6 +1,7 @@ __version__ = "3.0" import json +import math import os from collections import Counter @@ -205,9 +206,20 @@ def update(cls, node): node.nbBrackets.value = 0 return d = json.loads(jsonMetadata) - fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") - shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") - iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") + + # Find Fnumber + fnumber = findMetadata(d, ["FNumber"], "") + if fnumber == "": + aperture = findMetadata(d, ["Exif:ApertureValue", "ApertureValue", "Aperture"], "") + if aperture == "": + fnumber = -1.0 + else: + fnumber = pow(2.0, aperture / 2.0) + + # Get shutter speed and ISO + shutterSpeed = findMetadata(d, ["ExposureTime", "Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], -1.0) + iso = findMetadata(d, ["Exif:PhotographicSensitivity", "PhotographicSensitivity", "Photographic Sensitivity", "ISO"], -1.0) + if not fnumber and not shutterSpeed: # If one image without shutter or fnumber, we cannot found the number of brackets. # We assume that there is no multi-bracketing, so nothing to do. @@ -222,6 +234,7 @@ def update(cls, node): prevShutterSpeed = 0.0 prevIso = 0.0 prevPath = None # Stores the dirname of the previous parsed image + prevExposure = None newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) for path, exp in inputs: # If the dirname of the previous image and the dirname of the current image do not match, this means that the @@ -231,20 +244,18 @@ def update(cls, node): if prevPath is not None and prevPath != os.path.dirname(path): newGroup = True - # A new group is created if the current image's exposure level is larger than the previous image's, if there - # were any changes in the ISO or aperture value, or if a new dataset has been detected with the path. - # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger - # than the previous one indicates the start of a new exposure group. - fnumber, shutterSpeed, iso = exp - if exposures: - prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber > prevFnumber or shutterSpeed > prevShutterSpeed or iso < prevIso) or newGroup: + currentExposure = LdrToHdrCalibration.getExposure(exp) + + # Create a new group if the current image's exposure level is smaller than the previous image's, or + # if a new dataset has been detected (with a change in the path of the images). + if prevExposure and currentExposure < prevExposure or newGroup: exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) prevPath = os.path.dirname(path) + prevExposure = currentExposure newGroup = False exposureGroups.append(exposures) @@ -274,3 +285,37 @@ def update(cls, node): bestBracketSize = bestTuple[0] node.nbBrackets.value = bestBracketSize + + @staticmethod + def getExposure(exp, refIso = 100.0, refFnumber = 1.0): + fnumber, shutterSpeed, iso = exp + + validShutterSpeed = shutterSpeed > 0.0 and math.isfinite(shutterSpeed) + validFnumber = fnumber > 0.0 and math.isfinite(fnumber) + + if not validShutterSpeed and not validFnumber: + return -1.0 + + validRefFnumber = refFnumber > 0.0 and math.isfinite(refFnumber) + + if not validShutterSpeed: + shutterSpeed = 1.0 / 200.0 + + if not validFnumber: + if validRefFnumber: + fnumber = refFnumber + else: + fnumber = 2.0 + + lRefFnumber = refFnumber + if not validRefFnumber: + lRefFnumber = fnumber + + isoToAperture = 1.0 + if iso > 1e-6 and refIso > 1e-6: + isoToAperture = math.sqrt(iso / refIso) + + newFnumber = fnumber * isoToAperture + expIncrease = (newFnumber / lRefFnumber) * (newFnumber / lRefFnumber) + + return shutterSpeed * expIncrease diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 1a4ad8377e..c6bb797ece 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -2,6 +2,7 @@ import json import os +import math from collections import Counter from meshroom.core import desc @@ -291,9 +292,20 @@ def update(cls, node): node.nbBrackets.value = 0 return d = json.loads(jsonMetadata) - fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") - shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") - iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") + + # Find Fnumber + fnumber = findMetadata(d, ["FNumber"], "") + if fnumber == "": + aperture = findMetadata(d, ["Exif:ApertureValue", "ApertureValue", "Aperture"], "") + if aperture == "": + fnumber = -1.0 + else: + fnumber = pow(2.0, aperture / 2.0) + + # Get shutter speed and ISO + shutterSpeed = findMetadata(d, ["ExposureTime", "Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], -1.0) + iso = findMetadata(d, ["Exif:PhotographicSensitivity", "PhotographicSensitivity", "Photographic Sensitivity", "ISO"], -1.0) + if not fnumber and not shutterSpeed: # If one image without shutter or fnumber, we cannot found the number of brackets. # We assume that there is no multi-bracketing, so nothing to do. @@ -308,6 +320,7 @@ def update(cls, node): prevShutterSpeed = 0.0 prevIso = 0.0 prevPath = None # Stores the dirname of the previous parsed image + prevExposure = None newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) for path, exp in inputs: # If the dirname of the previous image and the dirname of the current image do not match, this means that the @@ -317,20 +330,18 @@ def update(cls, node): if prevPath is not None and prevPath != os.path.dirname(path): newGroup = True - # A new group is created if the current image's exposure level is larger than the previous image's, if there - # were any changes in the ISO or aperture value, or if a new dataset has been detected with the path. - # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger - # than the previous one indicates the start of a new exposure group. - fnumber, shutterSpeed, iso = exp - if exposures: - prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber > prevFnumber or shutterSpeed > prevShutterSpeed or iso < prevIso) or newGroup: + currentExposure = LdrToHdrMerge.getExposure(exp) + + # Create a new group if the current image's exposure level is smaller than the previous image's, or + # if a new dataset has been detected (with a change in the path of the images). + if prevExposure and currentExposure < prevExposure or newGroup: exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) prevPath = os.path.dirname(path) + prevExposure = currentExposure newGroup = False exposureGroups.append(exposures) @@ -361,6 +372,40 @@ def update(cls, node): bestBracketSize = bestTuple[0] node.nbBrackets.value = bestBracketSize + @staticmethod + def getExposure(exp, refIso = 100.0, refFnumber = 1.0): + fnumber, shutterSpeed, iso = exp + + validShutterSpeed = shutterSpeed > 0.0 and math.isfinite(shutterSpeed) + validFnumber = fnumber > 0.0 and math.isfinite(fnumber) + + if not validShutterSpeed and not validFnumber: + return -1.0 + + validRefFnumber = refFnumber > 0.0 and math.isfinite(refFnumber) + + if not validShutterSpeed: + shutterSpeed = 1.0 / 200.0 + + if not validFnumber: + if validRefFnumber: + fnumber = refFnumber + else: + fnumber = 2.0 + + lRefFnumber = refFnumber + if not validRefFnumber: + lRefFnumber = fnumber + + isoToAperture = 1.0 + if iso > 1e-6 and refIso > 1e-6: + isoToAperture = math.sqrt(iso / refIso) + + newFnumber = fnumber * isoToAperture + expIncrease = (newFnumber / lRefFnumber) * (newFnumber / lRefFnumber) + + return shutterSpeed * expIncrease + def processChunk(self, chunk): # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. # Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 36c0c78db2..7f0dccad2d 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,6 +1,7 @@ __version__ = "4.0" import json +import math import os from collections import Counter @@ -231,9 +232,20 @@ def update(cls, node): node.nbBrackets.value = 0 return d = json.loads(jsonMetadata) - fnumber = findMetadata(d, ["FNumber", "Exif:ApertureValue", "ApertureValue", "Aperture"], "") - shutterSpeed = findMetadata(d, ["Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], "") - iso = findMetadata(d, ["Exif:ISOSpeedRatings", "ISOSpeedRatings", "ISO"], "") + + # Find Fnumber + fnumber = findMetadata(d, ["FNumber"], "") + if fnumber == "": + aperture = findMetadata(d, ["Exif:ApertureValue", "ApertureValue", "Aperture"], "") + if aperture == "": + fnumber = -1.0 + else: + fnumber = pow(2.0, aperture / 2.0) + + # Get shutter speed and ISO + shutterSpeed = findMetadata(d, ["ExposureTime", "Exif:ShutterSpeedValue", "ShutterSpeedValue", "ShutterSpeed"], -1.0) + iso = findMetadata(d, ["Exif:PhotographicSensitivity", "PhotographicSensitivity", "Photographic Sensitivity", "ISO"], -1.0) + if not fnumber and not shutterSpeed: # If one image without shutter or fnumber, we cannot found the number of brackets. # We assume that there is no multi-bracketing, so nothing to do. @@ -248,6 +260,7 @@ def update(cls, node): prevShutterSpeed = 0.0 prevIso = 0.0 prevPath = None # Stores the dirname of the previous parsed image + prevExposure = None newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) for path, exp in inputs: # If the dirname of the previous image and the dirname of the current image do not match, this means that the @@ -257,20 +270,18 @@ def update(cls, node): if prevPath is not None and prevPath != os.path.dirname(path): newGroup = True - # A new group is created if the current image's exposure level is larger than the previous image's, if there - # were any changes in the ISO or aperture value, or if a new dataset has been detected with the path. - # Since the input images are ordered, the shutter speed should always be decreasing, so a shutter speed larger - # than the previous one indicates the start of a new exposure group. - fnumber, shutterSpeed, iso = exp - if exposures: - prevFnumber, prevShutterSpeed, prevIso = exposures[-1] - if exposures and len(exposures) > 1 and (fnumber > prevFnumber or shutterSpeed > prevShutterSpeed or iso < prevIso) or newGroup: + currentExposure = LdrToHdrSampling.getExposure(exp) + + # Create a new group if the current image's exposure level is smaller than the previous image's, or + # if a new dataset has been detected (with a change in the path of the images). + if prevExposure and currentExposure < prevExposure or newGroup: exposureGroups.append(exposures) exposures = [exp] else: exposures.append(exp) prevPath = os.path.dirname(path) + prevExposure = currentExposure newGroup = False exposureGroups.append(exposures) @@ -302,3 +313,37 @@ def update(cls, node): bestCount = bestTuple[1] node.outliersNb = len(inputs) - (bestBracketSize * bestCount) # Compute number of outliers node.nbBrackets.value = bestBracketSize + + @staticmethod + def getExposure(exp, refIso = 100.0, refFnumber = 1.0): + fnumber, shutterSpeed, iso = exp + + validShutterSpeed = shutterSpeed > 0.0 and math.isfinite(shutterSpeed) + validFnumber = fnumber > 0.0 and math.isfinite(fnumber) + + if not validShutterSpeed and not validFnumber: + return -1.0 + + validRefFnumber = refFnumber > 0.0 and math.isfinite(refFnumber) + + if not validShutterSpeed: + shutterSpeed = 1.0 / 200.0 + + if not validFnumber: + if validRefFnumber: + fnumber = refFnumber + else: + fnumber = 2.0 + + lRefFnumber = refFnumber + if not validRefFnumber: + lRefFnumber = fnumber + + isoToAperture = 1.0 + if iso > 1e-6 and refIso > 1e-6: + isoToAperture = math.sqrt(iso / refIso) + + newFnumber = fnumber * isoToAperture + expIncrease = (newFnumber / lRefFnumber) * (newFnumber / lRefFnumber) + + return shutterSpeed * expIncrease From 769d0e06b1f3bf571b1cd9a0b1600f659a820c4b Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 18 Aug 2023 09:23:01 +0200 Subject: [PATCH 0873/1093] [Node] LdrToHdrXXX : update exposure computation --- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 6655f81702..8c9ec4585f 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -316,6 +316,6 @@ def getExposure(exp, refIso = 100.0, refFnumber = 1.0): isoToAperture = math.sqrt(iso / refIso) newFnumber = fnumber * isoToAperture - expIncrease = (newFnumber / lRefFnumber) * (newFnumber / lRefFnumber) + expIncrease = (lRefFnumber / newFnumber) * (lRefFnumber / newFnumber) return shutterSpeed * expIncrease diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index c6bb797ece..aae38c7e85 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -402,7 +402,7 @@ def getExposure(exp, refIso = 100.0, refFnumber = 1.0): isoToAperture = math.sqrt(iso / refIso) newFnumber = fnumber * isoToAperture - expIncrease = (newFnumber / lRefFnumber) * (newFnumber / lRefFnumber) + expIncrease = (lRefFnumber / newFnumber) * (lRefFnumber / newFnumber) return shutterSpeed * expIncrease diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 7f0dccad2d..857a9700b0 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -344,6 +344,6 @@ def getExposure(exp, refIso = 100.0, refFnumber = 1.0): isoToAperture = math.sqrt(iso / refIso) newFnumber = fnumber * isoToAperture - expIncrease = (newFnumber / lRefFnumber) * (newFnumber / lRefFnumber) + expIncrease = (lRefFnumber / newFnumber) * (lRefFnumber / newFnumber) return shutterSpeed * expIncrease From 40a3b22f81734ee3307c90835e10eac5c8f58b7e Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Fri, 18 Aug 2023 09:29:34 +0200 Subject: [PATCH 0874/1093] [Nodes] Texturing : Change default value for CorrectEV option from False to True enabling automatic exposure correction for texture creation. --- meshroom/aliceVision/Texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 631ab8f4bf..392e1c200e 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -278,7 +278,7 @@ class Texturing(desc.AVCommandLineNode): name="correctEV", label="Correct Exposure", description="Uniformize images exposure values.", - value=False, + value=True, uid=[0], ), desc.BoolParam( From a6f65ac4bc2292d16ad696f2b2c2133caeac09c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 18 Aug 2023 18:42:34 +0200 Subject: [PATCH 0875/1093] [nodes] ImageProcessing: Update node's version Update the version following the addition of new LCP-related parameters to the command line. --- meshroom/aliceVision/ImageProcessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 8cae5f5b82..b1ee37c667 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -1,4 +1,4 @@ -__version__ = "3.2" +__version__ = "3.3" from meshroom.core import desc From f49ca3dd568740cb182692432a73e5fc1c9d4932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 2 Aug 2023 15:15:09 +0200 Subject: [PATCH 0876/1093] [nodes] HDR Fusion: Flag `userNbBrackets` as invalid if it isn't a multiple of the number of inputs Add an error message for `userNbBrackets` and set `validValue` to false if the set number of brackets is not a multiple of the number of input images. --- meshroom/aliceVision/LdrToHdrCalibration.py | 19 ++++++++++++++++--- meshroom/aliceVision/LdrToHdrMerge.py | 19 ++++++++++++++++--- meshroom/aliceVision/LdrToHdrSampling.py | 19 ++++++++++++++++--- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 6655f81702..1981408910 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -60,6 +60,8 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): range=(0, 15, 1), uid=[], group="user", # not used directly on the command line + errorMessage="The set number of brackets is not a multiple of the number of input images.\n" + "Errors will occur during the computation." ), desc.IntParam( name="nbBrackets", @@ -181,13 +183,24 @@ def update(cls, node): if "userNbBrackets" not in node.getAttributes().keys(): # Old version of the node return - if node.userNbBrackets.value != 0: - node.nbBrackets.value = node.userNbBrackets.value - return + node.userNbBrackets.validValue = True # Reset the status of "userNbBrackets" + cameraInitOutput = node.input.getLinkParam(recursive=True) if not cameraInitOutput: node.nbBrackets.value = 0 return + if node.userNbBrackets.value != 0: + # The number of brackets has been manually forced: check whether it is valid or not + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute("viewpoints"): + viewpoints = cameraInitOutput.node.viewpoints.value + # The number of brackets should be a multiple of the number of input images + if (len(viewpoints) % node.userNbBrackets.value != 0): + node.userNbBrackets.validValue = False + else: + node.userNbBrackets.validValue = True + node.nbBrackets.value = node.userNbBrackets.value + return + if not cameraInitOutput.node.hasAttribute("viewpoints"): if cameraInitOutput.node.hasAttribute("input"): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index c6bb797ece..99dfd580f2 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -59,6 +59,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode): range=(0, 15, 1), uid=[], group="user", # not used directly on the command line + errorMessage="The set number of brackets is not a multiple of the number of input images.\n" + "Errors will occur during the computation." ), desc.IntParam( name="nbBrackets", @@ -267,13 +269,24 @@ def update(cls, node): if "userNbBrackets" not in node.getAttributes().keys(): # Old version of the node return - if node.userNbBrackets.value != 0: - node.nbBrackets.value = node.userNbBrackets.value - return + node.userNbBrackets.validValue = True # Reset the status of "userNbBrackets" + cameraInitOutput = node.input.getLinkParam(recursive=True) if not cameraInitOutput: node.nbBrackets.value = 0 return + if node.userNbBrackets.value != 0: + # The number of brackets has been manually forced: check whether it is valid or not + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute("viewpoints"): + viewpoints = cameraInitOutput.node.viewpoints.value + # The number of brackets should be a multiple of the number of input images + if (len(viewpoints) % node.userNbBrackets.value != 0): + node.userNbBrackets.validValue = False + else: + node.userNbBrackets.validValue = True + node.nbBrackets.value = node.userNbBrackets.value + return + if not cameraInitOutput.node.hasAttribute("viewpoints"): if cameraInitOutput.node.hasAttribute("input"): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 7f0dccad2d..414d32da89 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -74,6 +74,8 @@ class LdrToHdrSampling(desc.AVCommandLineNode): range=(0, 15, 1), uid=[], group="user", # not used directly on the command line + errorMessage="The set number of brackets is not a multiple of the number of input images.\n" + "Errors will occur during the computation." ), desc.IntParam( name="nbBrackets", @@ -207,13 +209,24 @@ def update(cls, node): # Old version of the node return node.outliersNb = 0 # Reset the number of detected outliers - if node.userNbBrackets.value != 0: - node.nbBrackets.value = node.userNbBrackets.value - return + node.userNbBrackets.validValue = True # Reset the status of "userNbBrackets" + cameraInitOutput = node.input.getLinkParam(recursive=True) if not cameraInitOutput: node.nbBrackets.value = 0 return + if node.userNbBrackets.value != 0: + # The number of brackets has been manually forced: check whether it is valid or not + if cameraInitOutput and cameraInitOutput.node and cameraInitOutput.node.hasAttribute("viewpoints"): + viewpoints = cameraInitOutput.node.viewpoints.value + # The number of brackets should be a multiple of the number of input images + if (len(viewpoints) % node.userNbBrackets.value != 0): + node.userNbBrackets.validValue = False + else: + node.userNbBrackets.validValue = True + node.nbBrackets.value = node.userNbBrackets.value + return + if not cameraInitOutput.node.hasAttribute("viewpoints"): if cameraInitOutput.node.hasAttribute("input"): cameraInitOutput = cameraInitOutput.node.input.getLinkParam(recursive=True) From a5367c2f397a4fe663aee38bbf1c133cb9368cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 3 Aug 2023 16:00:19 +0200 Subject: [PATCH 0877/1093] [nodes] HDR Fusion: Harmonize ranges for `nbBrackets` and `userNbBrackets` --- meshroom/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/aliceVision/LdrToHdrMerge.py | 2 +- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 1981408910..2f6326c70a 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -70,7 +70,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): "It is detected automatically from input Viewpoints metadata if 'userNbBrackets' is 0,\n" "else it is equal to 'userNbBrackets'.", value=0, - range=(0, 10, 1), + range=(0, 15, 1), uid=[0], group="bracketsParams" ), diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 99dfd580f2..5d3b86c841 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -69,7 +69,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n" "is 0, else it is equal to 'userNbBrackets'.", value=0, - range=(0, 10, 1), + range=(0, 15, 1), uid=[0], group="bracketsParams" ), diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 414d32da89..46cbfd43b3 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -84,7 +84,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): "It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n" "is 0, else it is equal to 'userNbBrackets'.", value=0, - range=(0, 10, 1), + range=(0, 15, 1), uid=[0], group="bracketsParams" ), From a3306c568d68d6b8cb4f30a9fc0f9f5b9d4b0d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 22 Aug 2023 11:11:52 +0200 Subject: [PATCH 0878/1093] [nodes] KeyframeSelection: Flag `outputExtension` for video inputs If at least one of the inputs is a video, then the `outputExtension` attribute should never be set to "none": if it is, no frame will ever be written on disk, and as a consequence, no SfMData file will be written, meaning that the whole score computation and keyframe selection process will have been done for nothing. --- meshroom/aliceVision/KeyframeSelection.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index fcc2a6a717..a5ea1fe6d6 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -3,6 +3,9 @@ import os from meshroom.core import desc +# List of supported video extensions (provided by OpenImageIO) +videoExts = [".avi", ".mov", ".mp4", ".m4a", ".m4v", ".3gp", ".3g2", ".mj2", ".m4v", ".mpg"] + class KeyframeSelectionNodeSize(desc.DynamicNodeSize): def computeSize(self, node): inputPathsSize = super(KeyframeSelectionNodeSize, self).computeSize(node) @@ -273,6 +276,8 @@ class KeyframeSelection(desc.AVCommandLineNode): value="none", values=["none", "exr", "jpg", "png"], exclusive=True, + validValue=lambda node: not (any(ext in input.value.lower() for ext in videoExts for input in node.inputPaths.value) and node.outputExtension.value == "none"), + errorMessage="A video input has been provided. The output extension should be different from 'none'.", uid=[0], ), desc.ChoiceParam( From baed7924c8fedf91bbe1ce05fdc9c445ce90f0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 22 Aug 2023 13:29:50 +0200 Subject: [PATCH 0879/1093] [pipelines] add ImageSegmentation node to tracking pipelines --- meshroom/cameraTracking.mg | 57 +++++++++++++-------- meshroom/photogrammetryAndCameraTracking.mg | 51 ++++++++++++------ 2 files changed, 71 insertions(+), 37 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 97ffcbcadb..29824842f0 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,30 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "DepthMap": "4.0", - "PrepareDenseScene": "3.0", - "Publish": "1.3", - "KeyframeSelection": "4.1", - "SfMTransfer": "2.1", - "ApplyCalibration": "1.0", - "ImageMatchingMultiSfM": "1.0", - "DepthMapFilter": "3.0", + "MeshDecimate": "1.0", "Texturing": "6.0", - "ImageMatching": "2.0", - "MeshFiltering": "3.0", - "FeatureMatching": "2.0", - "ScenePreview": "1.0", - "SfMTriangulation": "1.0", - "CheckerboardDetection": "1.0", - "ConvertSfMFormat": "2.0", + "ExportDistortion": "1.0", "CameraInit": "9.0", + "ImageMatchingMultiSfM": "1.0", "StructureFromMotion": "3.1", - "MeshDecimate": "1.0", - "ExportAnimatedCamera": "2.0", + "FeatureExtraction": "1.3", + "ApplyCalibration": "1.0", + "SfMTriangulation": "1.0", + "Publish": "1.3", + "DepthMap": "4.0", "DistortionCalibration": "3.0", + "DepthMapFilter": "3.0", + "ImageSegmentation": "1.0", + "CheckerboardDetection": "1.0", + "ScenePreview": "1.0", "Meshing": "7.0", - "ExportDistortion": "1.0", - "FeatureExtraction": "1.3" + "PrepareDenseScene": "3.0", + "ImageMatching": "2.0", + "KeyframeSelection": "4.1", + "ConvertSfMFormat": "2.0", + "ExportAnimatedCamera": "2.0", + "FeatureMatching": "2.0", + "SfMTransfer": "2.1", + "MeshFiltering": "3.0" } }, "graph": { @@ -78,7 +79,10 @@ 200 ], "inputs": { - "input": "{ApplyCalibration_1.output}" + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentation_1.output}", + "maskExtension": "exr", + "maskInvert": true }, "internalInputs": { "color": "#575963" @@ -485,6 +489,19 @@ "label": "FeatureMatchingFramesToKeyframes", "color": "#80766f" } + }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 3, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } } } } \ No newline at end of file diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 4fee741f4b..10c594f93b 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,28 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "FeatureMatching": "2.0", - "ConvertSfMFormat": "2.0", - "PrepareDenseScene": "3.0", - "Meshing": "7.0", - "KeyframeSelection": "4.1", - "FeatureExtraction": "1.3", - "MeshFiltering": "3.0", - "DepthMap": "4.0", - "ImageMatching": "2.0", - "DistortionCalibration": "3.0", + "MeshDecimate": "1.0", "Texturing": "6.0", - "DepthMapFilter": "3.0", + "ExportDistortion": "1.0", "CameraInit": "9.0", - "ScenePreview": "1.0", + "ImageMatchingMultiSfM": "1.0", "StructureFromMotion": "3.1", - "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", "ApplyCalibration": "1.0", "Publish": "1.3", + "DepthMap": "4.0", + "DistortionCalibration": "3.0", + "DepthMapFilter": "3.0", + "ImageSegmentation": "1.0", + "CheckerboardDetection": "1.0", + "ScenePreview": "1.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.0", + "ImageMatching": "2.0", + "KeyframeSelection": "4.1", + "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", - "MeshDecimate": "1.0", - "ImageMatchingMultiSfM": "1.0", - "CheckerboardDetection": "1.0" + "FeatureMatching": "2.0", + "MeshFiltering": "3.0" } }, "graph": { @@ -49,7 +50,10 @@ 200 ], "inputs": { - "input": "{ApplyCalibration_1.output}" + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentation_1.output}", + "maskExtension": "exr", + "maskInvert": true }, "internalInputs": { "color": "#575963" @@ -561,6 +565,19 @@ "internalInputs": { "color": "#575963" } + }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 6, + 203 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } } } } \ No newline at end of file From dc9bc3b706d9af4798341a7eee124489ae57af41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 22 Aug 2023 16:36:36 +0200 Subject: [PATCH 0880/1093] [pipelines] Align `ImageSegmentation` nodes with others --- meshroom/cameraTracking.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 29824842f0..62531ea8ea 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -493,7 +493,7 @@ "ImageSegmentation_1": { "nodeType": "ImageSegmentation", "position": [ - 3, + 0, 200 ], "inputs": { diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 10c594f93b..342521dd2b 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -569,8 +569,8 @@ "ImageSegmentation_1": { "nodeType": "ImageSegmentation", "position": [ - 6, - 203 + 0, + 200 ], "inputs": { "input": "{CameraInit_1.output}" From b0c764b7c5334a524b6b5c5585b9e55cc53c3e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 11 Jul 2023 18:00:07 +0200 Subject: [PATCH 0881/1093] [nodes] PanoramaInit: remove fake dependency --- meshroom/aliceVision/PanoramaInit.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index e9527f24f6..d409a862a0 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -79,19 +79,6 @@ class PanoramaInit(desc.AVCommandLineNode): joinChar=",", enabled=lambda node: node.initializeCameras.value == "Spherical", ), - desc.ListAttribute( - elementDesc=desc.File( - name="dependency", - label="", - description="", - value="", - uid=[], - ), - name="dependency", - label="Dependency", - description="Folder(s) in which computed features are stored. (WORKAROUND for valid Tractor graph submission)", - group="forDependencyOnly", # not a command line argument - ), desc.BoolParam( name="useFisheye", label="Full Fisheye", From 38a8306a0b4e364585a2438c8d8797d791ad1da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 11 Jul 2023 18:04:42 +0200 Subject: [PATCH 0882/1093] [pipelines] update panorama pipelines --- meshroom/panoramaFisheyeHdr.mg | 71 ++++++++++++++++------------------ meshroom/panoramaHdr.mg | 51 ++++++++++++------------ 2 files changed, 58 insertions(+), 64 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 083922612b..4dbd679ebb 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "PanoramaEstimation": "1.0", - "FeatureMatching": "2.0", - "PanoramaCompositing": "2.0", "CameraInit": "9.0", "FeatureExtraction": "1.3", "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", "PanoramaSeams": "2.0", - "PanoramaPostProcessing": "2.0", - "LdrToHdrMerge": "4.1", "ImageMatching": "2.0", - "PanoramaMerging": "1.0", + "SfMTransform": "3.1", "PanoramaPrepareImages": "1.1", - "Publish": "1.3", "PanoramaInit": "2.0", - "PanoramaWarping": "1.1", + "Publish": "1.3", + "PanoramaPostProcessing": "2.0", + "FeatureMatching": "2.0", "LdrToHdrSampling": "4.0", - "SfMTransform": "3.1" + "PanoramaWarping": "1.1", + "PanoramaCompositing": "2.0", + "PanoramaMerging": "1.0", + "LdrToHdrMerge": "4.1" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", @@ -42,8 +42,8 @@ "PanoramaWarping_1": { "nodeType": "PanoramaWarping", "position": [ - 2200, - 0 + 2059, + -6 ], "inputs": { "input": "{SfMTransform_1.output}" @@ -78,8 +78,8 @@ "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ - 1400, - 0 + 1259, + -6 ], "inputs": { "input": "{PanoramaInit_1.outSfMData}", @@ -92,8 +92,8 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 1000, - 0 + 1023, + 85 ], "inputs": { "input": "{LdrToHdrMerge_1.outSfMData}", @@ -107,8 +107,8 @@ "PanoramaMerging_1": { "nodeType": "PanoramaMerging", "position": [ - 2800, - 0 + 2659, + -6 ], "inputs": { "input": "{PanoramaCompositing_1.input}", @@ -119,8 +119,8 @@ "PanoramaCompositing_1": { "nodeType": "PanoramaCompositing", "position": [ - 2600, - 0 + 2459, + -6 ], "inputs": { "input": "{PanoramaSeams_1.outputSfm}", @@ -151,8 +151,8 @@ "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ - 3000, - 0 + 2859, + -6 ], "inputs": { "inputPanorama": "{PanoramaMerging_1.outputPanorama}", @@ -173,8 +173,8 @@ "SfMTransform_1": { "nodeType": "SfMTransform", "position": [ - 2000, - 0 + 1859, + -6 ], "inputs": { "input": "{PanoramaEstimation_1.output}", @@ -184,8 +184,8 @@ "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ - 2400, - 0 + 2259, + -6 ], "inputs": { "input": "{PanoramaWarping_1.input}", @@ -195,8 +195,8 @@ "PanoramaEstimation_1": { "nodeType": "PanoramaEstimation", "position": [ - 1800, - 0 + 1659, + -6 ], "inputs": { "input": "{FeatureMatching_1.input}", @@ -210,22 +210,19 @@ "PanoramaInit_1": { "nodeType": "PanoramaInit", "position": [ - 1200, - 0 + 1028, + -44 ], "inputs": { - "input": "{FeatureExtraction_1.input}", - "dependency": [ - "{FeatureExtraction_1.output}" - ], + "input": "{LdrToHdrMerge_1.outSfMData}", "useFisheye": true } }, "FeatureMatching_1": { "nodeType": "FeatureMatching", "position": [ - 1600, - 0 + 1459, + -6 ], "inputs": { "input": "{ImageMatching_1.input}", @@ -237,8 +234,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3200, - 0 + 3059, + -6 ], "inputs": { "inputFiles": [ diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index d8de2d184e..625552ed4e 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "PanoramaEstimation": "1.0", - "FeatureMatching": "2.0", - "PanoramaCompositing": "2.0", "CameraInit": "9.0", "FeatureExtraction": "1.3", "LdrToHdrCalibration": "3.0", + "PanoramaEstimation": "1.0", "PanoramaSeams": "2.0", - "PanoramaPostProcessing": "2.0", - "LdrToHdrMerge": "4.1", "ImageMatching": "2.0", - "PanoramaMerging": "1.0", + "SfMTransform": "3.1", "PanoramaPrepareImages": "1.1", - "Publish": "1.3", "PanoramaInit": "2.0", - "PanoramaWarping": "1.1", + "Publish": "1.3", + "PanoramaPostProcessing": "2.0", + "FeatureMatching": "2.0", "LdrToHdrSampling": "4.0", - "SfMTransform": "3.1" + "PanoramaWarping": "1.1", + "PanoramaCompositing": "2.0", + "PanoramaMerging": "1.0", + "LdrToHdrMerge": "4.1" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", @@ -42,7 +42,7 @@ "PanoramaWarping_1": { "nodeType": "PanoramaWarping", "position": [ - 2200, + 2073, 0 ], "inputs": { @@ -78,7 +78,7 @@ "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ - 1400, + 1273, 0 ], "inputs": { @@ -92,8 +92,8 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 1000, - 0 + 1028, + 93 ], "inputs": { "input": "{LdrToHdrMerge_1.outSfMData}", @@ -103,7 +103,7 @@ "PanoramaMerging_1": { "nodeType": "PanoramaMerging", "position": [ - 2800, + 2673, 0 ], "inputs": { @@ -115,7 +115,7 @@ "PanoramaCompositing_1": { "nodeType": "PanoramaCompositing", "position": [ - 2600, + 2473, 0 ], "inputs": { @@ -146,7 +146,7 @@ "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ - 3000, + 2873, 0 ], "inputs": { @@ -168,7 +168,7 @@ "SfMTransform_1": { "nodeType": "SfMTransform", "position": [ - 2000, + 1873, 0 ], "inputs": { @@ -179,7 +179,7 @@ "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ - 2400, + 2273, 0 ], "inputs": { @@ -190,7 +190,7 @@ "PanoramaEstimation_1": { "nodeType": "PanoramaEstimation", "position": [ - 1800, + 1673, 0 ], "inputs": { @@ -205,20 +205,17 @@ "PanoramaInit_1": { "nodeType": "PanoramaInit", "position": [ - 1200, - 0 + 1034, + -35 ], "inputs": { - "input": "{FeatureExtraction_1.input}", - "dependency": [ - "{FeatureExtraction_1.output}" - ] + "input": "{LdrToHdrMerge_1.outSfMData}" } }, "FeatureMatching_1": { "nodeType": "FeatureMatching", "position": [ - 1600, + 1473, 0 ], "inputs": { @@ -231,7 +228,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3200, + 3073, 0 ], "inputs": { From 61278ab38dcf7e1019e35d18620508d3812ae8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 13 Jul 2023 19:13:50 +0200 Subject: [PATCH 0883/1093] [pipelines] Panorama: Align all nodes --- meshroom/panoramaFisheyeHdr.mg | 50 +++++++++++++++++----------------- meshroom/panoramaHdr.mg | 30 ++++++++++---------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 4dbd679ebb..ec932d9228 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -42,8 +42,8 @@ "PanoramaWarping_1": { "nodeType": "PanoramaWarping", "position": [ - 2059, - -6 + 2000, + 0 ], "inputs": { "input": "{SfMTransform_1.output}" @@ -78,8 +78,8 @@ "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ - 1259, - -6 + 1200, + 0 ], "inputs": { "input": "{PanoramaInit_1.outSfMData}", @@ -92,8 +92,8 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 1023, - 85 + 1000, + 70 ], "inputs": { "input": "{LdrToHdrMerge_1.outSfMData}", @@ -107,8 +107,8 @@ "PanoramaMerging_1": { "nodeType": "PanoramaMerging", "position": [ - 2659, - -6 + 2600, + 0 ], "inputs": { "input": "{PanoramaCompositing_1.input}", @@ -119,8 +119,8 @@ "PanoramaCompositing_1": { "nodeType": "PanoramaCompositing", "position": [ - 2459, - -6 + 2400, + 0 ], "inputs": { "input": "{PanoramaSeams_1.outputSfm}", @@ -151,8 +151,8 @@ "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ - 2859, - -6 + 2800, + 0 ], "inputs": { "inputPanorama": "{PanoramaMerging_1.outputPanorama}", @@ -173,8 +173,8 @@ "SfMTransform_1": { "nodeType": "SfMTransform", "position": [ - 1859, - -6 + 1800, + 0 ], "inputs": { "input": "{PanoramaEstimation_1.output}", @@ -184,8 +184,8 @@ "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ - 2259, - -6 + 2200, + 0 ], "inputs": { "input": "{PanoramaWarping_1.input}", @@ -195,8 +195,8 @@ "PanoramaEstimation_1": { "nodeType": "PanoramaEstimation", "position": [ - 1659, - -6 + 1600, + 0 ], "inputs": { "input": "{FeatureMatching_1.input}", @@ -210,8 +210,8 @@ "PanoramaInit_1": { "nodeType": "PanoramaInit", "position": [ - 1028, - -44 + 1000, + -50 ], "inputs": { "input": "{LdrToHdrMerge_1.outSfMData}", @@ -221,8 +221,8 @@ "FeatureMatching_1": { "nodeType": "FeatureMatching", "position": [ - 1459, - -6 + 1400, + 0 ], "inputs": { "input": "{ImageMatching_1.input}", @@ -234,8 +234,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3059, - -6 + 3000, + 0 ], "inputs": { "inputFiles": [ @@ -246,4 +246,4 @@ } } } -} \ No newline at end of file +} diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 625552ed4e..a7ee3247dc 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -42,7 +42,7 @@ "PanoramaWarping_1": { "nodeType": "PanoramaWarping", "position": [ - 2073, + 2000, 0 ], "inputs": { @@ -78,7 +78,7 @@ "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ - 1273, + 1200, 0 ], "inputs": { @@ -92,8 +92,8 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 1028, - 93 + 1000, + 70 ], "inputs": { "input": "{LdrToHdrMerge_1.outSfMData}", @@ -103,7 +103,7 @@ "PanoramaMerging_1": { "nodeType": "PanoramaMerging", "position": [ - 2673, + 2600, 0 ], "inputs": { @@ -115,7 +115,7 @@ "PanoramaCompositing_1": { "nodeType": "PanoramaCompositing", "position": [ - 2473, + 2400, 0 ], "inputs": { @@ -146,7 +146,7 @@ "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ - 2873, + 2800, 0 ], "inputs": { @@ -168,7 +168,7 @@ "SfMTransform_1": { "nodeType": "SfMTransform", "position": [ - 1873, + 1800, 0 ], "inputs": { @@ -179,7 +179,7 @@ "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ - 2273, + 2200, 0 ], "inputs": { @@ -190,7 +190,7 @@ "PanoramaEstimation_1": { "nodeType": "PanoramaEstimation", "position": [ - 1673, + 1600, 0 ], "inputs": { @@ -205,8 +205,8 @@ "PanoramaInit_1": { "nodeType": "PanoramaInit", "position": [ - 1034, - -35 + 1000, + -50 ], "inputs": { "input": "{LdrToHdrMerge_1.outSfMData}" @@ -215,7 +215,7 @@ "FeatureMatching_1": { "nodeType": "FeatureMatching", "position": [ - 1473, + 1400, 0 ], "inputs": { @@ -228,7 +228,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3073, + 3000, 0 ], "inputs": { @@ -240,4 +240,4 @@ } } } -} \ No newline at end of file +} From 3745ef6584bd95445c931e18c7dc5b77273c2673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 24 Aug 2023 18:17:53 +0200 Subject: [PATCH 0884/1093] [nodes] Masking: Add parameter to specify the extension of the masks Add the `maskExtension` parameter to specify the extension (by default, "png") of the masks that are to be loaded. --- meshroom/aliceVision/MeshMasking.py | 11 ++++++++++- meshroom/aliceVision/PrepareDenseScene.py | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 193d23610c..32dc526a3d 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "1.1" from meshroom.core import desc @@ -47,6 +47,15 @@ class MeshMasking(desc.AVCommandLineNode): label="Masks Folders", description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), + desc.ChoiceParam( + name="maskExtension", + label="Mask Extension", + description="File extension for the masks to use.", + value="png", + values=["exr", "jpg", "png"], + exclusive=True, + uid=[0] + ), desc.IntParam( name="threshold", label="Threshold", diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index a1e1a7c0ca..556e98cd15 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "3.1" from meshroom.core import desc @@ -46,6 +46,15 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Masks Folders", description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), + desc.ChoiceParam( + name="maskExtension", + label="Mask Extension", + description="File extension for the masks to use.", + value="png", + values=["exr", "jpg", "png"], + exclusive=True, + uid=[0] + ), desc.ChoiceParam( name="outputFileType", label="Output File Type", From 7ffffcca93919a16bc356943a672be363e354500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 24 Aug 2023 18:18:09 +0200 Subject: [PATCH 0885/1093] [nodes] ImageSegmentation: Add parameter to invert mask values --- meshroom/aliceVision/ImageSegmentation.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 8912820b9a..3c99b05edf 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -23,7 +23,6 @@ class ImageSegmentation(desc.AVCommandLineNode): value="", uid=[0], ), - desc.File( name="modelPath", label="Segmentation Model", @@ -31,7 +30,6 @@ class ImageSegmentation(desc.AVCommandLineNode): value="${ALICEVISION_SEMANTIC_SEGMENTATION_MODEL}", uid=[0] ), - desc.ChoiceParam( name="validClasses", label="Classes", @@ -52,7 +50,13 @@ class ImageSegmentation(desc.AVCommandLineNode): exclusive=False, uid=[0], ), - + desc.BoolParam( + name="maskInvert", + label="Invert Masks", + description="Invert mask values. If selected, the pixels corresponding to the mask will be set to 0 instead of 255.", + value=False, + uid=[0], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From e3f904f799167b718603b093fb890ac7b41d4398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 24 Aug 2023 18:27:45 +0200 Subject: [PATCH 0886/1093] [pipelines] Update masking in camera tracking pipelines The segmentation masks are now inverted during the `ImageSegmentation` process, thus the `FeatureExtraction` node does not need to do it anymore. In the CameraTracking pipeline, the `PrepareDenseScene` is now provided with the masks from the `ImageSegmentation` node. --- meshroom/cameraTracking.mg | 72 +++++++++++---------- meshroom/photogrammetryAndCameraTracking.mg | 62 +++++++++--------- 2 files changed, 69 insertions(+), 65 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 62531ea8ea..724edf8715 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "MeshDecimate": "1.0", - "Texturing": "6.0", - "ExportDistortion": "1.0", - "CameraInit": "9.0", - "ImageMatchingMultiSfM": "1.0", + "DepthMap": "4.0", + "SfMTriangulation": "1.0", "StructureFromMotion": "3.1", - "FeatureExtraction": "1.3", "ApplyCalibration": "1.0", - "SfMTriangulation": "1.0", - "Publish": "1.3", - "DepthMap": "4.0", - "DistortionCalibration": "3.0", - "DepthMapFilter": "3.0", - "ImageSegmentation": "1.0", - "CheckerboardDetection": "1.0", + "Texturing": "6.0", + "PrepareDenseScene": "3.1", + "KeyframeSelection": "4.1", "ScenePreview": "1.0", + "DepthMapFilter": "3.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "SfMTransfer": "2.1", + "Publish": "1.3", + "ImageMatchingMultiSfM": "1.0", + "FeatureMatching": "2.0", "Meshing": "7.0", - "PrepareDenseScene": "3.0", + "CameraInit": "9.0", "ImageMatching": "2.0", - "KeyframeSelection": "4.1", + "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "SfMTransfer": "2.1", - "MeshFiltering": "3.0" + "DistortionCalibration": "3.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "ImageSegmentation": "1.0" } }, "graph": { @@ -81,8 +81,7 @@ "inputs": { "input": "{ApplyCalibration_1.output}", "masksFolder": "{ImageSegmentation_1.output}", - "maskExtension": "exr", - "maskInvert": true + "maskExtension": "exr" }, "internalInputs": { "color": "#575963" @@ -193,7 +192,11 @@ 0 ], "inputs": { - "input": "{SfMTriangulation_1.output}" + "input": "{SfMTriangulation_1.output}", + "masksFolders": [ + "{ImageSegmentation_1.output}" + ], + "maskExtension": "exr" }, "internalInputs": { "color": "#3f3138" @@ -407,6 +410,20 @@ "color": "#80766f" } }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true + }, + "internalInputs": { + "color": "#575963" + } + }, "StructureFromMotion_2": { "nodeType": "StructureFromMotion", "position": [ @@ -489,19 +506,6 @@ "label": "FeatureMatchingFramesToKeyframes", "color": "#80766f" } - }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", - "position": [ - 0, - 200 - ], - "inputs": { - "input": "{CameraInit_1.output}" - }, - "internalInputs": { - "color": "#575963" - } } } } \ No newline at end of file diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 342521dd2b..d345cb3200 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "MeshDecimate": "1.0", - "Texturing": "6.0", - "ExportDistortion": "1.0", - "CameraInit": "9.0", - "ImageMatchingMultiSfM": "1.0", + "DepthMap": "4.0", "StructureFromMotion": "3.1", - "FeatureExtraction": "1.3", "ApplyCalibration": "1.0", - "Publish": "1.3", - "DepthMap": "4.0", - "DistortionCalibration": "3.0", - "DepthMapFilter": "3.0", - "ImageSegmentation": "1.0", - "CheckerboardDetection": "1.0", + "Texturing": "6.0", + "PrepareDenseScene": "3.1", + "KeyframeSelection": "4.1", "ScenePreview": "1.0", + "DepthMapFilter": "3.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Publish": "1.3", + "ImageMatchingMultiSfM": "1.0", + "FeatureMatching": "2.0", "Meshing": "7.0", - "PrepareDenseScene": "3.0", + "CameraInit": "9.0", "ImageMatching": "2.0", - "KeyframeSelection": "4.1", + "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "MeshFiltering": "3.0" + "DistortionCalibration": "3.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "ImageSegmentation": "1.0" } }, "graph": { @@ -52,8 +52,7 @@ "inputs": { "input": "{ApplyCalibration_1.output}", "masksFolder": "{ImageSegmentation_1.output}", - "maskExtension": "exr", - "maskInvert": true + "maskExtension": "exr" }, "internalInputs": { "color": "#575963" @@ -288,6 +287,20 @@ "color": "#80766f" } }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true + }, + "internalInputs": { + "color": "#575963" + } + }, "StructureFromMotion_2": { "nodeType": "StructureFromMotion", "position": [ @@ -565,19 +578,6 @@ "internalInputs": { "color": "#575963" } - }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", - "position": [ - 0, - 200 - ], - "inputs": { - "input": "{CameraInit_1.output}" - }, - "internalInputs": { - "color": "#575963" - } } } } \ No newline at end of file From 3747e24e2e2740a61f66439be803ba57eb541f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 24 Aug 2023 21:11:04 +0200 Subject: [PATCH 0887/1093] [nodes] KeyframeSelection: Add `minBlockSize` param for multi-threading --- meshroom/aliceVision/KeyframeSelection.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index fcc2a6a717..e42eba9a9f 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,4 +1,4 @@ -__version__ = "4.1" +__version__ = "4.2" import os from meshroom.core import desc @@ -250,6 +250,18 @@ class KeyframeSelection(desc.AVCommandLineNode): enabled=lambda node: node.smartSelection.enabled, advanced=True ), + desc.IntParam( + name="minBlockSize", + label="Multi-Threading Minimum Block Size", + description="The minimum number of frames to process for a thread to be spawned.\n" + "If using all the available threads implies processing less than this value in every thread, then less threads should be spawned,\n" + "and each will process at least 'minBlockSize' (except maybe for the very last thread, that might process less).", + value=10, + range=(1, 1000, 1), + uid=[], + enabled=lambda node: node.smartSelection.enabled, + advanced=True + ) ] ) ] From 57ef62bfc302f8540d452b2d239e09a2a7c559aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 24 Aug 2023 22:54:16 +0200 Subject: [PATCH 0888/1093] [nodes] KeyframeSelection: Add param to use masks for the smart selection Segmentation masks may be provided to exclude some parts of the frame from the score computations if the smart method is selected. --- meshroom/aliceVision/KeyframeSelection.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index e42eba9a9f..6ae6fd4e02 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,4 +1,4 @@ -__version__ = "4.2" +__version__ = "5.0" import os from meshroom.core import desc @@ -119,6 +119,20 @@ class KeyframeSelection(desc.AVCommandLineNode): value="${ALICEVISION_SENSOR_DB}", uid=[0], ), + desc.ListAttribute( + elementDesc=desc.File( + name="masks", + label="Masks Path", + description="Directory containing masks to apply to the frames.", + value="", + uid=[0], + ), + name="maskPaths", + label="Masks", + description="Masks (e.g. segmentation masks) used to exclude some parts of the frames from the score computations\n" + "for the smart keyframe selection.", + enabled=lambda node: node.selectionMethod.useSmartSelection.value + ), desc.GroupAttribute( name="selectionMethod", label="Keyframe Selection Method", From 179ef659b245b03337be371db57184db1e6c4e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 25 Aug 2023 17:38:45 +0200 Subject: [PATCH 0889/1093] [pipelines] Update templates with latest `KeyframeSelection` version --- meshroom/cameraTracking.mg | 22 ++++++++++----------- meshroom/photogrammetryAndCameraTracking.mg | 20 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 724edf8715..1aee6fef31 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "DepthMap": "4.0", + "ApplyCalibration": "1.0", "SfMTriangulation": "1.0", "StructureFromMotion": "3.1", - "ApplyCalibration": "1.0", - "Texturing": "6.0", - "PrepareDenseScene": "3.1", - "KeyframeSelection": "4.1", - "ScenePreview": "1.0", "DepthMapFilter": "3.0", - "MeshDecimate": "1.0", "MeshFiltering": "3.0", - "SfMTransfer": "2.1", - "Publish": "1.3", + "KeyframeSelection": "5.0", + "Texturing": "6.0", + "PrepareDenseScene": "3.1", "ImageMatchingMultiSfM": "1.0", "FeatureMatching": "2.0", - "Meshing": "7.0", "CameraInit": "9.0", + "MeshDecimate": "1.0", + "ScenePreview": "1.0", "ImageMatching": "2.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", + "SfMTransfer": "2.1", "ExportAnimatedCamera": "2.0", + "Publish": "1.3", "DistortionCalibration": "3.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", - "ImageSegmentation": "1.0" + "ImageSegmentation": "1.0", + "DepthMap": "4.0", + "Meshing": "7.0" } }, "graph": { diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index d345cb3200..a45beca954 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "DepthMap": "4.0", - "StructureFromMotion": "3.1", "ApplyCalibration": "1.0", - "Texturing": "6.0", - "PrepareDenseScene": "3.1", - "KeyframeSelection": "4.1", - "ScenePreview": "1.0", + "StructureFromMotion": "3.1", "DepthMapFilter": "3.0", - "MeshDecimate": "1.0", "MeshFiltering": "3.0", - "Publish": "1.3", + "KeyframeSelection": "5.0", + "Texturing": "6.0", + "PrepareDenseScene": "3.1", "ImageMatchingMultiSfM": "1.0", "FeatureMatching": "2.0", - "Meshing": "7.0", "CameraInit": "9.0", + "MeshDecimate": "1.0", + "ScenePreview": "1.0", "ImageMatching": "2.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", + "Publish": "1.3", "DistortionCalibration": "3.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", - "ImageSegmentation": "1.0" + "ImageSegmentation": "1.0", + "DepthMap": "4.0", + "Meshing": "7.0" } }, "graph": { From e2b1a5fb2ba8706f8b8b60c11114d91c7b4e8a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 28 Aug 2023 10:07:43 +0200 Subject: [PATCH 0890/1093] [pipelines] use segmentation masks in keyframe selection --- meshroom/cameraTracking.mg | 33 +++++++++++---------- meshroom/photogrammetryAndCameraTracking.mg | 29 ++++++++++-------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 1aee6fef31..48a5928b00 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "DepthMap": "4.0", + "Texturing": "6.0", + "ImageSegmentation": "1.0", "ApplyCalibration": "1.0", - "SfMTriangulation": "1.0", - "StructureFromMotion": "3.1", - "DepthMapFilter": "3.0", - "MeshFiltering": "3.0", + "ScenePreview": "1.0", + "MeshDecimate": "1.0", "KeyframeSelection": "5.0", - "Texturing": "6.0", "PrepareDenseScene": "3.1", + "SfMTransfer": "2.1", + "Publish": "1.3", + "MeshFiltering": "3.0", + "DepthMapFilter": "3.0", + "Meshing": "7.0", "ImageMatchingMultiSfM": "1.0", "FeatureMatching": "2.0", "CameraInit": "9.0", - "MeshDecimate": "1.0", - "ScenePreview": "1.0", "ImageMatching": "2.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", - "SfMTransfer": "2.1", + "SfMTriangulation": "1.0", + "StructureFromMotion": "3.1", "ExportAnimatedCamera": "2.0", - "Publish": "1.3", - "DistortionCalibration": "3.0", - "ExportDistortion": "1.0", - "FeatureExtraction": "1.3", - "ImageSegmentation": "1.0", - "DepthMap": "4.0", - "Meshing": "7.0" + "DistortionCalibration": "3.0" } }, "graph": { @@ -151,6 +151,9 @@ "inputs": { "inputPaths": [ "{ApplyCalibration_1.output}" + ], + "maskPaths": [ + "{ImageSegmentation_1.output}" ] }, "internalInputs": { diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index a45beca954..b036e38ad0 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "DepthMap": "4.0", + "Texturing": "6.0", + "ImageSegmentation": "1.0", "ApplyCalibration": "1.0", - "StructureFromMotion": "3.1", - "DepthMapFilter": "3.0", - "MeshFiltering": "3.0", + "ScenePreview": "1.0", + "MeshDecimate": "1.0", "KeyframeSelection": "5.0", - "Texturing": "6.0", "PrepareDenseScene": "3.1", + "Publish": "1.3", + "MeshFiltering": "3.0", + "DepthMapFilter": "3.0", + "Meshing": "7.0", "ImageMatchingMultiSfM": "1.0", "FeatureMatching": "2.0", "CameraInit": "9.0", - "MeshDecimate": "1.0", - "ScenePreview": "1.0", "ImageMatching": "2.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", + "StructureFromMotion": "3.1", "ExportAnimatedCamera": "2.0", - "Publish": "1.3", - "DistortionCalibration": "3.0", - "ExportDistortion": "1.0", - "FeatureExtraction": "1.3", - "ImageSegmentation": "1.0", - "DepthMap": "4.0", - "Meshing": "7.0" + "DistortionCalibration": "3.0" } }, "graph": { @@ -122,6 +122,9 @@ "inputs": { "inputPaths": [ "{ApplyCalibration_1.output}" + ], + "maskPaths": [ + "{ImageSegmentation_1.output}" ] }, "internalInputs": { From 93bbaa8beecaeba5d329068a1058a0cf7bfc6de0 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 29 Aug 2023 08:55:36 +0200 Subject: [PATCH 0891/1093] [Nodes] HDR: Add "auto" option for calibration method and working color space in sampling, calibration and merging nodes. --- meshroom/aliceVision/LdrToHdrCalibration.py | 9 +++++---- meshroom/aliceVision/LdrToHdrMerge.py | 4 ++-- meshroom/aliceVision/LdrToHdrSampling.py | 9 +++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 296fc2b146..8bae2b9e27 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -86,12 +86,13 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): name="calibrationMethod", label="Calibration Method", description="Method used for camera calibration:\n" + " - AUTO: If RAW images are detected then Linear behavior is selected else Debevec calibration method is enabled.\n" " - Linear: Disables the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" " - Debevec: This is the standard method for HDR calibration.\n" " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" " - Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=["linear", "debevec", "grossberg", "laguerre"], - value="debevec", + values=["AUTO", "linear", "debevec", "grossberg", "laguerre"], + value="AUTO", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, @@ -124,8 +125,8 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Allows you to choose the color space in which the data are processed.", - value="sRGB", - values=["sRGB", "Linear", "ACES2065-1", "ACEScg"], + value="AUTO", + values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[], group="user", # not used directly on the command line diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 2f127a9869..9dae0035e7 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -168,8 +168,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Allows you to choose the color space in which the data are processed.", - value="sRGB", - values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + value="AUTO", + values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index f2766bd143..cc04f8c8dd 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -100,12 +100,13 @@ class LdrToHdrSampling(desc.AVCommandLineNode): name="calibrationMethod", label="Calibration Method", description="Method used for camera calibration:\n" + " - AUTO: If RAW images are detected then Linear behavior is selected else Debevec calibration method is enabled.\n" " - Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" " - Debevec: This is the standard method for HDR calibration.\n" " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" " - Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=["linear", "debevec", "grossberg", "laguerre"], - value="debevec", + values=["AUTO", "linear", "debevec", "grossberg", "laguerre"], + value="AUTO", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, @@ -124,8 +125,8 @@ class LdrToHdrSampling(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Allows you to choose the color space in which the data are processed.", - value="sRGB", - values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + value="AUTO", + values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, From 8bd74feec62b151ce6e40a92932670557a74e14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 29 Aug 2023 15:30:07 +0200 Subject: [PATCH 0892/1093] [blender] preview: add masks in compositing graph --- meshroom/blender/scripts/preview.py | 69 +++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 13 deletions(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index e9e7a2758e..0342db44aa 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -36,12 +36,20 @@ def createParser(): ) parser.add_argument( "--undistortedImages", metavar='FILE', required=False, - help="Save the generated file to the specified path", + help="Path to folder containing undistorted images to use as background.", ) parser.add_argument( "--model", metavar='FILE', required=True, help="Point Cloud or Mesh used in the rendering.", ) + parser.add_argument( + "--useMasks", type=lambda x: (str(x).lower() == 'true'), required=True, + help="Apply mask to the rendered geometry or not.", + ) + parser.add_argument( + "--masks", metavar='FILE', required=False, + help="Path to folder containing masks to apply on rendered geometry.", + ) parser.add_argument( "--particleSize", type=float, required=False, help="Scale of particles used to show the point cloud", @@ -136,17 +144,26 @@ def initCompositing(): '''Initialize Blender compositing graph for adding background image to render.''' bpy.context.scene.render.film_transparent = True bpy.context.scene.use_nodes = True - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") - bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") + nodeAlphaOver = bpy.context.scene.node_tree.nodes.new(type="CompositorNodeAlphaOver") + nodeSetAlpha = bpy.context.scene.node_tree.nodes.new(type="CompositorNodeSetAlpha") + nodeBackground = bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") + nodeMask = bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") bpy.context.scene.node_tree.links.new( - bpy.context.scene.node_tree.nodes['Alpha Over'].outputs['Image'], + nodeAlphaOver.outputs['Image'], bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) bpy.context.scene.node_tree.links.new( - bpy.context.scene.node_tree.nodes['Image'].outputs['Image'], - bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[1]) + nodeBackground.outputs['Image'], + nodeAlphaOver.inputs[1]) bpy.context.scene.node_tree.links.new( bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], - bpy.context.scene.node_tree.nodes['Alpha Over'].inputs[2]) + nodeSetAlpha.inputs['Image']) + bpy.context.scene.node_tree.links.new( + nodeMask.outputs['Image'], + nodeSetAlpha.inputs['Alpha']) + bpy.context.scene.node_tree.links.new( + nodeSetAlpha.outputs['Image'], + nodeAlphaOver.inputs[2]) + return nodeBackground, nodeMask def setupRender(view, intrinsic, pose, outputDir): @@ -157,7 +174,7 @@ def setupRender(view, intrinsic, pose, outputDir): bpy.context.scene.render.filepath = os.path.abspath(outputDir + '/' + baseImgName + '_preview.jpg') -def setupBackground(view, folderUndistorted): +def setupBackground(view, folderUndistorted, nodeBackground): '''Retrieve undistorted image corresponding to view and use it as background.''' matches = glob.glob(folderUndistorted + '/*' + view['viewId'] + "*") # try with viewId if len(matches) == 0: @@ -168,10 +185,25 @@ def setupBackground(view, folderUndistorted): return None undistortedImgPath = matches[0] img = bpy.data.images.load(filepath=undistortedImgPath) - bpy.context.scene.node_tree.nodes["Image"].image = img + nodeBackground.image = img return img +def setupMask(view, folderMasks, nodeMask): + '''Retrieve mask corresponding to view and use it in compositing graph.''' + matches = glob.glob(folderMasks + '/*' + view['viewId'] + "*") # try with viewId + if len(matches) == 0: + baseImgName = os.path.splitext(os.path.basename(view['path']))[0] + matches = glob.glob(folderMasks + '/*' + baseImgName + "*") # try with image name + if len(matches) == 0: + # no background image found + return None + maskPath = matches[0] + mask = bpy.data.images.load(filepath=maskPath) + nodeMask.image = mask + return mask + + def loadModel(filename): '''Load model in Alembic of OBJ format. Make sure orientation matches camera orientation.''' if filename.lower().endswith('.obj'): @@ -300,8 +332,7 @@ def main(): initScene() print("Init compositing") - if args.useBackground: - initCompositing() + nodeBackground, nodeMask = initCompositing() print("Parse cameras SfM file") views, intrinsics, poses = parseSfMCameraFile(args.cameras) @@ -344,19 +375,31 @@ def main(): continue print("Rendering view " + view['viewId']) + img = None if args.useBackground: - img = setupBackground(view, args.undistortedImages) + img = setupBackground(view, args.undistortedImages, nodeBackground) if not img: # background setup failed # do not render this frame continue + + mask = None + if args.useMasks: + mask = setupMask(view, args.masks, nodeMask) + if not mask: + # mask setup failed + # do not render this frame + continue + setupRender(view, intrinsic, pose, args.output) bpy.ops.render.render(write_still=True) + # clear memory if img: - # clear memory bpy.data.images.remove(img) + if mask: + bpy.data.images.remove(mask) print("Done") return 0 From 1be026a8901828aad0a82ac113f55ff6172061f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 29 Aug 2023 15:30:30 +0200 Subject: [PATCH 0893/1093] [nodes] ScenePreview: add masks arguments --- meshroom/blender/ScenePreview.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index fb39467e5e..947b1e0515 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc import os.path @@ -66,6 +66,21 @@ class ScenePreview(desc.CommandLineNode): uid=[0], enabled=lambda node: node.useBackground.value, ), + desc.BoolParam( + name="useMasks", + label="Use Masks", + description="Apply mask to the rendered geometry.", + value=True, + uid=[0], + ), + desc.File( + name="masks", + label="Masks", + description="Folder containing the masks.", + value="", + uid=[0], + enabled=lambda node: node.useMasks.value, + ), desc.GroupAttribute( name="pointCloudParams", label="Point Cloud Settings", From cd5b80dae1c7e2c93287496dbe6eb65e66c17188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 29 Aug 2023 16:00:19 +0200 Subject: [PATCH 0894/1093] [blender] preview: correctly handle useBackground and useMasks in compositing graph --- meshroom/blender/ScenePreview.py | 2 +- meshroom/blender/scripts/preview.py | 35 +++++++++++++++-------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 947b1e0515..3675824888 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -68,7 +68,7 @@ class ScenePreview(desc.CommandLineNode): ), desc.BoolParam( name="useMasks", - label="Use Masks", + label="Apply Masks", description="Apply mask to the rendered geometry.", value=True, uid=[0], diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 0342db44aa..fdb2dc09d6 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -140,7 +140,7 @@ def initScene(): bpy.context.scene.cycles.use_denoising = False -def initCompositing(): +def initCompositing(useBackground, useMasks): '''Initialize Blender compositing graph for adding background image to render.''' bpy.context.scene.render.film_transparent = True bpy.context.scene.use_nodes = True @@ -148,21 +148,22 @@ def initCompositing(): nodeSetAlpha = bpy.context.scene.node_tree.nodes.new(type="CompositorNodeSetAlpha") nodeBackground = bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") nodeMask = bpy.context.scene.node_tree.nodes.new(type="CompositorNodeImage") - bpy.context.scene.node_tree.links.new( - nodeAlphaOver.outputs['Image'], - bpy.context.scene.node_tree.nodes['Composite'].inputs['Image']) - bpy.context.scene.node_tree.links.new( - nodeBackground.outputs['Image'], - nodeAlphaOver.inputs[1]) - bpy.context.scene.node_tree.links.new( - bpy.context.scene.node_tree.nodes['Render Layers'].outputs['Image'], - nodeSetAlpha.inputs['Image']) - bpy.context.scene.node_tree.links.new( - nodeMask.outputs['Image'], - nodeSetAlpha.inputs['Alpha']) - bpy.context.scene.node_tree.links.new( - nodeSetAlpha.outputs['Image'], - nodeAlphaOver.inputs[2]) + nodeRender = bpy.context.scene.node_tree.nodes['Render Layers'] + nodeComposite = bpy.context.scene.node_tree.nodes['Composite'] + if useBackground and useMasks: + bpy.context.scene.node_tree.links.new(nodeBackground.outputs['Image'], nodeAlphaOver.inputs[1]) + bpy.context.scene.node_tree.links.new(nodeRender.outputs['Image'], nodeSetAlpha.inputs['Image']) + bpy.context.scene.node_tree.links.new(nodeMask.outputs['Image'], nodeSetAlpha.inputs['Alpha']) + bpy.context.scene.node_tree.links.new(nodeSetAlpha.outputs['Image'], nodeAlphaOver.inputs[2]) + bpy.context.scene.node_tree.links.new(nodeAlphaOver.outputs['Image'], nodeComposite.inputs['Image']) + elif useBackground: + bpy.context.scene.node_tree.links.new(nodeBackground.outputs['Image'], nodeAlphaOver.inputs[1]) + bpy.context.scene.node_tree.links.new(nodeRender.outputs['Image'], nodeAlphaOver.inputs[2]) + bpy.context.scene.node_tree.links.new(nodeAlphaOver.outputs['Image'], nodeComposite.inputs['Image']) + elif useMasks: + bpy.context.scene.node_tree.links.new(nodeRender.outputs['Image'], nodeSetAlpha.inputs['Image']) + bpy.context.scene.node_tree.links.new(nodeMask.outputs['Image'], nodeSetAlpha.inputs['Alpha']) + bpy.context.scene.node_tree.links.new(nodeSetAlpha.outputs['Image'], nodeComposite.inputs['Image']) return nodeBackground, nodeMask @@ -332,7 +333,7 @@ def main(): initScene() print("Init compositing") - nodeBackground, nodeMask = initCompositing() + nodeBackground, nodeMask = initCompositing(args.useBackground, args.useMasks) print("Parse cameras SfM file") views, intrinsics, poses = parseSfMCameraFile(args.cameras) From 37e3b7fed40e0536cfd0f38fb8fc065aa4987a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 29 Aug 2023 16:16:26 +0200 Subject: [PATCH 0895/1093] [pipelines] use segmentation masks in scene preview --- meshroom/cameraTracking.mg | 19 ++++++++++--------- meshroom/photogrammetryAndCameraTracking.mg | 17 +++++++++-------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 48a5928b00..2f9c2ec2cd 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportDistortion": "1.0", - "FeatureExtraction": "1.3", - "DepthMap": "4.0", - "Texturing": "6.0", "ImageSegmentation": "1.0", "ApplyCalibration": "1.0", - "ScenePreview": "1.0", "MeshDecimate": "1.0", - "KeyframeSelection": "5.0", "PrepareDenseScene": "3.1", + "MeshFiltering": "3.0", "SfMTransfer": "2.1", "Publish": "1.3", - "MeshFiltering": "3.0", "DepthMapFilter": "3.0", "Meshing": "7.0", "ImageMatchingMultiSfM": "1.0", + "ScenePreview": "2.0", "FeatureMatching": "2.0", "CameraInit": "9.0", "ImageMatching": "2.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "SfMTriangulation": "1.0", + "KeyframeSelection": "5.0", "StructureFromMotion": "3.1", "ExportAnimatedCamera": "2.0", - "DistortionCalibration": "3.0" + "DistortionCalibration": "3.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "DepthMap": "4.0", + "Texturing": "6.0" } }, "graph": { @@ -363,7 +363,8 @@ "inputs": { "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", - "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentation_1.output}" }, "internalInputs": { "color": "#4c594c" diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index b036e38ad0..cfdbe91a46 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportDistortion": "1.0", - "FeatureExtraction": "1.3", - "DepthMap": "4.0", - "Texturing": "6.0", "ImageSegmentation": "1.0", "ApplyCalibration": "1.0", - "ScenePreview": "1.0", "MeshDecimate": "1.0", - "KeyframeSelection": "5.0", "PrepareDenseScene": "3.1", "Publish": "1.3", "MeshFiltering": "3.0", "DepthMapFilter": "3.0", "Meshing": "7.0", "ImageMatchingMultiSfM": "1.0", + "ScenePreview": "2.0", "FeatureMatching": "2.0", "CameraInit": "9.0", "ImageMatching": "2.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", + "KeyframeSelection": "5.0", "StructureFromMotion": "3.1", "ExportAnimatedCamera": "2.0", - "DistortionCalibration": "3.0" + "DistortionCalibration": "3.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "DepthMap": "4.0", + "Texturing": "6.0" } }, "graph": { @@ -240,7 +240,8 @@ "inputs": { "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", - "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}" + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentation_1.output}" }, "internalInputs": { "color": "#4c594c" From de3b1f92f4632063c4085da8e0a8d1dfde672302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 4 Sep 2023 15:08:58 +0200 Subject: [PATCH 0896/1093] [nodes] HDR Fusion: Harmonize descriptions and ChoiceParams' options --- meshroom/aliceVision/LdrToHdrCalibration.py | 19 ++++++++++--------- meshroom/aliceVision/LdrToHdrMerge.py | 7 ++++--- meshroom/aliceVision/LdrToHdrSampling.py | 19 ++++++++++--------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 8bae2b9e27..27e1e784d4 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -86,13 +86,13 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): name="calibrationMethod", label="Calibration Method", description="Method used for camera calibration:\n" - " - AUTO: If RAW images are detected then Linear behavior is selected else Debevec calibration method is enabled.\n" - " - Linear: Disables the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" - " - Debevec: This is the standard method for HDR calibration.\n" - " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" + " - Auto: If RAW images are detected, the 'Linear' calibration method will be used. Otherwise, the 'Debevec' calibration method will be used.\n" + " - Linear: Disables the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), they will be automatically converted to linear.\n" + " - Debevec: Standard method for HDR calibration.\n" + " - Grossberg: Based on a learned database of cameras, allows to reduce the Camera Response Function to a few parameters while keeping all the precision.\n" " - Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=["AUTO", "linear", "debevec", "grossberg", "laguerre"], - value="AUTO", + values=["auto", "linear", "debevec", "grossberg", "laguerre"], + value="auto", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, @@ -124,9 +124,10 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): desc.ChoiceParam( name="workingColorSpace", label="Working Color Space", - description="Allows you to choose the color space in which the data are processed.", - value="AUTO", - values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg"], + description="Color space in which the data are processed.\n" + "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", + value="auto", + values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[], group="user", # not used directly on the command line diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 9dae0035e7..7431ff8b14 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -167,9 +167,10 @@ class LdrToHdrMerge(desc.AVCommandLineNode): desc.ChoiceParam( name="workingColorSpace", label="Working Color Space", - description="Allows you to choose the color space in which the data are processed.", - value="AUTO", - values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + description="Color space in which the data are processed.\n" + "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", + value="auto", + values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index cc04f8c8dd..1952f87387 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -100,13 +100,13 @@ class LdrToHdrSampling(desc.AVCommandLineNode): name="calibrationMethod", label="Calibration Method", description="Method used for camera calibration:\n" - " - AUTO: If RAW images are detected then Linear behavior is selected else Debevec calibration method is enabled.\n" - " - Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" - " - Debevec: This is the standard method for HDR calibration.\n" - " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" + " - Auto: If RAW images are detected, the 'Linear' calibration method will be used. Otherwise, the 'Debevec' calibration method will be used.\n" + " - Linear: Disables the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), they will be automatically converted to linear.\n" + " - Debevec: Standard method for HDR calibration.\n" + " - Grossberg: Based on a learned database of cameras, allows to reduce the Camera Response Function to a few parameters while keeping all the precision.\n" " - Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=["AUTO", "linear", "debevec", "grossberg", "laguerre"], - value="AUTO", + values=["auto", "linear", "debevec", "grossberg", "laguerre"], + value="auto", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, @@ -124,9 +124,10 @@ class LdrToHdrSampling(desc.AVCommandLineNode): desc.ChoiceParam( name="workingColorSpace", label="Working Color Space", - description="Allows you to choose the color space in which the data are processed.", - value="AUTO", - values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + description="Color space in which the data are processed.\n" + "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", + value="auto", + values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, From bb98455ebd0978b77de57d8d8b9bec67bd5b7f42 Mon Sep 17 00:00:00 2001 From: "Fabien Servant @ TCS" <100348063+servantftechnicolor@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:51:05 +0200 Subject: [PATCH 0897/1093] Disable pyramid export for fisheye --- meshroom/panoramaFisheyeHdr.mg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index ec932d9228..4556de3d66 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -157,7 +157,7 @@ "inputs": { "inputPanorama": "{PanoramaMerging_1.outputPanorama}", "fillHoles": true, - "exportLevels": true + "exportLevels": false } }, "PanoramaPrepareImages_1": { From 6c552d7450b5fb0a7e6dbabae34f0d57db2d74c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 8 Sep 2023 19:30:15 +0200 Subject: [PATCH 0898/1093] [nodes] StructureFromMotion: Add new `logIntermediateSteps` parameter If enabled, the current state of the scene will be dumped as an SfMData file every 3 resections. Before this option was added, the intermediate steps were always dumped. --- meshroom/aliceVision/StructureFromMotion.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 0dac53002a..92adf44e6d 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,4 +1,4 @@ -__version__ = "3.1" +__version__ = "3.2" from meshroom.core import desc @@ -372,6 +372,14 @@ class StructureFromMotion(desc.AVCommandLineNode): uid=[], advanced=True, ), + desc.BoolParam( + name="logIntermediateSteps", + label="Log Intermediate Steps", + description="Dump the current state of the scene as an SfMData file every 3 resections.", + value=False, + uid=[], + advanced=True + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From ef00290c8f607e478178311daade741cfa883e1e Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <fabien.servant@technicolor.com> Date: Tue, 16 May 2023 11:51:58 +0200 Subject: [PATCH 0899/1093] Node for estimating relative pose per pairs --- .../aliceVision/RelativePoseEstimating.py | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 meshroom/aliceVision/RelativePoseEstimating.py diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py new file mode 100644 index 0000000000..d8d2af16ac --- /dev/null +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -0,0 +1,72 @@ +__version__ = "1.0" + +from meshroom.core import desc + +class RelativePoseEstimating(desc.AVCommandLineNode): + commandLine = 'aliceVision_relativePoseEstimating {allParams}' + size = desc.DynamicNodeSize('input') + + parallelization = desc.Parallelization(blockSize=25) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + category = 'Sparse Reconstruction' + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.File( + name='tracksFilename', + label='Tracks file', + description='Tracks file.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + exclusive=False, + uid=[0], + joinChar=',', + ), + 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='Pairs Infos', + description='Path to the output Pairs info files directory', + value=desc.Node.internalFolder, + uid=[], + ) + ] From 176363470a147e3c074ab68faf2d23c1a46a37a8 Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <fabien.servant@technicolor.com> Date: Tue, 16 May 2023 13:40:14 +0200 Subject: [PATCH 0900/1093] sfmBootstraping node --- meshroom/aliceVision/SfmBootstraping.py | 77 +++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 meshroom/aliceVision/SfmBootstraping.py diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py new file mode 100644 index 0000000000..ff3916ac57 --- /dev/null +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -0,0 +1,77 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class SfMBootStraping(desc.AVCommandLineNode): + commandLine = 'aliceVision_sfmBootstraping {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Sparse Reconstruction' + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.File( + name='tracksFilename', + label='Tracks file', + description='Tracks file.', + value='', + uid=[0], + ), + desc.File( + name='pairs', + label='Pairs file', + description='Information on pairs.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + exclusive=False, + uid=[0], + joinChar=',', + ), + 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='SfMData', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfm.json', + uid=[], + ) + ] From 8a39509d2be457f511a1bca7e4ca4f0314087e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 15 Sep 2023 16:02:03 +0200 Subject: [PATCH 0901/1093] [nodes] SfMBootstraping: Fix labels and harmonize quotes usage --- .../aliceVision/RelativePoseEstimating.py | 44 +++++++-------- meshroom/aliceVision/SfmBootstraping.py | 54 +++++++++---------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index d8d2af16ac..22c805f3c0 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -15,10 +15,10 @@ class RelativePoseEstimating(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.ListAttribute( @@ -34,28 +34,28 @@ class RelativePoseEstimating(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.File( - name='tracksFilename', - label='Tracks file', - description='Tracks file.', - value='', + name="tracksFilename", + label="Tracks File", + description="Tracks file.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), 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'], + 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=[], ) @@ -63,9 +63,9 @@ class RelativePoseEstimating(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Pairs Infos', - description='Path to the output Pairs info files directory', + name="output", + label="Pairs Info", + description="Path to the output Pairs info files directory.", value=desc.Node.internalFolder, uid=[], ) diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index ff3916ac57..c33c1f7452 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -13,10 +13,10 @@ class SfMBootStraping(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.ListAttribute( @@ -32,35 +32,35 @@ class SfMBootStraping(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.File( - name='tracksFilename', - label='Tracks file', - description='Tracks file.', - value='', + name="tracksFilename", + label="Tracks File", + description="Tracks file.", + value="", uid=[0], ), desc.File( - name='pairs', - label='Pairs file', - description='Information on pairs.', - value='', + name="pairs", + label="Pairs File", + description="Information on pairs.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), 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'], + 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=[], ) @@ -68,10 +68,10 @@ class SfMBootStraping(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.json', + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.json", uid=[], ) ] From 97d575f3d9b8e290d22b5addfbf4c95f86640b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 19 Sep 2023 15:57:28 +0200 Subject: [PATCH 0902/1093] [nodes] PanoramaPostProcessing: Add attributes to change the outputs' names Add input String parameters to determine the name of the generated outputs. These attributes include: - the name of the generated output panorama - the name of the generated output panorama preview The base folder for these outputs remains the node's cache, only the name of the outputs themselves can be updated. The output attribute about the downscaled levels of the panorama is also modified with the new name of the pyramid levels, which is a concatenation of the generated panorama's name and the size of the current level. --- .../aliceVision/PanoramaPostProcessing.py | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index f361561235..8052edba62 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -83,6 +83,24 @@ class PanoramaPostProcessing(desc.CommandLineNode): uid=[0], enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"] ), + desc.StringParam( + name="panoramaName", + label="Output Panorama Name", + description="Name of the output panorama.", + value="panorama.exr", + uid=[], + group=None, + advanced=True + ), + desc.StringParam( + name="previewName", + label="Panorama Preview Name", + description="Name of the preview of the output panorama.", + value="panoramaPreview.jpg", + uid=[], + group=None, + advanced=True, + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", @@ -100,7 +118,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): label="Output Panorama", description="Generated panorama in EXR format.", semantic="image", - value=desc.Node.internalFolder + "panorama.exr", + value=lambda attr: desc.Node.internalFolder + attr.node.panoramaName.value, uid=[], ), desc.File( @@ -108,14 +126,14 @@ class PanoramaPostProcessing(desc.CommandLineNode): label="Output Panorama Preview", description="Preview of the generated panorama in JPG format.", semantic="image", - value=desc.Node.internalFolder + "panoramaPreview.jpg", + value=lambda attr: desc.Node.internalFolder + attr.node.previewName.value, uid=[], ), desc.File( name="downscaledPanoramaLevels", label="Downscaled Panorama Levels", description="Downscaled versions of the generated panorama.", - value=desc.Node.internalFolder + "level_*.exr", + value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.panoramaName.value)[0] + "_level_*.exr", uid=[], group='', ), From 7d4a483d80e5eaef966566b583f448e258788690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 19 Sep 2023 15:58:40 +0200 Subject: [PATCH 0903/1093] [pipelines] Panorama: Update the `PanoramaPostProcessing` node's version --- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 4556de3d66..797976ad7a 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -11,7 +11,7 @@ "PanoramaPrepareImages": "1.1", "PanoramaInit": "2.0", "Publish": "1.3", - "PanoramaPostProcessing": "2.0", + "PanoramaPostProcessing": "2.1", "FeatureMatching": "2.0", "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index a7ee3247dc..a96bb8e000 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -11,7 +11,7 @@ "PanoramaPrepareImages": "1.1", "PanoramaInit": "2.0", "Publish": "1.3", - "PanoramaPostProcessing": "2.0", + "PanoramaPostProcessing": "2.1", "FeatureMatching": "2.0", "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", From bf53b8d74f9a97220ba2a30247e5278c48f53db9 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 20 Sep 2023 21:06:17 +0200 Subject: [PATCH 0904/1093] [nodes] ImageSegmentation: update GPU requirements to avoid computation failures --- meshroom/aliceVision/ImageSegmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 3c99b05edf..05cf592251 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -6,7 +6,7 @@ class ImageSegmentation(desc.AVCommandLineNode): commandLine = 'aliceVision_imageSegmentation {allParams}' size = desc.DynamicNodeSize('input') - gpu = desc.Level.NORMAL + gpu = desc.Level.INTENSIVE parallelization = desc.Parallelization(blockSize=50) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' From 7c79cc245c9da2df19c2a6e73e3f95108a7e9905 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 21 Sep 2023 00:07:09 +0200 Subject: [PATCH 0905/1093] [nodes] Meshing: export minVis --- meshroom/aliceVision/Meshing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 7fb7406c9e..85452bbb65 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -244,6 +244,15 @@ class Meshing(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.IntParam( + name="minVis", + label="Min Observations", + description="Filter points based on their number of observations.", + value=2, + range=(1, 20, 1), + uid=[0], + advanced=True, + ), desc.FloatParam( name="pixSizeMarginInitCoef", label="Pix Size Margin Init Coef", From 88c2bae88d8b3d29a373a89d77d62c4e3175cb5c Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <servantf@frarmt5018.mikros.int> Date: Thu, 21 Sep 2023 10:32:50 +0200 Subject: [PATCH 0906/1093] option to Align sfm at the end --- meshroom/aliceVision/StructureFromMotion.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 92adf44e6d..0928118223 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,4 +1,4 @@ -__version__ = "3.2" +__version__ = "3.3" from meshroom.core import desc @@ -348,6 +348,13 @@ class StructureFromMotion(desc.AVCommandLineNode): value=True, uid=[0], ), + desc.BoolParam( + name="useAutoTransform", + label="Automatically align result", + description="Enable/Disable automatic alignment of result.", + value=True, + uid=[0], + ), desc.File( name="initialPairA", label="Initial Pair A", From 2869248c50b9bca1bc663c8dfc9e02d21ab4b08a Mon Sep 17 00:00:00 2001 From: Fabien SERVANT <servantf@frarmt5018.mikros.int> Date: Thu, 21 Sep 2023 17:54:44 +0200 Subject: [PATCH 0907/1093] NodalSfm new node --- meshroom/aliceVision/NodalSfM.py | 77 +++++++++++++++++++ .../aliceVision/RelativePoseEstimating.py | 7 ++ 2 files changed, 84 insertions(+) create mode 100644 meshroom/aliceVision/NodalSfM.py diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py new file mode 100644 index 0000000000..88bb093b8c --- /dev/null +++ b/meshroom/aliceVision/NodalSfM.py @@ -0,0 +1,77 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class NodalSfM(desc.AVCommandLineNode): + commandLine = 'aliceVision_nodalSfM {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Sparse Reconstruction' + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.File( + name='tracksFilename', + label='Tracks file', + description='Tracks file.', + value='', + uid=[0], + ), + desc.File( + name='pairs', + label='Pairs file', + description='Information on pairs.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + exclusive=False, + uid=[0], + joinChar=',', + ), + 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='SfMData', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfm.abc', + uid=[], + ) + ] diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 22c805f3c0..01b7ddbbaa 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -50,6 +50,13 @@ class RelativePoseEstimating(desc.AVCommandLineNode): uid=[0], joinChar=",", ), + desc.BoolParam( + name="enforcePureRotation", + label="Enforce pure rotation", + description="Enforce pure rotation as a model", + value=False, + uid=[0], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From 0420891ac262b7cb91e55e8da1af1fc22902c9aa Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 21 Sep 2023 21:36:42 +0200 Subject: [PATCH 0908/1093] [nodes] CameraInit: fix tooltip focal is in mm --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index be0dab26d4..16460b3d0d 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -31,7 +31,7 @@ Intrinsic = [ desc.IntParam(name="intrinsicId", label="ID", description="Intrinsic UID.", value=-1, uid=[0], range=None), desc.FloatParam(name="initialFocalLength", label="Initial Focal Length", - description="Initial guess on the focal length (in pixels).\n" + description="Initial guess on the focal length (in mm).\n" "When we have an initial value from EXIF, this value is not accurate but it cannot be wrong.\n" "So this value is used to limit the range of possible values in the optimization.\n" "If this value is set to -1, it will not be used and the focal length will not be bounded.", From 5e36cfdb4af1a0cbc3a84ff73d031bd06d18b59c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 21 Sep 2023 22:54:06 +0200 Subject: [PATCH 0909/1093] [nodes] DepthMap: increase size of blocks --- meshroom/aliceVision/DepthMap.py | 4 ++-- meshroom/aliceVision/DepthMapFilter.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index d4443139d2..0cae32d5f6 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -1,4 +1,4 @@ -__version__ = "4.0" +__version__ = "5.0" from meshroom.core import desc @@ -7,7 +7,7 @@ class DepthMap(desc.AVCommandLineNode): commandLine = 'aliceVision_depthMapEstimation {allParams}' gpu = desc.Level.INTENSIVE size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=3) + parallelization = desc.Parallelization(blockSize=12) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' category = 'Dense Reconstruction' diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 487a4074fe..55e8ae856d 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" from meshroom.core import desc @@ -7,7 +7,7 @@ class DepthMapFilter(desc.AVCommandLineNode): commandLine = 'aliceVision_depthMapFiltering {allParams}' gpu = desc.Level.NORMAL size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=10) + parallelization = desc.Parallelization(blockSize=24) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' category = 'Dense Reconstruction' @@ -23,7 +23,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="SfMData file.", value="", uid=[0], - ), + ), desc.File( name="depthMapsFolder", label="Depth Maps Folder", From 2b7e10683a4a5db8118bdd01bd09a7499e0d27ca Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 22 Sep 2023 13:56:12 +0200 Subject: [PATCH 0910/1093] [nodes] StructureFromMotion: update label and description for the alignment option --- meshroom/aliceVision/StructureFromMotion.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 0928118223..77a4a6bd76 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -350,8 +350,11 @@ class StructureFromMotion(desc.AVCommandLineNode): ), desc.BoolParam( name="useAutoTransform", - label="Automatically align result", - description="Enable/Disable automatic alignment of result.", + label="Automatic Alignment", + description="Enable/Disable automatic alignment of the 3D reconstruction.\n" + "Determines scene orientation from the cameras' X axis,\n" + "determines north and scale from GPS information if available,\n" + "and defines ground level from the point cloud.", value=True, uid=[0], ), From 017afc916b59455296bd83c3c06189983578d063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 25 Sep 2023 17:02:31 +0200 Subject: [PATCH 0911/1093] [pipelines] add Nodal Tracking pipeline --- meshroom/nodalTracking.mg | 161 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 meshroom/nodalTracking.mg diff --git a/meshroom/nodalTracking.mg b/meshroom/nodalTracking.mg new file mode 100644 index 0000000000..d06fd483f8 --- /dev/null +++ b/meshroom/nodalTracking.mg @@ -0,0 +1,161 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2023.3.0-develop", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "ScenePreview": "2.0", + "ExportAnimatedCamera": "2.0", + "FeatureMatching": "2.0", + "NodalSfM": "1.0", + "CameraInit": "9.0", + "TracksBuilding": "1.0", + "FeatureExtraction": "1.3", + "RelativePoseEstimating": "1.0", + "Publish": "1.3", + "ImageMatching": "2.0", + "ConvertSfMFormat": "2.0" + } + }, + "graph": { + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } + }, + "TracksBuilding_1": { + "nodeType": "TracksBuilding", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ] + } + }, + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", + "position": [ + 1000, + 0 + ], + "inputs": { + "input": "{TracksBuilding_1.input}", + "featuresFolders": "{TracksBuilding_1.featuresFolders}", + "tracksFilename": "{TracksBuilding_1.output}", + "enforcePureRotation": true + } + }, + "NodalSfM_1": { + "nodeType": "NodalSfM", + "position": [ + 1200, + 0 + ], + "inputs": { + "input": "{RelativePoseEstimating_1.input}", + "featuresFolders": "{RelativePoseEstimating_1.featuresFolders}", + "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", + "pairs": "{RelativePoseEstimating_1.output}" + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1400, + 0 + ], + "inputs": { + "input": "{NodalSfM_1.output}", + "exportUndistortedImages": true + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 1400, + 200 + ], + "inputs": { + "input": "{NodalSfM_1.output}", + "fileExt": "sfm", + "structure": false, + "observations": false + } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 1600, + 200 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{NodalSfM_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "useMasks": false, + "pointCloudParams": { + "particleSize": 0.001, + "particleColor": "Red" + } + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1800, + 0 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{ScenePreview_1.output}" + ] + } + } + } +} \ No newline at end of file From d06ec43f844190484e380c4445b445a83a81dafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Mon, 25 Sep 2023 17:34:33 +0200 Subject: [PATCH 0912/1093] [nodes] add basic node documentation --- meshroom/aliceVision/NodalSfM.py | 1 + meshroom/aliceVision/RelativePoseEstimating.py | 1 + 2 files changed, 2 insertions(+) diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index 88bb093b8c..1090cf7568 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -9,6 +9,7 @@ class NodalSfM(desc.AVCommandLineNode): category = 'Sparse Reconstruction' documentation = ''' +A Structure-From-Motion node specifically designed to handle pure rotation camera movements. ''' inputs = [ diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 01b7ddbbaa..80294924c5 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -11,6 +11,7 @@ class RelativePoseEstimating(desc.AVCommandLineNode): category = 'Sparse Reconstruction' documentation = ''' +Estimate relative pose between each pair of views that share tracks. ''' inputs = [ From ebeda0f0c19d75b61620c5aff73920f3a374e526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Tue, 26 Sep 2023 09:40:47 +0200 Subject: [PATCH 0913/1093] [pipelines] rename Nodal Tracking to Nodal Camera Tracking --- meshroom/{nodalTracking.mg => nodalCameraTracking.mg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename meshroom/{nodalTracking.mg => nodalCameraTracking.mg} (100%) diff --git a/meshroom/nodalTracking.mg b/meshroom/nodalCameraTracking.mg similarity index 100% rename from meshroom/nodalTracking.mg rename to meshroom/nodalCameraTracking.mg From 3642f6874eb3ee988b2c795d44a3cd2d01e1a6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Wed, 30 Aug 2023 15:57:25 +0200 Subject: [PATCH 0914/1093] [nodes] new IntrinsicsCalibration node --- meshroom/aliceVision/IntrinsicsCalibration.py | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 meshroom/aliceVision/IntrinsicsCalibration.py diff --git a/meshroom/aliceVision/IntrinsicsCalibration.py b/meshroom/aliceVision/IntrinsicsCalibration.py new file mode 100644 index 0000000000..efbbc4395b --- /dev/null +++ b/meshroom/aliceVision/IntrinsicsCalibration.py @@ -0,0 +1,57 @@ +__version__ = '1.0' + +from meshroom.core import desc + + +class IntrinsicsCalibration(desc.AVCommandLineNode): + commandLine = 'aliceVision_intrinsicsCalibration {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Other' + documentation = ''' +Estimate the camera intrinsics and extrinsincs on a set of checkerboard images. +''' + + inputs = [ + desc.File( + name="input", + label="Input SfMData", + description="SfMData file.", + value="", + uid=[0], + ), + desc.File( + name="checkerboards", + label="Checkerboards Folder", + description="Folder containing checkerboard JSON files.", + value="", + uid=[0], + ), + desc.FloatParam( + name="squareSize", + label="Square Size", + description="Checkerboard square width in mm", + value=10., + range=(0.1, 100., 0.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 = [ + desc.File( + name="output", + label="SfMData File", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", + uid=[], + ) + ] From 482097ae6fd3463ee5f1dc02378d52d099c48493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= <mugulmotion@gmail.com> Date: Fri, 8 Sep 2023 17:16:55 +0200 Subject: [PATCH 0915/1093] [nodes] renamed IntrinsicsCalibration to CheckerboardCalibration --- .../{IntrinsicsCalibration.py => CheckerboardCalibration.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meshroom/aliceVision/{IntrinsicsCalibration.py => CheckerboardCalibration.py} (92%) diff --git a/meshroom/aliceVision/IntrinsicsCalibration.py b/meshroom/aliceVision/CheckerboardCalibration.py similarity index 92% rename from meshroom/aliceVision/IntrinsicsCalibration.py rename to meshroom/aliceVision/CheckerboardCalibration.py index efbbc4395b..0e5ab339be 100644 --- a/meshroom/aliceVision/IntrinsicsCalibration.py +++ b/meshroom/aliceVision/CheckerboardCalibration.py @@ -3,8 +3,8 @@ from meshroom.core import desc -class IntrinsicsCalibration(desc.AVCommandLineNode): - commandLine = 'aliceVision_intrinsicsCalibration {allParams}' +class CheckerboardCalibration(desc.AVCommandLineNode): + commandLine = 'aliceVision_checkerboardCalibration {allParams}' size = desc.DynamicNodeSize('input') category = 'Other' From 3d9edaa1bc0a30c6a8a23ce12880bde36135678a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 5 Oct 2023 17:04:22 +0200 Subject: [PATCH 0916/1093] [pipelines] Update `DepthMap` and `DepthMapFilter` versions --- meshroom/cameraTracking.mg | 6 +++--- meshroom/photogrammetry.mg | 6 +++--- meshroom/photogrammetryAndCameraTracking.mg | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 2f9c2ec2cd..c3a4b99bff 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -12,7 +12,7 @@ "MeshFiltering": "3.0", "SfMTransfer": "2.1", "Publish": "1.3", - "DepthMapFilter": "3.0", + "DepthMapFilter": "4.0", "Meshing": "7.0", "ImageMatchingMultiSfM": "1.0", "ScenePreview": "2.0", @@ -28,7 +28,7 @@ "DistortionCalibration": "3.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", - "DepthMap": "4.0", + "DepthMap": "5.0", "Texturing": "6.0" } }, @@ -512,4 +512,4 @@ } } } -} \ No newline at end of file +} diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 0602a9362d..6da0cf2f62 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -5,9 +5,9 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "DepthMapFilter": "3.0", + "DepthMapFilter": "4.0", "Meshing": "7.0", - "DepthMap": "4.0", + "DepthMap": "5.0", "FeatureExtraction": "1.2", "PrepareDenseScene": "3.0", "CameraInit": "9.0", @@ -159,4 +159,4 @@ } } } -} \ No newline at end of file +} diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index cfdbe91a46..e3e89aec04 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -11,7 +11,7 @@ "PrepareDenseScene": "3.1", "Publish": "1.3", "MeshFiltering": "3.0", - "DepthMapFilter": "3.0", + "DepthMapFilter": "4.0", "Meshing": "7.0", "ImageMatchingMultiSfM": "1.0", "ScenePreview": "2.0", @@ -26,7 +26,7 @@ "DistortionCalibration": "3.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", - "DepthMap": "4.0", + "DepthMap": "5.0", "Texturing": "6.0" } }, @@ -584,4 +584,4 @@ } } } -} \ No newline at end of file +} From 41c3b816c5524837fce31a3e9251edd614d2dfe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 6 Oct 2023 15:36:35 +0200 Subject: [PATCH 0917/1093] [pipelines] Add a Camera Tracking template with no distortion calibration --- meshroom/cameraTrackingWithoutCalibration.mg | 457 +++++++++++++++++++ 1 file changed, 457 insertions(+) create mode 100644 meshroom/cameraTrackingWithoutCalibration.mg diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg new file mode 100644 index 0000000000..5fb712b8e8 --- /dev/null +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -0,0 +1,457 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2023.3.0-develop", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "CameraInit": "9.0", + "ConvertSfMFormat": "2.0", + "PrepareDenseScene": "3.1", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "FeatureExtraction": "1.3", + "SfMTriangulation": "1.0", + "FeatureMatching": "2.0", + "KeyframeSelection": "5.0", + "ScenePreview": "2.0", + "Texturing": "6.0", + "ImageSegmentation": "1.0", + "DepthMapFilter": "4.0", + "DepthMap": "5.0", + "ImageMatchingMultiSfM": "1.0", + "ApplyCalibration": "1.0", + "ImageMatching": "2.0", + "Publish": "1.3", + "SfMTransfer": "2.1", + "StructureFromMotion": "3.3", + "ExportAnimatedCamera": "2.0", + "MeshDecimate": "1.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -200, + 0 + ], + "inputs": {}, + "internalInputs": { + "color": "#575963" + } + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 2400, + 0 + ], + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 2200, + 0 + ], + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 200, + 200 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentation_1.output}", + "maskExtension": "exr" + }, + "internalInputs": { + "color": "#575963" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingKeyframes", + "color": "#575963" + } + }, + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 1000, + 200 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{StructureFromMotion_2.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive" + }, + "internalInputs": { + "label": "ImageMatchingKeyframes", + "color": "#575963" + } + }, + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", + "position": [ + 200, + 0 + ], + "inputs": { + "inputPaths": [ + "{ApplyCalibration_1.output}" + ], + "maskPaths": [ + "{ImageSegmentation_1.output}" + ] + }, + "internalInputs": { + "color": "#575963" + } + }, + "MeshDecimate_1": { + "nodeType": "MeshDecimate", + "position": [ + 3000, + 0 + ], + "inputs": { + "input": "{MeshFiltering_1.outputMesh}", + "simplificationFactor": 0.05 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 2800, + 0 + ], + "inputs": { + "inputMesh": "{Meshing_1.outputMesh}", + "filterLargeTrianglesFactor": 10.0 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 2000, + 0 + ], + "inputs": { + "input": "{SfMTriangulation_1.output}", + "masksFolders": [ + "{ImageSegmentation_1.output}" + ], + "maskExtension": "exr" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "SfMTransfer_1": { + "nodeType": "SfMTransfer", + "position": [ + 1600, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "reference": "{StructureFromMotion_1.output}", + "transferLandmarks": false + }, + "internalInputs": { + "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", + "color": "#3f3138" + } + }, + "SfMTriangulation_1": { + "nodeType": "SfMTriangulation", + "position": [ + 1800, + 0 + ], + "inputs": { + "input": "{SfMTransfer_1.output}", + "featuresFolders": "{StructureFromMotion_2.featuresFolders}", + "matchesFolders": "{StructureFromMotion_2.matchesFolders}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 3200, + 0 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshDecimate_1.output}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 3574, + 166 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{Texturing_1.output}", + "{ScenePreview_1.output}", + "" + ] + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1600, + 200 + ], + "inputs": { + "input": "{StructureFromMotion_1.output}", + "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" + } + }, + "Meshing_1": { + "nodeType": "Meshing", + "position": [ + 2600, + 0 + ], + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "estimateSpaceFromSfM": false, + "minStep": 1, + "fullWeight": 10.0, + "saveRawDensePointCloud": true + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 3200, + 200 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentation_1.output}" + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 3000, + 200 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "json", + "describerTypes": "{StructureFromMotion_1.describerTypes}", + "structure": false, + "observations": false + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", + "position": [ + 1400, + 200 + ], + "inputs": { + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_3.output}", + "{FeatureMatching_2.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "nbFirstUnstableCameras": 0, + "maxImagesPerGroup": 0, + "bundleAdjustmentMaxOutliers": -1, + "minInputTrackLength": 5, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the complete camera tracking sequence.", + "color": "#80766f" + } + }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true + }, + "internalInputs": { + "color": "#575963" + } + }, + "StructureFromMotion_2": { + "nodeType": "StructureFromMotion", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + }, + "internalInputs": { + "comment": "Solve all keyframes first.", + "label": "StructureFromMotionKeyframes", + "color": "#575963" + } + }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 1200, + 360 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames", + "color": "#80766f" + } + }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 1000, + 360 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1200, + 200 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" + } + } + } +} \ No newline at end of file From c8452186179890ecc2cdfb259325373b46a17c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 6 Oct 2023 18:01:00 +0200 Subject: [PATCH 0918/1093] [pipelines] CameraTracking: Update parameters The following parameters are updated: - `minAngleForTriangulation` in the `SfMTriangulation` node for the Camera Tracking and Camera Tracking Without Calibration templates - `minAngleForLandmark` in the `SfMTriangulation` node for the Camera Tracking and Camera Tracking Without Calibration templates - `filterTrackForks` in the `StructureFromMotion` node for the Camera Tracking, Camera Tracking Without Calibration and Photogrammetry and Camera Tracking templates --- meshroom/cameraTracking.mg | 47 +++++++++++--------- meshroom/cameraTrackingWithoutCalibration.mg | 7 ++- meshroom/photogrammetryAndCameraTracking.mg | 39 ++++++++-------- 3 files changed, 50 insertions(+), 43 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index c3a4b99bff..15a26ee342 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ImageSegmentation": "1.0", - "ApplyCalibration": "1.0", - "MeshDecimate": "1.0", - "PrepareDenseScene": "3.1", - "MeshFiltering": "3.0", - "SfMTransfer": "2.1", - "Publish": "1.3", - "DepthMapFilter": "4.0", - "Meshing": "7.0", - "ImageMatchingMultiSfM": "1.0", - "ScenePreview": "2.0", - "FeatureMatching": "2.0", "CameraInit": "9.0", - "ImageMatching": "2.0", - "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", - "SfMTriangulation": "1.0", - "KeyframeSelection": "5.0", - "StructureFromMotion": "3.1", - "ExportAnimatedCamera": "2.0", "DistortionCalibration": "3.0", "ExportDistortion": "1.0", + "CheckerboardDetection": "1.0", + "PrepareDenseScene": "3.1", + "MeshFiltering": "3.0", + "Meshing": "7.0", "FeatureExtraction": "1.3", + "SfMTriangulation": "1.0", + "FeatureMatching": "2.0", + "KeyframeSelection": "5.0", + "ScenePreview": "2.0", + "Texturing": "6.0", + "ImageSegmentation": "1.0", + "DepthMapFilter": "4.0", "DepthMap": "5.0", - "Texturing": "6.0" + "ImageMatchingMultiSfM": "1.0", + "ApplyCalibration": "1.0", + "ImageMatching": "2.0", + "Publish": "1.3", + "SfMTransfer": "2.1", + "StructureFromMotion": "3.3", + "ExportAnimatedCamera": "2.0", + "MeshDecimate": "1.0" } }, "graph": { @@ -230,7 +230,9 @@ "inputs": { "input": "{SfMTransfer_1.output}", "featuresFolders": "{StructureFromMotion_2.featuresFolders}", - "matchesFolders": "{StructureFromMotion_2.matchesFolders}" + "matchesFolders": "{StructureFromMotion_2.matchesFolders}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 }, "internalInputs": { "color": "#3f3138" @@ -407,7 +409,8 @@ "minInputTrackLength": 5, "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 + "minAngleForLandmark": 0.5, + "filterTrackForks": true }, "internalInputs": { "comment": "Estimate cameras parameters for the complete camera tracking sequence.", @@ -512,4 +515,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 5fb712b8e8..96b122a1e3 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -227,7 +227,9 @@ "inputs": { "input": "{SfMTransfer_1.output}", "featuresFolders": "{StructureFromMotion_2.featuresFolders}", - "matchesFolders": "{StructureFromMotion_2.matchesFolders}" + "matchesFolders": "{StructureFromMotion_2.matchesFolders}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 }, "internalInputs": { "color": "#3f3138" @@ -361,7 +363,8 @@ "minInputTrackLength": 5, "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 + "minAngleForLandmark": 0.5, + "filterTrackForks": true }, "internalInputs": { "comment": "Estimate cameras parameters for the complete camera tracking sequence.", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index e3e89aec04..4eb2b1697a 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ImageSegmentation": "1.0", - "ApplyCalibration": "1.0", - "MeshDecimate": "1.0", - "PrepareDenseScene": "3.1", - "Publish": "1.3", - "MeshFiltering": "3.0", - "DepthMapFilter": "4.0", - "Meshing": "7.0", - "ImageMatchingMultiSfM": "1.0", - "ScenePreview": "2.0", - "FeatureMatching": "2.0", "CameraInit": "9.0", - "ImageMatching": "2.0", - "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", - "KeyframeSelection": "5.0", - "StructureFromMotion": "3.1", - "ExportAnimatedCamera": "2.0", "DistortionCalibration": "3.0", "ExportDistortion": "1.0", + "CheckerboardDetection": "1.0", + "PrepareDenseScene": "3.1", + "MeshFiltering": "3.0", + "Meshing": "7.0", "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "KeyframeSelection": "5.0", + "ScenePreview": "2.0", + "Texturing": "6.0", + "ImageSegmentation": "1.0", + "DepthMapFilter": "4.0", "DepthMap": "5.0", - "Texturing": "6.0" + "ImageMatchingMultiSfM": "1.0", + "ApplyCalibration": "1.0", + "ImageMatching": "2.0", + "Publish": "1.3", + "StructureFromMotion": "3.3", + "ExportAnimatedCamera": "2.0", + "MeshDecimate": "1.0" } }, "graph": { @@ -284,7 +284,8 @@ "minInputTrackLength": 5, "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 + "minAngleForLandmark": 0.5, + "filterTrackForks": true }, "internalInputs": { "comment": "Estimate cameras parameters for the complete camera tracking sequence.", @@ -584,4 +585,4 @@ } } } -} +} \ No newline at end of file From a19a948cf93057e9adbba3720cea46852944c67f Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Mon, 9 Oct 2023 17:50:43 +0200 Subject: [PATCH 0919/1093] [Node] imageProcessing: Add inputColorSpace option to force the color space of the input image. --- meshroom/aliceVision/ImageProcessing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index b1ee37c667..9fd290a16d 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -462,6 +462,15 @@ class ImageProcessing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), + desc.ChoiceParam( + name="inputColorSpace", + label="Input Color Space", + description="Allows you to force the color space of the input image.", + value="AUTO", + values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + exclusive=True, + uid=[0], + ), desc.ChoiceParam( name="outputColorSpace", label="Output Color Space", From a9a02b9b74a7805a22539b7f8a4ef22ed151e6a3 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 5 Oct 2023 08:57:05 +0200 Subject: [PATCH 0920/1093] New nodes for panorama to sfm --- meshroom/aliceVision/SfMMerge.py | 49 ++++++++++++++++++++++++++++++++ meshroom/aliceVision/SfMToRig.py | 42 +++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 meshroom/aliceVision/SfMMerge.py create mode 100644 meshroom/aliceVision/SfMToRig.py diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py new file mode 100644 index 0000000000..df0fa3eb8c --- /dev/null +++ b/meshroom/aliceVision/SfMMerge.py @@ -0,0 +1,49 @@ +__version__ = "1.0" + +from meshroom.core import desc +import os.path + +class SfmMerge(desc.AVCommandLineNode): + commandLine = 'aliceVision_sfmMerge {allParams}' + size = desc.DynamicNodeSize('firstinput') + + category = 'Utils' + documentation = ''' +Merge two sfmData into a single one. Fails if some uid is shared among them +''' + + inputs = [ + desc.File( + name="firstinput", + label="SfMData", + description="First Input SfMData file.", + value="", + uid=[0], + ), + desc.File( + name="secondinput", + label="SfMData", + description="Second Input SfMData 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="SfMData", + description="Path to the output SfM file (in SfMData format).", + value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", + uid=[], + ), + ] diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py new file mode 100644 index 0000000000..817d730d6b --- /dev/null +++ b/meshroom/aliceVision/SfMToRig.py @@ -0,0 +1,42 @@ +__version__ = "1.0" + +from meshroom.core import desc +import os.path + +class SfmToRig(desc.AVCommandLineNode): + commandLine = 'aliceVision_sfmToRig {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' +Assumes input sfm data describes a set of cameras capturing a scene at a common time. Transform the set of cameras into a rig of cameras. +''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData 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="SfMData", + description="Path to the output SfM file (in SfMData format).", + value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", + uid=[], + ), + ] From 083c748513fcf13dc43df9dd09f24b6999891592 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 5 Oct 2023 11:15:56 +0200 Subject: [PATCH 0921/1093] Update chunks with merge --- meshroom/aliceVision/SfMMerge.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index df0fa3eb8c..2152c587a2 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -3,9 +3,35 @@ from meshroom.core import desc import os.path + +class MergeNodeSize(object): + """ + MergeNodeSize expresses a dependency to two input attributess to define + the size of a Node in terms of individual tasks for parallelization. + """ + def __init__(self, param1, param2): + self._param1 = param1 + self._param2 = param2 + + def computeSize(self, node): + + size1 = 0 + size2 = 0 + + param1 = node.attribute(self._param1) + if param1.isLink: + size1 = param1.getLinkParam().node.size + + param2 = node.attribute(self._param2) + if param2.isLink: + size2 = param2.getLinkParam().node.size + + return size1 + size2 + + class SfmMerge(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmMerge {allParams}' - size = desc.DynamicNodeSize('firstinput') + size = MergeNodeSize('firstinput', 'secondinput') category = 'Utils' documentation = ''' From 5ec55ba4a6879cd8faebe923b3b0461c019dec7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 10 Oct 2023 11:15:45 +0200 Subject: [PATCH 0922/1093] [nodes] SfMMerge/SfMToRig: Update labels and descriptions --- meshroom/aliceVision/SfMMerge.py | 12 ++++++------ meshroom/aliceVision/SfMToRig.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index 2152c587a2..67c5d88edc 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -29,27 +29,27 @@ def computeSize(self, node): return size1 + size2 -class SfmMerge(desc.AVCommandLineNode): +class SfMMerge(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmMerge {allParams}' size = MergeNodeSize('firstinput', 'secondinput') category = 'Utils' documentation = ''' -Merge two sfmData into a single one. Fails if some uid is shared among them +Merges two SfMData files into a single one. Fails if some UID is shared among them. ''' inputs = [ desc.File( name="firstinput", - label="SfMData", - description="First Input SfMData file.", + label="First SfMData", + description="First input SfMData file to merge.", value="", uid=[0], ), desc.File( name="secondinput", - label="SfMData", - description="Second Input SfMData file.", + label="Second SfMData", + description="Second input SfMData file to merge.", value="", uid=[0], ), diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py index 817d730d6b..48def995ef 100644 --- a/meshroom/aliceVision/SfMToRig.py +++ b/meshroom/aliceVision/SfMToRig.py @@ -3,13 +3,13 @@ from meshroom.core import desc import os.path -class SfmToRig(desc.AVCommandLineNode): +class SfMToRig(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmToRig {allParams}' size = desc.DynamicNodeSize('input') category = 'Utils' documentation = ''' -Assumes input sfm data describes a set of cameras capturing a scene at a common time. Transform the set of cameras into a rig of cameras. +Assumes the input SfMData describes a set of cameras capturing a scene at a common time. Transformd the set of cameras into a rig of cameras. ''' inputs = [ From 3451f0e573ab9048356841ed3c0337f2ec03f166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 23 Oct 2023 10:15:11 +0200 Subject: [PATCH 0923/1093] [pipelines] CamTrack: Update default params for keyframes SfM Align the `minAngleForTriangulation`, `minAngleForLandmark` and `filterTrackForks` with the second SfM from the pipeline, and disable the downscale in the DepthMap node. --- meshroom/cameraTracking.mg | 46 +++++++++++--------- meshroom/cameraTrackingWithoutCalibration.mg | 40 +++++++++-------- meshroom/photogrammetryAndCameraTracking.mg | 41 +++++++++-------- 3 files changed, 69 insertions(+), 58 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 15a26ee342..a70396143a 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "9.0", - "ConvertSfMFormat": "2.0", - "DistortionCalibration": "3.0", + "ExportAnimatedCamera": "2.0", + "DepthMapFilter": "4.0", + "Texturing": "6.0", "ExportDistortion": "1.0", - "CheckerboardDetection": "1.0", - "PrepareDenseScene": "3.1", - "MeshFiltering": "3.0", - "Meshing": "7.0", + "ConvertSfMFormat": "2.0", + "Publish": "1.3", + "MeshDecimate": "1.0", + "CameraInit": "9.0", + "ImageSegmentation": "1.0", + "ApplyCalibration": "1.0", "FeatureExtraction": "1.3", - "SfMTriangulation": "1.0", - "FeatureMatching": "2.0", - "KeyframeSelection": "5.0", "ScenePreview": "2.0", - "Texturing": "6.0", - "ImageSegmentation": "1.0", - "DepthMapFilter": "4.0", - "DepthMap": "5.0", + "StructureFromMotion": "3.3", + "MeshFiltering": "3.0", + "DistortionCalibration": "3.0", "ImageMatchingMultiSfM": "1.0", - "ApplyCalibration": "1.0", + "DepthMap": "5.0", + "PrepareDenseScene": "3.1", "ImageMatching": "2.0", - "Publish": "1.3", + "KeyframeSelection": "5.0", + "CheckerboardDetection": "1.0", "SfMTransfer": "2.1", - "StructureFromMotion": "3.3", - "ExportAnimatedCamera": "2.0", - "MeshDecimate": "1.0" + "SfMTriangulation": "1.0", + "FeatureMatching": "2.0", + "Meshing": "7.0" } }, "graph": { @@ -66,7 +66,8 @@ ], "inputs": { "input": "{PrepareDenseScene_1.input}", - "imagesFolder": "{PrepareDenseScene_1.output}" + "imagesFolder": "{PrepareDenseScene_1.output}", + "downscale": 1 }, "internalInputs": { "color": "#3f3138" @@ -443,7 +444,10 @@ "matchesFolders": [ "{FeatureMatching_1.output}" ], - "describerTypes": "{FeatureMatching_1.describerTypes}" + "describerTypes": "{FeatureMatching_1.describerTypes}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5, + "filterTrackForks": true }, "internalInputs": { "comment": "Solve all keyframes first.", diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 96b122a1e3..d10179004b 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -5,28 +5,28 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "9.0", + "ExportAnimatedCamera": "2.0", + "DepthMapFilter": "4.0", + "Texturing": "6.0", "ConvertSfMFormat": "2.0", - "PrepareDenseScene": "3.1", - "MeshFiltering": "3.0", - "Meshing": "7.0", + "Publish": "1.3", + "MeshDecimate": "1.0", + "CameraInit": "9.0", + "ImageSegmentation": "1.0", + "ApplyCalibration": "1.0", "FeatureExtraction": "1.3", - "SfMTriangulation": "1.0", - "FeatureMatching": "2.0", - "KeyframeSelection": "5.0", "ScenePreview": "2.0", - "Texturing": "6.0", - "ImageSegmentation": "1.0", - "DepthMapFilter": "4.0", - "DepthMap": "5.0", + "StructureFromMotion": "3.3", + "MeshFiltering": "3.0", "ImageMatchingMultiSfM": "1.0", - "ApplyCalibration": "1.0", + "DepthMap": "5.0", + "PrepareDenseScene": "3.1", "ImageMatching": "2.0", - "Publish": "1.3", + "KeyframeSelection": "5.0", "SfMTransfer": "2.1", - "StructureFromMotion": "3.3", - "ExportAnimatedCamera": "2.0", - "MeshDecimate": "1.0" + "SfMTriangulation": "1.0", + "FeatureMatching": "2.0", + "Meshing": "7.0" } }, "graph": { @@ -63,7 +63,8 @@ ], "inputs": { "input": "{PrepareDenseScene_1.input}", - "imagesFolder": "{PrepareDenseScene_1.output}" + "imagesFolder": "{PrepareDenseScene_1.output}", + "downscale": 1 }, "internalInputs": { "color": "#3f3138" @@ -397,7 +398,10 @@ "matchesFolders": [ "{FeatureMatching_1.output}" ], - "describerTypes": "{FeatureMatching_1.describerTypes}" + "describerTypes": "{FeatureMatching_1.describerTypes}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5, + "filterTrackForks": true }, "internalInputs": { "comment": "Solve all keyframes first.", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 4eb2b1697a..60e1f9fa0d 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "9.0", - "ConvertSfMFormat": "2.0", - "DistortionCalibration": "3.0", + "ExportAnimatedCamera": "2.0", + "DepthMapFilter": "4.0", + "Texturing": "6.0", "ExportDistortion": "1.0", - "CheckerboardDetection": "1.0", - "PrepareDenseScene": "3.1", - "MeshFiltering": "3.0", - "Meshing": "7.0", + "ConvertSfMFormat": "2.0", + "Publish": "1.3", + "MeshDecimate": "1.0", + "CameraInit": "9.0", + "ImageSegmentation": "1.0", + "ApplyCalibration": "1.0", "FeatureExtraction": "1.3", - "FeatureMatching": "2.0", - "KeyframeSelection": "5.0", "ScenePreview": "2.0", - "Texturing": "6.0", - "ImageSegmentation": "1.0", - "DepthMapFilter": "4.0", - "DepthMap": "5.0", + "StructureFromMotion": "3.3", + "MeshFiltering": "3.0", + "DistortionCalibration": "3.0", "ImageMatchingMultiSfM": "1.0", - "ApplyCalibration": "1.0", + "DepthMap": "5.0", + "PrepareDenseScene": "3.1", "ImageMatching": "2.0", - "Publish": "1.3", - "StructureFromMotion": "3.3", - "ExportAnimatedCamera": "2.0", - "MeshDecimate": "1.0" + "KeyframeSelection": "5.0", + "CheckerboardDetection": "1.0", + "FeatureMatching": "2.0", + "Meshing": "7.0" } }, "graph": { @@ -320,7 +320,10 @@ "{FeatureMatching_5.output}" ], "describerTypes": "{FeatureMatching_1.describerTypes}", - "lockScenePreviouslyReconstructed": true + "lockScenePreviouslyReconstructed": true, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5, + "filterTrackForks": true }, "internalInputs": { "comment": "Solve all keyframes first.", From e7c1d7078a39f88c0192b87deef653402cad3ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 30 Oct 2023 11:21:09 +0100 Subject: [PATCH 0924/1093] [pipelines] Add `PrepareDenseScene` node to Photogrammetry Draft template This allows the `Texturing` node to actually output a texture. --- meshroom/photogrammetryDraft.mg | 34 ++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 78268b0456..426879da2f 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -1,17 +1,18 @@ { "header": { "nodesVersions": { + "PrepareDenseScene": "3.1", "Meshing": "7.0", - "FeatureExtraction": "1.2", - "CameraInit": "9.0", - "FeatureMatching": "2.0", - "MeshFiltering": "3.0", "Texturing": "6.0", - "StructureFromMotion": "3.1", "ImageMatching": "2.0", + "MeshFiltering": "3.0", + "FeatureExtraction": "1.3", + "StructureFromMotion": "3.3", + "FeatureMatching": "2.0", + "CameraInit": "9.0", "Publish": "1.3" }, - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", "template": true }, @@ -19,22 +20,23 @@ "Texturing_1": { "nodeType": "Texturing", "position": [ - 1400, + 1600, 0 ], "inputs": { "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", "inputMesh": "{MeshFiltering_1.outputMesh}" } }, "Meshing_1": { "nodeType": "Meshing", "position": [ - 1000, + 1200, 0 ], "inputs": { - "input": "{StructureFromMotion_1.output}" + "input": "{PrepareDenseScene_1.input}" } }, "ImageMatching_1": { @@ -86,7 +88,7 @@ "MeshFiltering_1": { "nodeType": "MeshFiltering", "position": [ - 1200, + 1400, 0 ], "inputs": { @@ -109,7 +111,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 1600, + 1800, 0 ], "inputs": { @@ -119,6 +121,16 @@ "{Texturing_1.outputTextures}" ] } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 1000, + 0 + ], + "inputs": { + "input": "{StructureFromMotion_1.output}" + } } } } \ No newline at end of file From 7bfa44ee94a8cd488f8e77d6c2e590c1f7aace7b Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 31 Oct 2023 17:12:16 +0100 Subject: [PATCH 0925/1093] [Node] imageProcessing: Add automatic reorientation option. --- meshroom/aliceVision/ImageProcessing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 9fd290a16d..ac5cc42ca6 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -100,6 +100,13 @@ class ImageProcessing(desc.AVCommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name="reorient", + label="Automatic Reorientation", + description="Automatic image reorientation.", + value=False, + uid=[0], + ), desc.BoolParam( name="fixNonFinite", label="Fix Non-Finite", From 5a22d46ce5bd809ed5762e24867ba3432dd48593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 3 Nov 2023 13:23:13 +0100 Subject: [PATCH 0926/1093] [pipelines] PhotogAndCamTrack: Disable automatic alignment in SfM --- meshroom/photogrammetryAndCameraTracking.mg | 38 +++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 60e1f9fa0d..1e3adcd558 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", - "DepthMapFilter": "4.0", "Texturing": "6.0", - "ExportDistortion": "1.0", + "DistortionCalibration": "3.0", "ConvertSfMFormat": "2.0", - "Publish": "1.3", - "MeshDecimate": "1.0", - "CameraInit": "9.0", - "ImageSegmentation": "1.0", - "ApplyCalibration": "1.0", "FeatureExtraction": "1.3", + "ExportDistortion": "1.0", + "ApplyCalibration": "1.0", + "ImageSegmentation": "1.0", + "FeatureMatching": "2.0", "ScenePreview": "2.0", - "StructureFromMotion": "3.3", + "KeyframeSelection": "5.0", + "MeshDecimate": "1.0", "MeshFiltering": "3.0", - "DistortionCalibration": "3.0", "ImageMatchingMultiSfM": "1.0", - "DepthMap": "5.0", - "PrepareDenseScene": "3.1", + "CameraInit": "9.0", + "DepthMapFilter": "4.0", "ImageMatching": "2.0", - "KeyframeSelection": "5.0", - "CheckerboardDetection": "1.0", - "FeatureMatching": "2.0", - "Meshing": "7.0" + "ExportAnimatedCamera": "2.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "Meshing": "7.0", + "DepthMap": "5.0", + "StructureFromMotion": "3.3", + "CheckerboardDetection": "1.0" } }, "graph": { @@ -285,7 +285,8 @@ "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5, - "filterTrackForks": true + "filterTrackForks": true, + "useAutoTransform": false }, "internalInputs": { "comment": "Estimate cameras parameters for the complete camera tracking sequence.", @@ -323,7 +324,8 @@ "lockScenePreviouslyReconstructed": true, "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5, - "filterTrackForks": true + "filterTrackForks": true, + "useAutoTransform": false }, "internalInputs": { "comment": "Solve all keyframes first.", From a7b8b73cb9ed7abb18c45b581e892808287e86b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 17 Oct 2023 15:43:34 +0200 Subject: [PATCH 0927/1093] [nodes] Clean-up: Harmonize nodes' descriptions --- meshroom/aliceVision/CameraInit.py | 14 ++--- meshroom/aliceVision/CameraRigCalibration.py | 2 +- meshroom/aliceVision/CheckerboardDetection.py | 46 ++++++++-------- meshroom/aliceVision/ConvertMesh.py | 4 +- meshroom/aliceVision/ConvertSfMFormat.py | 4 +- meshroom/aliceVision/DepthMap.py | 28 +++++----- meshroom/aliceVision/ExportAnimatedCamera.py | 2 +- meshroom/aliceVision/ExportDistortion.py | 38 ++++++------- meshroom/aliceVision/ImageProcessing.py | 18 +++---- meshroom/aliceVision/LdrToHdrCalibration.py | 12 ++--- meshroom/aliceVision/LdrToHdrMerge.py | 40 +++++++------- meshroom/aliceVision/LdrToHdrSampling.py | 16 +++--- meshroom/aliceVision/LightingCalibration.py | 2 +- meshroom/aliceVision/LightingEstimation.py | 2 +- meshroom/aliceVision/MeshResampling.py | 2 +- meshroom/aliceVision/Meshing.py | 2 +- meshroom/aliceVision/NodalSfM.py | 54 +++++++++---------- meshroom/aliceVision/PanoramaMerging.py | 2 +- .../aliceVision/PanoramaPostProcessing.py | 2 +- meshroom/aliceVision/Publish.py | 2 +- meshroom/aliceVision/SfMSplitReconstructed.py | 40 +++++++------- meshroom/aliceVision/SfMTriangulation.py | 2 +- meshroom/aliceVision/Split360Images.py | 4 +- meshroom/aliceVision/StructureFromMotion.py | 4 +- meshroom/aliceVision/Texturing.py | 4 +- 25 files changed, 173 insertions(+), 173 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 16460b3d0d..bb82a16d7e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -38,8 +38,8 @@ value=-1.0, uid=[0], range=None), desc.FloatParam(name="focalLength", label="Focal Length", description="Known/calibrated focal length (in mm).", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="pixelRatio", label="Pixel Ratio", description="Ratio between the pixel width and the pixel height.", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), - desc.BoolParam(name='pixelRatioLocked', label='Pixel Ratio Locked', - description='The pixel ratio value is locked for estimation.', + desc.BoolParam(name="pixelRatioLocked", label="Pixel Ratio Locked", + description="The pixel ratio value is locked for estimation.", value=True, uid=[0]), desc.ChoiceParam(name="type", label="Camera Type", description="Mathematical model used to represent a camera:\n" @@ -241,7 +241,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): desc.ChoiceParam( name="allowedCameraModels", label="Allowed Camera Models", - description='List of the camera models that can be attributed.', + description="List of the camera models that can be attributed.", value=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], values=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], exclusive=False, @@ -320,10 +320,10 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='''Output SfMData.''', - value=desc.Node.internalFolder + 'cameraInit.sfm', + name="output", + label="SfMData", + description="Output SfMData.", + value=desc.Node.internalFolder + "cameraInit.sfm", uid=[], ), ] diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index ac04acf46e..54784dd45b 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -14,7 +14,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): inputs = [ desc.File( name="sfmdata", - label='SfMData', + label="SfMData", description="Input SfMData file.", value="", uid=[0], diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index 0dcba781ff..4e2bb4c9ef 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/aliceVision/CheckerboardDetection.py @@ -17,30 +17,30 @@ class CheckerboardDetection(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData File. Viewpoints must correspond to lens calibration grids.', - value='', + name="input", + label="Input", + description="Input 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 the image center.', + name="useNestedGrids", + label="Nested Calibration Grid", + description="Enable if images contain nested calibration grids. These grids must be centered on the image center.", value=False, uid=[0], ), desc.BoolParam( - name='doubleSize', - label='Double Size', - description='Double the image size prior to processing', + 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', + name="exportDebugImages", + label="Export Debug Images", + description="Export debug images.", value=False, uid=[0], ), @@ -48,20 +48,20 @@ class CheckerboardDetection(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='', + name="output", + label="Folder", + description="Output folder.", 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 + '<VIEW_ID>.png', - group='', # do not export on the command line + name="checkerLines", + enabled=lambda node: node.exportDebugImages.value, + label="Checker Lines", + description="Debug images.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>.png", + group="", # do not export on the command line uid=[], ), ] diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index d76097a9a1..e3ef5e7a68 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -19,10 +19,10 @@ class ConvertMesh(desc.AVCommandLineNode): ), desc.ChoiceParam( name="outputMeshFileType", - label="File Type", + label="Output File Type", description="Output mesh format (*.obj, *.gltf, *.fbx, *.stl).", value="obj", - values=("gltf", "obj", "fbx", "stl"), + values=["gltf", "obj", "fbx", "stl"], exclusive=True, uid=[0], group="", diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 9bd2a8156f..7b50a04676 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -17,7 +17,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): desc.File( name="input", label="Input", - description="SfMData file.", + description="Input SfMData file.", value="", uid=[0], ), @@ -45,7 +45,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): elementDesc=desc.File( name="imageId", label="Image ID", - description="UID or path of an image to add to the whitelist.", + description="UID or path of an image to add to the white list.", value="", uid=[0], ), diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 0cae32d5f6..d418be8cf6 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -299,7 +299,7 @@ class DepthMap(desc.AVCommandLineNode): value=1, range=(-1, 10, 1), uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( name="refineStepXY", @@ -308,7 +308,7 @@ class DepthMap(desc.AVCommandLineNode): value=1, range=(-1, 10, 1), uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( name="refineMaxTCamsPerTile", @@ -317,7 +317,7 @@ class DepthMap(desc.AVCommandLineNode): value=4, range=(1, 20, 1), uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( name="refineSubsampling", @@ -327,7 +327,7 @@ class DepthMap(desc.AVCommandLineNode): range=(1, 30, 1), uid=[0], advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( name="refineHalfNbDepths", @@ -339,7 +339,7 @@ class DepthMap(desc.AVCommandLineNode): range=(1, 50, 1), uid=[0], advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( name="refineWSH", @@ -349,7 +349,7 @@ class DepthMap(desc.AVCommandLineNode): range=(1, 20, 1), uid=[0], advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.FloatParam( name="refineSigma", @@ -359,7 +359,7 @@ class DepthMap(desc.AVCommandLineNode): range=(0.0, 30.0, 0.5), uid=[0], advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.FloatParam( name="refineGammaC", @@ -369,7 +369,7 @@ class DepthMap(desc.AVCommandLineNode): range=(0.0, 30.0, 0.5), uid=[0], advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.FloatParam( name="refineGammaP", @@ -379,7 +379,7 @@ class DepthMap(desc.AVCommandLineNode): range=(0.0, 30.0, 0.5), uid=[0], advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.BoolParam( name="refineInterpolateMiddleDepth", @@ -387,7 +387,7 @@ class DepthMap(desc.AVCommandLineNode): description="Enable middle depth bilinear interpolation.", value=False, uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), desc.BoolParam( name="refineUseConsistentScale", @@ -395,7 +395,7 @@ class DepthMap(desc.AVCommandLineNode): description="Compare patch with consistent scale for similarity volume computation.", value=False, uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, + enabled=lambda node: node.refine.refineEnabled.value, ), ] ), @@ -420,7 +420,7 @@ class DepthMap(desc.AVCommandLineNode): range=(1, 500, 10), uid=[0], advanced=True, - enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, + enabled=lambda node: node.colorOptimization.colorOptimizationEnabled.value, ), ] ), @@ -452,7 +452,7 @@ class DepthMap(desc.AVCommandLineNode): label="Subparts", description="User custom patch pattern subparts for similarity volume computation.", advanced=True, - enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), elementDesc=desc.GroupAttribute( name="customPatchPatternSubpart", label="Patch Pattern Subpart", @@ -511,7 +511,7 @@ class DepthMap(desc.AVCommandLineNode): value=False, uid=[0], advanced=True, - enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), ), ] ), diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 6a79b1c561..fe4b650a30 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -59,7 +59,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], - enabled= lambda node: node.exportUndistortedImages.value, + enabled=lambda node: node.exportUndistortedImages.value, ), desc.BoolParam( name="exportFullROD", diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index fa9d070fa9..fe36da67e8 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -12,38 +12,38 @@ class ExportDistortion(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file.', - value='', + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", uid=[0], ), ] outputs = [ desc.File( - name='output', - label='Folder', - description='Output folder.', + name="output", + label="Folder", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='distoStMap', - label='Distortion ST Map', - description='Calibrated distortion ST map.', - semantic='image', - value=desc.Node.internalFolder + '<INTRINSIC_ID>_distort.exr', - group='', # do not export on the command line + name="distoStMap", + label="Distortion ST Map", + description="Calibrated distortion ST map.", + semantic="image", + value=desc.Node.internalFolder + "<INTRINSIC_ID>_distort.exr", + group="", # do not export on the command line uid=[], ), desc.File( - name='undistoStMap', - label='Undistortion ST Map', - description='Calibrated undistortion ST map.', - semantic='image', - value=desc.Node.internalFolder + '<INTRINSIC_ID>_undistort.exr', - group='', # do not export on the command line + name="undistoStMap", + label="Undistortion ST Map", + description="Calibrated undistortion ST map.", + semantic="image", + value=desc.Node.internalFolder + "<INTRINSIC_ID>_undistort.exr", + group="", # do not export on the command line uid=[], ), ] diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index ac5cc42ca6..f5d7b1d5a3 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -413,7 +413,7 @@ class ImageProcessing(desc.AVCommandLineNode): desc.BoolParam( name="nlmFilterEnabled", label="Enable", - description='Use Non-Local Mean Denoising from OpenCV to denoise images.', + description="Use Non-Local Mean Denoising from OpenCV to denoise images.", value=False, uid=[0], ), @@ -587,17 +587,17 @@ class ImageProcessing(desc.AVCommandLineNode): ), desc.File( - name='lensCorrectionProfileInfo', - label='Lens Correction Profile Info', - description='''Lens Correction Profile filepath or database directory.''', - value='${ALICEVISION_LENS_PROFILE_INFO}', + name="lensCorrectionProfileInfo", + label="Lens Correction Profile Info", + description="Lens Correction Profile filepath or database directory.", + value="${ALICEVISION_LENS_PROFILE_INFO}", uid=[], ), desc.BoolParam( - name='lensCorrectionProfileSearchIgnoreCameraModel', - label='LCP Generic Search', - description='The lens name and camera maker are used to match the LCP database, but the camera model is ignored.', + name="lensCorrectionProfileSearchIgnoreCameraModel", + label="LCP Generic Search", + description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.", value=True, uid=[0], advanced=True, @@ -689,7 +689,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Images", description="Output images.", semantic="image", - value= outputImagesValueFunct, + value=outputImagesValueFunct, group="", # do not export on the command line uid=[], ), diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 27e1e784d4..c454f463a4 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -80,7 +80,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], - enabled= lambda node: node.nbBrackets.value != 1, + enabled=lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( name="calibrationMethod", @@ -95,7 +95,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): value="auto", exclusive=True, uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name="calibrationWeight", @@ -109,7 +109,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): values=["default", "gaussian", "triangle", "plateau"], exclusive=True, uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name="channelQuantizationPower", @@ -119,7 +119,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name="workingColorSpace", @@ -131,7 +131,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): exclusive=True, uid=[], group="user", # not used directly on the command line - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name="maxTotalPoints", @@ -143,7 +143,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): range=(8, 10000000, 1000), uid=[0], advanced=True, - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name="verboseLevel", diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 7431ff8b14..3e5ca2c19f 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -89,7 +89,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=1, range=(-4, 4, 1), uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), + enabled=lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( name="meanTargetedLumaForMerging", @@ -98,33 +98,33 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=0.4, range=(0.0, 1.0, 0.01), uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), + enabled=lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( - name='minSignificantValue', - label='Minimum Significant Value', - description='Minimum channel input value to be considered in advanced pixelwise merging.', + name="minSignificantValue", + label="Minimum Significant Value", + description="Minimum channel input value to be considered in advanced pixelwise merging.", value=0.05, range=(0.0, 1.0, 0.001), uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1), + enabled=lambda node: (node.nbBrackets.value != 1), ), desc.FloatParam( - name='maxSignificantValue', - label='Maximum Significant Value', - description='Maximum channel input value to be considered in advanced pixelwise merging.', + name="maxSignificantValue", + label="Maximum Significant Value", + description="Maximum channel input value to be considered in advanced pixelwise merging.", value=0.995, range=(0.0, 1.0, 0.001), uid=[0], - enabled= lambda node: (node.nbBrackets.value != 1), + enabled=lambda node: (node.nbBrackets.value != 1), ), desc.BoolParam( - name='computeLightMasks', - label='Compute Light Masks', + name="computeLightMasks", + label="Compute Light Masks", description="Compute masks of low and high lights and missing info.", value=False, uid=[0], - enabled= lambda node: node.nbBrackets.value != 1, + enabled=lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( name="byPass", @@ -132,7 +132,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], - enabled= lambda node: node.nbBrackets.value != 1, + enabled=lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( name="keepSourceImageName", @@ -152,7 +152,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=["gaussian", "triangle", "plateau"], exclusive=True, uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name="channelQuantizationPower", @@ -162,7 +162,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name="workingColorSpace", @@ -173,7 +173,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( name="enableHighlight", @@ -182,7 +182,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=False, uid=[0], group="user", # not used directly on the command line - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.FloatParam( name="highlightCorrectionFactor", @@ -195,7 +195,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=1.0, range=(0.0, 1.0, 0.01), uid=[0], - enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value, + enabled=lambda node: node.enableHighlight.enabled and node.enableHighlight.value, ), desc.FloatParam( name="highlightTargetLux", @@ -218,7 +218,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=120000.0, range=(1000.0, 150000.0, 1.0), uid=[0], - enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, + enabled=lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( name="storageDataType", diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 1952f87387..2ce8fa1567 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -94,7 +94,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], - enabled= lambda node: node.nbBrackets.value != 1, + enabled=lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( name="calibrationMethod", @@ -109,7 +109,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): value="auto", exclusive=True, uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name="channelQuantizationPower", @@ -119,7 +119,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): range=(8, 14, 1), uid=[0], advanced=True, - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name="workingColorSpace", @@ -130,7 +130,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name="blockSize", @@ -140,7 +140,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): range=(8, 1024, 1), uid=[0], advanced=True, - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name="radius", @@ -150,7 +150,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): range=(0, 10, 1), uid=[0], advanced=True, - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( name="maxCountSample", @@ -160,7 +160,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): range=(10, 1000, 10), uid=[0], advanced=True, - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( name="debug", @@ -168,7 +168,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Export debug files to analyze the sampling strategy.", value=False, uid=[], - enabled= lambda node: node.byPass.enabled and not node.byPass.value, + enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( name="verboseLevel", diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index ddeb72ec92..718f4149af 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -14,7 +14,7 @@ class LightingCalibration(desc.CommandLineNode): inputs = [ desc.File( name="inputPath", - label="SfMData", + label="Input SfMData", description="Input SfMData file.", value="", uid=[0] diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index e7a4a8ccc6..6bd5275a8c 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -13,7 +13,7 @@ class LightingEstimation(desc.AVCommandLineNode): inputs = [ desc.File( name="input", - label="SfMData", + label="Input SfMData", description="Input SfMData file.", value="", uid=[0], diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 5e9eda6fab..56c0048b34 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -39,7 +39,7 @@ class MeshResampling(desc.AVCommandLineNode): ), desc.IntParam( name="minVertices", - label='Min Vertices', + label="Min Vertices", description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 85452bbb65..9d85bc96ce 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -326,7 +326,7 @@ class Meshing(desc.AVCommandLineNode): ), desc.IntParam( name="helperPointsGridSize", - label='Helper Points Grid Size', + label="Helper Points Grid Size", description="Grid size for the helper points.", value=10, range=(0, 50, 1), diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index 1090cf7568..79aa5f4f78 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -14,10 +14,10 @@ class NodalSfM(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( @@ -33,35 +33,35 @@ class NodalSfM(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.File( - name='tracksFilename', - label='Tracks file', - description='Tracks file.', - value='', + name="tracksFilename", + label="Tracks File", + description="Input tracks file.", + value="", uid=[0], ), desc.File( - name='pairs', - label='Pairs file', - description='Information on pairs.', - value='', + name="pairs", + label="Pairs File", + description="Information on pairs.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), 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'], + 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=[], ) @@ -69,10 +69,10 @@ class NodalSfM(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.abc', + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", uid=[], ) ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 3e12c4e2cd..f55f58a66e 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -22,7 +22,7 @@ class PanoramaMerging(desc.AVCommandLineNode): name="input", label="Input SfMData", description="Input SfMData file.", - value='', + value="", uid=[0], ), desc.File( diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 8052edba62..909eb96bd1 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -135,6 +135,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Downscaled versions of the generated panorama.", value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.panoramaName.value)[0] + "_level_*.exr", uid=[], - group='', + group="", ), ] diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 9ec86f5e15..95578bf743 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -22,7 +22,7 @@ class Publish(desc.Node): elementDesc=desc.File( name="input", label="Input", - description="", + description="File or folder to publish.", value="", uid=[0], ), diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index f224c4114c..5e01846453 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -9,25 +9,25 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): category = 'Utils' documentation = ''' - This nodes takes a sfmData file and split it in two - - One sfmData with the reconstructed views - - One sfmData with the non reconstructed views + This nodes takes a SfMData file as an input and splits it in two output SfMData files: + - One SfMData containing the reconstructed views + - One SfMData containing the non-reconstructed views ''' inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file .''', - value='', + name="input", + label="Input SfMData", + description="Input SfMData 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'], + 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=[], ), @@ -35,17 +35,17 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): outputs = [ desc.File( - name='reconstructedOutput', - label='Reconstructed SfMData File', - description='SfMData file with reconstructed cameras', - value=desc.Node.internalFolder + 'sfmReconstructed.abc', + name="reconstructedOutput", + label="Reconstructed SfMData File", + description="SfMData file containing the reconstructed cameras.", + value=desc.Node.internalFolder + "sfmReconstructed.abc", uid=[], ), desc.File( - name='notReconstructedOutput', - label='Not Reconstructed SfMData File', - description='SfMData file with non reconstructed cameras', - value=desc.Node.internalFolder + 'sfmNonReconstructed.abc', + name="notReconstructedOutput", + label="Not Reconstructed SfMData File", + description="SfMData file containing the non-reconstructed cameras.", + value=desc.Node.internalFolder + "sfmNonReconstructed.abc", uid=[], ) ] diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index d2d877f7ec..aeb369c346 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -131,7 +131,7 @@ class SfMTriangulation(desc.AVCommandLineNode): ), desc.ChoiceParam( name="interFileExtension", - label='Inter File Extension', + label="Inter File Extension", description="Extension of the intermediate file export.", value=".abc", values=(".abc", ".ply"), diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 40197dbb11..76f1066e0f 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -31,7 +31,7 @@ class Split360Images(desc.AVCommandLineNode): name="input", label="Input", description="Single image, image folder or SfMData file.", - value='', + value="", uid=[0], ), desc.ChoiceParam( @@ -80,7 +80,7 @@ class Split360Images(desc.AVCommandLineNode): groupDesc=[ desc.IntParam( name="equirectangularNbSplits", - label='Nb Splits', + label="Nb Splits", description="Equirectangular number of splits.", value=2, range=(1, 100, 1), diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 77a4a6bd76..77731b3662 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -65,7 +65,7 @@ class StructureFromMotion(desc.AVCommandLineNode): desc.File( name="input", label="SfMData", - description='SfMData file.', + description="Input SfMData file.", value="", uid=[0], ), @@ -323,7 +323,7 @@ class StructureFromMotion(desc.AVCommandLineNode): ), desc.IntParam( name="minNbCamerasToRefinePrincipalPoint", - label='Min Nb Cameras To Refine Principal Point', + label="Min Nb Cameras To Refine Principal Point", description="Minimum number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera).\n" "If we do not have enough cameras, the principal point is considered to be in the center of the image.\n" "If minNbCamerasToRefinePrincipalPoint <= 0, the principal point is never refined." diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 392e1c200e..df5aa1234b 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -350,7 +350,7 @@ class Texturing(desc.AVCommandLineNode): ), desc.File( name="outputMaterial", - enabled= lambda node: node.outputMeshFileType.value == "obj", + enabled=lambda node: node.outputMeshFileType.value == "obj", label="Material", description="Output material file.", value=desc.Node.internalFolder + "texturedMesh.mtl", @@ -361,7 +361,7 @@ class Texturing(desc.AVCommandLineNode): name="outputTextures", label="Textures", description="Output texture files.", - value= lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", + value=lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", uid=[], group="" ) From 5edac6b74923f844ca1b9a9f811d828aa09b444a Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Tue, 7 Nov 2023 09:07:42 +0100 Subject: [PATCH 0928/1093] [Node] cameraInit: Upgrade sfmData version to 1.2.6 --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index bb82a16d7e..46e9de1a60 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -449,7 +449,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 5], + "version": [1, 2, 6], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From 240a43614d486c16db777a343531104beacbe7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 6 Dec 2023 10:39:09 +0000 Subject: [PATCH 0929/1093] [pipelines] Nodal Tracking: Add image segmentation to the template --- meshroom/nodalCameraTracking.mg | 37 ++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index d06fd483f8..58b2ca17da 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -5,17 +5,18 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ScenePreview": "2.0", - "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "NodalSfM": "1.0", - "CameraInit": "9.0", "TracksBuilding": "1.0", + "ImageSegmentation": "1.0", "FeatureExtraction": "1.3", - "RelativePoseEstimating": "1.0", - "Publish": "1.3", + "ScenePreview": "2.0", "ImageMatching": "2.0", - "ConvertSfMFormat": "2.0" + "CameraInit": "9.0", + "NodalSfM": "1.0", + "ConvertSfMFormat": "2.0", + "Publish": "1.3", + "ExportAnimatedCamera": "2.0", + "FeatureMatching": "2.0", + "RelativePoseEstimating": "1.0" } }, "graph": { @@ -39,13 +40,14 @@ 0 ], "inputs": { - "input": "{CameraInit_1.output}" + "input": "{ImageSegmentation_1.input}", + "masksFolder": "{ImageSegmentation_1.output}" } }, "CameraInit_1": { "nodeType": "CameraInit", "position": [ - 0, + -200, 0 ], "inputs": {} @@ -138,6 +140,7 @@ "model": "{NodalSfM_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", "useMasks": false, + "masks": "{ImageSegmentation_1.output}", "pointCloudParams": { "particleSize": 0.001, "particleColor": "Red" @@ -156,6 +159,20 @@ "{ScenePreview_1.output}" ] } + }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true + }, + "internalInputs": { + "color": "#80766f" + } } } } \ No newline at end of file From bba6183d9c4cb129796be20cc7801a447bfdd27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 6 Dec 2023 10:52:50 +0000 Subject: [PATCH 0930/1093] [pipelines] Add colors to the Nodal Camera Tracking template --- meshroom/nodalCameraTracking.mg | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 58b2ca17da..efeab7714d 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -31,6 +31,9 @@ "featuresFolders": [ "{FeatureExtraction_1.output}" ] + }, + "internalInputs": { + "color": "#80766f" } }, "FeatureExtraction_1": { @@ -42,6 +45,9 @@ "inputs": { "input": "{ImageSegmentation_1.input}", "masksFolder": "{ImageSegmentation_1.output}" + }, + "internalInputs": { + "color": "#80766f" } }, "CameraInit_1": { @@ -50,7 +56,10 @@ -200, 0 ], - "inputs": {} + "inputs": {}, + "internalInputs": { + "color": "#80766f" + } }, "FeatureMatching_1": { "nodeType": "FeatureMatching", @@ -63,6 +72,9 @@ "featuresFolders": "{ImageMatching_1.featuresFolders}", "imagePairsList": "{ImageMatching_1.output}", "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "color": "#80766f" } }, "TracksBuilding_1": { @@ -77,6 +89,9 @@ "matchesFolders": [ "{FeatureMatching_1.output}" ] + }, + "internalInputs": { + "color": "#80766f" } }, "RelativePoseEstimating_1": { @@ -90,6 +105,9 @@ "featuresFolders": "{TracksBuilding_1.featuresFolders}", "tracksFilename": "{TracksBuilding_1.output}", "enforcePureRotation": true + }, + "internalInputs": { + "color": "#80766f" } }, "NodalSfM_1": { @@ -103,6 +121,9 @@ "featuresFolders": "{RelativePoseEstimating_1.featuresFolders}", "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", "pairs": "{RelativePoseEstimating_1.output}" + }, + "internalInputs": { + "color": "#80766f" } }, "ExportAnimatedCamera_1": { @@ -114,6 +135,9 @@ "inputs": { "input": "{NodalSfM_1.output}", "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" } }, "ConvertSfMFormat_1": { @@ -127,6 +151,9 @@ "fileExt": "sfm", "structure": false, "observations": false + }, + "internalInputs": { + "color": "#4c594c" } }, "ScenePreview_1": { @@ -145,6 +172,9 @@ "particleSize": 0.001, "particleColor": "Red" } + }, + "internalInputs": { + "color": "#4c594c" } }, "Publish_1": { From 13d6dd3820595c4e43b8cc2b687425891c86fa61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 23 Nov 2023 15:38:32 +0100 Subject: [PATCH 0931/1093] [pipelines] Update versions for all the templates --- meshroom/cameraTracking.mg | 34 ++++++++++---------- meshroom/cameraTrackingWithoutCalibration.mg | 30 ++++++++--------- meshroom/distortionCalibration.mg | 10 +++--- meshroom/hdrFusion.mg | 8 ++--- meshroom/nodalCameraTracking.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 33 +++++++++---------- meshroom/panoramaHdr.mg | 30 ++++++++--------- meshroom/photogrammetry.mg | 22 ++++++------- meshroom/photogrammetryAndCameraTracking.mg | 34 ++++++++++---------- meshroom/photogrammetryDraft.mg | 14 ++++---- meshroom/stereoPhotometry.mg | 8 ++--- 11 files changed, 112 insertions(+), 113 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index a70396143a..d9772aa8c4 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,35 +1,35 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", + "ScenePreview": "2.0", + "Publish": "1.3", + "MeshFiltering": "3.0", "DepthMapFilter": "4.0", - "Texturing": "6.0", + "DepthMap": "5.0", "ExportDistortion": "1.0", + "Texturing": "6.0", "ConvertSfMFormat": "2.0", - "Publish": "1.3", - "MeshDecimate": "1.0", - "CameraInit": "9.0", "ImageSegmentation": "1.0", - "ApplyCalibration": "1.0", - "FeatureExtraction": "1.3", - "ScenePreview": "2.0", - "StructureFromMotion": "3.3", - "MeshFiltering": "3.0", - "DistortionCalibration": "3.0", - "ImageMatchingMultiSfM": "1.0", - "DepthMap": "5.0", "PrepareDenseScene": "3.1", - "ImageMatching": "2.0", "KeyframeSelection": "5.0", + "ExportAnimatedCamera": "2.0", "CheckerboardDetection": "1.0", + "DistortionCalibration": "3.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "Meshing": "7.0", + "CameraInit": "9.0", + "ImageMatchingMultiSfM": "1.0", + "MeshDecimate": "1.0", "SfMTransfer": "2.1", + "StructureFromMotion": "3.3", "SfMTriangulation": "1.0", - "FeatureMatching": "2.0", - "Meshing": "7.0" + "ImageMatching": "2.0", + "ApplyCalibration": "1.0" } }, "graph": { diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index d10179004b..4677e26c26 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -1,32 +1,32 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", + "ScenePreview": "2.0", + "Publish": "1.3", + "MeshFiltering": "3.0", "DepthMapFilter": "4.0", + "DepthMap": "5.0", "Texturing": "6.0", "ConvertSfMFormat": "2.0", - "Publish": "1.3", - "MeshDecimate": "1.0", - "CameraInit": "9.0", "ImageSegmentation": "1.0", - "ApplyCalibration": "1.0", - "FeatureExtraction": "1.3", - "ScenePreview": "2.0", - "StructureFromMotion": "3.3", - "MeshFiltering": "3.0", - "ImageMatchingMultiSfM": "1.0", - "DepthMap": "5.0", "PrepareDenseScene": "3.1", - "ImageMatching": "2.0", "KeyframeSelection": "5.0", + "ExportAnimatedCamera": "2.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "Meshing": "7.0", + "CameraInit": "9.0", + "ImageMatchingMultiSfM": "1.0", + "MeshDecimate": "1.0", "SfMTransfer": "2.1", + "StructureFromMotion": "3.3", "SfMTriangulation": "1.0", - "FeatureMatching": "2.0", - "Meshing": "7.0" + "ImageMatching": "2.0", + "ApplyCalibration": "1.0" } }, "graph": { diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index f5d03b32ac..d2a1122acf 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -1,15 +1,15 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "DistortionCalibration": "3.0", - "CheckerboardDetection": "1.0", + "ExportDistortion": "1.0", "CameraInit": "9.0", - "Publish": "1.3", - "ExportDistortion": "1.0" + "CheckerboardDetection": "1.0", + "DistortionCalibration": "3.0", + "Publish": "1.3" } }, "graph": { diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index aaedec5ae2..29ff1ef641 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -1,13 +1,13 @@ { "header": { "nodesVersions": { - "Publish": "1.3", - "LdrToHdrMerge": "4.1", "CameraInit": "9.0", + "LdrToHdrMerge": "4.1", + "LdrToHdrCalibration": "3.0", "LdrToHdrSampling": "4.0", - "LdrToHdrCalibration": "3.0" + "Publish": "1.3" }, - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true }, diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index efeab7714d..5360953634 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true, "nodesVersions": { diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 797976ad7a..85a7399366 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,25 +1,25 @@ { "header": { "nodesVersions": { - "CameraInit": "9.0", - "FeatureExtraction": "1.3", - "LdrToHdrCalibration": "3.0", - "PanoramaEstimation": "1.0", + "FeatureMatching": "2.0", + "PanoramaMerging": "1.0", "PanoramaSeams": "2.0", - "ImageMatching": "2.0", + "CameraInit": "9.0", + "LdrToHdrMerge": "4.1", + "PanoramaPostProcessing": "2.0", "SfMTransform": "3.1", - "PanoramaPrepareImages": "1.1", - "PanoramaInit": "2.0", - "Publish": "1.3", - "PanoramaPostProcessing": "2.1", - "FeatureMatching": "2.0", - "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", + "LdrToHdrCalibration": "3.0", + "LdrToHdrSampling": "4.0", "PanoramaCompositing": "2.0", - "PanoramaMerging": "1.0", - "LdrToHdrMerge": "4.1" + "Publish": "1.3", + "PanoramaPrepareImages": "1.1", + "FeatureExtraction": "1.3", + "PanoramaInit": "2.0", + "ImageMatching": "2.0", + "PanoramaEstimation": "1.0" }, - "releaseVersion": "2023.3.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true }, @@ -156,8 +156,7 @@ ], "inputs": { "inputPanorama": "{PanoramaMerging_1.outputPanorama}", - "fillHoles": true, - "exportLevels": false + "fillHoles": true } }, "PanoramaPrepareImages_1": { @@ -246,4 +245,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index a96bb8e000..a2d2395632 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,25 +1,25 @@ { "header": { "nodesVersions": { - "CameraInit": "9.0", - "FeatureExtraction": "1.3", - "LdrToHdrCalibration": "3.0", - "PanoramaEstimation": "1.0", + "FeatureMatching": "2.0", + "PanoramaMerging": "1.0", "PanoramaSeams": "2.0", - "ImageMatching": "2.0", + "CameraInit": "9.0", + "LdrToHdrMerge": "4.1", + "PanoramaPostProcessing": "2.0", "SfMTransform": "3.1", - "PanoramaPrepareImages": "1.1", - "PanoramaInit": "2.0", - "Publish": "1.3", - "PanoramaPostProcessing": "2.1", - "FeatureMatching": "2.0", - "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", + "LdrToHdrCalibration": "3.0", + "LdrToHdrSampling": "4.0", "PanoramaCompositing": "2.0", - "PanoramaMerging": "1.0", - "LdrToHdrMerge": "4.1" + "Publish": "1.3", + "PanoramaPrepareImages": "1.1", + "FeatureExtraction": "1.3", + "PanoramaInit": "2.0", + "ImageMatching": "2.0", + "PanoramaEstimation": "1.0" }, - "releaseVersion": "2023.3.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true }, @@ -240,4 +240,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 6da0cf2f62..ceb8cdc977 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -1,22 +1,22 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true, "nodesVersions": { - "DepthMapFilter": "4.0", - "Meshing": "7.0", + "StructureFromMotion": "3.3", "DepthMap": "5.0", - "FeatureExtraction": "1.2", - "PrepareDenseScene": "3.0", - "CameraInit": "9.0", + "Meshing": "7.0", "FeatureMatching": "2.0", - "MeshFiltering": "3.0", + "CameraInit": "9.0", "Texturing": "6.0", - "StructureFromMotion": "3.1", - "ImageMatching": "2.0", - "Publish": "1.3" + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "MeshFiltering": "3.0", + "FeatureExtraction": "1.3", + "DepthMapFilter": "4.0", + "ImageMatching": "2.0" } }, "graph": { @@ -159,4 +159,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 1e3adcd558..232d980894 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,33 +1,33 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true, "nodesVersions": { + "ScenePreview": "2.0", + "Publish": "1.3", + "MeshFiltering": "3.0", + "DepthMapFilter": "4.0", + "ExportDistortion": "1.0", + "DepthMap": "5.0", "Texturing": "6.0", - "DistortionCalibration": "3.0", "ConvertSfMFormat": "2.0", - "FeatureExtraction": "1.3", - "ExportDistortion": "1.0", - "ApplyCalibration": "1.0", "ImageSegmentation": "1.0", - "FeatureMatching": "2.0", - "ScenePreview": "2.0", + "PrepareDenseScene": "3.1", "KeyframeSelection": "5.0", - "MeshDecimate": "1.0", - "MeshFiltering": "3.0", - "ImageMatchingMultiSfM": "1.0", - "CameraInit": "9.0", - "DepthMapFilter": "4.0", - "ImageMatching": "2.0", "ExportAnimatedCamera": "2.0", - "PrepareDenseScene": "3.1", - "Publish": "1.3", + "CheckerboardDetection": "1.0", + "DistortionCalibration": "3.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", "Meshing": "7.0", - "DepthMap": "5.0", + "CameraInit": "9.0", + "ImageMatchingMultiSfM": "1.0", + "MeshDecimate": "1.0", "StructureFromMotion": "3.3", - "CheckerboardDetection": "1.0" + "ImageMatching": "2.0", + "ApplyCalibration": "1.0" } }, "graph": { diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 426879da2f..9908a48433 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -1,18 +1,18 @@ { "header": { "nodesVersions": { - "PrepareDenseScene": "3.1", + "StructureFromMotion": "3.3", + "FeatureMatching": "2.0", "Meshing": "7.0", + "CameraInit": "9.0", "Texturing": "6.0", - "ImageMatching": "2.0", + "Publish": "1.3", "MeshFiltering": "3.0", "FeatureExtraction": "1.3", - "StructureFromMotion": "3.3", - "FeatureMatching": "2.0", - "CameraInit": "9.0", - "Publish": "1.3" + "PrepareDenseScene": "3.1", + "ImageMatching": "2.0" }, - "releaseVersion": "2023.3.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true }, diff --git a/meshroom/stereoPhotometry.mg b/meshroom/stereoPhotometry.mg index 0adf694ef0..1be693d461 100644 --- a/meshroom/stereoPhotometry.mg +++ b/meshroom/stereoPhotometry.mg @@ -1,15 +1,15 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.2.0-develop", + "releaseVersion": "2023.3.0", "fileVersion": "1.1", "template": true, "nodesVersions": { + "PhotometricStereo": "1.0", + "CameraInit": "9.0", "SphereDetection": "1.0", "LightingCalibration": "1.0", - "Publish": "1.2", - "CameraInit": "9.0", - "PhotometricStereo": "1.0" + "Publish": "1.3" } }, "graph": { From 7ec54fc50d1f9fdfea666ac81474acf2e7afbf04 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 7 Dec 2023 11:53:58 +0100 Subject: [PATCH 0932/1093] option for gpu in segmentation --- meshroom/aliceVision/ImageSegmentation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 05cf592251..4ce6e91025 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -57,6 +57,13 @@ class ImageSegmentation(desc.AVCommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name="useGpu", + label="Use GPU", + description="Use GPU for computation if available", + value=True, + uid=[], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From eb4e30ac4fbd3e4bc84009149630ffebd6ca6476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 13 Dec 2023 15:37:22 +0100 Subject: [PATCH 0933/1093] [pipelines] Add distortion calibration to the nodal camtrack template --- meshroom/nodalCameraTracking.mg | 99 ++++++++++++++++++++++++++++----- 1 file changed, 86 insertions(+), 13 deletions(-) diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 5360953634..f9a31ff258 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -1,22 +1,26 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { - "TracksBuilding": "1.0", - "ImageSegmentation": "1.0", + "DistortionCalibration": "3.0", "FeatureExtraction": "1.3", "ScenePreview": "2.0", - "ImageMatching": "2.0", - "CameraInit": "9.0", - "NodalSfM": "1.0", - "ConvertSfMFormat": "2.0", - "Publish": "1.3", - "ExportAnimatedCamera": "2.0", "FeatureMatching": "2.0", - "RelativePoseEstimating": "1.0" + "RelativePoseEstimating": "1.0", + "ExportAnimatedCamera": "2.0", + "ConvertSfMFormat": "2.0", + "ImageSegmentation": "1.0", + "NodalSfM": "1.0", + "ExportDistortion": "1.0", + "CameraInit": "9.0", + "CheckerboardDetection": "1.0", + "ImageMatching": "2.0", + "TracksBuilding": "1.0", + "ApplyCalibration": "1.0", + "Publish": "1.3" } }, "graph": { @@ -43,7 +47,7 @@ 0 ], "inputs": { - "input": "{ImageSegmentation_1.input}", + "input": "{ApplyCalibration_1.output}", "masksFolder": "{ImageSegmentation_1.output}" }, "internalInputs": { @@ -186,7 +190,8 @@ "inputs": { "inputFiles": [ "{ExportAnimatedCamera_1.output}", - "{ScenePreview_1.output}" + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}" ] } }, @@ -194,7 +199,7 @@ "nodeType": "ImageSegmentation", "position": [ 0, - 0 + 200 ], "inputs": { "input": "{CameraInit_1.output}", @@ -203,6 +208,74 @@ "internalInputs": { "color": "#80766f" } + }, + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + -400, + -160 + ], + "inputs": { + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", + "position": [ + -200, + -160 + ], + "inputs": { + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 0, + -160 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#80766f" + } + }, + "CameraInit_2": { + "nodeType": "CameraInit", + "position": [ + -600, + -160 + ], + "inputs": {}, + "internalInputs": { + "label": "CameraInitLensGrid", + "color": "#302e2e" + } } } } \ No newline at end of file From e661fe384828b3fea9547bac61396c8669b5c621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 13 Dec 2023 15:37:43 +0100 Subject: [PATCH 0934/1093] [pipelines] Add nodal camtrack without calibration template --- .../nodalCameraTrackingWithoutCalibration.mg | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 meshroom/nodalCameraTrackingWithoutCalibration.mg diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg new file mode 100644 index 0000000000..5360953634 --- /dev/null +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -0,0 +1,208 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2023.3.0", + "fileVersion": "1.1", + "template": true, + "nodesVersions": { + "TracksBuilding": "1.0", + "ImageSegmentation": "1.0", + "FeatureExtraction": "1.3", + "ScenePreview": "2.0", + "ImageMatching": "2.0", + "CameraInit": "9.0", + "NodalSfM": "1.0", + "ConvertSfMFormat": "2.0", + "Publish": "1.3", + "ExportAnimatedCamera": "2.0", + "FeatureMatching": "2.0", + "RelativePoseEstimating": "1.0" + } + }, + "graph": { + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + }, + "internalInputs": { + "color": "#80766f" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{ImageSegmentation_1.input}", + "masksFolder": "{ImageSegmentation_1.output}" + }, + "internalInputs": { + "color": "#80766f" + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -200, + 0 + ], + "inputs": {}, + "internalInputs": { + "color": "#80766f" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "color": "#80766f" + } + }, + "TracksBuilding_1": { + "nodeType": "TracksBuilding", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ] + }, + "internalInputs": { + "color": "#80766f" + } + }, + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", + "position": [ + 1000, + 0 + ], + "inputs": { + "input": "{TracksBuilding_1.input}", + "featuresFolders": "{TracksBuilding_1.featuresFolders}", + "tracksFilename": "{TracksBuilding_1.output}", + "enforcePureRotation": true + }, + "internalInputs": { + "color": "#80766f" + } + }, + "NodalSfM_1": { + "nodeType": "NodalSfM", + "position": [ + 1200, + 0 + ], + "inputs": { + "input": "{RelativePoseEstimating_1.input}", + "featuresFolders": "{RelativePoseEstimating_1.featuresFolders}", + "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", + "pairs": "{RelativePoseEstimating_1.output}" + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1400, + 0 + ], + "inputs": { + "input": "{NodalSfM_1.output}", + "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 1400, + 200 + ], + "inputs": { + "input": "{NodalSfM_1.output}", + "fileExt": "sfm", + "structure": false, + "observations": false + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 1600, + 200 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{NodalSfM_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "useMasks": false, + "masks": "{ImageSegmentation_1.output}", + "pointCloudParams": { + "particleSize": 0.001, + "particleColor": "Red" + } + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 1800, + 0 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{ScenePreview_1.output}" + ] + } + }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true + }, + "internalInputs": { + "color": "#80766f" + } + } + } +} \ No newline at end of file From c5fbcf264fc8ae0887ba9e451b28886e7e138aa0 Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Thu, 14 Dec 2023 10:51:36 +0100 Subject: [PATCH 0935/1093] [imageProcessing] Add parameters for enabling pixel aspect ratio application --- meshroom/aliceVision/ImageProcessing.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index f5d7b1d5a3..9d795176c5 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -460,6 +460,30 @@ class ImageProcessing(desc.AVCommandLineNode): ), ] ), + desc.GroupAttribute( + name="parFilter", + label="Pixel Aspect Ratio", + description="Pixel Aspect Ratio parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="parEnabled", + label="Enable", + description="Apply pixel aspect ratio.", + value=False, + uid=[0], + ), + desc.BoolParam( + name="parRowDecimation", + label="Row decimation", + description="If selected, reduce image height by decimating the number of rows.\n" + "Otherwise, increase width by upsampling image columns.", + value=False, + uid=[0], + enabled=lambda node: node.parFilter.parEnabled.value, + ), + ] + ), desc.ChoiceParam( name="outputFormat", label="Output Image Format", From fdfb7c81774a9a9e1801e50b040a0ca516f82d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 18 Dec 2023 08:43:17 +0000 Subject: [PATCH 0936/1093] [nodes] Blender: Rescale rendered images based on their pixel aspect ratio --- meshroom/blender/scripts/preview.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index fdb2dc09d6..5093d5037c 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -396,6 +396,13 @@ def main(): setupRender(view, intrinsic, pose, args.output) bpy.ops.render.render(write_still=True) + # if the pixel aspect ratio is not 1, reload and rescale the rendered image + if bpy.context.scene.render.pixel_aspect_x != 1.0: + finalImg = bpy.data.images.load(bpy.context.scene.render.filepath) + finalImg.scale(int(bpy.context.scene.render.resolution_x * bpy.context.scene.render.pixel_aspect_x), bpy.context.scene.render.resolution_y) + finalImg.save() + bpy.data.images.remove(finalImg) + # clear memory if img: bpy.data.images.remove(img) From d13e0720402c5d4bc555986dd5c5ce731f5ee09b Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 19 Dec 2023 16:06:13 +0100 Subject: [PATCH 0937/1093] Option to export lens grid undistorted --- meshroom/aliceVision/ExportDistortion.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index fe36da67e8..041e9fb9ad 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -46,4 +46,12 @@ class ExportDistortion(desc.AVCommandLineNode): group="", # do not export on the command line uid=[], ), + desc.BoolParam( + name="exportUndistortedGrids", + label="Export undistorted lens grids", + description="Undistort the lens grids and save as images", + value=True, + uid=[0], + advanced=True, + ), ] From 69473115fbcc88491f2ebfcc9bd83477e7610f52 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 20 Dec 2023 09:41:26 +0100 Subject: [PATCH 0938/1093] [nodes] blender preview: add comment --- meshroom/blender/scripts/preview.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 5093d5037c..31cf39cc32 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -401,6 +401,7 @@ def main(): finalImg = bpy.data.images.load(bpy.context.scene.render.filepath) finalImg.scale(int(bpy.context.scene.render.resolution_x * bpy.context.scene.render.pixel_aspect_x), bpy.context.scene.render.resolution_y) finalImg.save() + # clear image from memory bpy.data.images.remove(finalImg) # clear memory From 5b575537fe00eaa2e1776d16fe6f4c1acef86795 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 20 Dec 2023 11:27:14 +0100 Subject: [PATCH 0939/1093] [nodes] ExportDistortion: update params and namings - fix: input param should be in input list - improve params naming (in sync with AliceVision changes) - expose more params --- meshroom/aliceVision/ExportDistortion.py | 62 +++++++++++++++++++----- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 041e9fb9ad..3e7cbeae93 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -7,7 +7,8 @@ class ExportDistortion(desc.AVCommandLineNode): category = 'Export' documentation = ''' -Export the distortion model and parameters of cameras in a SfM scene. +Export the lens distortion model as Nuke node and STMaps. +It also allows to export an undistorted image of the lens grids for validation. ''' inputs = [ @@ -18,6 +19,28 @@ class ExportDistortion(desc.AVCommandLineNode): value="", uid=[0], ), + desc.BoolParam( + name="exportNukeNode", + label="Export Nuke Node", + description="Export Nuke LensDistortion node as nuke file.\n" + "Only supports 3DEqualizer/3DE4 Anamorphic lens model.", + value=True, + uid=[0], + ), + desc.BoolParam( + name="exportLensGridsUndistorted", + label="Export Lens Grids Undistorted", + description="Export the lens grids undistorted for validation.", + value=True, + uid=[0], + ), + desc.BoolParam( + name="exportSTMaps", + label="Export STMaps", + description="Export STMaps for distortion and undistortion.", + value=True, + uid=[0], + ), ] outputs = [ @@ -29,29 +52,42 @@ class ExportDistortion(desc.AVCommandLineNode): uid=[], ), desc.File( - name="distoStMap", + name="distortionNukeNode", + label="Distortion Nuke Node", + description="Calibrated distortion ST map.", + value=desc.Node.internalFolder + "nukeLensDistortion_<INTRINSIC_ID>.nk", + group="", # do not export on the command line + uid=[], + enabled=lambda node: node.exportNukeNode.value, + ), + desc.File( + name="lensGridsUndistorted", + label="Undistorted Lens Grids", + description="Undistorted lens grids for validation", + semantic="image", + value=desc.Node.internalFolder + "lensgrid_<VIEW_ID>_undistort.exr", + group="", # do not export on the command line + uid=[], + enabled=lambda node: node.exportLensGridsUndistorted.value, + ), + desc.File( + name="distortionStMap", label="Distortion ST Map", description="Calibrated distortion ST map.", semantic="image", - value=desc.Node.internalFolder + "<INTRINSIC_ID>_distort.exr", + value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_distort.exr", group="", # do not export on the command line uid=[], + enabled=lambda node: node.exportSTMaps.value, ), desc.File( - name="undistoStMap", + name="undistortionStMap", label="Undistortion ST Map", description="Calibrated undistortion ST map.", semantic="image", - value=desc.Node.internalFolder + "<INTRINSIC_ID>_undistort.exr", + value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_undistort.exr", group="", # do not export on the command line uid=[], - ), - desc.BoolParam( - name="exportUndistortedGrids", - label="Export undistorted lens grids", - description="Undistort the lens grids and save as images", - value=True, - uid=[0], - advanced=True, + enabled=lambda node: node.exportSTMaps.value, ), ] From 66fe2d251349bd55b8e180df2d2af8b8222eb462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 21 Dec 2023 12:35:41 +0100 Subject: [PATCH 0940/1093] [nodes] LdrToHdrCalibration: Add intrinsic ID in the response file's path The node outputs a response file that is named "response_INTRISICID.csv", as determined in AliceVision. Without it, the output attribute refers to a file that does not exist. --- meshroom/aliceVision/LdrToHdrCalibration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index c454f463a4..2c070a2793 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "3.1" import json import math @@ -161,7 +161,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): name="response", label="Response File", description="Path to the output response file.", - value=desc.Node.internalFolder + "response.csv", + value=desc.Node.internalFolder + "response_<INTRINSIC_ID>.csv", uid=[], ) ] From d9a085f6496646aca8ccc7c7d14d5d820cf7f6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 21 Dec 2023 16:27:04 +0100 Subject: [PATCH 0941/1093] [pipelines] Update versions for `LdrToHdrCalibration` --- meshroom/hdrFusion.mg | 6 +++--- meshroom/panoramaFisheyeHdr.mg | 6 +++--- meshroom/panoramaHdr.mg | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 29ff1ef641..3b17a72cd4 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -3,11 +3,11 @@ "nodesVersions": { "CameraInit": "9.0", "LdrToHdrMerge": "4.1", - "LdrToHdrCalibration": "3.0", + "LdrToHdrCalibration": "3.1", "LdrToHdrSampling": "4.0", "Publish": "1.3" }, - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true }, @@ -85,4 +85,4 @@ } } } -} \ No newline at end of file +} diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 85a7399366..cc72585494 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -9,7 +9,7 @@ "PanoramaPostProcessing": "2.0", "SfMTransform": "3.1", "PanoramaWarping": "1.1", - "LdrToHdrCalibration": "3.0", + "LdrToHdrCalibration": "3.1", "LdrToHdrSampling": "4.0", "PanoramaCompositing": "2.0", "Publish": "1.3", @@ -19,7 +19,7 @@ "ImageMatching": "2.0", "PanoramaEstimation": "1.0" }, - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true }, @@ -245,4 +245,4 @@ } } } -} \ No newline at end of file +} diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index a2d2395632..167b1c8e42 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -9,7 +9,7 @@ "PanoramaPostProcessing": "2.0", "SfMTransform": "3.1", "PanoramaWarping": "1.1", - "LdrToHdrCalibration": "3.0", + "LdrToHdrCalibration": "3.1", "LdrToHdrSampling": "4.0", "PanoramaCompositing": "2.0", "Publish": "1.3", @@ -19,7 +19,7 @@ "ImageMatching": "2.0", "PanoramaEstimation": "1.0" }, - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true }, @@ -240,4 +240,4 @@ } } } -} \ No newline at end of file +} From a7f85522ac5168307002db7e7a62bf00189b6dfa Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 3 Jan 2024 15:32:41 +0100 Subject: [PATCH 0942/1093] [node] imageProcessing: add option to keep input filename. --- meshroom/aliceVision/ImageSegmentation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 4ce6e91025..12badebcd6 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -64,6 +64,13 @@ class ImageSegmentation(desc.AVCommandLineNode): value=True, uid=[], ), + desc.BoolParam( + name="keepFilename", + label="Keep Filename", + description="Keep Input Filename", + value=False, + uid=[], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From 543c0bfd9615597d0c764711a6936a6a589f1c0a Mon Sep 17 00:00:00 2001 From: demoulinv <vincent.demoulin@technicolor.com> Date: Wed, 3 Jan 2024 16:08:42 +0100 Subject: [PATCH 0943/1093] [Node] imageSegmentation: update keepFilename parameter. --- meshroom/aliceVision/ImageSegmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 12badebcd6..ddea70768d 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -69,7 +69,7 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Keep Filename", description="Keep Input Filename", value=False, - uid=[], + uid=[0], ), desc.ChoiceParam( name="verboseLevel", From fc2a7f6bc29f72e09e8dffd41b39ab0b3bd8155f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 10 Jan 2024 15:08:01 +0000 Subject: [PATCH 0944/1093] [nodes] ImageSegmentation: Update nodes' version Update from 1.0 to 1.2. The update to 1.1 that should have occurred with #2165 has been forgotten. --- meshroom/aliceVision/ImageSegmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index ddea70768d..3d6218266a 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "1.2" from meshroom.core import desc From 026a244152fd1dc4b02fe1c4e31b3d91e1a8a24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 10 Jan 2024 15:12:44 +0000 Subject: [PATCH 0945/1093] [pipelines] Update versions for all templates with `ImageSegmentation` --- meshroom/cameraTracking.mg | 4 ++-- meshroom/cameraTrackingWithoutCalibration.mg | 4 ++-- meshroom/nodalCameraTracking.mg | 2 +- meshroom/nodalCameraTrackingWithoutCalibration.mg | 4 ++-- meshroom/photogrammetryAndCameraTracking.mg | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index d9772aa8c4..3019e623ca 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { @@ -13,7 +13,7 @@ "ExportDistortion": "1.0", "Texturing": "6.0", "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.0", + "ImageSegmentation": "1.2", "PrepareDenseScene": "3.1", "KeyframeSelection": "5.0", "ExportAnimatedCamera": "2.0", diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 4677e26c26..17885dea35 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { @@ -12,7 +12,7 @@ "DepthMap": "5.0", "Texturing": "6.0", "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.0", + "ImageSegmentation": "1.2", "PrepareDenseScene": "3.1", "KeyframeSelection": "5.0", "ExportAnimatedCamera": "2.0", diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index f9a31ff258..d111b6a86a 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -12,7 +12,7 @@ "RelativePoseEstimating": "1.0", "ExportAnimatedCamera": "2.0", "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.0", + "ImageSegmentation": "1.2", "NodalSfM": "1.0", "ExportDistortion": "1.0", "CameraInit": "9.0", diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 5360953634..2e586c8371 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -1,12 +1,12 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { "TracksBuilding": "1.0", - "ImageSegmentation": "1.0", + "ImageSegmentation": "1.2", "FeatureExtraction": "1.3", "ScenePreview": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 232d980894..55707b72a5 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { @@ -13,7 +13,7 @@ "DepthMap": "5.0", "Texturing": "6.0", "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.0", + "ImageSegmentation": "1.2", "PrepareDenseScene": "3.1", "KeyframeSelection": "5.0", "ExportAnimatedCamera": "2.0", From 900d89d95a9d7d6eead83505d0774050ea069be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 11 Jan 2024 09:23:30 +0100 Subject: [PATCH 0946/1093] [pipelines] Enable `Keep Filename` for all `ImageSegmentation` nodes in templates --- meshroom/cameraTracking.mg | 33 ++++++++++--------- meshroom/cameraTrackingWithoutCalibration.mg | 31 ++++++++--------- meshroom/nodalCameraTracking.mg | 25 +++++++------- .../nodalCameraTrackingWithoutCalibration.mg | 19 ++++++----- meshroom/photogrammetryAndCameraTracking.mg | 31 ++++++++--------- 5 files changed, 72 insertions(+), 67 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 3019e623ca..3a027e6c80 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ScenePreview": "2.0", + "ExportAnimatedCamera": "2.0", + "Texturing": "6.0", + "ImageMatching": "2.0", "Publish": "1.3", "MeshFiltering": "3.0", + "MeshDecimate": "1.0", "DepthMapFilter": "4.0", - "DepthMap": "5.0", "ExportDistortion": "1.0", - "Texturing": "6.0", - "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.2", "PrepareDenseScene": "3.1", + "ImageMatchingMultiSfM": "1.0", + "Meshing": "7.0", "KeyframeSelection": "5.0", - "ExportAnimatedCamera": "2.0", "CheckerboardDetection": "1.0", - "DistortionCalibration": "3.0", - "FeatureExtraction": "1.3", - "FeatureMatching": "2.0", - "Meshing": "7.0", - "CameraInit": "9.0", - "ImageMatchingMultiSfM": "1.0", - "MeshDecimate": "1.0", + "ApplyCalibration": "1.0", + "ConvertSfMFormat": "2.0", + "DepthMap": "5.0", "SfMTransfer": "2.1", "StructureFromMotion": "3.3", + "DistortionCalibration": "3.0", "SfMTriangulation": "1.0", - "ImageMatching": "2.0", - "ApplyCalibration": "1.0" + "FeatureMatching": "2.0", + "ScenePreview": "2.0", + "ImageSegmentation": "1.2", + "FeatureExtraction": "1.3", + "CameraInit": "9.0" } }, "graph": { @@ -426,7 +426,8 @@ ], "inputs": { "input": "{CameraInit_1.output}", - "maskInvert": true + "maskInvert": true, + "keepFilename": true }, "internalInputs": { "color": "#575963" diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 17885dea35..6a74c7122f 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -5,28 +5,28 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ScenePreview": "2.0", + "ExportAnimatedCamera": "2.0", + "Texturing": "6.0", + "ImageMatching": "2.0", "Publish": "1.3", "MeshFiltering": "3.0", + "MeshDecimate": "1.0", "DepthMapFilter": "4.0", - "DepthMap": "5.0", - "Texturing": "6.0", - "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.2", "PrepareDenseScene": "3.1", - "KeyframeSelection": "5.0", - "ExportAnimatedCamera": "2.0", - "FeatureExtraction": "1.3", - "FeatureMatching": "2.0", - "Meshing": "7.0", - "CameraInit": "9.0", "ImageMatchingMultiSfM": "1.0", - "MeshDecimate": "1.0", + "Meshing": "7.0", + "KeyframeSelection": "5.0", + "ApplyCalibration": "1.0", + "ConvertSfMFormat": "2.0", + "DepthMap": "5.0", "SfMTransfer": "2.1", "StructureFromMotion": "3.3", "SfMTriangulation": "1.0", - "ImageMatching": "2.0", - "ApplyCalibration": "1.0" + "FeatureMatching": "2.0", + "ScenePreview": "2.0", + "ImageSegmentation": "1.2", + "FeatureExtraction": "1.3", + "CameraInit": "9.0" } }, "graph": { @@ -380,7 +380,8 @@ ], "inputs": { "input": "{CameraInit_1.output}", - "maskInvert": true + "maskInvert": true, + "keepFilename": true }, "internalInputs": { "color": "#575963" diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index d111b6a86a..8c3b02ddac 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -5,22 +5,22 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "DistortionCalibration": "3.0", - "FeatureExtraction": "1.3", - "ScenePreview": "2.0", "FeatureMatching": "2.0", - "RelativePoseEstimating": "1.0", + "ExportDistortion": "1.0", "ExportAnimatedCamera": "2.0", + "ScenePreview": "2.0", "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.2", - "NodalSfM": "1.0", - "ExportDistortion": "1.0", - "CameraInit": "9.0", "CheckerboardDetection": "1.0", - "ImageMatching": "2.0", - "TracksBuilding": "1.0", "ApplyCalibration": "1.0", - "Publish": "1.3" + "ImageMatching": "2.0", + "CameraInit": "9.0", + "Publish": "1.3", + "DistortionCalibration": "3.0", + "ImageSegmentation": "1.2", + "RelativePoseEstimating": "1.0", + "FeatureExtraction": "1.3", + "NodalSfM": "1.0", + "TracksBuilding": "1.0" } }, "graph": { @@ -203,7 +203,8 @@ ], "inputs": { "input": "{CameraInit_1.output}", - "maskInvert": true + "maskInvert": true, + "keepFilename": true }, "internalInputs": { "color": "#80766f" diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 2e586c8371..e91d3e8076 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -5,18 +5,18 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "TracksBuilding": "1.0", - "ImageSegmentation": "1.2", - "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ExportAnimatedCamera": "2.0", "ScenePreview": "2.0", + "ConvertSfMFormat": "2.0", "ImageMatching": "2.0", "CameraInit": "9.0", - "NodalSfM": "1.0", - "ConvertSfMFormat": "2.0", "Publish": "1.3", - "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "RelativePoseEstimating": "1.0" + "ImageSegmentation": "1.2", + "RelativePoseEstimating": "1.0", + "FeatureExtraction": "1.3", + "NodalSfM": "1.0", + "TracksBuilding": "1.0" } }, "graph": { @@ -198,7 +198,8 @@ ], "inputs": { "input": "{CameraInit_1.output}", - "maskInvert": true + "maskInvert": true, + "keepFilename": true }, "internalInputs": { "color": "#80766f" diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 55707b72a5..3796fce4a2 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ScenePreview": "2.0", + "ExportAnimatedCamera": "2.0", + "Texturing": "6.0", + "ImageMatching": "2.0", "Publish": "1.3", "MeshFiltering": "3.0", + "MeshDecimate": "1.0", "DepthMapFilter": "4.0", "ExportDistortion": "1.0", - "DepthMap": "5.0", - "Texturing": "6.0", - "ConvertSfMFormat": "2.0", - "ImageSegmentation": "1.2", "PrepareDenseScene": "3.1", + "ImageMatchingMultiSfM": "1.0", + "Meshing": "7.0", "KeyframeSelection": "5.0", - "ExportAnimatedCamera": "2.0", "CheckerboardDetection": "1.0", + "ApplyCalibration": "1.0", + "ConvertSfMFormat": "2.0", + "DepthMap": "5.0", + "StructureFromMotion": "3.3", "DistortionCalibration": "3.0", - "FeatureExtraction": "1.3", "FeatureMatching": "2.0", - "Meshing": "7.0", - "CameraInit": "9.0", - "ImageMatchingMultiSfM": "1.0", - "MeshDecimate": "1.0", - "StructureFromMotion": "3.3", - "ImageMatching": "2.0", - "ApplyCalibration": "1.0" + "ScenePreview": "2.0", + "ImageSegmentation": "1.2", + "FeatureExtraction": "1.3", + "CameraInit": "9.0" } }, "graph": { @@ -301,7 +301,8 @@ ], "inputs": { "input": "{CameraInit_1.output}", - "maskInvert": true + "maskInvert": true, + "keepFilename": true }, "internalInputs": { "color": "#575963" From dc165a821617a582b64da421f5813d9bff1e20f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 12 Jan 2024 12:08:53 +0100 Subject: [PATCH 0947/1093] [nodes] ImageSegmentation: Adapt preview to the name of the output masks --- meshroom/aliceVision/ImageSegmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 3d6218266a..db9a2e08e8 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -95,7 +95,7 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Masks", description="Generated segmentation masks.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>.exr", + value=lambda attr: desc.Node.internalFolder + "<VIEW_ID>.exr" if not attr.node.keepFilename.value else desc.Node.internalFolder + "<FILENAME>.exr", group="", uid=[], ), From 7817d23eada967606bbe1bcf6113e6b27cbeab3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 12 Jan 2024 17:17:39 +0100 Subject: [PATCH 0948/1093] [pipelines] Panorama: Enable "Minimal 2D Motion" for `FeatureMatching` --- meshroom/panoramaFisheyeHdr.mg | 27 ++++++++++++++------------- meshroom/panoramaHdr.mg | 27 ++++++++++++++------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index cc72585494..1257ffae8d 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "FeatureMatching": "2.0", - "PanoramaMerging": "1.0", + "FeatureExtraction": "1.3", "PanoramaSeams": "2.0", - "CameraInit": "9.0", - "LdrToHdrMerge": "4.1", "PanoramaPostProcessing": "2.0", - "SfMTransform": "3.1", "PanoramaWarping": "1.1", + "LdrToHdrMerge": "4.1", + "PanoramaMerging": "1.0", + "Publish": "1.3", + "PanoramaEstimation": "1.0", + "CameraInit": "9.0", "LdrToHdrCalibration": "3.1", + "ImageMatching": "2.0", "LdrToHdrSampling": "4.0", - "PanoramaCompositing": "2.0", - "Publish": "1.3", "PanoramaPrepareImages": "1.1", - "FeatureExtraction": "1.3", - "PanoramaInit": "2.0", - "ImageMatching": "2.0", - "PanoramaEstimation": "1.0" + "FeatureMatching": "2.0", + "PanoramaCompositing": "2.0", + "SfMTransform": "3.1", + "PanoramaInit": "2.0" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", @@ -227,7 +227,8 @@ "input": "{ImageMatching_1.input}", "featuresFolders": "{ImageMatching_1.featuresFolders}", "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "minRequired2DMotion": 5.0 } }, "Publish_1": { @@ -245,4 +246,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 167b1c8e42..7865abc6c8 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "FeatureMatching": "2.0", - "PanoramaMerging": "1.0", + "FeatureExtraction": "1.3", "PanoramaSeams": "2.0", - "CameraInit": "9.0", - "LdrToHdrMerge": "4.1", "PanoramaPostProcessing": "2.0", - "SfMTransform": "3.1", "PanoramaWarping": "1.1", + "LdrToHdrMerge": "4.1", + "PanoramaMerging": "1.0", + "Publish": "1.3", + "PanoramaEstimation": "1.0", + "CameraInit": "9.0", "LdrToHdrCalibration": "3.1", + "ImageMatching": "2.0", "LdrToHdrSampling": "4.0", - "PanoramaCompositing": "2.0", - "Publish": "1.3", "PanoramaPrepareImages": "1.1", - "FeatureExtraction": "1.3", - "PanoramaInit": "2.0", - "ImageMatching": "2.0", - "PanoramaEstimation": "1.0" + "FeatureMatching": "2.0", + "PanoramaCompositing": "2.0", + "SfMTransform": "3.1", + "PanoramaInit": "2.0" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", @@ -222,7 +222,8 @@ "input": "{ImageMatching_1.input}", "featuresFolders": "{ImageMatching_1.featuresFolders}", "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "minRequired2DMotion": 5.0 } }, "Publish_1": { @@ -240,4 +241,4 @@ } } } -} +} \ No newline at end of file From f478fb7f519ead40b2430441d6471d85ced89e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 15 Jan 2024 11:28:15 +0100 Subject: [PATCH 0949/1093] [pipelines] PhotogAndCamTrack: Matching mode in exhaustive mode --- meshroom/photogrammetryAndCameraTracking.mg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 3796fce4a2..0d99bb572a 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -488,7 +488,7 @@ "featuresFolders": [ "{FeatureExtraction_1.output}" ], - "method": "VocabularyTree", + "method": "Exhaustive", "matchingMode": "a/b" }, "internalInputs": { From e1397c8c8338436a2e157adf9b0b6cdbfba59f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 15 Jan 2024 12:33:48 +0100 Subject: [PATCH 0950/1093] [pipelines] PanoramaFisheyeHdr: Run `FeatureExtraction` after `PanoramaInit` The `FeatureExtraction` node will thus be able to use the fisheye circle information obtained with `PanoramaInit` to only extract features within that circle. --- meshroom/panoramaFisheyeHdr.mg | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 1257ffae8d..972d363520 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { + "PanoramaEstimation": "1.0", + "LdrToHdrCalibration": "3.1", + "PanoramaPostProcessing": "2.0", + "FeatureMatching": "2.0", + "PanoramaPrepareImages": "1.1", "FeatureExtraction": "1.3", "PanoramaSeams": "2.0", - "PanoramaPostProcessing": "2.0", + "PanoramaCompositing": "2.0", + "PanoramaInit": "2.0", "PanoramaWarping": "1.1", - "LdrToHdrMerge": "4.1", "PanoramaMerging": "1.0", + "SfMTransform": "3.1", + "LdrToHdrSampling": "4.0", "Publish": "1.3", - "PanoramaEstimation": "1.0", - "CameraInit": "9.0", - "LdrToHdrCalibration": "3.1", "ImageMatching": "2.0", - "LdrToHdrSampling": "4.0", - "PanoramaPrepareImages": "1.1", - "FeatureMatching": "2.0", - "PanoramaCompositing": "2.0", - "SfMTransform": "3.1", - "PanoramaInit": "2.0" + "LdrToHdrMerge": "4.1", + "CameraInit": "9.0" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", @@ -42,7 +42,7 @@ "PanoramaWarping_1": { "nodeType": "PanoramaWarping", "position": [ - 2000, + 2200, 0 ], "inputs": { @@ -78,11 +78,11 @@ "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ - 1200, + 1400, 0 ], "inputs": { - "input": "{PanoramaInit_1.outSfMData}", + "input": "{FeatureExtraction_1.input}", "featuresFolders": [ "{FeatureExtraction_1.output}" ], @@ -92,11 +92,11 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 1000, - 70 + 1200, + 0 ], "inputs": { - "input": "{LdrToHdrMerge_1.outSfMData}", + "input": "{PanoramaInit_1.outSfMData}", "describerTypes": [ "sift" ], @@ -107,7 +107,7 @@ "PanoramaMerging_1": { "nodeType": "PanoramaMerging", "position": [ - 2600, + 2800, 0 ], "inputs": { @@ -119,7 +119,7 @@ "PanoramaCompositing_1": { "nodeType": "PanoramaCompositing", "position": [ - 2400, + 2600, 0 ], "inputs": { @@ -151,7 +151,7 @@ "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ - 2800, + 3000, 0 ], "inputs": { @@ -172,7 +172,7 @@ "SfMTransform_1": { "nodeType": "SfMTransform", "position": [ - 1800, + 2000, 0 ], "inputs": { @@ -183,7 +183,7 @@ "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ - 2200, + 2400, 0 ], "inputs": { @@ -194,7 +194,7 @@ "PanoramaEstimation_1": { "nodeType": "PanoramaEstimation", "position": [ - 1600, + 1800, 0 ], "inputs": { @@ -210,7 +210,7 @@ "nodeType": "PanoramaInit", "position": [ 1000, - -50 + 0 ], "inputs": { "input": "{LdrToHdrMerge_1.outSfMData}", @@ -220,7 +220,7 @@ "FeatureMatching_1": { "nodeType": "FeatureMatching", "position": [ - 1400, + 1600, 0 ], "inputs": { @@ -234,7 +234,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3000, + 3200, 0 ], "inputs": { From 32ba10e79e36755b4a7da89efc1961db2a87df47 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 25 Jan 2024 11:16:42 +0100 Subject: [PATCH 0951/1093] E57 importer --- meshroom/aliceVision/ImportE57.py | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 meshroom/aliceVision/ImportE57.py diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py new file mode 100644 index 0000000000..e7186694ac --- /dev/null +++ b/meshroom/aliceVision/ImportE57.py @@ -0,0 +1,57 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class ImportE57(desc.AVCommandLineNode): + commandLine = 'aliceVision_importe57 {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' +Import an e57 file and generate a sfmData +''' + + inputs = [ + desc.ListAttribute( + elementDesc=desc.File( + name="inputFile", + label="e57 File", + description="Path to a e57 file.", + value="", + uid=[0], + ), + name="input", + label="Input Files", + description="Set of e57 files in the same reference frame." + ), + 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=[], + ), + + desc.FloatParam( + name="maxDensity", + label="Points density", + description="Make sure no points has no neighboor closer than maxDensity meters", + value=0.01, + range=(0.0, 0.2, 0.001), + uid=[0] + ) + ] + + outputs = [ + desc.File( + name="output", + label="Output", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", + uid=[], + ), + ] + From 7ebeacc3e205884a0980c5731ab357697a47d2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 30 Jan 2024 13:46:39 +0100 Subject: [PATCH 0952/1093] [nodes] ImportE57: Clean-up labels and descriptions --- meshroom/aliceVision/ImportE57.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index e7186694ac..1d9b6e0048 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -4,26 +4,34 @@ class ImportE57(desc.AVCommandLineNode): - commandLine = 'aliceVision_importe57 {allParams}' + commandLine = 'aliceVision_importE57 {allParams}' size = desc.DynamicNodeSize('input') category = 'Utils' documentation = ''' -Import an e57 file and generate a sfmData +Import an E57 file and generate an SfMData. ''' inputs = [ desc.ListAttribute( elementDesc=desc.File( name="inputFile", - label="e57 File", - description="Path to a e57 file.", + label="E57 File", + description="Path to an E57 file.", value="", uid=[0], ), name="input", label="Input Files", - description="Set of e57 files in the same reference frame." + description="Set of E57 files in the same reference frame." + ), + desc.FloatParam( + name="maxDensity", + label="Points Density", + description="Ensure no points has no neighbour closer than maxDensity meters.", + value=0.01, + range=(0.0, 0.2, 0.001), + uid=[0] ), desc.ChoiceParam( name="verboseLevel", @@ -33,15 +41,6 @@ class ImportE57(desc.AVCommandLineNode): values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], - ), - - desc.FloatParam( - name="maxDensity", - label="Points density", - description="Make sure no points has no neighboor closer than maxDensity meters", - value=0.01, - range=(0.0, 0.2, 0.001), - uid=[0] ) ] @@ -54,4 +53,3 @@ class ImportE57(desc.AVCommandLineNode): uid=[], ), ] - From 0e0f511c5df8226f11fa9e9cbc26e8d74c274712 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 1 Feb 2024 18:18:55 +0100 Subject: [PATCH 0953/1093] [nodes] Replace the list of colorspaces with the utilitary constant --- meshroom/aliceVision/FeatureExtraction.py | 3 ++- meshroom/aliceVision/ImageProcessing.py | 7 ++++--- meshroom/aliceVision/LdrToHdrCalibration.py | 5 +++-- meshroom/aliceVision/LdrToHdrMerge.py | 5 +++-- meshroom/aliceVision/LdrToHdrSampling.py | 5 +++-- meshroom/aliceVision/PanoramaPostProcessing.py | 3 ++- meshroom/aliceVision/PanoramaWarping.py | 3 ++- meshroom/aliceVision/Texturing.py | 5 +++-- 8 files changed, 22 insertions(+), 14 deletions(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 16f87081f6..2dc1326031 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -1,6 +1,7 @@ __version__ = "1.3" from meshroom.core import desc +from meshroom.core.utils import COLORSPACES class FeatureExtraction(desc.AVCommandLineNode): @@ -140,8 +141,8 @@ class FeatureExtraction(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Allows you to choose the color space in which the data are processed.", + values=COLORSPACES, value="sRGB", - values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 9d795176c5..8c22e39fa6 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -1,6 +1,7 @@ __version__ = "3.3" from meshroom.core import desc +from meshroom.core.utils import COLORSPACES import os.path @@ -497,8 +498,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="inputColorSpace", label="Input Color Space", description="Allows you to force the color space of the input image.", + values=COLORSPACES, value="AUTO", - values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), @@ -506,8 +507,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="outputColorSpace", label="Output Color Space", description="Allows you to choose the color space of the output image.", + values=COLORSPACES, value="AUTO", - values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), @@ -515,8 +516,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Allows you to choose the color space in which the data are processed.", + values=COLORSPACES, value="Linear", - values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled=lambda node: not node.applyDcpMetadata.value, diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 2c070a2793..a467b16737 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -6,6 +6,7 @@ from collections import Counter from meshroom.core import desc +from meshroom.core.utils import COLORSPACES def findMetadata(d, keys, defaultValue): v = None @@ -126,8 +127,8 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="Working Color Space", description="Color space in which the data are processed.\n" "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", - value="auto", - values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg"], + values=COLORSPACES, + value="AUTO", exclusive=True, uid=[], group="user", # not used directly on the command line diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 3e5ca2c19f..564484606d 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -6,6 +6,7 @@ from collections import Counter from meshroom.core import desc +from meshroom.core.utils import COLORSPACES def findMetadata(d, keys, defaultValue): v = None @@ -169,8 +170,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Working Color Space", description="Color space in which the data are processed.\n" "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", - value="auto", - values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + values=COLORSPACES, + value="AUTO", exclusive=True, uid=[0], enabled=lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 2ce8fa1567..9ab5c1f968 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -6,6 +6,7 @@ from collections import Counter from meshroom.core import desc +from meshroom.core.utils import COLORSPACES def findMetadata(d, keys, defaultValue): @@ -126,8 +127,8 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="Working Color Space", description="Color space in which the data are processed.\n" "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", - value="auto", - values=["auto", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + values=COLORSPACES, + value="AUTO", exclusive=True, uid=[0], enabled=lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 909eb96bd1..81a975aa78 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import COLORSPACES class PanoramaPostProcessing(desc.CommandLineNode): @@ -58,8 +59,8 @@ class PanoramaPostProcessing(desc.CommandLineNode): name="outputColorSpace", label="Output Color Space", description="The color space of the output image.", + values=COLORSPACES, value="Linear", - values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index cc29771d9b..be70ce9f0c 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import COLORSPACES class PanoramaWarping(desc.AVCommandLineNode): @@ -69,8 +70,8 @@ class PanoramaWarping(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Colorspace in which the panorama warping will be performed.", + values=COLORSPACES, value="Linear", - values=["Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index df5aa1234b..ed0b491b6f 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,6 +1,7 @@ __version__ = "6.0" from meshroom.core import desc, Version +from meshroom.core.utils import COLORSPACES import logging @@ -259,8 +260,8 @@ class Texturing(desc.AVCommandLineNode): name="workingColorSpace", label="Working Color Space", description="Color space for the texturing internal computation (does not impact the output file color space).", + values=COLORSPACES, value="sRGB", - values=("sRGB", "Linear", "ACES2065-1", "ACEScg"), exclusive=True, uid=[0], advanced=True, @@ -269,8 +270,8 @@ class Texturing(desc.AVCommandLineNode): name="outputColorSpace", label="Output Color Space", description="Color space for the output texture files.", + values=COLORSPACES, value="AUTO", - values=("sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "AUTO"), exclusive=True, uid=[0], ), From 45451aed7d6f0132e1002875437cad52d29d482a Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 2 Feb 2024 19:50:05 +0100 Subject: [PATCH 0954/1093] [nodes] CameraInit: check allowedCameraModels validity --- meshroom/aliceVision/CameraInit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 46e9de1a60..d078f2fb6e 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -247,6 +247,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): exclusive=False, uid=[], joinChar=",", + validValue=lambda node: len(node.allowedCameraModels.value), + errorMessage="Need at least one allowed camera model.", advanced=True, ), desc.ChoiceParam( From 9c270c5ec0d481a114df025dd7abd1f791f4f9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 8 Feb 2024 16:05:33 +0100 Subject: [PATCH 0955/1093] [nodes] Use utilitary constants for most common `ChoiceParams` --- meshroom/aliceVision/ApplyCalibration.py | 3 ++- meshroom/aliceVision/CameraCalibration.py | 3 ++- meshroom/aliceVision/CameraInit.py | 5 +++-- meshroom/aliceVision/CameraLocalization.py | 5 +++-- meshroom/aliceVision/CameraRigCalibration.py | 5 +++-- meshroom/aliceVision/CameraRigLocalization.py | 5 +++-- meshroom/aliceVision/CheckerboardCalibration.py | 3 ++- meshroom/aliceVision/CheckerboardDetection.py | 10 ++++++++++ meshroom/aliceVision/ColorCheckerCorrection.py | 5 +++-- meshroom/aliceVision/ColorCheckerDetection.py | 3 ++- meshroom/aliceVision/ConvertMesh.py | 3 ++- meshroom/aliceVision/ConvertSfMFormat.py | 5 +++-- meshroom/aliceVision/DepthMap.py | 3 ++- meshroom/aliceVision/DepthMapFilter.py | 3 ++- meshroom/aliceVision/DistortionCalibration.py | 3 ++- meshroom/aliceVision/ExportAnimatedCamera.py | 3 ++- meshroom/aliceVision/ExportColoredPointCloud.py | 3 ++- meshroom/aliceVision/ExportDistortion.py | 10 ++++++++++ meshroom/aliceVision/ExportMatches.py | 5 +++-- meshroom/aliceVision/ExportMaya.py | 3 ++- meshroom/aliceVision/FeatureExtraction.py | 6 +++--- meshroom/aliceVision/FeatureMatching.py | 5 +++-- meshroom/aliceVision/FeatureRepeatability.py | 5 +++-- meshroom/aliceVision/GlobalSfM.py | 6 +++--- meshroom/aliceVision/ImageMasking.py | 3 ++- meshroom/aliceVision/ImageMatching.py | 3 ++- meshroom/aliceVision/ImageMatchingMultiSfM.py | 3 ++- meshroom/aliceVision/ImageProcessing.py | 8 ++++---- meshroom/aliceVision/ImageSegmentation.py | 3 ++- meshroom/aliceVision/ImportE57.py | 3 ++- meshroom/aliceVision/ImportKnownPoses.py | 3 ++- meshroom/aliceVision/KeyframeSelection.py | 5 +++-- meshroom/aliceVision/LdrToHdrCalibration.py | 4 ++-- meshroom/aliceVision/LdrToHdrMerge.py | 6 +++--- meshroom/aliceVision/LdrToHdrSampling.py | 4 ++-- meshroom/aliceVision/LightingCalibration.py | 3 ++- meshroom/aliceVision/LightingEstimation.py | 3 ++- meshroom/aliceVision/MergeMeshes.py | 3 ++- meshroom/aliceVision/MeshDecimate.py | 3 ++- meshroom/aliceVision/MeshDenoising.py | 3 ++- meshroom/aliceVision/MeshFiltering.py | 3 ++- meshroom/aliceVision/MeshMasking.py | 3 ++- meshroom/aliceVision/MeshResampling.py | 3 ++- meshroom/aliceVision/Meshing.py | 3 ++- meshroom/aliceVision/NodalSfM.py | 5 +++-- meshroom/aliceVision/NormalIntegration.py | 3 ++- meshroom/aliceVision/PanoramaCompositing.py | 5 +++-- meshroom/aliceVision/PanoramaEstimation.py | 6 +++--- meshroom/aliceVision/PanoramaInit.py | 3 ++- meshroom/aliceVision/PanoramaMerging.py | 5 +++-- meshroom/aliceVision/PanoramaPostProcessing.py | 4 ++-- meshroom/aliceVision/PanoramaPrepareImages.py | 3 ++- meshroom/aliceVision/PanoramaSeams.py | 3 ++- meshroom/aliceVision/PanoramaWarping.py | 6 +++--- meshroom/aliceVision/PhotometricStereo.py | 3 ++- meshroom/aliceVision/PrepareDenseScene.py | 3 ++- meshroom/aliceVision/Publish.py | 4 +++- meshroom/aliceVision/RelativePoseEstimating.py | 5 +++-- meshroom/aliceVision/SfMAlignment.py | 3 ++- meshroom/aliceVision/SfMDistances.py | 5 +++-- meshroom/aliceVision/SfMMerge.py | 4 +++- meshroom/aliceVision/SfMSplitReconstructed.py | 3 ++- meshroom/aliceVision/SfMToRig.py | 4 +++- meshroom/aliceVision/SfMTransfer.py | 3 ++- meshroom/aliceVision/SfMTransform.py | 5 +++-- meshroom/aliceVision/SfMTriangulation.py | 5 +++-- meshroom/aliceVision/SfmBootstraping.py | 5 +++-- meshroom/aliceVision/SketchfabUpload.py | 6 ++++-- meshroom/aliceVision/SphereDetection.py | 3 ++- meshroom/aliceVision/Split360Images.py | 3 ++- meshroom/aliceVision/StructureFromMotion.py | 5 +++-- meshroom/aliceVision/Texturing.py | 5 +++-- meshroom/aliceVision/TracksBuilding.py | 5 +++-- 73 files changed, 195 insertions(+), 109 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index e50ee4839f..79b59aa2fc 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ApplyCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_applyCalibration {allParams}' @@ -30,8 +31,8 @@ class ApplyCalibration(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 38af3adb83..ccfa01e634 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class CameraCalibration(desc.AVCommandLineNode): @@ -127,8 +128,8 @@ class CameraCalibration(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index d078f2fb6e..965e4aae16 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -8,6 +8,7 @@ import logging from meshroom.core import desc, Version +from meshroom.core.utils import RAW_COLOR_INTERPRETATION, VERBOSE_LEVEL from meshroom.multiview import FilesByType, findFilesByTypeInFolder Viewpoint = [ @@ -260,8 +261,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): " - LibRawWhiteBalancing: Use internal white balancing from libraw.\n" " - DCPLinearProcessing: Use DCP color profile.\n" " - DCPMetadata: Same as None with DCP info added in metadata.", + values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", - values=["None", "LibRawNoWhiteBalancing", "LibRawWhiteBalancing", "DCPLinearProcessing", "DCPMetadata"], exclusive=True, uid=[0], ), @@ -313,8 +314,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index ab65c4f4d1..29a9cc8ab0 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -2,6 +2,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class CameraLocalization(desc.AVCommandLineNode): @@ -44,8 +45,8 @@ class CameraLocalization(desc.AVCommandLineNode): name="matchDescTypes", label="Match Desc Types", description="Describer types to use for the matching.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -210,8 +211,8 @@ class CameraLocalization(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 54784dd45b..ac0f42b737 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -2,6 +2,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class CameraRigCalibration(desc.AVCommandLineNode): @@ -52,8 +53,8 @@ class CameraRigCalibration(desc.AVCommandLineNode): name="matchDescTypes", label="Match Describer Types", description="The describer types to use for the matching.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -169,8 +170,8 @@ class CameraRigCalibration(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index e175c0c9c1..2c4fc0c179 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -2,6 +2,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class CameraRigLocalization(desc.AVCommandLineNode): @@ -51,8 +52,8 @@ class CameraRigLocalization(desc.AVCommandLineNode): name="matchDescTypes", label="Match Describer Types", description="The describer types to use for the matching.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -176,8 +177,8 @@ class CameraRigLocalization(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/CheckerboardCalibration.py b/meshroom/aliceVision/CheckerboardCalibration.py index 0e5ab339be..be347c8173 100644 --- a/meshroom/aliceVision/CheckerboardCalibration.py +++ b/meshroom/aliceVision/CheckerboardCalibration.py @@ -1,6 +1,7 @@ __version__ = '1.0' from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class CheckerboardCalibration(desc.AVCommandLineNode): @@ -39,8 +40,8 @@ class CheckerboardCalibration(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index 4e2bb4c9ef..94b1aed5b2 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/aliceVision/CheckerboardDetection.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class CheckerboardDetection(desc.AVCommandLineNode): @@ -44,6 +45,15 @@ class CheckerboardDetection(desc.AVCommandLineNode): value=False, uid=[0], ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), ] outputs = [ diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 5f53bae573..cb493aa86c 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL import os.path @@ -54,8 +55,8 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): " - half: Use half float (16 bits per channel).\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" " - auto: Use half float if all values can fit, else use full float.", + values=EXR_STORAGE_DATA_TYPE, value="float", - values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), @@ -63,8 +64,8 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index d52379738d..28b9170cbd 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL import os.path @@ -55,8 +56,8 @@ class ColorCheckerDetection(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index e3ef5e7a68..03d4e98ce0 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ConvertMesh(desc.AVCommandLineNode): @@ -31,8 +32,8 @@ class ConvertMesh(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 7b50a04676..dc77bb4e05 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -1,6 +1,7 @@ __version__ = "2.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class ConvertSfMFormat(desc.AVCommandLineNode): @@ -35,8 +36,8 @@ class ConvertSfMFormat(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types to keep.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5", "unknown"], exclusive=False, uid=[0], joinChar=",", @@ -92,8 +93,8 @@ class ConvertSfMFormat(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index d418be8cf6..a27fa86851 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -1,6 +1,7 @@ __version__ = "5.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class DepthMap(desc.AVCommandLineNode): @@ -594,8 +595,8 @@ class DepthMap(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 55e8ae856d..80358038d3 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -1,6 +1,7 @@ __version__ = "4.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class DepthMapFilter(desc.AVCommandLineNode): @@ -113,8 +114,8 @@ class DepthMapFilter(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 1ac9c84c45..8e70280aa8 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -1,6 +1,7 @@ __version__ = '3.0' from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class DistortionCalibration(desc.AVCommandLineNode): @@ -40,8 +41,8 @@ class DistortionCalibration(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index fe4b650a30..a2681e7db9 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -1,6 +1,7 @@ __version__ = "2.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ExportAnimatedCamera(desc.AVCommandLineNode): @@ -80,8 +81,8 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index dee37d94bf..ae39f79dcf 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ExportColoredPointCloud(desc.AVCommandLineNode): @@ -22,8 +23,8 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 3e7cbeae93..9368e53196 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ExportDistortion(desc.AVCommandLineNode): commandLine = 'aliceVision_exportDistortion {allParams}' @@ -41,6 +42,15 @@ class ExportDistortion(desc.AVCommandLineNode): value=True, uid=[0], ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), ] outputs = [ diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index ec189d16af..d547df2182 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -1,6 +1,7 @@ __version__ = "1.1" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class ExportMatches(desc.AVCommandLineNode): @@ -23,8 +24,8 @@ class ExportMatches(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -57,8 +58,8 @@ class ExportMatches(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 253144a2fb..d28b7a23f2 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ExportMaya(desc.AVCommandLineNode): @@ -26,8 +27,8 @@ class ExportMaya(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 2dc1326031..7118763d10 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -1,7 +1,7 @@ __version__ = "1.3" from meshroom.core import desc -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, DESCRIBER_TYPES, VERBOSE_LEVEL class FeatureExtraction(desc.AVCommandLineNode): @@ -66,8 +66,8 @@ class FeatureExtraction(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], joinChar=",", @@ -167,8 +167,8 @@ class FeatureExtraction(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index bbcab8bc3b..c48448b535 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -1,6 +1,7 @@ __version__ = "2.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class FeatureMatching(desc.AVCommandLineNode): @@ -63,8 +64,8 @@ class FeatureMatching(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], joinChar=",", @@ -213,8 +214,8 @@ class FeatureMatching(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index bfb2061616..d4dcabeb2c 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -1,6 +1,7 @@ __version__ = "1.1" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class FeatureRepeatability(desc.AVCommandLineNode): @@ -26,8 +27,8 @@ class FeatureRepeatability(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["sift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -115,8 +116,8 @@ class FeatureRepeatability(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index de7e5cfe5d..9a5e3a3c53 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class GlobalSfM(desc.AVCommandLineNode): @@ -52,9 +53,8 @@ class GlobalSfM(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", - "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -95,8 +95,8 @@ class GlobalSfM(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 48a810169a..f20cab60c4 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -1,6 +1,7 @@ __version__ = "3.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ImageMasking(desc.AVCommandLineNode): @@ -134,8 +135,8 @@ class ImageMasking(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 64c05330cd..86961d18e6 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -2,6 +2,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ImageMatching(desc.AVCommandLineNode): @@ -133,8 +134,8 @@ class ImageMatching(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 5d834eb99e..a94d41ff4f 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -2,6 +2,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ImageMatchingMultiSfM(desc.AVCommandLineNode): @@ -136,8 +137,8 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 8c22e39fa6..ca540fbd40 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -1,7 +1,7 @@ __version__ = "3.3" from meshroom.core import desc -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, EXR_STORAGE_DATA_TYPE, RAW_COLOR_INTERPRETATION, VERBOSE_LEVEL import os.path @@ -527,8 +527,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="rawColorInterpretation", label="RAW Color Interpretation", description="Allows you to choose how RAW data are color processed.", + values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", - values=["None", "LibRawNoWhiteBalancing", "LibRawWhiteBalancing", "DCPLinearProcessing", "DCPMetadata", "Auto"], exclusive=True, uid=[0], ), @@ -636,8 +636,8 @@ class ImageProcessing(desc.AVCommandLineNode): " - half: Use half float (16 bits per channel).\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" " - auto: Use half float if all values can fit, else use full float.", + values=EXR_STORAGE_DATA_TYPE, value="float", - values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), @@ -686,8 +686,8 @@ class ImageProcessing(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index db9a2e08e8..004f15c852 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -1,6 +1,7 @@ __version__ = "1.2" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ImageSegmentation(desc.AVCommandLineNode): @@ -75,8 +76,8 @@ class ImageSegmentation(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index 1d9b6e0048..c5c57dd61d 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ImportE57(desc.AVCommandLineNode): @@ -37,8 +38,8 @@ class ImportE57(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index e2ad7c4b02..0428f8ef93 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class ImportKnownPoses(desc.AVCommandLineNode): @@ -30,8 +31,8 @@ class ImportKnownPoses(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index b8270e87c3..ca5bc48d81 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -2,6 +2,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL # List of supported video extensions (provided by OpenImageIO) videoExts = [".avi", ".mov", ".mp4", ".m4a", ".m4v", ".3gp", ".3g2", ".mj2", ".m4v", ".mpg"] @@ -314,8 +315,8 @@ class KeyframeSelection(desc.AVCommandLineNode): " - half: Use half float (16 bits per channel).\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" " - auto: Use half float if all values can fit, else use full float.", + values=EXR_STORAGE_DATA_TYPE, value="float", - values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], enabled=lambda node: node.outputExtension.value == "exr", @@ -409,8 +410,8 @@ class KeyframeSelection(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index a467b16737..5adca56955 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -6,7 +6,7 @@ from collections import Counter from meshroom.core import desc -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL def findMetadata(d, keys, defaultValue): v = None @@ -150,8 +150,8 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 564484606d..1172dc6415 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -6,7 +6,7 @@ from collections import Counter from meshroom.core import desc -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL def findMetadata(d, keys, defaultValue): v = None @@ -229,8 +229,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode): " - half: Use half float (16 bits per channel).\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" " - auto: Use half float if all values can fit, else use full float.", + values=EXR_STORAGE_DATA_TYPE, value="float", - values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), @@ -238,8 +238,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 9ab5c1f968..9e30d9609e 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -6,7 +6,7 @@ from collections import Counter from meshroom.core import desc -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL def findMetadata(d, keys, defaultValue): @@ -175,8 +175,8 @@ class LdrToHdrSampling(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 718f4149af..76758afeae 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class LightingCalibration(desc.CommandLineNode): @@ -47,8 +48,8 @@ class LightingCalibration(desc.CommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index 6bd5275a8c..1efc9ee258 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class LightingEstimation(desc.AVCommandLineNode): @@ -76,8 +77,8 @@ class LightingEstimation(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 3c84420351..a5daffe053 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class MergeMeshes(desc.AVCommandLineNode): @@ -59,8 +60,8 @@ class MergeMeshes(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 824cc85e75..1c5f505172 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class MeshDecimate(desc.AVCommandLineNode): @@ -67,8 +68,8 @@ class MeshDecimate(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index f85a30f635..ca9a51770a 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class MeshDenoising(desc.AVCommandLineNode): @@ -85,8 +86,8 @@ class MeshDenoising(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 56369f39a6..924b8554da 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -1,6 +1,7 @@ __version__ = "3.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class MeshFiltering(desc.AVCommandLineNode): @@ -115,8 +116,8 @@ class MeshFiltering(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 32dc526a3d..937c8d5682 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -1,6 +1,7 @@ __version__ = "1.1" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class MeshMasking(desc.AVCommandLineNode): @@ -99,8 +100,8 @@ class MeshMasking(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 56c0048b34..214e5d8a55 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class MeshResampling(desc.AVCommandLineNode): @@ -73,8 +74,8 @@ class MeshResampling(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 9d85bc96ce..407831f97b 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -1,6 +1,7 @@ __version__ = "7.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class Meshing(desc.AVCommandLineNode): @@ -513,8 +514,8 @@ class Meshing(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index 79aa5f4f78..a8f57e2a1c 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class NodalSfM(desc.AVCommandLineNode): @@ -51,7 +52,7 @@ class NodalSfM(desc.AVCommandLineNode): label="Describer Types", description="Describer types used to describe an image.", value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], + values=DESCRIBER_TYPES, exclusive=False, uid=[0], joinChar=",", @@ -60,8 +61,8 @@ class NodalSfM(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index be909bb645..edb4ae396e 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class NormalIntegration(desc.CommandLineNode): commandLine = 'aliceVision_normalIntegration {allParams}' @@ -37,8 +38,8 @@ class NormalIntegration(desc.CommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 1076cab657..0e15e0ae8a 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL class PanoramaCompositing(desc.AVCommandLineNode): @@ -89,8 +90,8 @@ class PanoramaCompositing(desc.AVCommandLineNode): " - half: Use half float (16 bits per channel).\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" " - auto: Use half float if all values can fit, else use full float.", + values=EXR_STORAGE_DATA_TYPE, value="float", - values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), @@ -112,8 +113,8 @@ class PanoramaCompositing(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index be142378ff..fdf2a832de 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class PanoramaEstimation(desc.AVCommandLineNode): @@ -51,9 +52,8 @@ class PanoramaEstimation(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["sift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", - "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -177,8 +177,8 @@ class PanoramaEstimation(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index d409a862a0..630b8678ab 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -1,6 +1,7 @@ __version__ = "2.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class PanoramaInit(desc.AVCommandLineNode): @@ -144,8 +145,8 @@ class PanoramaInit(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index f55f58a66e..d6b0c6c860 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL class PanoramaMerging(desc.AVCommandLineNode): @@ -57,8 +58,8 @@ class PanoramaMerging(desc.AVCommandLineNode): " - half: Use half float (16 bits per channel).\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" " - auto: Use half float if all values can fit, else use full float.\n", + values=EXR_STORAGE_DATA_TYPE, value="float", - values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), @@ -66,8 +67,8 @@ class PanoramaMerging(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 81a975aa78..5c9d45ee54 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -4,7 +4,7 @@ import os from meshroom.core import desc -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL class PanoramaPostProcessing(desc.CommandLineNode): @@ -106,8 +106,8 @@ class PanoramaPostProcessing(desc.CommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index 0c709a4295..ace260e674 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -1,6 +1,7 @@ __version__ = "1.1" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL import os.path @@ -26,8 +27,8 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 4bc35453c3..15ca8a6dfa 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -4,6 +4,7 @@ import os from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class PanoramaSeams(desc.AVCommandLineNode): @@ -51,8 +52,8 @@ class PanoramaSeams(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index be70ce9f0c..cbacec4560 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -4,7 +4,7 @@ import os from meshroom.core import desc -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL class PanoramaWarping(desc.AVCommandLineNode): @@ -83,8 +83,8 @@ class PanoramaWarping(desc.AVCommandLineNode): " - half: Use half float (16 bits per channel).\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" " - auto: Use half float if all values can fit, else use full float.", + values=EXR_STORAGE_DATA_TYPE, value="float", - values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), @@ -92,8 +92,8 @@ class PanoramaWarping(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 047865bc14..990ffbaeb2 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class PhotometricStereo(desc.CommandLineNode): commandLine = 'aliceVision_photometricStereo {allParams}' @@ -75,8 +76,8 @@ class PhotometricStereo(desc.CommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 556e98cd15..3e954e82f4 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -1,6 +1,7 @@ __version__ = "3.1" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class PrepareDenseScene(desc.AVCommandLineNode): @@ -93,8 +94,8 @@ class PrepareDenseScene(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 95578bf743..7479383c11 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -3,6 +3,8 @@ __version__ = "1.3" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + import distutils.dir_util as du import shutil import glob @@ -42,8 +44,8 @@ class Publish(desc.Node): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 80294924c5..918fbfbee2 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class RelativePoseEstimating(desc.AVCommandLineNode): commandLine = 'aliceVision_relativePoseEstimating {allParams}' @@ -45,8 +46,8 @@ class RelativePoseEstimating(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], joinChar=",", @@ -62,8 +63,8 @@ class RelativePoseEstimating(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 1ea6be1580..db50489b10 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -1,6 +1,7 @@ __version__ = "2.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL import os.path @@ -104,8 +105,8 @@ class SfMAlignment(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py index b0fc9760c3..c82dc14811 100644 --- a/meshroom/aliceVision/SfMDistances.py +++ b/meshroom/aliceVision/SfMDistances.py @@ -1,6 +1,7 @@ __version__ = "3.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class SfMDistances(desc.AVCommandLineNode): @@ -31,8 +32,8 @@ class SfMDistances(desc.AVCommandLineNode): name="landmarksDescriberTypes", label="Describer Types", description="Describer types used to describe an image (only used when using 'landmarks').", + values=DESCRIBER_TYPES, value=["cctag3"], - values=["sift", "sift_float", "sift_upright", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], joinChar=",", @@ -59,8 +60,8 @@ class SfMDistances(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index 67c5d88edc..530d022eec 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -1,6 +1,8 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + import os.path @@ -57,8 +59,8 @@ class SfMMerge(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index 5e01846453..3a2f9faaa7 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class SfMSplitReconstructed(desc.AVCommandLineNode): @@ -26,8 +27,8 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py index 48def995ef..acfacfec76 100644 --- a/meshroom/aliceVision/SfMToRig.py +++ b/meshroom/aliceVision/SfMToRig.py @@ -1,6 +1,8 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + import os.path class SfMToRig(desc.AVCommandLineNode): @@ -24,8 +26,8 @@ class SfMToRig(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 4a68045100..dbbf71ed92 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -1,6 +1,7 @@ __version__ = "2.1" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL import os.path @@ -96,8 +97,8 @@ class SfMTransfer(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index b179583242..2fc25c71e5 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -1,6 +1,7 @@ __version__ = "3.1" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL import os.path @@ -135,8 +136,8 @@ class SfMTransform(desc.AVCommandLineNode): name="landmarksDescriberTypes", label="Landmarks Describer Types", description="Image describer types used to compute the mean of the point cloud (only for 'landmarks' method).", + values=DESCRIBER_TYPES, value=["sift", "dspsift", "akaze"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5", "unknown"], exclusive=False, uid=[0], joinChar=",", @@ -190,8 +191,8 @@ class SfMTransform(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index aeb369c346..af42b467ac 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class SfMTriangulation(desc.AVCommandLineNode): @@ -49,8 +50,8 @@ class SfMTriangulation(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], joinChar=",", @@ -143,8 +144,8 @@ class SfMTriangulation(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index c33c1f7452..3c12b8f8fa 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class SfMBootStraping(desc.AVCommandLineNode): @@ -49,8 +50,8 @@ class SfMBootStraping(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], joinChar=",", @@ -59,8 +60,8 @@ class SfMBootStraping(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 670e88019b..7d64ee15dd 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -1,6 +1,8 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + import glob import os import json @@ -177,9 +179,9 @@ class SketchfabUpload(desc.Node): desc.ChoiceParam( name="verboseLevel", label="Verbose Level", - description="Verbosity level (critical, error, warning, info, debug).", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["critical", "error", "warning", "info", "debug"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 90d078774d..5f1bd096fc 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class SphereDetection(desc.CommandLineNode): @@ -74,8 +75,8 @@ class SphereDetection(desc.CommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 76f1066e0f..fac1730e57 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -1,6 +1,7 @@ __version__ = "3.0" from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL class Split360InputNodeSize(desc.DynamicNodeSize): @@ -124,8 +125,8 @@ class Split360Images(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 77731b3662..6a1ca04161 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -1,6 +1,7 @@ __version__ = "3.3" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class StructureFromMotion(desc.AVCommandLineNode): @@ -97,8 +98,8 @@ class StructureFromMotion(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], joinChar=",", @@ -394,8 +395,8 @@ class StructureFromMotion(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index ed0b491b6f..e4049aea73 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -1,7 +1,8 @@ __version__ = "6.0" from meshroom.core import desc, Version -from meshroom.core.utils import COLORSPACES +from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL + import logging @@ -325,8 +326,8 @@ class Texturing(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ), diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index 73e5fcc5ec..c1b5bc4c5e 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -1,6 +1,7 @@ __version__ = "1.0" from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class TracksBuilding(desc.AVCommandLineNode): @@ -48,8 +49,8 @@ class TracksBuilding(desc.AVCommandLineNode): name="describerTypes", label="Describer Types", description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, value=["dspsift"], - values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], joinChar=",", @@ -83,8 +84,8 @@ class TracksBuilding(desc.AVCommandLineNode): name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, value="info", - values=["fatal", "error", "warning", "info", "debug", "trace"], exclusive=True, uid=[], ) From 25ea01e710c9c16704ae796fa05bbde13dccde5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 8 Feb 2024 17:18:07 +0100 Subject: [PATCH 0956/1093] [nodes] Harmonize the use of trailing commas across all the nodes --- meshroom/aliceVision/CameraCalibration.py | 2 +- meshroom/aliceVision/CameraInit.py | 343 +++++++++++++----- meshroom/aliceVision/ConvertSfMFormat.py | 1 - meshroom/aliceVision/DepthMap.py | 81 +++-- meshroom/aliceVision/DistortionCalibration.py | 2 +- meshroom/aliceVision/ExportAnimatedCamera.py | 1 - meshroom/aliceVision/ExportMatches.py | 4 +- meshroom/aliceVision/FeatureExtraction.py | 16 +- meshroom/aliceVision/FeatureMatching.py | 6 +- meshroom/aliceVision/FeatureRepeatability.py | 2 +- meshroom/aliceVision/GlobalSfM.py | 6 +- meshroom/aliceVision/ImageMasking.py | 22 +- meshroom/aliceVision/ImageMatching.py | 4 +- meshroom/aliceVision/ImageMatchingMultiSfM.py | 4 +- meshroom/aliceVision/ImageProcessing.py | 41 +-- meshroom/aliceVision/ImageSegmentation.py | 5 +- meshroom/aliceVision/ImportE57.py | 6 +- meshroom/aliceVision/ImportKnownPoses.py | 2 +- meshroom/aliceVision/KeyframeSelection.py | 74 ++-- meshroom/aliceVision/LdrToHdrCalibration.py | 8 +- meshroom/aliceVision/LdrToHdrMerge.py | 8 +- meshroom/aliceVision/LdrToHdrSampling.py | 6 +- meshroom/aliceVision/LightingCalibration.py | 14 +- meshroom/aliceVision/LightingEstimation.py | 2 +- meshroom/aliceVision/MergeMeshes.py | 2 +- meshroom/aliceVision/MeshDecimate.py | 2 +- meshroom/aliceVision/MeshDenoising.py | 2 +- meshroom/aliceVision/MeshFiltering.py | 2 +- meshroom/aliceVision/MeshMasking.py | 12 +- meshroom/aliceVision/MeshResampling.py | 4 +- meshroom/aliceVision/Meshing.py | 30 +- meshroom/aliceVision/NodalSfM.py | 6 +- meshroom/aliceVision/NormalIntegration.py | 10 +- meshroom/aliceVision/PanoramaCompositing.py | 8 +- meshroom/aliceVision/PanoramaEstimation.py | 6 +- meshroom/aliceVision/PanoramaInit.py | 26 +- meshroom/aliceVision/PanoramaMerging.py | 2 +- .../aliceVision/PanoramaPostProcessing.py | 8 +- meshroom/aliceVision/PanoramaSeams.py | 4 +- meshroom/aliceVision/PanoramaWarping.py | 2 +- meshroom/aliceVision/PhotometricStereo.py | 26 +- meshroom/aliceVision/PrepareDenseScene.py | 12 +- .../aliceVision/RelativePoseEstimating.py | 6 +- meshroom/aliceVision/SfMAlignment.py | 6 +- meshroom/aliceVision/SfMMerge.py | 2 +- meshroom/aliceVision/SfMSplitReconstructed.py | 2 +- meshroom/aliceVision/SfMToRig.py | 2 +- meshroom/aliceVision/SfMTransfer.py | 6 +- meshroom/aliceVision/SfMTransform.py | 104 ++++-- meshroom/aliceVision/SfMTriangulation.py | 6 +- meshroom/aliceVision/SfmBootstraping.py | 6 +- meshroom/aliceVision/SphereDetection.py | 34 +- meshroom/aliceVision/Split360Images.py | 16 +- meshroom/aliceVision/StructureFromMotion.py | 14 +- meshroom/aliceVision/Texturing.py | 58 ++- meshroom/aliceVision/TracksBuilding.py | 6 +- meshroom/blender/ScenePreview.py | 4 +- 57 files changed, 681 insertions(+), 415 deletions(-) diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index ccfa01e634..41a63724b3 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -52,7 +52,7 @@ class CameraCalibration(desc.AVCommandLineNode): range=(0, 10000, 1), uid=[0], ), - ] + ], ), desc.FloatParam( name="squareSize", diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 965e4aae16..87b4715158 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -12,38 +12,116 @@ from meshroom.multiview import FilesByType, findFilesByTypeInFolder Viewpoint = [ - desc.IntParam(name="viewId", label="ID", description="Image UID.", value=-1, uid=[0], range=None), - desc.IntParam(name="poseId", label="Pose ID", description="Pose ID.", value=-1, uid=[0], range=None), - desc.File(name="path", label="Image Path", description="Image filepath.", value="", uid=[0]), - desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal camera parameters.", value=-1, uid=[0], range=None), - desc.IntParam(name="rigId", label="Rig", description="Rig parameters.", value=-1, uid=[0], range=None), - desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig sub-pose parameters.", value=-1, uid=[0], range=None), - desc.StringParam(name="metadata", label="Image Metadata", - description="The configuration of the Viewpoints is based on the images' metadata.\n" - "The important ones are:\n" - " - Focal Length: the focal length in mm.\n" - " - Make and Model: this information allows to convert the focal in mm into a focal length in pixels using " - "an embedded sensor database.\n" - " - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be " - "differentiated and their internal parameters are optimized separately.", - value="", uid=[], advanced=True), + desc.IntParam( + name="viewId", + label="ID", + description="Image UID.", + value=-1, + uid=[0], + range=None, + ), + desc.IntParam( + name="poseId", + label="Pose ID", + description="Pose ID.", + value=-1, + uid=[0], + range=None, + ), + desc.File( + name="path", + label="Image Path", + description="Image filepath.", + value="", + uid=[0], + ), + desc.IntParam( + name="intrinsicId", + label="Intrinsic", + description="Internal camera parameters.", + value=-1, + uid=[0], + range=None, + ), + desc.IntParam( + name="rigId", + label="Rig", + description="Rig parameters.", + value=-1, + uid=[0], + range=None, + ), + desc.IntParam( + name="subPoseId", + label="Rig Sub-Pose", + description="Rig sub-pose parameters.", + value=-1, + uid=[0], + range=None, + ), + desc.StringParam( + name="metadata", + label="Image Metadata", + description="The configuration of the Viewpoints is based on the images' metadata.\n" + "The important ones are:\n" + " - Focal Length: the focal length in mm.\n" + " - Make and Model: this information allows to convert the focal in mm into a focal length in pixels using " + "an embedded sensor database.\n" + " - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be " + "differentiated and their internal parameters are optimized separately.", + value="", + uid=[], + advanced=True, + ), ] Intrinsic = [ - desc.IntParam(name="intrinsicId", label="ID", description="Intrinsic UID.", value=-1, uid=[0], range=None), - desc.FloatParam(name="initialFocalLength", label="Initial Focal Length", - description="Initial guess on the focal length (in mm).\n" - "When we have an initial value from EXIF, this value is not accurate but it cannot be wrong.\n" - "So this value is used to limit the range of possible values in the optimization.\n" - "If this value is set to -1, it will not be used and the focal length will not be bounded.", - value=-1.0, uid=[0], range=None), - desc.FloatParam(name="focalLength", label="Focal Length", description="Known/calibrated focal length (in mm).", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), - desc.FloatParam(name="pixelRatio", label="Pixel Ratio", description="Ratio between the pixel width and the pixel height.", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), - desc.BoolParam(name="pixelRatioLocked", label="Pixel Ratio Locked", - description="The pixel ratio value is locked for estimation.", - value=True, uid=[0]), - desc.ChoiceParam(name="type", label="Camera Type", - description="Mathematical model used to represent a camera:\n" + desc.IntParam( + name="intrinsicId", + label="ID", + description="Intrinsic UID.", + value=-1, + uid=[0], + range=None, + ), + desc.FloatParam( + name="initialFocalLength", + label="Initial Focal Length", + description="Initial guess on the focal length (in mm).\n" + "When we have an initial value from EXIF, this value is not accurate but it cannot be wrong.\n" + "So this value is used to limit the range of possible values in the optimization.\n" + "If this value is set to -1, it will not be used and the focal length will not be bounded.", + value=-1.0, + uid=[0], + range=None, + ), + desc.FloatParam( + name="focalLength", + label="Focal Length", + description="Known/calibrated focal length (in mm).", + value=1000.0, + uid=[0], + range=(0.0, 10000.0, 1.0), + ), + desc.FloatParam( + name="pixelRatio", + label="Pixel Ratio", + description="Ratio between the pixel width and the pixel height.", + value=1.0, + uid=[0], + range=(0.0, 10.0, 0.1), + ), + desc.BoolParam( + name="pixelRatioLocked", + label="Pixel Ratio Locked", + description="The pixel ratio value is locked for estimation.", + value=True, + uid=[0], + ), + desc.ChoiceParam( + name="type", + label="Camera Type", + description="Mathematical model used to represent a camera:\n" " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" " - radial1: Pinhole camera with one radial distortion parameter.\n" " - radial3: Pinhole camera with 3 radial distortion parameters.\n" @@ -53,65 +131,154 @@ " - 3deanamorphic4: Pinhole camera with 4 anamorphic distortion coefficients.\n" " - 3declassicld: Pinhole camera with 10 anamorphic distortion coefficients.\n" " - 3deradial4: Pinhole camera with 3DE radial4 model.\n", - value="", values=["", "pinhole", "radial1", "radial3", "brown", "fisheye4", "equidistant_r3", "3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, uid=[0]), - desc.IntParam(name="width", label="Width", description="Image width.", value=0, uid=[0], range=(0, 10000, 1)), - desc.IntParam(name="height", label="Height", description="Image height.", value=0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor width (in mm).", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)), - desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor height (in mm).", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)), - desc.StringParam(name="serialNumber", label="Serial Number", description="Device serial number (Camera UID and Lens UID combined).", value="", uid=[0]), - desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the optical center in the image (i.e. the sensor surface).", groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), - desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), - ]), - - desc.ChoiceParam(name="initializationMode", label="Initialization Mode", - description="Defines how this intrinsic was initialized:\n" - " - calibrated: calibrated externally.\n" - " - estimated: estimated from metadata and/or sensor width.\n" - " - unknown: unknown camera parameters (can still have default value guess).\n" - " - none: not set.", - values=("calibrated", "estimated", "unknown", "none"), - value="none", - exclusive=True, - uid=[0], + value="", + values=["", "pinhole", "radial1", "radial3", "brown", "fisheye4", "equidistant_r3", "3deanamorphic4", "3declassicld", "3deradial4"], + exclusive=True, + uid=[0], ), - - desc.ChoiceParam(name="distortionInitializationMode", label="Distortion Initialization Mode", - description="Defines how the distortion model and parameters were initialized:\n" - " - calibrated: calibrated externally.\n" - " - estimated: estimated from a database of generic calibration.\n" - " - unknown: unknown camera parameters (can still have default value guess).\n" - " - none: not set.", - values=("calibrated", "estimated", "unknown", "none"), - value="none", - exclusive=True, - uid=[0], + desc.IntParam( + name="width", + label="Width", + description="Image width.", + value=0, + uid=[0], + range=(0, 10000, 1), + ), + desc.IntParam( + name="height", + label="Height", + description="Image height.", + value=0, + uid=[0], + range=(0, 10000, 1), + ), + desc.FloatParam( + name="sensorWidth", + label="Sensor Width", + description="Sensor width (in mm).", + value=36.0, + uid=[0], + range=(0.0, 1000.0, 1.0), + ), + desc.FloatParam( + name="sensorHeight", + label="Sensor Height", + description="Sensor height (in mm).", + value=24.0, + uid=[0], + range=(0.0, 1000.0, 1.0), + ), + desc.StringParam( + name="serialNumber", + label="Serial Number", + description="Device serial number (Camera UID and Lens UID combined).", + value="", + uid=[0], + ), + desc.GroupAttribute( + name="principalPoint", + label="Principal Point", + description="Position of the optical center in the image (i.e. the sensor surface).", + groupDesc=[ + desc.FloatParam( + name="x", + label="x", + description="", + value=0.0, + uid=[0], + range=(0.0, 10000.0, 1.0), + ), + desc.FloatParam( + name="y", + label="y", + description="", + value=0.0, + uid=[0], + range=(0.0, 10000.0, 1.0), + ), + ], + ), + desc.ChoiceParam( + name="initializationMode", + label="Initialization Mode", + description="Defines how this intrinsic was initialized:\n" + " - calibrated: calibrated externally.\n" + " - estimated: estimated from metadata and/or sensor width.\n" + " - unknown: unknown camera parameters (can still have default value guess).\n" + " - none: not set.", + values=("calibrated", "estimated", "unknown", "none"), + value="none", + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name="distortionInitializationMode", + label="Distortion Initialization Mode", + description="Defines how the distortion model and parameters were initialized:\n" + " - calibrated: calibrated externally.\n" + " - estimated: estimated from a database of generic calibration.\n" + " - unknown: unknown camera parameters (can still have default value guess).\n" + " - none: not set.", + values=("calibrated", "estimated", "unknown", "none"), + value="none", + exclusive=True, + uid=[0], ), - desc.ListAttribute( - name="distortionParams", - elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), - label="Distortion Params", - description="Distortion parameters.", + name="distortionParams", + elementDesc=desc.FloatParam( + name="p", + label="", + description="", + value=0.0, + uid=[0], + range=(-0.1, 0.1, 0.01), + ), + label="Distortion Params", + description="Distortion parameters.", ), desc.GroupAttribute( - name="undistortionOffset", - label="Undistortion Offset", - description="Undistortion offset.", - groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), - desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), - ] + name="undistortionOffset", + label="Undistortion Offset", + description="Undistortion offset.", + groupDesc=[ + desc.FloatParam( + name="x", + label="x", + description="", + value=0.0, + uid=[0], + range=(0.0, 10000.0, 1.0), + ), + desc.FloatParam( + name="y", + label="y", + description="", + value=0.0, + uid=[0], + range=(0.0, 10000.0, 1.0), + ), + ], ), desc.ListAttribute( - name="undistortionParams", - elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), - label="Undistortion Params", - description="Undistortion parameters." + name="undistortionParams", + elementDesc=desc.FloatParam( + name="p", + label="", + description="", + value=0.0, + uid=[0], + range=(-0.1, 0.1, 0.01), + ), + label="Undistortion Params", + description="Undistortion parameters." ), - desc.BoolParam(name="locked", label="Locked", - description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.", - value=False, uid=[0] + desc.BoolParam( + name="locked", + label="Locked", + description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.", + value=False, + uid=[0], ), ] @@ -183,14 +350,24 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): inputs = [ desc.ListAttribute( name="viewpoints", - elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="Viewpoint.", groupDesc=Viewpoint), + elementDesc=desc.GroupAttribute( + name="viewpoint", + label="Viewpoint", + description="Viewpoint.", + groupDesc=Viewpoint, + ), label="Viewpoints", description="Input viewpoints.", group="", ), desc.ListAttribute( name="intrinsics", - elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="Intrinsic.", groupDesc=Intrinsic), + elementDesc=desc.GroupAttribute( + name="intrinsic", + label="Intrinsic", + description="Intrinsic.", + groupDesc=Intrinsic, + ), label="Intrinsics", description="Camera intrinsics.", group="", @@ -243,8 +420,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): name="allowedCameraModels", label="Allowed Camera Models", description="List of the camera models that can be attributed.", - value=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], values=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], + value=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], exclusive=False, uid=[], joinChar=",", diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index dc77bb4e05..37b4aadd13 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -109,4 +109,3 @@ class ConvertSfMFormat(desc.AVCommandLineNode): uid=[], ), ] - diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index a27fa86851..c946400a76 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -74,40 +74,41 @@ class DepthMap(desc.AVCommandLineNode): description="Tiles are used to split the computation into fixed buffers to fit the GPU best.", group=None, groupDesc=[ - desc.IntParam( - name="tileBufferWidth", - label="Buffer Width", - description="Maximum tile buffer width.", - value=1024, - range=(-1, 2000, 10), - uid=[0], - ), - desc.IntParam( - name="tileBufferHeight", - label="Buffer Height", - description="Maximum tile buffer height.", - value=1024, - range=(-1, 2000, 10), - uid=[0], - ), - desc.IntParam( - name="tilePadding", - label="Padding", - description="Buffer padding for overlapping tiles.", - value=64, - range=(0, 500, 1), - uid=[0], - ), - desc.BoolParam( - name="autoAdjustSmallImage", - label="Auto Adjust Small Image", - description="Automatically adjust depth map parameters if images are smaller than one tile\n" - "(maxTCamsPerTile = maxTCams, adjust step if needed).", - value=True, - uid=[0], - advanced=True, - ), - ]), + desc.IntParam( + name="tileBufferWidth", + label="Buffer Width", + description="Maximum tile buffer width.", + value=1024, + range=(-1, 2000, 10), + uid=[0], + ), + desc.IntParam( + name="tileBufferHeight", + label="Buffer Height", + description="Maximum tile buffer height.", + value=1024, + range=(-1, 2000, 10), + uid=[0], + ), + desc.IntParam( + name="tilePadding", + label="Padding", + description="Buffer padding for overlapping tiles.", + value=64, + range=(0, 500, 1), + uid=[0], + ), + desc.BoolParam( + name="autoAdjustSmallImage", + label="Auto Adjust Small Image", + description="Automatically adjust depth map parameters if images are smaller than one tile\n" + "(maxTCamsPerTile = maxTCams, adjust step if needed).", + value=True, + uid=[0], + advanced=True, + ), + ], + ), desc.BoolParam( name="chooseTCamsPerTile", label="Choose Neighbour Cameras Per Tile", @@ -277,7 +278,7 @@ class DepthMap(desc.AVCommandLineNode): value=False, uid=[0], ), - ] + ], ), desc.GroupAttribute( name="refine", @@ -398,7 +399,7 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.refine.refineEnabled.value, ), - ] + ], ), desc.GroupAttribute( name="colorOptimization", @@ -423,7 +424,7 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, enabled=lambda node: node.colorOptimization.colorOptimizationEnabled.value, ), - ] + ], ), desc.GroupAttribute( name="customPatchPattern", @@ -502,7 +503,7 @@ class DepthMap(desc.AVCommandLineNode): range=(0.0, 1.0, 0.1), uid=[0], ), - ] + ], ), ), desc.BoolParam( @@ -514,7 +515,7 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), ), - ] + ], ), desc.GroupAttribute( name="intermediateResults", @@ -580,7 +581,7 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), - ] + ], ), desc.IntParam( name="nbGPUs", diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 8e70280aa8..532b0e328a 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -55,5 +55,5 @@ class DistortionCalibration(desc.AVCommandLineNode): description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index a2681e7db9..619246e027 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -113,4 +113,3 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): uid=[], ), ] - diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index d547df2182..f83dd9f9d5 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -40,7 +40,7 @@ class ExportMatches(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.ListAttribute( elementDesc=desc.File( @@ -52,7 +52,7 @@ class ExportMatches(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which computed matches are stored." + description="Folder(s) in which computed matches are stored.", ), desc.ChoiceParam( name="verboseLevel", diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 7118763d10..cd5f517edf 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -138,13 +138,13 @@ class FeatureExtraction(desc.AVCommandLineNode): uid=[0], ), desc.ChoiceParam( - name="workingColorSpace", - label="Working Color Space", - description="Allows you to choose the color space in which the data are processed.", - values=COLORSPACES, - value="sRGB", - exclusive=True, - uid=[0], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + values=COLORSPACES, + value="sRGB", + exclusive=True, + uid=[0], ), desc.BoolParam( name="forceCpuExtraction", @@ -171,7 +171,7 @@ class FeatureExtraction(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index c48448b535..68f7843a57 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -51,7 +51,7 @@ class FeatureMatching(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.File( name="imagePairsList", @@ -208,7 +208,7 @@ class FeatureMatching(desc.AVCommandLineNode): description="Expor debug files (svg, dot).", value=False, uid=[], - advanced=True + advanced=True, ), desc.ChoiceParam( name="verboseLevel", @@ -218,7 +218,7 @@ class FeatureMatching(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ desc.File( diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index d4dcabeb2c..d40ea48bc8 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -120,7 +120,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 9a5e3a3c53..dafa75e3ab 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -35,7 +35,7 @@ class GlobalSfM(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features." + description="Folder(s) containing the extracted features.", ), desc.ListAttribute( elementDesc=desc.File( @@ -47,7 +47,7 @@ class GlobalSfM(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which computed matches are stored." + description="Folder(s) in which computed matches are stored.", ), desc.ChoiceParam( name="describerTypes", @@ -99,7 +99,7 @@ class GlobalSfM(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index f20cab60c4..ee481904d8 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -48,7 +48,7 @@ class ImageMasking(desc.AVCommandLineNode): semantic="color/hue", value=0.33, range=(0.0, 1.0, 0.01), - uid=[0] + uid=[0], ), desc.FloatParam( name="hsvHueRange", @@ -56,7 +56,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Tolerance around the hue value to isolate.", value=0.1, range=(0.0, 1.0, 0.01), - uid=[0] + uid=[0], ), desc.FloatParam( name="hsvMinSaturation", @@ -64,7 +64,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Hue is meaningless if saturation is low. Do not mask pixels below this threshold.", value=0.3, range=(0.0, 1.0, 0.01), - uid=[0] + uid=[0], ), desc.FloatParam( name="hsvMaxSaturation", @@ -72,7 +72,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", value=1.0, range=(0.0, 1.0, 0.01), - uid=[0] + uid=[0], ), desc.FloatParam( name="hsvMinValue", @@ -80,7 +80,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Hue is meaningless if the value is low. Do not mask pixels below this threshold.", value=0.3, range=(0.0, 1.0, 0.01), - uid=[0] + uid=[0], ), desc.FloatParam( name="hsvMaxValue", @@ -88,9 +88,9 @@ class ImageMasking(desc.AVCommandLineNode): description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", value=1.0, range=(0.0, 1.0, 0.01), - uid=[0] + uid=[0], ), - ] + ], ), desc.BoolParam( name="invert", @@ -98,7 +98,7 @@ class ImageMasking(desc.AVCommandLineNode): description="If selected, the selected area is ignored.\n" "If not, only the selected area is considered.", value=True, - uid=[0] + uid=[0], ), desc.IntParam( name="growRadius", @@ -107,7 +107,7 @@ class ImageMasking(desc.AVCommandLineNode): "It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.", value=0, range=(0, 50, 1), - uid=[0] + uid=[0], ), desc.IntParam( name="shrinkRadius", @@ -115,7 +115,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Shrink the selected area.", value=0, range=(0, 50, 1), - uid=[0] + uid=[0], ), desc.File( name="depthMapFolder", @@ -139,7 +139,7 @@ class ImageMasking(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 86961d18e6..bdbf69f728 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -52,7 +52,7 @@ class ImageMatching(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.ChoiceParam( name="method", @@ -138,7 +138,7 @@ class ImageMatching(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index a94d41ff4f..ea87aec1ec 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -44,7 +44,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.ChoiceParam( name="method", @@ -141,7 +141,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index ca540fbd40..2305daef91 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -172,9 +172,9 @@ class ImageProcessing(desc.AVCommandLineNode): description="Chromatic aberration (fringing) correction if the model parameters are available in the metadata.", value=False, uid=[0], - enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value - ) - ] + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + ], ), desc.FloatParam( name="scaleFactor", @@ -264,7 +264,7 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), - ] + ], ), desc.GroupAttribute( name="bilateralFilter", @@ -307,7 +307,7 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), - ] + ], ), desc.GroupAttribute( name="claheFilter", @@ -341,7 +341,7 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.claheFilter.claheEnabled.value, ), - ] + ], ), desc.GroupAttribute( name="noiseFilter", @@ -402,7 +402,7 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), - ] + ], ), desc.GroupAttribute( name="nlmFilter", @@ -459,7 +459,7 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), - ] + ], ), desc.GroupAttribute( name="parFilter", @@ -483,7 +483,7 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: node.parFilter.parEnabled.value, ), - ] + ], ), desc.ChoiceParam( name="outputFormat", @@ -522,7 +522,6 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: not node.applyDcpMetadata.value, ), - desc.ChoiceParam( name="rawColorInterpretation", label="RAW Color Interpretation", @@ -532,7 +531,6 @@ class ImageProcessing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - desc.BoolParam( name="applyDcpMetadata", label="Apply DCP Metadata", @@ -540,7 +538,6 @@ class ImageProcessing(desc.AVCommandLineNode): value=False, uid=[0], ), - desc.File( name="colorProfileDatabase", label="Color Profile Database", @@ -549,7 +546,6 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[], enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), - desc.BoolParam( name="errorOnMissingColorProfile", label="Error On Missing DCP Color Profile", @@ -558,7 +554,6 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), - desc.BoolParam( name="useDCPColorMatrixOnly", label="Use DCP Color Matrix Only", @@ -567,7 +562,6 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), - desc.BoolParam( name="doWBAfterDemosaicing", label="WB After Demosaicing", @@ -576,7 +570,6 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), - desc.ChoiceParam( name="demosaicingAlgo", label="Demosaicing Algorithm", @@ -586,7 +579,6 @@ class ImageProcessing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - desc.ChoiceParam( name="highlightMode", label="Highlight Mode", @@ -600,7 +592,6 @@ class ImageProcessing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - desc.FloatParam( name="correlatedColorTemperature", label="Illuminant Color Temperature", @@ -610,7 +601,6 @@ class ImageProcessing(desc.AVCommandLineNode): range=(-1.0, 10000.0, 1.0), uid=[0], ), - desc.File( name="lensCorrectionProfileInfo", label="Lens Correction Profile Info", @@ -618,7 +608,6 @@ class ImageProcessing(desc.AVCommandLineNode): value="${ALICEVISION_LENS_PROFILE_INFO}", uid=[], ), - desc.BoolParam( name="lensCorrectionProfileSearchIgnoreCameraModel", label="LCP Generic Search", @@ -627,7 +616,6 @@ class ImageProcessing(desc.AVCommandLineNode): uid=[0], advanced=True, ), - desc.ChoiceParam( name="storageDataType", label="Storage Data Type For EXR Output", @@ -641,7 +629,6 @@ class ImageProcessing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - desc.ChoiceParam( name="exrCompressionMethod", label="EXR Compression Method", @@ -651,7 +638,6 @@ class ImageProcessing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - desc.IntParam( name="exrCompressionLevel", label="EXR Compression Level", @@ -661,9 +647,8 @@ class ImageProcessing(desc.AVCommandLineNode): value=0, range=(0, 500, 1), uid=[0], - enabled=lambda node: node.exrCompressionMethod.value in ["dwaa", "dwab", "zip", "zips"] + enabled=lambda node: node.exrCompressionMethod.value in ["dwaa", "dwab", "zip", "zips"], ), - desc.BoolParam( name="jpegCompress", label="JPEG Compress", @@ -671,7 +656,6 @@ class ImageProcessing(desc.AVCommandLineNode): value=True, uid=[0], ), - desc.IntParam( name="jpegQuality", label="JPEG Quality", @@ -679,9 +663,8 @@ class ImageProcessing(desc.AVCommandLineNode): value=90, range=(0, 100, 1), uid=[0], - enabled=lambda node: node.jpegCompress.value + enabled=lambda node: node.jpegCompress.value, ), - desc.ChoiceParam( name="verboseLevel", label="Verbose Level", @@ -690,7 +673,7 @@ class ImageProcessing(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 004f15c852..6560d2be99 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -29,7 +29,7 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Segmentation Model", description="Weights file for the internal model.", value="${ALICEVISION_SEMANTIC_SEGMENTATION_MODEL}", - uid=[0] + uid=[0], ), desc.ChoiceParam( name="validClasses", @@ -80,7 +80,7 @@ class ImageSegmentation(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -101,4 +101,3 @@ class ImageSegmentation(desc.AVCommandLineNode): uid=[], ), ] - diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index c5c57dd61d..1403eff9d0 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -24,7 +24,7 @@ class ImportE57(desc.AVCommandLineNode): ), name="input", label="Input Files", - description="Set of E57 files in the same reference frame." + description="Set of E57 files in the same reference frame.", ), desc.FloatParam( name="maxDensity", @@ -32,7 +32,7 @@ class ImportE57(desc.AVCommandLineNode): description="Ensure no points has no neighbour closer than maxDensity meters.", value=0.01, range=(0.0, 0.2, 0.001), - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", @@ -42,7 +42,7 @@ class ImportE57(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index 0428f8ef93..c09ae09a11 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -35,7 +35,7 @@ class ImportKnownPoses(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index ca5bc48d81..fb6b8ea3a3 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -89,7 +89,7 @@ class KeyframeSelection(desc.AVCommandLineNode): ), name="brands", label="Brands", - description="Camera brands." + description="Camera brands.", ), desc.ListAttribute( elementDesc=desc.File( @@ -101,7 +101,7 @@ class KeyframeSelection(desc.AVCommandLineNode): ), name="models", label="Models", - description="Camera models." + description="Camera models.", ), desc.ListAttribute( elementDesc=desc.FloatParam( @@ -114,7 +114,7 @@ class KeyframeSelection(desc.AVCommandLineNode): ), name="mmFocals", label="Focals", - description="Focals in mm (will be used if not 0)." + description="Focals in mm (will be used if not 0).", ), desc.File( name="sensorDbPath", @@ -135,7 +135,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Masks", description="Masks (e.g. segmentation masks) used to exclude some parts of the frames from the score computations\n" "for the smart keyframe selection.", - enabled=lambda node: node.selectionMethod.useSmartSelection.value + enabled=lambda node: node.selectionMethod.useSmartSelection.value, ), desc.GroupAttribute( name="selectionMethod", @@ -150,7 +150,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Use Smart Keyframe Selection", description="Use the smart keyframe selection.", value=True, - uid=[0] + uid=[0], ), desc.GroupAttribute( name="regularSelection", @@ -167,7 +167,7 @@ class KeyframeSelection(desc.AVCommandLineNode): value=12, range=(1, 1000, 1), uid=[0], - enabled=lambda node: node.regularSelection.enabled + enabled=lambda node: node.regularSelection.enabled, ), desc.IntParam( name="maxFrameStep", @@ -176,7 +176,7 @@ class KeyframeSelection(desc.AVCommandLineNode): value=0, range=(0, 1000, 1), uid=[0], - enabled=lambda node: node.regularSelection.enabled + enabled=lambda node: node.regularSelection.enabled, ), desc.IntParam( name="maxNbOutFrames", @@ -187,7 +187,7 @@ class KeyframeSelection(desc.AVCommandLineNode): value=0, range=(0, 10000, 1), uid=[0], - enabled=lambda node: node.regularSelection.enabled + enabled=lambda node: node.regularSelection.enabled, ), ], ), @@ -206,7 +206,7 @@ class KeyframeSelection(desc.AVCommandLineNode): value=10.0, range=(0.0, 100.0, 1.0), uid=[0], - enabled=lambda node: node.smartSelection.enabled + enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( name="minNbOutFrames", @@ -215,7 +215,7 @@ class KeyframeSelection(desc.AVCommandLineNode): value=10, range=(1, 100, 1), uid=[0], - enabled=lambda node: node.smartSelection.enabled + enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( name="maxNbOutFrames", @@ -224,7 +224,7 @@ class KeyframeSelection(desc.AVCommandLineNode): value=2000, range=(1, 10000, 1), uid=[0], - enabled=lambda node: node.smartSelection.enabled + enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( name="rescaledWidthSharpness", @@ -235,7 +235,7 @@ class KeyframeSelection(desc.AVCommandLineNode): range=(0, 4000, 1), uid=[0], enabled=lambda node: node.smartSelection.enabled, - advanced=True + advanced=True, ), desc.IntParam( name="rescaledWidthFlow", @@ -246,7 +246,7 @@ class KeyframeSelection(desc.AVCommandLineNode): range=(0, 4000, 1), uid=[0], enabled=lambda node: node.smartSelection.enabled, - advanced=True + advanced=True, ), desc.IntParam( name="sharpnessWindowSize", @@ -256,7 +256,7 @@ class KeyframeSelection(desc.AVCommandLineNode): range=(1, 10000, 1), uid=[0], enabled=lambda node: node.smartSelection.enabled, - advanced=True + advanced=True, ), desc.IntParam( name="flowCellSize", @@ -266,7 +266,7 @@ class KeyframeSelection(desc.AVCommandLineNode): range=(10, 2000, 1), uid=[0], enabled=lambda node: node.smartSelection.enabled, - advanced=True + advanced=True, ), desc.IntParam( name="minBlockSize", @@ -278,11 +278,11 @@ class KeyframeSelection(desc.AVCommandLineNode): range=(1, 1000, 1), uid=[], enabled=lambda node: node.smartSelection.enabled, - advanced=True - ) - ] - ) - ] + advanced=True, + ), + ], + ), + ], ), desc.BoolParam( name="renameKeyframes", @@ -292,7 +292,7 @@ class KeyframeSelection(desc.AVCommandLineNode): "option enabled instead of [00015.exr, 00294.exr, 00825.exr].", value=False, enabled=lambda node: node.outputExtension.value != "none", - uid=[0] + uid=[0], ), desc.ChoiceParam( name="outputExtension", @@ -320,7 +320,7 @@ class KeyframeSelection(desc.AVCommandLineNode): exclusive=True, uid=[0], enabled=lambda node: node.outputExtension.value == "exr", - advanced=True + advanced=True, ), desc.GroupAttribute( name="debugOptions", @@ -342,7 +342,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Export Scores To CSV", description="Export the computed sharpness and optical flow scores to a CSV file.", value=False, - uid=[0] + uid=[0], ), desc.StringParam( name="csvFilename", @@ -350,7 +350,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Name of the CSV file to export. It will be written in the node's output folder.", value="scores.csv", uid=[0], - enabled=lambda node: node.debugOptions.debugScores.exportScores.value + enabled=lambda node: node.debugOptions.debugScores.exportScores.value, ), desc.BoolParam( name="exportSelectedFrames", @@ -358,9 +358,9 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Add a column in the CSV file containing 1s for frames that were selected and 0s for those that were not.", value=False, uid=[0], - enabled=lambda node: node.debugOptions.debugScores.exportScores.value - ) - ] + enabled=lambda node: node.debugOptions.debugScores.exportScores.value, + ), + ], ), desc.GroupAttribute( name="opticalFlowVisualisation", @@ -375,7 +375,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Export each frame's optical flow HSV visualisation as PNG images.", value=False, uid=[0], - enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled + enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled, ), desc.BoolParam( name="flowVisualisationOnly", @@ -384,9 +384,9 @@ class KeyframeSelection(desc.AVCommandLineNode): "If this option is selected, all the other options will be ignored.", value=False, uid=[0], - enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled - ) - ] + enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled, + ), + ], ), desc.BoolParam( name="skipSharpnessComputation", @@ -394,7 +394,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Skip the sharpness score computation. A fixed score of 1.0 will be applied by default to all the frames.", value=False, uid=[0], - enabled=lambda node: node.debugOptions.enabled + enabled=lambda node: node.debugOptions.enabled, ), desc.BoolParam( name="skipSelection", @@ -402,9 +402,9 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Compute the sharpness and optical flow scores, but do not proceed to the frame selection.", value=False, uid=[0], - enabled=lambda node: node.debugOptions.enabled - ) - ] + enabled=lambda node: node.debugOptions.enabled, + ), + ], ), desc.ChoiceParam( name="verboseLevel", @@ -438,7 +438,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Output SfMData file containing all the frames that were not selected as keyframes.\n" "If the input contains videos, this file will not be written since all the frames that were not selected do not actually exist on disk.", value=desc.Node.internalFolder + "frames.sfm", - uid=[] - ) + uid=[], + ), ] diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 5adca56955..0cfb336268 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -62,7 +62,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): uid=[], group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" - "Errors will occur during the computation." + "Errors will occur during the computation.", ), desc.IntParam( name="nbBrackets", @@ -73,7 +73,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): value=0, range=(0, 15, 1), uid=[0], - group="bracketsParams" + group="bracketsParams", ), desc.BoolParam( name="byPass", @@ -154,7 +154,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -164,7 +164,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Path to the output response file.", value=desc.Node.internalFolder + "response_<INTRINSIC_ID>.csv", uid=[], - ) + ), ] def processChunk(self, chunk): diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 1172dc6415..a353411f60 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -61,7 +61,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): uid=[], group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" - "Errors will occur during the computation." + "Errors will occur during the computation.", ), desc.IntParam( name="nbBrackets", @@ -72,7 +72,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value=0, range=(0, 15, 1), uid=[0], - group="bracketsParams" + group="bracketsParams", ), desc.BoolParam( name="offsetRefBracketIndexEnabled", @@ -242,7 +242,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -260,7 +260,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", uid=[], - ) + ), ] @classmethod diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 9e30d9609e..fb53cd1520 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -76,7 +76,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): uid=[], group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" - "Errors will occur during the computation." + "Errors will occur during the computation.", ), desc.IntParam( name="nbBrackets", @@ -87,7 +87,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): value=0, range=(0, 15, 1), uid=[0], - group="bracketsParams" + group="bracketsParams", ), desc.BoolParam( name="byPass", @@ -179,7 +179,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 76758afeae..c612b6b529 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -18,21 +18,21 @@ class LightingCalibration(desc.CommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0] + uid=[0], ), desc.File( name="inputJSON", label="Sphere Detection File", description="Input JSON file containing sphere centers and radiuses.", value="", - uid=[0] + uid=[0], ), desc.BoolParam( name="saveAsModel", label="Save As Model", description="Check if this calibration file will be used with other datasets.", value=False, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="method", @@ -42,7 +42,7 @@ class LightingCalibration(desc.CommandLineNode): values=["brightestPoint", "whiteSphere"], value="brightestPoint", exclusive=True, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", @@ -52,7 +52,7 @@ class LightingCalibration(desc.CommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -61,6 +61,6 @@ class LightingCalibration(desc.CommandLineNode): label="Light File", description="Light information will be written here.", value=desc.Node.internalFolder + "/lights.json", - uid=[] - ) + uid=[], + ), ] diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index 1efc9ee258..014dbdf6d6 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -81,7 +81,7 @@ class LightingEstimation(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index a5daffe053..fffc9d84d6 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -64,7 +64,7 @@ class MergeMeshes(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 1c5f505172..e2463ebd4a 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -72,7 +72,7 @@ class MeshDecimate(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index ca9a51770a..99556e3141 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -90,7 +90,7 @@ class MeshDenoising(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 924b8554da..64482594ec 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -120,7 +120,7 @@ class MeshFiltering(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 937c8d5682..f3f44aa0fb 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -55,7 +55,7 @@ class MeshMasking(desc.AVCommandLineNode): value="png", values=["exr", "jpg", "png"], exclusive=True, - uid=[0] + uid=[0], ), desc.IntParam( name="threshold", @@ -63,14 +63,14 @@ class MeshMasking(desc.AVCommandLineNode): description="The minimum number of visibilities to keep a vertex.", value=1, range=(1, 100, 1), - uid=[0] + uid=[0], ), desc.BoolParam( name="smoothBoundary", label="Smooth Boundary", description="Modify the triangles at the boundary to fit the masks.", value=False, - uid=[0] + uid=[0], ), desc.BoolParam( name="invert", @@ -78,7 +78,7 @@ class MeshMasking(desc.AVCommandLineNode): description="If ticked, the selected area is ignored.\n" "If not, only the selected area is considered.", value=False, - uid=[0] + uid=[0], ), desc.BoolParam( name="undistortMasks", @@ -86,7 +86,7 @@ class MeshMasking(desc.AVCommandLineNode): description="Undistort the masks with the same parameters as the matching image.\n" "Select it if the masks are drawn on the original images.", value=False, - uid=[0] + uid=[0], ), desc.BoolParam( name="usePointsVisibilities", @@ -104,7 +104,7 @@ class MeshMasking(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 214e5d8a55..e2175fdc37 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -21,7 +21,7 @@ class MeshResampling(desc.AVCommandLineNode): description="Input mesh in the OBJ file format.", value="", uid=[0], - ), + ), desc.FloatParam( name="simplificationFactor", label="Simplification Factor", @@ -78,7 +78,7 @@ class MeshResampling(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 407831f97b..306ad1d7e1 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -55,7 +55,7 @@ class Meshing(desc.AVCommandLineNode): "Parameters can be adjusted in advanced settings.", value=False, uid=[0], - group="" + group="", ), desc.GroupAttribute( name="boundingBox", @@ -71,22 +71,22 @@ class Meshing(desc.AVCommandLineNode): name="x", label="x", description="X offset.", value=0.0, uid=[0], - range=(-20.0, 20.0, 0.01) + range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y offset.", value=0.0, uid=[0], - range=(-20.0, 20.0, 0.01) + range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z offset.", value=0.0, uid=[0], - range=(-20.0, 20.0, 0.01) - ) + range=(-20.0, 20.0, 0.01), + ), ], - joinChar="," + joinChar=",", ), desc.GroupAttribute( name="bboxRotation", @@ -110,9 +110,9 @@ class Meshing(desc.AVCommandLineNode): value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) - ) + ), ], - joinChar="," + joinChar=",", ), desc.GroupAttribute( name="bboxScale", @@ -123,23 +123,23 @@ class Meshing(desc.AVCommandLineNode): name="x", label="x", description="X scale.", value=1.0, uid=[0], - range=(0.0, 20.0, 0.01) + range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y scale.", value=1.0, uid=[0], - range=(0.0, 20.0, 0.01) + range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z scale.", value=1.0, uid=[0], - range=(0.0, 20.0, 0.01) - ) + range=(0.0, 20.0, 0.01), + ), ], - joinChar="," - ) + joinChar=",", + ), ], joinChar=",", enabled=lambda node: node.useBoundingBox.value, @@ -518,7 +518,7 @@ class Meshing(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index a8f57e2a1c..4a2a22b82c 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -31,7 +31,7 @@ class NodalSfM(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.File( name="tracksFilename", @@ -65,7 +65,7 @@ class NodalSfM(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -75,5 +75,5 @@ class NodalSfM(desc.AVCommandLineNode): description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index edb4ae396e..18888db946 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -16,7 +16,7 @@ class NormalIntegration(desc.CommandLineNode): label="Normal Maps Folder", description="Path to the folder containing the normal maps and the masks.", value="", - uid=[0] + uid=[0], ), desc.File( name="sfmDataFile", @@ -32,7 +32,7 @@ class NormalIntegration(desc.CommandLineNode): value=1, range=(1, 10, 1), advanced=True, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", @@ -42,7 +42,7 @@ class NormalIntegration(desc.CommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -51,6 +51,6 @@ class NormalIntegration(desc.CommandLineNode): label="Output Path", description="Path to the output folder.", value=desc.Node.internalFolder, - uid=[] - ) + uid=[], + ), ] diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 0e15e0ae8a..eb214aae08 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -55,7 +55,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): value="multiband", values=["replace", "alpha", "multiband"], exclusive=True, - uid=[0] + uid=[0], ), desc.IntParam( name="forceMinPyramidLevels", @@ -107,7 +107,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): values=["none", "borders", "seams", "all"], exclusive=True, advanced=True, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", @@ -117,7 +117,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -127,5 +127,5 @@ class PanoramaCompositing(desc.AVCommandLineNode): description="Output folder containing the composited panorama.", value=desc.Node.internalFolder, uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index fdf2a832de..5f11e13ad8 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -34,7 +34,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features." + description="Folder(s) containing the extracted features.", ), desc.ListAttribute( elementDesc=desc.File( @@ -46,7 +46,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which computed matches are stored." + description="Folder(s) in which computed matches are stored.", ), desc.ChoiceParam( name="describerTypes", @@ -181,7 +181,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 630b8678ab..4ee66852f6 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -61,7 +61,7 @@ class PanoramaInit(desc.AVCommandLineNode): "The contact sheet consists in a preview of the panorama using the input images.", value=True, uid=[0], - enabled=lambda node: node.config.enabled and node.config.value != "" + enabled=lambda node: node.config.enabled and node.config.value != "", ), desc.ListAttribute( elementDesc=desc.IntParam( @@ -101,17 +101,23 @@ class PanoramaInit(desc.AVCommandLineNode): description="Center of the fisheye circle (XY offset to the center in pixels).", groupDesc=[ desc.FloatParam( - name="fisheyeCenterOffset_x", label="x", description="X offset in pixels.", + name="fisheyeCenterOffset_x", + label="x", + description="X offset in pixels.", value=0.0, uid=[0], - range=(-1000.0, 10000.0, 1.0)), + range=(-1000.0, 10000.0, 1.0), + ), desc.FloatParam( - name="fisheyeCenterOffset_y", label="y", description="Y offset in pixels.", + name="fisheyeCenterOffset_y", + label="y", + description="Y offset in pixels.", value=0.0, uid=[0], - range=(-1000.0, 10000.0, 1.0)), - ], - group=None, # skip group from command line + range=(-1000.0, 10000.0, 1.0), + ), + ], + group=None, # skip group from command line enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.FloatParam( @@ -130,7 +136,7 @@ class PanoramaInit(desc.AVCommandLineNode): value="None", values=["None", "rotate90", "rotate180", "rotate270"], exclusive=True, - uid=[0] + uid=[0], ), desc.BoolParam( name="debugFisheyeCircleEstimation", @@ -149,7 +155,7 @@ class PanoramaInit(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -159,5 +165,5 @@ class PanoramaInit(desc.AVCommandLineNode): description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index d6b0c6c860..66a4cda361 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -71,7 +71,7 @@ class PanoramaMerging(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 5c9d45ee54..6f78b5f6f8 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -53,7 +53,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="The width (in pixels) of the output panorama preview.", value=1000, range=(0, 5000, 100), - uid=[0] + uid=[0], ), desc.ChoiceParam( name="outputColorSpace", @@ -82,7 +82,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): value=0, range=(0, 500, 1), uid=[0], - enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"] + enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"], ), desc.StringParam( name="panoramaName", @@ -91,7 +91,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): value="panorama.exr", uid=[], group=None, - advanced=True + advanced=True, ), desc.StringParam( name="previewName", @@ -110,7 +110,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 15ca8a6dfa..1f90b29824 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -56,7 +56,7 @@ class PanoramaSeams(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -74,5 +74,5 @@ class PanoramaSeams(desc.AVCommandLineNode): description="Path to the output SfMData file.", value=desc.Node.internalFolder + "panorama.sfm", uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index cbacec4560..4f29edd456 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -55,7 +55,7 @@ class PanoramaWarping(desc.AVCommandLineNode): value=50, range=(0, 100, 1), enabled=lambda node: (node.estimateResolution.value), - uid=[0] + uid=[0], ), desc.IntParam( name="maxPanoramaWidth", diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 990ffbaeb2..f174b12b2e 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -17,7 +17,7 @@ class PhotometricStereo(desc.CommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0] + uid=[0], ), desc.File( name="pathToJSONLightFile", @@ -25,14 +25,14 @@ class PhotometricStereo(desc.CommandLineNode): description="Path to a JSON file containing the lighting information.\n" "If empty, .txt files are expected in the image folder.", value="defaultJSON.txt", - uid=[0] + uid=[0], ), desc.File( name="maskPath", label="Mask Folder Path", description="Path to a folder containing masks or to a mask directly.", value="", - uid=[0] + uid=[0], ), desc.ChoiceParam( name="SHOrder", @@ -45,7 +45,7 @@ class PhotometricStereo(desc.CommandLineNode): value="0", exclusive=True, advanced=True, - uid=[0] + uid=[0], ), desc.BoolParam( name="removeAmbiant", @@ -53,7 +53,7 @@ class PhotometricStereo(desc.CommandLineNode): description="True if the ambiant light is to be removed on the PS images, false otherwise.", value=False, advanced=True, - uid=[0] + uid=[0], ), desc.BoolParam( name="isRobust", @@ -61,7 +61,7 @@ class PhotometricStereo(desc.CommandLineNode): description="True to use the robust algorithm, false otherwise.", value=False, advanced=True, - uid=[0] + uid=[0], ), desc.IntParam( name="downscale", @@ -70,7 +70,7 @@ class PhotometricStereo(desc.CommandLineNode): value=1, range=(1, 10, 1), advanced=True, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", @@ -80,7 +80,7 @@ class PhotometricStereo(desc.CommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -105,7 +105,7 @@ class PhotometricStereo(desc.CommandLineNode): description="Output SfMData file containing the albedo information.", value=desc.Node.internalFolder + "/albedoMaps.sfm", uid=[], - group="", # remove from command line + group="", # remove from command line ), desc.File( name="outputSfmDataNormal", @@ -113,7 +113,7 @@ class PhotometricStereo(desc.CommandLineNode): description="Output SfMData file containing the normal maps information.", value=desc.Node.internalFolder + "/normalMaps.sfm", uid=[], - group="", # remove from command line + group="", # remove from command line ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images @@ -125,7 +125,7 @@ class PhotometricStereo(desc.CommandLineNode): semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals.exr", uid=[], - group="", # do not export on the command line + group="", # do not export on the command line ), desc.File( name="normalsWorld", @@ -134,7 +134,7 @@ class PhotometricStereo(desc.CommandLineNode): semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals_w.exr", uid=[], - group="", # do not export on the command line + group="", # do not export on the command line ), desc.File( name="albedo", @@ -143,6 +143,6 @@ class PhotometricStereo(desc.CommandLineNode): semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_albedo.exr", uid=[], - group="", # do not export on the command line + group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 3e954e82f4..a9be30e484 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -54,7 +54,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): value="png", values=["exr", "jpg", "png"], exclusive=True, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="outputFileType", @@ -64,7 +64,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], - advanced=True + advanced=True, ), desc.BoolParam( name="saveMetadata", @@ -72,7 +72,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="Save projections and intrinsics information in images metadata (only for .exr images).", value=True, uid=[0], - advanced=True + advanced=True, ), desc.BoolParam( name="saveMatricesTxtFiles", @@ -80,7 +80,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="Save projections and intrinsics information in text files.", value=False, uid=[0], - advanced=True + advanced=True, ), desc.BoolParam( name="evCorrection", @@ -88,7 +88,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="Apply a correction on images' exposure value.", value=False, uid=[0], - advanced=True + advanced=True, ), desc.ChoiceParam( name="verboseLevel", @@ -117,6 +117,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): value=desc.Node.internalFolder + "<VIEW_ID>.{outputFileTypeValue}", uid=[], group="", - advanced=True + advanced=True, ), ] diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 918fbfbee2..4f6fc7edd3 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -33,7 +33,7 @@ class RelativePoseEstimating(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.File( name="tracksFilename", @@ -67,7 +67,7 @@ class RelativePoseEstimating(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -77,5 +77,5 @@ class RelativePoseEstimating(desc.AVCommandLineNode): description="Path to the output Pairs info files directory.", value=desc.Node.internalFolder, uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index db50489b10..3e4b787a33 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -85,21 +85,21 @@ class SfMAlignment(desc.AVCommandLineNode): label="Scale", description="Apply scale transformation.", value=True, - uid=[0] + uid=[0], ), desc.BoolParam( name="applyRotation", label="Rotation", description="Apply rotation transformation.", value=True, - uid=[0] + uid=[0], ), desc.BoolParam( name="applyTranslation", label="Translation", description="Apply translation transformation.", value=True, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index 530d022eec..ee3c9fff4f 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -63,7 +63,7 @@ class SfMMerge(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index 3a2f9faaa7..0b2e33cd55 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -48,5 +48,5 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): description="SfMData file containing the non-reconstructed cameras.", value=desc.Node.internalFolder + "sfmNonReconstructed.abc", uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py index acfacfec76..7e7f79057f 100644 --- a/meshroom/aliceVision/SfMToRig.py +++ b/meshroom/aliceVision/SfMToRig.py @@ -30,7 +30,7 @@ class SfMToRig(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index dbbf71ed92..d080c886ed 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -77,21 +77,21 @@ class SfMTransfer(desc.AVCommandLineNode): label="Poses", description="Transfer poses.", value=True, - uid=[0] + uid=[0], ), desc.BoolParam( name="transferIntrinsics", label="Intrinsics", description="Transfer cameras intrinsics.", value=True, - uid=[0] + uid=[0], ), desc.BoolParam( name="transferLandmarks", label="Landmarks", description="Transfer landmarks.", value=True, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 2fc25c71e5..b340bfda97 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -74,25 +74,31 @@ class SfMTransform(desc.AVCommandLineNode): description="Translation in space.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X offset.", + name="x", + label="x", + description="X offset.", value=0.0, uid=[0], - range=(-20.0, 20.0, 0.01) + range=(-20.0, 20.0, 0.01), ), desc.FloatParam( - name="y", label="y", description="Y offset.", + name="y", + label="y", + description="Y offset.", value=0.0, uid=[0], - range=(-20.0, 20.0, 0.01) + range=(-20.0, 20.0, 0.01), ), desc.FloatParam( - name="z", label="z", description="Z offset.", + name="z", + label="z", + description="Z offset.", value=0.0, uid=[0], - range=(-20.0, 20.0, 0.01) - ) + range=(-20.0, 20.0, 0.01), + ), ], - joinChar="," + joinChar=",", ), desc.GroupAttribute( name="manualRotation", @@ -100,25 +106,31 @@ class SfMTransform(desc.AVCommandLineNode): description="Rotation in Euler angles.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="Euler X rotation.", + name="x", + label="x", + description="Euler X rotation.", value=0.0, uid=[0], - range=(-90.0, 90.0, 1.0) + range=(-90.0, 90.0, 1.0), ), desc.FloatParam( - name="y", label="y", description="Euler Y rotation.", + name="y", + label="y", + description="Euler Y rotation.", value=0.0, uid=[0], - range=(-180.0, 180.0, 1.0) + range=(-180.0, 180.0, 1.0), ), desc.FloatParam( - name="z", label="z", description="Euler Z rotation.", + name="z", + label="z", + description="Euler Z rotation.", value=0.0, uid=[0], - range=(-180.0, 180.0, 1.0) - ) + range=(-180.0, 180.0, 1.0), + ), ], - joinChar="," + joinChar=",", ), desc.FloatParam( name="manualScale", @@ -126,8 +138,8 @@ class SfMTransform(desc.AVCommandLineNode): description="Uniform scale.", value=1.0, uid=[0], - range=(0.0, 20.0, 0.01) - ) + range=(0.0, 20.0, 0.01), + ), ], joinChar=",", enabled=lambda node: node.method.value == "manual", @@ -152,14 +164,54 @@ class SfMTransform(desc.AVCommandLineNode): ), desc.ListAttribute( name="markers", - elementDesc=desc.GroupAttribute(name="markerAlign", label="Marker Align", description="", joinChar=":", groupDesc=[ - desc.IntParam(name="markerId", label="Marker", description="Marker ID.", value=0, uid=[0], range=(0, 32, 1)), - desc.GroupAttribute(name="markerCoord", label="Coord", description="Marker coordinates.", joinChar=",", groupDesc=[ - desc.FloatParam(name="x", label="x", description="X coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), - desc.FloatParam(name="y", label="y", description="Y coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), - desc.FloatParam(name="z", label="z", description="Z coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), - ]) - ]), + elementDesc=desc.GroupAttribute( + name="markerAlign", + label="Marker Align", + description="", + joinChar=":", + groupDesc=[ + desc.IntParam( + name="markerId", + label="Marker", + description="Marker ID.", + value=0, + uid=[0], + range=(0, 32, 1), + ), + desc.GroupAttribute( + name="markerCoord", + label="Coord", + description="Marker coordinates.", + joinChar=",", + groupDesc=[ + desc.FloatParam( + name="x", + label="x", + description="X coordinates for the marker.", + value=0.0, + uid=[0], + range=(-2.0, 2.0, 1.0), + ), + desc.FloatParam( + name="y", + label="y", + description="Y coordinates for the marker.", + value=0.0, + uid=[0], + range=(-2.0, 2.0, 1.0), + ), + desc.FloatParam( + name="z", + label="z", + description="Z coordinates for the marker.", + value=0.0, + uid=[0], + range=(-2.0, 2.0, 1.0), + ), + ], + ), + ], + ), label="Markers", description="Markers alignment points.", ), diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index af42b467ac..4026df0b30 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -32,7 +32,7 @@ class SfMTriangulation(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.ListAttribute( elementDesc=desc.File( @@ -44,7 +44,7 @@ class SfMTriangulation(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which computed matches are stored." + description="Folder(s) in which computed matches are stored.", ), desc.ChoiceParam( name="describerTypes", @@ -148,7 +148,7 @@ class SfMTriangulation(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index 3c12b8f8fa..63b4fbc78b 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -30,7 +30,7 @@ class SfMBootStraping(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.File( name="tracksFilename", @@ -64,7 +64,7 @@ class SfMBootStraping(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -74,5 +74,5 @@ class SfMBootStraping(desc.AVCommandLineNode): description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.json", uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 5f1bd096fc..5a782bb0dc 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -18,21 +18,21 @@ class SphereDetection(desc.CommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0] + uid=[0], ), desc.File( name="modelPath", label="Detection Network", description="Deep learning network for automatic calibration sphere detection.", value="${ALICEVISION_SPHERE_DETECTION_MODEL}", - uid=[0] + uid=[0], ), desc.BoolParam( name="autoDetect", label="Automatic Sphere Detection", description="Automatic detection of calibration spheres.", value=False, - uid=[0] + uid=[0], ), desc.FloatParam( name="minScore", @@ -41,7 +41,7 @@ class SphereDetection(desc.CommandLineNode): value=0.0, range=(0.0, 50.0, 0.01), advanced=True, - uid=[0] + uid=[0], ), desc.GroupAttribute( name="sphereCenter", @@ -49,18 +49,24 @@ class SphereDetection(desc.CommandLineNode): description="Center of the circle (XY offset to the center of the image in pixels).", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X offset in pixels.", + name="x", + label="x", + description="X offset in pixels.", value=0.0, uid=[0], - range=(-1000.0, 10000.0, 1.0)), + range=(-1000.0, 10000.0, 1.0), + ), desc.FloatParam( - name="y", label="y", description="Y offset in pixels.", + name="y", + label="y", + description="Y offset in pixels.", value=0.0, uid=[0], - range=(-1000.0, 10000.0, 1.0)), - ], + range=(-1000.0, 10000.0, 1.0), + ), + ], enabled=lambda node: not node.autoDetect.value, - group=None # skip group from command line + group=None, # skip group from command line ), desc.FloatParam( name="sphereRadius", @@ -69,7 +75,7 @@ class SphereDetection(desc.CommandLineNode): value=500.0, range=(0.0, 1000.0, 0.1), enabled=lambda node: not node.autoDetect.value, - uid=[0] + uid=[0], ), desc.ChoiceParam( name="verboseLevel", @@ -79,7 +85,7 @@ class SphereDetection(desc.CommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ @@ -88,6 +94,6 @@ class SphereDetection(desc.CommandLineNode): label="Output Folder", description="Sphere detection information will be written here.", value=desc.Node.internalFolder, - uid=[] - ) + uid=[], + ), ] diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index fac1730e57..cd83347110 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -44,7 +44,11 @@ class Split360Images(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - desc.GroupAttribute(name="dualFisheyeGroup", label="Dual Fisheye", description="Dual Fisheye.", group=None, + desc.GroupAttribute( + name="dualFisheyeGroup", + label="Dual Fisheye", + description="Dual Fisheye.", + group=None, enabled=lambda node: node.splitMode.value == "dualfisheye", groupDesc=[ desc.ChoiceParam( @@ -74,9 +78,13 @@ class Split360Images(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - ] + ], ), - desc.GroupAttribute(name="equirectangularGroup", label="Equirectangular", description="Equirectangular", group=None, + desc.GroupAttribute( + name="equirectangularGroup", + label="Equirectangular", + description="Equirectangular", + group=None, enabled=lambda node: node.splitMode.value == "equirectangular", groupDesc=[ desc.IntParam( @@ -110,7 +118,7 @@ class Split360Images(desc.AVCommandLineNode): range=(0.0, 180.0, 1.0), uid=[0], ), - ] + ], ), desc.ChoiceParam( name="extension", diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 6a1ca04161..a226ea9b31 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -80,7 +80,7 @@ class StructureFromMotion(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.ListAttribute( elementDesc=desc.File( @@ -92,7 +92,7 @@ class StructureFromMotion(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which the computed matches are stored." + description="Folder(s) in which the computed matches are stored.", ), desc.ChoiceParam( name="describerTypes", @@ -180,7 +180,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value=30, range=(0, 100, 1), uid=[0], - advanced=True + advanced=True, ), desc.IntParam( name="maxImagesPerGroup", @@ -190,7 +190,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value=30, range=(0, 100, 1), uid=[0], - advanced=True + advanced=True, ), desc.IntParam( name="bundleAdjustmentMaxOutliers", @@ -200,7 +200,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value=50, range=(-1, 1000, 1), uid=[0], - advanced=True + advanced=True, ), desc.IntParam( name="maxNumberOfMatches", @@ -389,7 +389,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Dump the current state of the scene as an SfMData file every 3 resections.", value=False, uid=[], - advanced=True + advanced=True, ), desc.ChoiceParam( name="verboseLevel", @@ -399,7 +399,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index e4049aea73..e0850ed21c 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -83,7 +83,10 @@ class Texturing(desc.AVCommandLineNode): exclusive=True, uid=[0], ), - desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color map parameters.", + desc.GroupAttribute( + name="colorMapping", + label="Color Mapping", + description="Color map parameters.", enabled=lambda node: (node.imagesFolder.value != ''), group=None, groupDesc=[ @@ -107,7 +110,10 @@ class Texturing(desc.AVCommandLineNode): ), ], ), - desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump mapping parameters.", + desc.GroupAttribute( + name="bumpMapping", + label="Bump Mapping", + description="Bump mapping parameters.", enabled=lambda node: (node.inputRefMesh.value != ''), group=None, groupDesc=[ @@ -151,7 +157,10 @@ class Texturing(desc.AVCommandLineNode): ), ], ), - desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement mapping parameters.", + desc.GroupAttribute( + name="displacementMapping", + label="Displacement Mapping", + description="Displacement mapping parameters.", enabled=lambda node: (node.inputRefMesh.value != ""), group=None, groupDesc=[ @@ -168,7 +177,7 @@ class Texturing(desc.AVCommandLineNode): label="File Type", description="File type for the height map texture.", value="exr", - values=("exr",), + values=("exr"), exclusive=True, uid=[0], enabled=lambda node: node.displacementMapping.enable.value, @@ -223,10 +232,38 @@ class Texturing(desc.AVCommandLineNode): name="multiBandNbContrib", label="Multi-Band Contributions", groupDesc=[ - desc.IntParam(name="high", label="High Freq", description="High frequency band.", value=1, uid=[0], range=None), - desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-high frequency band.", value=5, uid=[0], range=None), - desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-low frequency band.", value=10, uid=[0], range=None), - desc.IntParam(name="low", label="Low Freq", description="Low frequency band", value=0, uid=[0], range=None), + desc.IntParam( + name="high", + label="High Freq", + description="High frequency band.", + value=1, + uid=[0], + range=None, + ), + desc.IntParam( + name="midHigh", + label="Mid-High Freq", + description="Mid-high frequency band.", + value=5, + uid=[0], + range=None, + ), + desc.IntParam( + name="midLow", + label="Mid-Low Freq", + description="Mid-low frequency band.", + value=10, + uid=[0], + range=None, + ), + desc.IntParam( + name="low", + label="Low Freq", + description="Low frequency band", + value=0, + uid=[0], + range=None, + ), ], description="Number of contributions per frequency band for multi-band blending (each frequency band also contributes to lower bands).", advanced=True, @@ -333,7 +370,6 @@ class Texturing(desc.AVCommandLineNode): ), ] - outputs = [ desc.File( name="output", @@ -365,8 +401,8 @@ class Texturing(desc.AVCommandLineNode): description="Output texture files.", value=lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", uid=[], - group="" - ) + group="", + ), ] def upgradeAttributeValues(self, attrValues, fromVersion): diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index c1b5bc4c5e..fbab55f202 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -31,7 +31,7 @@ class TracksBuilding(desc.AVCommandLineNode): ), name="featuresFolders", label="Features Folders", - description="Folder(s) containing the extracted features and descriptors." + description="Folder(s) containing the extracted features and descriptors.", ), desc.ListAttribute( elementDesc=desc.File( @@ -43,7 +43,7 @@ class TracksBuilding(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which computed matches are stored." + description="Folder(s) in which computed matches are stored.", ), desc.ChoiceParam( name="describerTypes", @@ -88,7 +88,7 @@ class TracksBuilding(desc.AVCommandLineNode): value="info", exclusive=True, uid=[], - ) + ), ] outputs = [ diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 3675824888..c6a8d3fb72 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -105,7 +105,7 @@ class ScenePreview(desc.CommandLineNode): exclusive=True, uid=[0], ), - ] + ], ), desc.GroupAttribute( name="meshParams", @@ -132,7 +132,7 @@ class ScenePreview(desc.CommandLineNode): exclusive=True, uid=[0], ), - ] + ], ), ] From ce12063086efc65e37466dc48f0504189ad47ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 14 Feb 2024 17:43:55 +0100 Subject: [PATCH 0957/1093] import E57 divided output --- meshroom/aliceVision/ImportE57.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index 1403eff9d0..5f8d54da23 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -29,11 +29,27 @@ class ImportE57(desc.AVCommandLineNode): desc.FloatParam( name="maxDensity", label="Points Density", - description="Ensure no points has no neighbour closer than maxDensity meters.", + description="Ensure each point has no neighbour closer than maxDensity meters.", value=0.01, range=(0.0, 0.2, 0.001), uid=[0], ), + desc.FloatParam( + name="minIntensity", + label="Laser Intensity Lower Limit", + description="Ensure no point has an intensity lower than this value.", + value=0.03, + range=(0.0, 1.0, 0.01), + uid=[0], + ), + desc.IntParam( + name="maxPointsPerBlock", + label="Points Limit", + description="Limit the number of points per computation region (For memory usage, 0 means no limit).", + value=5000000, + range=(0, 10000000, 100000), + uid=[0], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", @@ -49,8 +65,8 @@ class ImportE57(desc.AVCommandLineNode): desc.File( name="output", label="Output", - description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.abc", + description="Path to the output JSON file.", + value=desc.Node.internalFolder + "inputset.json", uid=[], ), ] From 13483a25895920289aed12c825fa5d5d1f9686b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 15 Feb 2024 18:17:40 +0100 Subject: [PATCH 0958/1093] [pipelines] NodalTracking: Apply masks in `ScenePreview` --- meshroom/nodalCameraTracking.mg | 1 - meshroom/nodalCameraTrackingWithoutCalibration.mg | 1 - 2 files changed, 2 deletions(-) diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 8c3b02ddac..47b421c609 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -170,7 +170,6 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{NodalSfM_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "useMasks": false, "masks": "{ImageSegmentation_1.output}", "pointCloudParams": { "particleSize": 0.001, diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index e91d3e8076..d997ad209f 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -166,7 +166,6 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{NodalSfM_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "useMasks": false, "masks": "{ImageSegmentation_1.output}", "pointCloudParams": { "particleSize": 0.001, From 9803e5385eb3fee03ef8d5e821f656318236f751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 20 Feb 2024 15:51:23 +0100 Subject: [PATCH 0959/1093] [nodes] Add new simple node for Lidar meshing --- meshroom/aliceVision/LidarMeshing.py | 152 +++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 meshroom/aliceVision/LidarMeshing.py diff --git a/meshroom/aliceVision/LidarMeshing.py b/meshroom/aliceVision/LidarMeshing.py new file mode 100644 index 0000000000..5db8946d8f --- /dev/null +++ b/meshroom/aliceVision/LidarMeshing.py @@ -0,0 +1,152 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +class LidarMeshing(desc.AVCommandLineNode): + commandLine = 'aliceVision_lidarMeshing {allParams}' + + # size = desc.DynamicNodeSize('input') + # parallelization = desc.Parallelization(blockSize=2) + # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE + + category = 'Dense Reconstruction' + documentation = ''' + This node creates a dense geometric surface representation of the lidar measurements. + ''' + + inputs = [ + desc.File( + name="input", + label="Input JSON", + description="Input JSON file with description of inputs.", + value="", + uid=[0], + ), + desc.BoolParam( + name="useBoundingBox", + label="Custom Bounding Box", + description="Edit the meshing bounding box.\n" + "If enabled, it takes priority over the 'Estimate Space From SfM' option.\n" + "Parameters can be adjusted in advanced settings.", + value=False, + uid=[0], + group="", + ), + desc.GroupAttribute( + name="boundingBox", + label="Bounding Box Settings", + description="Translation, rotation and scale of the bounding box.", + groupDesc=[ + desc.GroupAttribute( + name="bboxTranslation", + label="Translation", + description="Position in space.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="X offset.", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01), + ), + desc.FloatParam( + name="y", label="y", description="Y offset.", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01), + ), + desc.FloatParam( + name="z", label="z", description="Z offset.", + value=0.0, + uid=[0], + range=(-20.0, 20.0, 0.01), + ), + ], + joinChar=",", + ), + desc.GroupAttribute( + name="bboxRotation", + label="Euler Rotation", + description="Rotation in Euler degrees.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="Euler X rotation.", + value=0.0, + uid=[0], + range=(-90.0, 90.0, 1.0) + ), + desc.FloatParam( + name="y", label="y", description="Euler Y rotation.", + value=0.0, + uid=[0], + range=(-180.0, 180.0, 1.0) + ), + desc.FloatParam( + name="z", label="z", description="Euler Z rotation.", + value=0.0, + uid=[0], + range=(-180.0, 180.0, 1.0) + ), + ], + joinChar=",", + ), + desc.GroupAttribute( + name="bboxScale", + label="Scale", + description="Scale of the bounding box.", + groupDesc=[ + desc.FloatParam( + name="x", label="x", description="X scale.", + value=1.0, + uid=[0], + range=(0.0, 20.0, 0.01), + ), + desc.FloatParam( + name="y", label="y", description="Y scale.", + value=1.0, + uid=[0], + range=(0.0, 20.0, 0.01), + ), + desc.FloatParam( + name="z", label="z", description="Z scale.", + value=1.0, + uid=[0], + range=(0.0, 20.0, 0.01), + ), + ], + joinChar=",", + ), + ], + joinChar=",", + enabled=lambda node: node.useBoundingBox.value, + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), + ] + + outputs = [ + desc.File( + name="output", + label="Sub-Meshes directory", + description="Output directory for sub-meshes", + value=desc.Node.internalFolder, + uid=[], + ), + desc.File( + name="outputJson", + label="Scene description", + description="Output Scene description.", + value=desc.Node.internalFolder + "scene.json", + uid=[], + ), + ] From dbb9c6d33fbc7c4c3318d7704ef6b2e5d50e9401 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Tue, 12 Mar 2024 23:31:55 +0100 Subject: [PATCH 0960/1093] [nodes] ExportAnimatedCameras: rename as ST maps (instead of UV) --- meshroom/aliceVision/ExportAnimatedCamera.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 619246e027..cefbb07707 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -39,9 +39,10 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): uid=[0], ), desc.BoolParam( - name="exportUVMaps", - label="Export UV Maps", - description="Export UV maps. Absolutes values (x, y) of distortion are encoded in UV channels.", + name="exportSTMaps", + label="Export ST Maps", + description="Export ST maps. Motion (x, y) is encoded in the image channels to correct the lens distortion.\n" + "It represents the absolute pixel positions of an image normalized between 0 and 1.", value=True, uid=[0], ), From 080770c107377353118878ee814cae15bc5f8508 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 15 Mar 2024 19:11:03 +0100 Subject: [PATCH 0961/1093] [nodes] New node MeshRemoveUnseenFaces Remove triangles from the mesh when the vertices are not visible by any camera. --- meshroom/aliceVision/MeshRemoveUnseenFaces.py | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 meshroom/aliceVision/MeshRemoveUnseenFaces.py diff --git a/meshroom/aliceVision/MeshRemoveUnseenFaces.py b/meshroom/aliceVision/MeshRemoveUnseenFaces.py new file mode 100644 index 0000000000..5899605cc9 --- /dev/null +++ b/meshroom/aliceVision/MeshRemoveUnseenFaces.py @@ -0,0 +1,78 @@ +__version__ = "3.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class MeshRemoveUnseenFaces(desc.AVCommandLineNode): + commandLine = 'aliceVision_meshRemoveUnseenFaces {allParams}' + + cpu = desc.Level.INTENSIVE + ram = desc.Level.NORMAL + + category = 'Dense Reconstruction' + documentation = ''' +Remove triangles from the mesh when the vertices are not visible by any camera. +''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file.", + value="", + uid=[0], + ), + desc.File( + name="inputMesh", + label="Mesh", + description="Input Mesh file.", + value="", + uid=[0], + ), + desc.ChoiceParam( + name="outputMeshFileType", + label="Mesh Type", + description="File type for the output mesh.", + value="obj", + values=("gltf", "obj", "fbx", "stl"), + exclusive=True, + uid=[0], + group="", + ), + desc.IntParam( + name="minObservations", + label="Min Observations", + description="Minimal number of observations to keep a vertex.", + value=1, + range=(0, 5, 1), + uid=[0], + ), + desc.IntParam( + name="minVertices", + label="Min Vertices to Remove a Triangle", + description="Minimal number of killed vertices in a triangle to remove the triangle.", + value=3, + range=(1, 3, 1), + uid=[0], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), + ] + + outputs = [ + desc.File( + name="outputMesh", + label="Mesh", + description="Output mesh file.", + value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", + uid=[], + ), + ] From 60ab1adc1e843cbc2b0ddffa24f94591dacb0590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 19 Mar 2024 10:57:37 +0000 Subject: [PATCH 0962/1093] [nodes] SfM: Update default value and range for the max number of Ransac iterations --- meshroom/aliceVision/StructureFromMotion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index a226ea9b31..f27f79699a 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -130,8 +130,8 @@ class StructureFromMotion(desc.AVCommandLineNode): name="localizerEstimatorMaxIterations", label="Localizer Max Ransac Iterations", description="Maximum number of iterations allowed in the Ransac step.", - value=4096, - range=(1, 20000, 1), + value=50000, + range=(1, 100000, 1), uid=[0], advanced=True, ), From 9b6ea615848b1b69d29785a2f6efac2792117fbd Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 19 Mar 2024 09:47:07 +0100 Subject: [PATCH 0963/1093] Change camera models --- meshroom/aliceVision/CameraInit.py | 41 +++++++++---------- meshroom/aliceVision/DistortionCalibration.py | 6 +-- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 87b4715158..78b06d822b 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -123,16 +123,27 @@ label="Camera Type", description="Mathematical model used to represent a camera:\n" " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" - " - radial1: Pinhole camera with one radial distortion parameter.\n" - " - radial3: Pinhole camera with 3 radial distortion parameters.\n" - " - brown: Pinhole camera with 3 radial and 2 tangential distortion parameters.\n" - " - fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV).\n" - " - equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV).\n" + " - equidistant: Non-projective camera model suited for full-fisheye optics (like 180deg FoV).\n", + value="pinhole", + values=["pinhole", "equidistant"], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name="distortionType", + label="Distortion Type", + description="Mathematical model used to represent the distortion:\n" + " - radialk1: radial distortion with one parameter.\n" + " - radialk3: radial distortion with three parameters (Best for pinhole cameras).\n" + " - radialk3pt: radial distortion with three parameters and normalized with the sum of parameters (Best for equidistant cameras).\n" + " - brown: distortion with 3 radial and 2 tangential parameters.\n" + " - fisheye1: distortion with 1 parameter suited for fisheye optics (like 120deg FoV).\n" + " - fisheye4: distortion with 4 parameters suited for fisheye optics (like 120deg FoV).\n" " - 3deanamorphic4: Pinhole camera with 4 anamorphic distortion coefficients.\n" " - 3declassicld: Pinhole camera with 10 anamorphic distortion coefficients.\n" " - 3deradial4: Pinhole camera with 3DE radial4 model.\n", - value="", - values=["", "pinhole", "radial1", "radial3", "brown", "fisheye4", "equidistant_r3", "3deanamorphic4", "3declassicld", "3deradial4"], + value="radialk3", + values=["none", "radialk1", "radialk3", "radialk3pt", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, uid=[0], ), @@ -416,19 +427,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): exclusive=True, uid=[], ), - desc.ChoiceParam( - name="allowedCameraModels", - label="Allowed Camera Models", - description="List of the camera models that can be attributed.", - values=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], - value=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], - exclusive=False, - uid=[], - joinChar=",", - validValue=lambda node: len(node.allowedCameraModels.value), - errorMessage="Need at least one allowed camera model.", - advanced=True, - ), desc.ChoiceParam( name="rawColorInterpretation", label="RAW Color Interpretation", @@ -621,6 +619,7 @@ def createViewpointsFile(self, node, additionalViews=()): for intrinsic in intrinsics: intrinsic['principalPoint'] = [intrinsic['principalPoint']['x'], intrinsic['principalPoint']['y']] intrinsic['undistortionOffset'] = [intrinsic['undistortionOffset']['x'], intrinsic['undistortionOffset']['y']] + intrinsic['undistortionType'] = 'none' views = node.viewpoints.getPrimitiveValue(exportDefault=False) # convert the metadata string into a map @@ -629,7 +628,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 6], + "version": [1, 2, 8], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 532b0e328a..61bebab89b 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -29,9 +29,9 @@ class DistortionCalibration(desc.AVCommandLineNode): uid=[0], ), desc.ChoiceParam( - name="cameraModel", - label="Camera Model", - description="Camera model used to estimate distortion.", + name="undistortionModelName", + label="Undistortion Model", + description="model used to estimate undistortion.", value="3deanamorphic4", values=["3deanamorphic4"], exclusive=True, From 6dc4cc0e632c90c81402a5da54ebaafa18fbd06f Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 20 Mar 2024 12:28:23 +0100 Subject: [PATCH 0964/1093] Update meshroom/nodes/aliceVision/CameraInit.py Co-authored-by: Simone Gasparini <simone.gasparini@gmail.com> --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 78b06d822b..7afc837d8c 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -123,7 +123,7 @@ label="Camera Type", description="Mathematical model used to represent a camera:\n" " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" - " - equidistant: Non-projective camera model suited for full-fisheye optics (like 180deg FoV).\n", + " - equidistant: Non-projective camera model suited for full-fisheye optics (180deg FoV).\n", value="pinhole", values=["pinhole", "equidistant"], exclusive=True, From 641795a759f549aa752b199c35a5ebbcde77c903 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 20 Mar 2024 14:16:14 +0100 Subject: [PATCH 0965/1093] Upgrade nodes versions --- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/DistortionCalibration.py | 2 +- meshroom/cameraTracking.mg | 4 ++-- meshroom/cameraTrackingWithoutCalibration.mg | 2 +- meshroom/distortionCalibration.mg | 4 ++-- meshroom/hdrFusion.mg | 2 +- meshroom/nodalCameraTracking.mg | 4 ++-- meshroom/nodalCameraTrackingWithoutCalibration.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 4 ++-- meshroom/photogrammetryDraft.mg | 2 +- meshroom/stereoPhotometry.mg | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 7afc837d8c..bc916c7fe5 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "9.0" +__version__ = "10.0" import os import json diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 61bebab89b..c614c9425e 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -1,4 +1,4 @@ -__version__ = '3.0' +__version__ = '4.0' from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 3a027e6c80..31a653e689 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -23,13 +23,13 @@ "DepthMap": "5.0", "SfMTransfer": "2.1", "StructureFromMotion": "3.3", - "DistortionCalibration": "3.0", + "DistortionCalibration": "4.0", "SfMTriangulation": "1.0", "FeatureMatching": "2.0", "ScenePreview": "2.0", "ImageSegmentation": "1.2", "FeatureExtraction": "1.3", - "CameraInit": "9.0" + "CameraInit": "10.0" } }, "graph": { diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 6a74c7122f..12d0c659dc 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -26,7 +26,7 @@ "ScenePreview": "2.0", "ImageSegmentation": "1.2", "FeatureExtraction": "1.3", - "CameraInit": "9.0" + "CameraInit": "10.0" } }, "graph": { diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index d2a1122acf..a588884bd6 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -6,9 +6,9 @@ "template": true, "nodesVersions": { "ExportDistortion": "1.0", - "CameraInit": "9.0", + "CameraInit": "10.0", "CheckerboardDetection": "1.0", - "DistortionCalibration": "3.0", + "DistortionCalibration": "4.0", "Publish": "1.3" } }, diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 3b17a72cd4..0adda54f40 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "9.0", + "CameraInit": "10.0", "LdrToHdrMerge": "4.1", "LdrToHdrCalibration": "3.1", "LdrToHdrSampling": "4.0", diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 47b421c609..b66c0d5942 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -13,9 +13,9 @@ "CheckerboardDetection": "1.0", "ApplyCalibration": "1.0", "ImageMatching": "2.0", - "CameraInit": "9.0", + "CameraInit": "10.0", "Publish": "1.3", - "DistortionCalibration": "3.0", + "DistortionCalibration": "4.0", "ImageSegmentation": "1.2", "RelativePoseEstimating": "1.0", "FeatureExtraction": "1.3", diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index d997ad209f..37184a22e8 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -10,7 +10,7 @@ "ScenePreview": "2.0", "ConvertSfMFormat": "2.0", "ImageMatching": "2.0", - "CameraInit": "9.0", + "CameraInit": "10.0", "Publish": "1.3", "ImageSegmentation": "1.2", "RelativePoseEstimating": "1.0", diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 972d363520..ff5af8a66b 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -17,7 +17,7 @@ "Publish": "1.3", "ImageMatching": "2.0", "LdrToHdrMerge": "4.1", - "CameraInit": "9.0" + "CameraInit": "10.0" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 7865abc6c8..271e4e6d4a 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -9,7 +9,7 @@ "PanoramaMerging": "1.0", "Publish": "1.3", "PanoramaEstimation": "1.0", - "CameraInit": "9.0", + "CameraInit": "10.0", "LdrToHdrCalibration": "3.1", "ImageMatching": "2.0", "LdrToHdrSampling": "4.0", diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index ceb8cdc977..5d072870a9 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -9,7 +9,7 @@ "DepthMap": "5.0", "Meshing": "7.0", "FeatureMatching": "2.0", - "CameraInit": "9.0", + "CameraInit": "10.0", "Texturing": "6.0", "PrepareDenseScene": "3.1", "Publish": "1.3", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 0d99bb572a..695a9a91c2 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -22,12 +22,12 @@ "ConvertSfMFormat": "2.0", "DepthMap": "5.0", "StructureFromMotion": "3.3", - "DistortionCalibration": "3.0", + "DistortionCalibration": "4.0", "FeatureMatching": "2.0", "ScenePreview": "2.0", "ImageSegmentation": "1.2", "FeatureExtraction": "1.3", - "CameraInit": "9.0" + "CameraInit": "10.0" } }, "graph": { diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 9908a48433..331f29ba39 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -4,7 +4,7 @@ "StructureFromMotion": "3.3", "FeatureMatching": "2.0", "Meshing": "7.0", - "CameraInit": "9.0", + "CameraInit": "10.0", "Texturing": "6.0", "Publish": "1.3", "MeshFiltering": "3.0", diff --git a/meshroom/stereoPhotometry.mg b/meshroom/stereoPhotometry.mg index 1be693d461..b7a530e1fc 100644 --- a/meshroom/stereoPhotometry.mg +++ b/meshroom/stereoPhotometry.mg @@ -6,7 +6,7 @@ "template": true, "nodesVersions": { "PhotometricStereo": "1.0", - "CameraInit": "9.0", + "CameraInit": "10.0", "SphereDetection": "1.0", "LightingCalibration": "1.0", "Publish": "1.3" From 9416b769bc752aab5533caeac75aaaf5dad66bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 20 Mar 2024 15:05:00 +0100 Subject: [PATCH 0966/1093] [pipelines] Update templates with non-default CameraInit parameter values --- meshroom/hdrFusion.mg | 21 +++++--------------- meshroom/panoramaFisheyeHdr.mg | 33 +++++++++++--------------------- meshroom/panoramaHdr.mg | 35 ++++++++++++---------------------- 3 files changed, 28 insertions(+), 61 deletions(-) diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 0adda54f40..1a255467f6 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -1,11 +1,11 @@ { "header": { "nodesVersions": { - "CameraInit": "10.0", - "LdrToHdrMerge": "4.1", "LdrToHdrCalibration": "3.1", "LdrToHdrSampling": "4.0", - "Publish": "1.3" + "LdrToHdrMerge": "4.1", + "Publish": "1.3", + "CameraInit": "10.0" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", @@ -59,18 +59,7 @@ 0, 0 ], - "inputs": { - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ] - } + "inputs": {} }, "Publish_1": { "nodeType": "Publish", @@ -85,4 +74,4 @@ } } } -} +} \ No newline at end of file diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index ff5af8a66b..57dcaa061b 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "PanoramaEstimation": "1.0", "LdrToHdrCalibration": "3.1", + "LdrToHdrSampling": "4.0", + "PanoramaSeams": "2.0", + "PanoramaWarping": "1.1", "PanoramaPostProcessing": "2.0", - "FeatureMatching": "2.0", + "ImageMatching": "2.0", "PanoramaPrepareImages": "1.1", - "FeatureExtraction": "1.3", - "PanoramaSeams": "2.0", "PanoramaCompositing": "2.0", + "SfMTransform": "3.1", "PanoramaInit": "2.0", - "PanoramaWarping": "1.1", + "PanoramaEstimation": "1.0", + "FeatureExtraction": "1.3", "PanoramaMerging": "1.0", - "SfMTransform": "3.1", - "LdrToHdrSampling": "4.0", - "Publish": "1.3", - "ImageMatching": "2.0", "LdrToHdrMerge": "4.1", - "CameraInit": "10.0" + "Publish": "1.3", + "CameraInit": "10.0", + "FeatureMatching": "2.0" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", @@ -135,18 +135,7 @@ 0, 0 ], - "inputs": { - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ] - } + "inputs": {} }, "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 271e4e6d4a..c7ffc25386 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,23 +1,23 @@ { "header": { "nodesVersions": { - "FeatureExtraction": "1.3", + "LdrToHdrCalibration": "3.1", + "LdrToHdrSampling": "4.0", "PanoramaSeams": "2.0", - "PanoramaPostProcessing": "2.0", "PanoramaWarping": "1.1", - "LdrToHdrMerge": "4.1", - "PanoramaMerging": "1.0", - "Publish": "1.3", - "PanoramaEstimation": "1.0", - "CameraInit": "10.0", - "LdrToHdrCalibration": "3.1", + "PanoramaPostProcessing": "2.0", "ImageMatching": "2.0", - "LdrToHdrSampling": "4.0", "PanoramaPrepareImages": "1.1", - "FeatureMatching": "2.0", "PanoramaCompositing": "2.0", "SfMTransform": "3.1", - "PanoramaInit": "2.0" + "PanoramaInit": "2.0", + "PanoramaEstimation": "1.0", + "FeatureExtraction": "1.3", + "PanoramaMerging": "1.0", + "LdrToHdrMerge": "4.1", + "Publish": "1.3", + "CameraInit": "10.0", + "FeatureMatching": "2.0" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", @@ -130,18 +130,7 @@ 0, 0 ], - "inputs": { - "allowedCameraModels": [ - "pinhole", - "radial1", - "radial3", - "brown", - "fisheye1", - "3deanamorphic4", - "3deradial4", - "3declassicld" - ] - } + "inputs": {} }, "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", From 98d4bdef1417479e91fa931d9ff4b08251e57c22 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 22 Mar 2024 00:00:45 +0100 Subject: [PATCH 0967/1093] Update meshroom/nodes/aliceVision/CameraInit.py --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index bc916c7fe5..b891884e89 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -123,7 +123,7 @@ label="Camera Type", description="Mathematical model used to represent a camera:\n" " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" - " - equidistant: Non-projective camera model suited for full-fisheye optics (180deg FoV).\n", + " - equidistant: Non-projective camera model suited for full-fisheye optics.\n", value="pinhole", values=["pinhole", "equidistant"], exclusive=True, From da3184be8e23196dc17c5a50da719d2e8a12a470 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 27 Mar 2024 10:14:32 +0100 Subject: [PATCH 0968/1093] Upgrade intrinsics for distortion --- meshroom/aliceVision/CameraInit.py | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index b891884e89..04fcd74fe9 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -535,6 +535,67 @@ def initialize(self, node, inputs, recursiveInputs): views, intrinsics = self.buildIntrinsics(node, filesByType.images) self.setAttributes(node, {"viewpoints": views, "intrinsics": intrinsics}) + def upgradeTypes(self, intrinsic, itype): + if itype == "pinhole": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "none" + intrinsic['undistortionType'] = "none" + + elif itype == "radial1": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "radialk1" + intrinsic['undistortionType'] = "none" + + elif itype == "radial3": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "radialk3" + intrinsic['undistortionType'] = "none" + + elif itype == "3deradial4": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "3deradial4" + intrinsic['undistortionType'] = "none" + + elif itype == "brown": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "brown" + intrinsic['undistortionType'] = "none" + + elif itype == "fisheye4": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "fisheye4" + intrinsic['undistortionType'] = "none" + + elif itype == "fisheye1": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "fisheye1" + intrinsic['undistortionType'] = "none" + + elif itype == "3deanamorphic4": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "none" + intrinsic['undistortionType'] = "3deanamorphic4" + + elif itype == "3declassicld": + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "3declassicld" + intrinsic['undistortionType'] = "none" + + elif itype == "equidistant": + intrinsic['type'] = "equidistant" + intrinsic['distortionType'] = "none" + intrinsic['undistortionType'] = "none" + + elif itype == "equidistant_r3": + intrinsic['type'] = "equidistant" + intrinsic['distortionType'] = "radialk3pt" + intrinsic['undistortionType'] = "none" + + else: + intrinsic['type'] = "pinhole" + intrinsic['distortionType'] = "none" + intrinsic['undistortionType'] = "none" + def upgradeAttributeValues(self, attrValues, fromVersion): # Starting with version 6, the principal point is now relative to the image center @@ -560,6 +621,12 @@ def upgradeAttributeValues(self, attrValues, fromVersion): intrinsic['pixelRatio'] = 1.0 intrinsic['pixelRatioLocked'] = False + #Upgrade types + if fromVersion < Version(10, 0): + for intrinsic in attrValues['intrinsics']: + itype = intrinsic['type'] + self.upgradeTypes(intrinsic, itype) + return attrValues def readSfMData(self, sfmFile): From 32ebf2738770548d3b00b037d88ff2cd92feb0c1 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Wed, 27 Mar 2024 21:29:39 +0100 Subject: [PATCH 0969/1093] [nodes] New SelectConnectedViews node Select Connected Views based on SfM landmarks. --- meshroom/aliceVision/SelectConnectedViews.py | 71 ++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 meshroom/aliceVision/SelectConnectedViews.py diff --git a/meshroom/aliceVision/SelectConnectedViews.py b/meshroom/aliceVision/SelectConnectedViews.py new file mode 100644 index 0000000000..329a7dfa4f --- /dev/null +++ b/meshroom/aliceVision/SelectConnectedViews.py @@ -0,0 +1,71 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class SelectConnectedViews(desc.AVCommandLineNode): + commandLine = 'aliceVision_selectConnectedViews {allParams}' + + cpu = desc.Level.NORMAL + ram = desc.Level.NORMAL + + category = 'Dense Reconstruction' + documentation = ''' +Select Connected Views based on SfM landmarks. +''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file.", + value="", + uid=[0], + ), + desc.IntParam( + name="maxTCams", + label="Max Nb Neighbour Cameras", + description="Maximum number of neighbour cameras per image.", + value=10, + range=(1, 20, 1), + uid=[0], + ), + desc.FloatParam( + name="minViewAngle", + label="Min View Angle", + description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", + value=2.0, + range=(0.0, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="maxViewAngle", + label="Max View Angle", + description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", + value=70.0, + range=(10.0, 120.0, 1.0), + uid=[0], + advanced=True, + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), + ] + + outputs = [ + desc.File( + name="output", + label="Connected Views", + description="List of connected views in a text file.", + value=desc.Node.internalFolder + "connectedViews.txt", + uid=[], + ), + ] From eae2a2b9ffb5055c30fe0f7e837ad4548383edda Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Thu, 28 Mar 2024 10:49:36 +0100 Subject: [PATCH 0970/1093] [nodes] sfm requires large CPU and RAM resources --- meshroom/aliceVision/StructureFromMotion.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index f27f79699a..f98c185253 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -8,6 +8,9 @@ class StructureFromMotion(desc.AVCommandLineNode): commandLine = 'aliceVision_incrementalSfM {allParams}' size = desc.DynamicNodeSize('input') + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE + category = 'Sparse Reconstruction' documentation = ''' This node will analyze feature matches to understand the geometric relationship behind all the 2D observations, From e74804328efc551aeab1b11187937c8be79a9e71 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 28 Mar 2024 11:20:59 +0100 Subject: [PATCH 0971/1093] Convert distortion node --- meshroom/aliceVision/ConvertDistortion.py | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 meshroom/aliceVision/ConvertDistortion.py diff --git a/meshroom/aliceVision/ConvertDistortion.py b/meshroom/aliceVision/ConvertDistortion.py new file mode 100644 index 0000000000..cf4cc13c0e --- /dev/null +++ b/meshroom/aliceVision/ConvertDistortion.py @@ -0,0 +1,61 @@ +__version__ = "2.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class ConvertDistortion(desc.AVCommandLineNode): + commandLine = 'aliceVision_convertDistortion {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' + Convert distortions between different models + ''' + + inputs = [ + desc.File( + name="input", + label="Input", + description="Input SfMData file.", + value="", + uid=[0], + ), + desc.ChoiceParam( + name="from", + label="from", + description="Distortion model to convert from", + value="distortion", + values=["distortion", "undistortion"], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name="to", + label="to", + description="Distortion model to convert to", + value="undistortion", + values=["distortion", "undistortion"], + exclusive=True, + uid=[0], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), + ] + + outputs = [ + desc.File( + name="output", + label="Output", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", + uid=[], + ), + ] From 7c4ed70919b252a66617376f8f7a9f3a9da534b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 28 Mar 2024 16:28:31 +0100 Subject: [PATCH 0972/1093] [nodes] KeyframeSelection: Update default minimum number of keyframes --- meshroom/aliceVision/KeyframeSelection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index fb6b8ea3a3..914204460f 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -212,7 +212,7 @@ class KeyframeSelection(desc.AVCommandLineNode): name="minNbOutFrames", label="Min Nb Output Frames", description="Minimum number of frames selected to be keyframes.", - value=10, + value=40, range=(1, 100, 1), uid=[0], enabled=lambda node: node.smartSelection.enabled, From 3455ca81b1f08cb595606b957feb3a8442504510 Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE <aurore.lafaurie.pro@gmail.com> Date: Thu, 28 Mar 2024 18:20:09 +0100 Subject: [PATCH 0973/1093] [nodes] Update of values from tuple to list for ChoiceParam Update of values from tuple to list for ChoiceParam to be consistent everywhere. Before it was not a problem but because of dynamic choices we expect it to be editable list. --- meshroom/aliceVision/CameraInit.py | 4 ++-- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/MeshFiltering.py | 2 +- meshroom/aliceVision/MeshMasking.py | 2 +- meshroom/aliceVision/MeshRemoveUnseenFaces.py | 2 +- meshroom/aliceVision/Meshing.py | 4 ++-- meshroom/aliceVision/SfMTriangulation.py | 2 +- meshroom/aliceVision/StructureFromMotion.py | 2 +- meshroom/aliceVision/Texturing.py | 8 ++++---- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 04fcd74fe9..8c822c7ccf 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -217,7 +217,7 @@ " - estimated: estimated from metadata and/or sensor width.\n" " - unknown: unknown camera parameters (can still have default value guess).\n" " - none: not set.", - values=("calibrated", "estimated", "unknown", "none"), + values=["calibrated", "estimated", "unknown", "none"], value="none", exclusive=True, uid=[0], @@ -230,7 +230,7 @@ " - estimated: estimated from a database of generic calibration.\n" " - unknown: unknown camera parameters (can still have default value guess).\n" " - none: not set.", - values=("calibrated", "estimated", "unknown", "none"), + values=["calibrated", "estimated", "unknown", "none"], value="none", exclusive=True, uid=[0], diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 68f7843a57..74bd653d96 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -81,7 +81,7 @@ class FeatureMatching(desc.AVCommandLineNode): "For Binary based descriptors:\n" " - BRUTE_FORCE_HAMMING: BruteForce Hamming matching", value="ANN_L2", - values=("BRUTE_FORCE_L2", "ANN_L2", "CASCADE_HASHING_L2", "FAST_CASCADE_HASHING_L2", "BRUTE_FORCE_HAMMING"), + values=["BRUTE_FORCE_L2", "ANN_L2", "CASCADE_HASHING_L2", "FAST_CASCADE_HASHING_L2", "BRUTE_FORCE_HAMMING"], exclusive=True, uid=[0], advanced=True, diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 64482594ec..71a84eee6a 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -25,7 +25,7 @@ class MeshFiltering(desc.AVCommandLineNode): label="Mesh Type", description="File type for the output mesh.", value="obj", - values=("gltf", "obj", "fbx", "stl"), + values=["gltf", "obj", "fbx", "stl"], exclusive=True, uid=[0], group="", diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index f3f44aa0fb..c05fedf58c 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -31,7 +31,7 @@ class MeshMasking(desc.AVCommandLineNode): label="Output Mesh Type", description="File type of the output mesh.", value="obj", - values=("obj", "gltf", "fbx", "stl"), + values=["obj", "gltf", "fbx", "stl"], exclusive=True, uid=[0], group="", diff --git a/meshroom/aliceVision/MeshRemoveUnseenFaces.py b/meshroom/aliceVision/MeshRemoveUnseenFaces.py index 5899605cc9..63b977ff2a 100644 --- a/meshroom/aliceVision/MeshRemoveUnseenFaces.py +++ b/meshroom/aliceVision/MeshRemoveUnseenFaces.py @@ -35,7 +35,7 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): label="Mesh Type", description="File type for the output mesh.", value="obj", - values=("gltf", "obj", "fbx", "stl"), + values=["gltf", "obj", "fbx", "stl"], exclusive=True, uid=[0], group="", diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 306ad1d7e1..faf442228b 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -212,7 +212,7 @@ class Meshing(desc.AVCommandLineNode): label="Partitioning", description="Single block or auto partitioning.", value="singleBlock", - values=("singleBlock", "auto"), + values=["singleBlock", "auto"], exclusive=True, uid=[0], advanced=True, @@ -222,7 +222,7 @@ class Meshing(desc.AVCommandLineNode): label="Repartition", description="Multi-resolution or regular grid-based repartition.", value="multiResolution", - values=("multiResolution", "regularGrid"), + values=["multiResolution", "regularGrid"], exclusive=True, uid=[0], advanced=True, diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index 4026df0b30..f28d38bc8a 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -135,7 +135,7 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Inter File Extension", description="Extension of the intermediate file export.", value=".abc", - values=(".abc", ".ply"), + values=[".abc", ".ply"], exclusive=True, uid=[], advanced=True, diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index f27f79699a..033240c579 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -378,7 +378,7 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Inter File Extension", description="Extension of the intermediate file export.", value=".abc", - values=(".abc", ".ply"), + values=[".abc", ".ply"], exclusive=True, uid=[], advanced=True, diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index e0850ed21c..9098c2748a 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -61,7 +61,7 @@ class Texturing(desc.AVCommandLineNode): label="Texture Side", description="Output texture size.", value=8192, - values=(1024, 2048, 4096, 8192, 16384), + values=[1024, 2048, 4096, 8192, 16384], exclusive=True, uid=[0], ), @@ -70,7 +70,7 @@ class Texturing(desc.AVCommandLineNode): label="Texture Downscale", description="Texture downscale factor.", value=2, - values=(1, 2, 4, 8), + values=[1, 2, 4, 8], exclusive=True, uid=[0], ), @@ -79,7 +79,7 @@ class Texturing(desc.AVCommandLineNode): label="Mesh File Type", description="File type for the mesh output.", value="obj", - values=("obj", "gltf", "fbx", "stl"), + values=["obj", "gltf", "fbx", "stl"], exclusive=True, uid=[0], ), @@ -103,7 +103,7 @@ class Texturing(desc.AVCommandLineNode): label="File Type", description="Texture file type.", value="exr", - values=("exr", "png", "tiff", "jpg"), + values=["exr", "png", "tiff", "jpg"], exclusive=True, uid=[0], enabled=lambda node: node.colorMapping.enable.value, From 238918276b394886783d803cfdd142f946221cac Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Sat, 30 Mar 2024 14:48:55 +0100 Subject: [PATCH 0974/1093] [nodes] ExportanimatedCamera: change default value for the principal point correction The export in Alembic (for Maya, blender, etc) now includes the principal point, so there is no reason to correct the principal point by default. --- meshroom/aliceVision/ExportAnimatedCamera.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index cefbb07707..ae06db7474 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -75,7 +75,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): name="correctPrincipalPoint", label="Correct Principal Point", description="Correct principal point.", - value=True, + value=False, uid=[0], ), desc.ChoiceParam( From 46fd6e15091517364f1ba200708e8e384d6e9e3b Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 5 Apr 2024 17:42:06 +0200 Subject: [PATCH 0975/1093] Lidar nodes --- meshroom/aliceVision/LidarDecimating.py | 63 +++++++++++++++++++++++++ meshroom/aliceVision/LidarMerging.py | 44 +++++++++++++++++ meshroom/aliceVision/LidarMeshing.py | 6 +-- 3 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 meshroom/aliceVision/LidarDecimating.py create mode 100644 meshroom/aliceVision/LidarMerging.py diff --git a/meshroom/aliceVision/LidarDecimating.py b/meshroom/aliceVision/LidarDecimating.py new file mode 100644 index 0000000000..83cf9ed722 --- /dev/null +++ b/meshroom/aliceVision/LidarDecimating.py @@ -0,0 +1,63 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +class LidarDecimating(desc.AVCommandLineNode): + commandLine = 'aliceVision_lidarDecimating {allParams}' + + size = desc.StaticNodeSize(10) + parallelization = desc.Parallelization(blockSize=1) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeFullSize}' + + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE + + category = 'Dense Reconstruction' + documentation = ''' + This node simplifies previously reconstructed meshes + ''' + + inputs = [ + desc.File( + name="input", + label="Input JSON", + description="Input JSON file with description of inputs.", + value="", + uid=[0], + ), + desc.FloatParam( + name="errorLimit", + label="Error limit", + description="Maximal distance allowed", + value=0.001, + range=(0.0, 1.0, 0.001), + uid=[0], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), + ] + + outputs = [ + desc.File( + name="output", + label="Sub-Meshes directory", + description="Output directory for sub-meshes", + value=desc.Node.internalFolder, + uid=[], + ), + desc.File( + name="outputJson", + label="Scene description", + description="Output Scene description.", + value=desc.Node.internalFolder + "scene.json", + uid=[], + ), + ] diff --git a/meshroom/aliceVision/LidarMerging.py b/meshroom/aliceVision/LidarMerging.py new file mode 100644 index 0000000000..99b7e994b6 --- /dev/null +++ b/meshroom/aliceVision/LidarMerging.py @@ -0,0 +1,44 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +class LidarMerging(desc.AVCommandLineNode): + commandLine = 'aliceVision_lidarMerging {allParams}' + + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE + + category = 'Dense Reconstruction' + documentation = ''' + This node merge meshes into one + ''' + + inputs = [ + desc.File( + name="input", + label="Input JSON", + description="Input JSON file with description of inputs.", + value="", + uid=[0], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), + ] + + outputs = [ + desc.File( + name="output", + label="Mesh path output", + description="Output directory for mesh", + value=desc.Node.internalFolder + "output.obj", + uid=[], + ) + ] diff --git a/meshroom/aliceVision/LidarMeshing.py b/meshroom/aliceVision/LidarMeshing.py index 5db8946d8f..c405ecb1a4 100644 --- a/meshroom/aliceVision/LidarMeshing.py +++ b/meshroom/aliceVision/LidarMeshing.py @@ -6,9 +6,9 @@ class LidarMeshing(desc.AVCommandLineNode): commandLine = 'aliceVision_lidarMeshing {allParams}' - # size = desc.DynamicNodeSize('input') - # parallelization = desc.Parallelization(blockSize=2) - # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + size = desc.StaticNodeSize(10) + parallelization = desc.Parallelization(blockSize=1) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeFullSize}' cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE From 6c7acf42aa1b8bdbbbb74770e1e2aa959139a3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 9 Apr 2024 11:46:20 +0200 Subject: [PATCH 0976/1093] [nodes] Texturing: Exclusively use lists for ChoiceParams values ChoiceParams that had their available values described in a tuple need to be updated to a list to be able to handle dynamic values. --- meshroom/aliceVision/Texturing.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 9098c2748a..f67eaf0f85 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -130,7 +130,7 @@ class Texturing(desc.AVCommandLineNode): label="Bump Type", description="Export normal map or height map.", value="Normal", - values=("Height", "Normal"), + values=["Height", "Normal"], exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value, @@ -140,7 +140,7 @@ class Texturing(desc.AVCommandLineNode): label="File Type", description="File type for the normal map texture.", value="exr", - values = ("exr", "png", "tiff", "jpg"), + values=["exr", "png", "tiff", "jpg"], exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal", @@ -150,7 +150,7 @@ class Texturing(desc.AVCommandLineNode): label="File Type", description="File type for the height map texture.", value="exr", - values=("exr",), + values=["exr",], exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height", @@ -177,7 +177,7 @@ class Texturing(desc.AVCommandLineNode): label="File Type", description="File type for the height map texture.", value="exr", - values=("exr"), + values=["exr"], exclusive=True, uid=[0], enabled=lambda node: node.displacementMapping.enable.value, @@ -192,7 +192,7 @@ class Texturing(desc.AVCommandLineNode): " - LSCM (<= 600k faces): optimize space. Generates one atlas.\n" " - ABF (<= 300k faces): optimize space and stretch. Generates one atlas.", value="Basic", - values=("Basic", "LSCM", "ABF"), + values=["Basic", "LSCM", "ABF"], exclusive=True, uid=[0], ), From 724387bafd383df9c7bc21ad1a07f1e4e1a69bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 11 Apr 2024 16:57:08 +0200 Subject: [PATCH 0977/1093] [nodes] FeatureMatching: Update default value for number of Ransac iterations The range and default value for the maximum number of iterations for Ransac now match the ones from the StructureFromMotion node. --- meshroom/aliceVision/FeatureMatching.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 74bd653d96..2f5614f413 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -126,9 +126,9 @@ class FeatureMatching(desc.AVCommandLineNode): desc.IntParam( name="maxIteration", label="Max Iterations", - description="Maximum number of iterations allowed in the ransac step.", - value=2048, - range=(1, 20000, 1), + description="Maximum number of iterations allowed in the Ransac step.", + value=50000, + range=(1, 100000, 1), uid=[0], advanced=True, ), From fd27a28d3736692446ed3860d648d6d399d94046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 11 Apr 2024 16:57:25 +0200 Subject: [PATCH 0978/1093] [nodes] FeatureMatching: Correct minor typo --- meshroom/aliceVision/FeatureMatching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 2f5614f413..e5746e184f 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -205,7 +205,7 @@ class FeatureMatching(desc.AVCommandLineNode): desc.BoolParam( name="exportDebugFiles", label="Export Debug Files", - description="Expor debug files (svg, dot).", + description="Export debug files (svg, dot).", value=False, uid=[], advanced=True, From e89431e9842ad4fc150728ceedb5c82f07db7ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 15 Apr 2024 16:03:55 +0200 Subject: [PATCH 0979/1093] [nodes] ConvertDistortion: update labels and version --- meshroom/aliceVision/ConvertDistortion.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/ConvertDistortion.py b/meshroom/aliceVision/ConvertDistortion.py index cf4cc13c0e..0e54d13f76 100644 --- a/meshroom/aliceVision/ConvertDistortion.py +++ b/meshroom/aliceVision/ConvertDistortion.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "1.0" from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL @@ -10,7 +10,7 @@ class ConvertDistortion(desc.AVCommandLineNode): category = 'Utils' documentation = ''' - Convert distortions between different models + Convert distortions between different models. ''' inputs = [ @@ -23,8 +23,8 @@ class ConvertDistortion(desc.AVCommandLineNode): ), desc.ChoiceParam( name="from", - label="from", - description="Distortion model to convert from", + label="From", + description="Distortion model to convert from.", value="distortion", values=["distortion", "undistortion"], exclusive=True, @@ -32,8 +32,8 @@ class ConvertDistortion(desc.AVCommandLineNode): ), desc.ChoiceParam( name="to", - label="to", - description="Distortion model to convert to", + label="To", + description="Distortion model to convert to.", value="undistortion", values=["distortion", "undistortion"], exclusive=True, From 98bef3d79f1b205d191063e5ede63543274b1b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 18 Apr 2024 18:12:24 +0200 Subject: [PATCH 0980/1093] [nodes] Lidar: Update labels and descriptions --- meshroom/aliceVision/LidarDecimating.py | 14 +++++++------- meshroom/aliceVision/LidarMerging.py | 8 ++++---- meshroom/aliceVision/LidarMeshing.py | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/meshroom/aliceVision/LidarDecimating.py b/meshroom/aliceVision/LidarDecimating.py index 83cf9ed722..f92291b223 100644 --- a/meshroom/aliceVision/LidarDecimating.py +++ b/meshroom/aliceVision/LidarDecimating.py @@ -15,7 +15,7 @@ class LidarDecimating(desc.AVCommandLineNode): category = 'Dense Reconstruction' documentation = ''' - This node simplifies previously reconstructed meshes + This node simplifies previously reconstructed meshes from Lidar. ''' inputs = [ @@ -28,8 +28,8 @@ class LidarDecimating(desc.AVCommandLineNode): ), desc.FloatParam( name="errorLimit", - label="Error limit", - description="Maximal distance allowed", + label="Error Limit", + description="Maximal distance (in meters) allowed.", value=0.001, range=(0.0, 1.0, 0.001), uid=[0], @@ -48,15 +48,15 @@ class LidarDecimating(desc.AVCommandLineNode): outputs = [ desc.File( name="output", - label="Sub-Meshes directory", - description="Output directory for sub-meshes", + label="Sub-Meshes Directory", + description="Output directory for sub-meshes.", value=desc.Node.internalFolder, uid=[], ), desc.File( name="outputJson", - label="Scene description", - description="Output Scene description.", + label="Scene Description", + description="Output scene description.", value=desc.Node.internalFolder + "scene.json", uid=[], ), diff --git a/meshroom/aliceVision/LidarMerging.py b/meshroom/aliceVision/LidarMerging.py index 99b7e994b6..2740d0105a 100644 --- a/meshroom/aliceVision/LidarMerging.py +++ b/meshroom/aliceVision/LidarMerging.py @@ -11,7 +11,7 @@ class LidarMerging(desc.AVCommandLineNode): category = 'Dense Reconstruction' documentation = ''' - This node merge meshes into one + This node merge several meshes into one. ''' inputs = [ @@ -36,9 +36,9 @@ class LidarMerging(desc.AVCommandLineNode): outputs = [ desc.File( name="output", - label="Mesh path output", - description="Output directory for mesh", + label="Mesh Path Output", + description="Output directory for mesh.", value=desc.Node.internalFolder + "output.obj", uid=[], - ) + ), ] diff --git a/meshroom/aliceVision/LidarMeshing.py b/meshroom/aliceVision/LidarMeshing.py index c405ecb1a4..98af094226 100644 --- a/meshroom/aliceVision/LidarMeshing.py +++ b/meshroom/aliceVision/LidarMeshing.py @@ -15,7 +15,7 @@ class LidarMeshing(desc.AVCommandLineNode): category = 'Dense Reconstruction' documentation = ''' - This node creates a dense geometric surface representation of the lidar measurements. + This node creates a dense geometric surface representation of the Lidar measurements. ''' inputs = [ @@ -76,19 +76,19 @@ class LidarMeshing(desc.AVCommandLineNode): name="x", label="x", description="Euler X rotation.", value=0.0, uid=[0], - range=(-90.0, 90.0, 1.0) + range=(-90.0, 90.0, 1.0), ), desc.FloatParam( name="y", label="y", description="Euler Y rotation.", value=0.0, uid=[0], - range=(-180.0, 180.0, 1.0) + range=(-180.0, 180.0, 1.0), ), desc.FloatParam( name="z", label="z", description="Euler Z rotation.", value=0.0, uid=[0], - range=(-180.0, 180.0, 1.0) + range=(-180.0, 180.0, 1.0), ), ], joinChar=",", @@ -137,15 +137,15 @@ class LidarMeshing(desc.AVCommandLineNode): outputs = [ desc.File( name="output", - label="Sub-Meshes directory", + label="Sub-Meshes Directory", description="Output directory for sub-meshes", value=desc.Node.internalFolder, uid=[], ), desc.File( name="outputJson", - label="Scene description", - description="Output Scene description.", + label="Scene Description", + description="Output scene description.", value=desc.Node.internalFolder + "scene.json", uid=[], ), From 58d1cf0ec1b025ec49ace0bba52ace73037292b1 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 21 May 2024 15:39:06 +0200 Subject: [PATCH 0981/1093] Add track coordinates --- meshroom/aliceVision/NodalSfM.py | 22 ----------------- .../aliceVision/RelativePoseEstimating.py | 24 +------------------ meshroom/aliceVision/SfmBootstraping.py | 24 +------------------ 3 files changed, 2 insertions(+), 68 deletions(-) diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index 4a2a22b82c..cc8a0ce18b 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -21,18 +21,6 @@ class NodalSfM(desc.AVCommandLineNode): value="", uid=[0], ), - desc.ListAttribute( - elementDesc=desc.File( - name="featuresFolder", - label="Features Folder", - description="", - value="", - uid=[0], - ), - name="featuresFolders", - label="Features Folders", - description="Folder(s) containing the extracted features and descriptors.", - ), desc.File( name="tracksFilename", label="Tracks File", @@ -47,16 +35,6 @@ class NodalSfM(desc.AVCommandLineNode): value="", uid=[0], ), - desc.ChoiceParam( - name="describerTypes", - label="Describer Types", - description="Describer types used to describe an image.", - value=["dspsift"], - values=DESCRIBER_TYPES, - exclusive=False, - uid=[0], - joinChar=",", - ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 4f6fc7edd3..c525946db6 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL @@ -23,18 +23,6 @@ class RelativePoseEstimating(desc.AVCommandLineNode): value="", uid=[0], ), - desc.ListAttribute( - elementDesc=desc.File( - name="featuresFolder", - label="Features Folder", - description="", - value="", - uid=[0], - ), - name="featuresFolders", - label="Features Folders", - description="Folder(s) containing the extracted features and descriptors.", - ), desc.File( name="tracksFilename", label="Tracks File", @@ -42,16 +30,6 @@ class RelativePoseEstimating(desc.AVCommandLineNode): value="", uid=[0], ), - desc.ChoiceParam( - name="describerTypes", - label="Describer Types", - description="Describer types used to describe an image.", - values=DESCRIBER_TYPES, - value=["dspsift"], - exclusive=False, - uid=[0], - joinChar=",", - ), desc.BoolParam( name="enforcePureRotation", label="Enforce pure rotation", diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index 63b4fbc78b..f8572fa5d3 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL @@ -20,18 +20,6 @@ class SfMBootStraping(desc.AVCommandLineNode): value="", uid=[0], ), - desc.ListAttribute( - elementDesc=desc.File( - name="featuresFolder", - label="Features Folder", - description="", - value="", - uid=[0], - ), - name="featuresFolders", - label="Features Folders", - description="Folder(s) containing the extracted features and descriptors.", - ), desc.File( name="tracksFilename", label="Tracks File", @@ -46,16 +34,6 @@ class SfMBootStraping(desc.AVCommandLineNode): value="", uid=[0], ), - desc.ChoiceParam( - name="describerTypes", - label="Describer Types", - description="Describer types used to describe an image.", - values=DESCRIBER_TYPES, - value=["dspsift"], - exclusive=False, - uid=[0], - joinChar=",", - ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From 757671f73d6f46b050409b96a09274d8d2f56c73 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 21 May 2024 18:38:21 +0200 Subject: [PATCH 0982/1093] Upgrade nodes versions --- meshroom/aliceVision/NodalSfM.py | 2 +- meshroom/nodalCameraTracking.mg | 6 ++---- meshroom/nodalCameraTrackingWithoutCalibration.mg | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index cc8a0ce18b..fae09a7dc6 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index b66c0d5942..82fb30cb07 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -17,9 +17,9 @@ "Publish": "1.3", "DistortionCalibration": "4.0", "ImageSegmentation": "1.2", - "RelativePoseEstimating": "1.0", + "RelativePoseEstimating": "2.0", "FeatureExtraction": "1.3", - "NodalSfM": "1.0", + "NodalSfM": "2.0", "TracksBuilding": "1.0" } }, @@ -106,7 +106,6 @@ ], "inputs": { "input": "{TracksBuilding_1.input}", - "featuresFolders": "{TracksBuilding_1.featuresFolders}", "tracksFilename": "{TracksBuilding_1.output}", "enforcePureRotation": true }, @@ -122,7 +121,6 @@ ], "inputs": { "input": "{RelativePoseEstimating_1.input}", - "featuresFolders": "{RelativePoseEstimating_1.featuresFolders}", "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", "pairs": "{RelativePoseEstimating_1.output}" }, diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 37184a22e8..3577f0ed6a 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -13,9 +13,9 @@ "CameraInit": "10.0", "Publish": "1.3", "ImageSegmentation": "1.2", - "RelativePoseEstimating": "1.0", + "RelativePoseEstimating": "2.0", "FeatureExtraction": "1.3", - "NodalSfM": "1.0", + "NodalSfM": "2.0", "TracksBuilding": "1.0" } }, @@ -102,7 +102,6 @@ ], "inputs": { "input": "{TracksBuilding_1.input}", - "featuresFolders": "{TracksBuilding_1.featuresFolders}", "tracksFilename": "{TracksBuilding_1.output}", "enforcePureRotation": true }, @@ -118,7 +117,6 @@ ], "inputs": { "input": "{RelativePoseEstimating_1.input}", - "featuresFolders": "{RelativePoseEstimating_1.featuresFolders}", "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", "pairs": "{RelativePoseEstimating_1.output}" }, From f0a88def2ec89502237313fb05d18f3f4d76169d Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE <aurore.lafaurie.pro@gmail.com> Date: Thu, 16 May 2024 11:06:06 +0200 Subject: [PATCH 0983/1093] [nodes] <FILESTEM> added and changed in nodes values --- meshroom/aliceVision/ExportAnimatedCamera.py | 3 ++- meshroom/aliceVision/ImageSegmentation.py | 2 +- meshroom/blender/ScenePreview.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index ae06db7474..acd7067fbe 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -109,7 +109,8 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): name="outputUndistorted", label="Undistorted Images", description="Output undistorted images.", - value=desc.Node.internalFolder + "undistort", + semantic="image", + value=desc.Node.internalFolder + "undistort/" + "<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}", group="", # exclude from command line uid=[], ), diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 6560d2be99..ebeeaee3f6 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -96,7 +96,7 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Masks", description="Generated segmentation masks.", semantic="image", - value=lambda attr: desc.Node.internalFolder + "<VIEW_ID>.exr" if not attr.node.keepFilename.value else desc.Node.internalFolder + "<FILENAME>.exr", + value=lambda attr: desc.Node.internalFolder + "<VIEW_ID>.exr" if not attr.node.keepFilename.value else desc.Node.internalFolder + "<FILESTEM>.exr", group="", uid=[], ), diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index c6a8d3fb72..5748a43872 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -149,7 +149,7 @@ class ScenePreview(desc.CommandLineNode): label="Frames", description="Frames rendered in Blender.", semantic="image", - value=desc.Node.internalFolder + "<FILENAME>_preview.jpg", + value=desc.Node.internalFolder + "<FILESTEM>_preview.jpg", uid=[], group="", ), From 14ae1a5ad85fd6667bcdb37e41fc03772736f797 Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE <aurore.lafaurie.pro@gmail.com> Date: Fri, 31 May 2024 17:32:19 +0200 Subject: [PATCH 0984/1093] [nodes] ImageProcessing : use keepImageFilename attribute --- meshroom/aliceVision/ImageProcessing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 2305daef91..aa439daa74 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -12,8 +12,9 @@ def outputImagesValueFunct(attr): outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None if inputExt in ['.abc', '.sfm']: + fileStem = '<FILENAME>' if attr.node.keepImageFilename.value else '<VIEW_ID>' # If we have an SfM in input - return desc.Node.internalFolder + '<VIEW_ID>' + (outputExt or '.*') + return desc.Node.internalFolder + fileStem + (outputExt or '.*') if inputExt: # if we have one or multiple files in input From eb155eff79d4652be98792f3ca70e4e186e21660 Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE <aurore.lafaurie.pro@gmail.com> Date: Mon, 3 Jun 2024 15:33:16 +0200 Subject: [PATCH 0985/1093] [nodes] Fix ImageProcessing node <FILENAME> to <FILESTEM> --- meshroom/aliceVision/ImageProcessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index aa439daa74..62b074678a 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -12,7 +12,7 @@ def outputImagesValueFunct(attr): outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None if inputExt in ['.abc', '.sfm']: - fileStem = '<FILENAME>' if attr.node.keepImageFilename.value else '<VIEW_ID>' + fileStem = '<FILESTEM>' if attr.node.keepImageFilename.value else '<VIEW_ID>' # If we have an SfM in input return desc.Node.internalFolder + fileStem + (outputExt or '.*') From d58fb674a1ef645bfb710e5797c9b797a7cf708f Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE <aurore.lafaurie.pro@gmail.com> Date: Tue, 4 Jun 2024 11:34:03 +0200 Subject: [PATCH 0986/1093] [nodes/ui] Fix ExportAnimatedCamera outputs for ScenePreview use --- meshroom/aliceVision/ExportAnimatedCamera.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index acd7067fbe..38ffe11b1a 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -107,10 +107,18 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): ), desc.File( name="outputUndistorted", + label="Undistorted Folder", + description="Output undistorted folder.", + value=desc.Node.internalFolder + "undistort/", + group="", # exclude from command line + uid=[], + ), + desc.File( + name="outputImages", label="Undistorted Images", description="Output undistorted images.", - semantic="image", value=desc.Node.internalFolder + "undistort/" + "<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}", + semantic="image", group="", # exclude from command line uid=[], ), From 4dde094141053d620ae34a990fccd649fab932cc Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE <aurore.lafaurie.pro@gmail.com> Date: Fri, 7 Jun 2024 13:36:54 +0200 Subject: [PATCH 0987/1093] [nodes] Fix outputImages if no export in ExportAnimatedCamera --- meshroom/aliceVision/ExportAnimatedCamera.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 38ffe11b1a..2286336b3a 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -120,6 +120,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): value=desc.Node.internalFolder + "undistort/" + "<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}", semantic="image", group="", # exclude from command line + enabled=lambda node: node.exportUndistortedImages.value, uid=[], ), ] From 5206301061152e2da8e608f07ceac28cdce8fec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 10 Jun 2024 18:55:35 +0200 Subject: [PATCH 0988/1093] [nodes] Blender scripts: Add `__init__.py` Add missing `__init__.py` so the "scripts" folder can be loaded as a module. This also automatically includes the content of the "scripts" folder into the files that are installed with cx_Freeze when packaging Meshroom. --- meshroom/blender/scripts/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 meshroom/blender/scripts/__init__.py diff --git a/meshroom/blender/scripts/__init__.py b/meshroom/blender/scripts/__init__.py new file mode 100644 index 0000000000..e69de29bb2 From 7421c949742af31f10af8b89b390481efb576021 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 17 Jun 2024 09:36:09 +0200 Subject: [PATCH 0989/1093] [nodes] DepthMapFilter: display normal maps --- meshroom/aliceVision/DepthMapFilter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 80358038d3..ebf7787df3 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -150,4 +150,14 @@ class DepthMapFilter(desc.AVCommandLineNode): uid=[], group="", # do not export on the command line ), + desc.File( + name="normal", + label="Normal Maps", + description="Normal maps.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr", + uid=[], + enabled=lambda node: node.computeNormalMaps.value, + group="", # do not export on the command line + ), ] From 3a584614dcf73087ad1d9eb7106d4356e00bb950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 17 Jun 2024 11:25:49 +0200 Subject: [PATCH 0990/1093] [pipelines] Export all templates with the correct ordering --- meshroom/cameraTracking.mg | 466 +++++++------- meshroom/cameraTrackingWithoutCalibration.mg | 350 +++++----- meshroom/distortionCalibration.mg | 20 +- meshroom/hdrFusion.mg | 44 +- meshroom/nodalCameraTracking.mg | 268 ++++---- .../nodalCameraTrackingWithoutCalibration.mg | 144 ++--- meshroom/panoramaFisheyeHdr.mg | 212 +++--- meshroom/panoramaHdr.mg | 200 +++--- meshroom/photogrammetry.mg | 140 ++-- meshroom/photogrammetryAndCameraTracking.mg | 606 +++++++++--------- meshroom/photogrammetryDraft.mg | 120 ++-- meshroom/stereoPhotometry.mg | 30 +- 12 files changed, 1300 insertions(+), 1300 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 31a653e689..4d8c15f01f 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,34 +5,48 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", - "Texturing": "6.0", - "ImageMatching": "2.0", - "Publish": "1.3", - "MeshFiltering": "3.0", - "MeshDecimate": "1.0", - "DepthMapFilter": "4.0", - "ExportDistortion": "1.0", - "PrepareDenseScene": "3.1", - "ImageMatchingMultiSfM": "1.0", - "Meshing": "7.0", - "KeyframeSelection": "5.0", - "CheckerboardDetection": "1.0", "ApplyCalibration": "1.0", + "CameraInit": "10.0", + "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", - "SfMTransfer": "2.1", - "StructureFromMotion": "3.3", + "DepthMapFilter": "4.0", "DistortionCalibration": "4.0", - "SfMTriangulation": "1.0", + "ExportAnimatedCamera": "2.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", "FeatureMatching": "2.0", - "ScenePreview": "2.0", + "ImageMatching": "2.0", + "ImageMatchingMultiSfM": "1.0", "ImageSegmentation": "1.2", - "FeatureExtraction": "1.3", - "CameraInit": "10.0" + "KeyframeSelection": "5.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "ScenePreview": "2.0", + "SfMTransfer": "2.1", + "SfMTriangulation": "1.0", + "StructureFromMotion": "3.3", + "Texturing": "6.0" } }, "graph": { + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, "CameraInit_1": { "nodeType": "CameraInit", "position": [ @@ -44,6 +58,50 @@ "color": "#575963" } }, + "CameraInit_2": { + "nodeType": "CameraInit", + "position": [ + -600, + -160 + ], + "inputs": {}, + "internalInputs": { + "label": "CameraInitLensGrid", + "color": "#302e2e" + } + }, + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + -400, + -160 + ], + "inputs": { + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 3000, + 200 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "json", + "describerTypes": "{StructureFromMotion_1.describerTypes}", + "structure": false, + "observations": false + }, + "internalInputs": { + "color": "#4c594c" + } + }, "DepthMapFilter_1": { "nodeType": "DepthMapFilter", "position": [ @@ -73,6 +131,47 @@ "color": "#3f3138" } }, + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", + "position": [ + -200, + -160 + ], + "inputs": { + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1600, + 200 + ], + "inputs": { + "input": "{StructureFromMotion_1.output}", + "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 0, + -160 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ @@ -105,6 +204,39 @@ "color": "#575963" } }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 1200, + 360 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames", + "color": "#80766f" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1200, + 200 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" + } + }, "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ @@ -143,6 +275,39 @@ "color": "#575963" } }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 1000, + 360 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true, + "keepFilename": true + }, + "internalInputs": { + "color": "#575963" + } + }, "KeyframeSelection_1": { "nodeType": "KeyframeSelection", "position": [ @@ -189,66 +354,36 @@ "color": "#3f3138" } }, - "PrepareDenseScene_1": { - "nodeType": "PrepareDenseScene", - "position": [ - 2000, - 0 - ], - "inputs": { - "input": "{SfMTriangulation_1.output}", - "masksFolders": [ - "{ImageSegmentation_1.output}" - ], - "maskExtension": "exr" - }, - "internalInputs": { - "color": "#3f3138" - } - }, - "SfMTransfer_1": { - "nodeType": "SfMTransfer", - "position": [ - 1600, - 0 - ], - "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "reference": "{StructureFromMotion_1.output}", - "transferLandmarks": false - }, - "internalInputs": { - "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", - "color": "#3f3138" - } - }, - "SfMTriangulation_1": { - "nodeType": "SfMTriangulation", + "Meshing_1": { + "nodeType": "Meshing", "position": [ - 1800, + 2600, 0 ], "inputs": { - "input": "{SfMTransfer_1.output}", - "featuresFolders": "{StructureFromMotion_2.featuresFolders}", - "matchesFolders": "{StructureFromMotion_2.matchesFolders}", - "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "estimateSpaceFromSfM": false, + "minStep": 1, + "fullWeight": 10.0, + "saveRawDensePointCloud": true }, "internalInputs": { "color": "#3f3138" } }, - "Texturing_1": { - "nodeType": "Texturing", + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", "position": [ - 3200, + 2000, 0 ], "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{PrepareDenseScene_1.output}", - "inputMesh": "{MeshDecimate_1.output}" + "input": "{SfMTriangulation_1.output}", + "masksFolders": [ + "{ImageSegmentation_1.output}" + ], + "maskExtension": "exr" }, "internalInputs": { "color": "#3f3138" @@ -269,125 +404,53 @@ ] } }, - "ExportAnimatedCamera_1": { - "nodeType": "ExportAnimatedCamera", + "ScenePreview_1": { + "nodeType": "ScenePreview", "position": [ - 1600, + 3200, 200 ], "inputs": { - "input": "{StructureFromMotion_1.output}", - "exportUndistortedImages": true + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentation_1.output}" }, "internalInputs": { - "color": "#80766f" + "color": "#4c594c" } }, - "Meshing_1": { - "nodeType": "Meshing", + "SfMTransfer_1": { + "nodeType": "SfMTransfer", "position": [ - 2600, + 1600, 0 ], "inputs": { - "input": "{DepthMapFilter_1.input}", - "depthMapsFolder": "{DepthMapFilter_1.output}", - "estimateSpaceFromSfM": false, - "minStep": 1, - "fullWeight": 10.0, - "saveRawDensePointCloud": true + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "reference": "{StructureFromMotion_1.output}", + "transferLandmarks": false }, "internalInputs": { + "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", "color": "#3f3138" } }, - "CheckerboardDetection_1": { - "nodeType": "CheckerboardDetection", - "position": [ - -400, - -160 - ], - "inputs": { - "input": "{CameraInit_2.output}", - "useNestedGrids": true, - "exportDebugImages": true - }, - "internalInputs": { - "color": "#302e2e" - } - }, - "DistortionCalibration_1": { - "nodeType": "DistortionCalibration", - "position": [ - -200, - -160 - ], - "inputs": { - "input": "{CheckerboardDetection_1.input}", - "checkerboards": "{CheckerboardDetection_1.output}" - }, - "internalInputs": { - "color": "#302e2e" - } - }, - "ExportDistortion_1": { - "nodeType": "ExportDistortion", - "position": [ - 0, - -160 - ], - "inputs": { - "input": "{DistortionCalibration_1.output}" - }, - "internalInputs": { - "color": "#302e2e" - } - }, - "ApplyCalibration_1": { - "nodeType": "ApplyCalibration", + "SfMTriangulation_1": { + "nodeType": "SfMTriangulation", "position": [ - 0, + 1800, 0 ], "inputs": { - "input": "{CameraInit_1.output}", - "calibration": "{DistortionCalibration_1.output}" - }, - "internalInputs": { - "color": "#575963" - } - }, - "ScenePreview_1": { - "nodeType": "ScenePreview", - "position": [ - 3200, - 200 - ], - "inputs": { - "cameras": "{ConvertSfMFormat_1.output}", - "model": "{MeshDecimate_1.output}", - "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}" - }, - "internalInputs": { - "color": "#4c594c" - } - }, - "ConvertSfMFormat_1": { - "nodeType": "ConvertSfMFormat", - "position": [ - 3000, - 200 - ], - "inputs": { - "input": "{ExportAnimatedCamera_1.input}", - "fileExt": "json", - "describerTypes": "{StructureFromMotion_1.describerTypes}", - "structure": false, - "observations": false + "input": "{SfMTransfer_1.output}", + "featuresFolders": "{StructureFromMotion_2.featuresFolders}", + "matchesFolders": "{StructureFromMotion_2.matchesFolders}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 }, "internalInputs": { - "color": "#4c594c" + "color": "#3f3138" } }, "StructureFromMotion_1": { @@ -418,21 +481,6 @@ "color": "#80766f" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", - "position": [ - 0, - 200 - ], - "inputs": { - "input": "{CameraInit_1.output}", - "maskInvert": true, - "keepFilename": true - }, - "internalInputs": { - "color": "#575963" - } - }, "StructureFromMotion_2": { "nodeType": "StructureFromMotion", "position": [ @@ -456,67 +504,19 @@ "color": "#575963" } }, - "FeatureMatching_2": { - "nodeType": "FeatureMatching", - "position": [ - 1200, - 360 - ], - "inputs": { - "input": "{ImageMatching_2.input}", - "featuresFolders": "{ImageMatching_2.featuresFolders}", - "imagePairsList": "{ImageMatching_2.output}" - }, - "internalInputs": { - "label": "FeatureMatchingAllFrames", - "color": "#80766f" - } - }, - "ImageMatching_2": { - "nodeType": "ImageMatching", - "position": [ - 1000, - 360 - ], - "inputs": { - "input": "{ApplyCalibration_1.output}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "Sequential", - "nbNeighbors": 20 - }, - "internalInputs": { - "color": "#80766f" - } - }, - "CameraInit_2": { - "nodeType": "CameraInit", - "position": [ - -600, - -160 - ], - "inputs": {}, - "internalInputs": { - "label": "CameraInitLensGrid", - "color": "#302e2e" - } - }, - "FeatureMatching_3": { - "nodeType": "FeatureMatching", + "Texturing_1": { + "nodeType": "Texturing", "position": [ - 1200, - 200 + 3200, + 0 ], "inputs": { - "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", - "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", - "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshDecimate_1.output}" }, "internalInputs": { - "label": "FeatureMatchingFramesToKeyframes", - "color": "#80766f" + "color": "#3f3138" } } } diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 12d0c659dc..7bebfd9b0c 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -5,31 +5,44 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { + "ApplyCalibration": "1.0", + "CameraInit": "10.0", + "ConvertSfMFormat": "2.0", + "DepthMap": "5.0", + "DepthMapFilter": "4.0", "ExportAnimatedCamera": "2.0", - "Texturing": "6.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", "ImageMatching": "2.0", - "Publish": "1.3", - "MeshFiltering": "3.0", - "MeshDecimate": "1.0", - "DepthMapFilter": "4.0", - "PrepareDenseScene": "3.1", "ImageMatchingMultiSfM": "1.0", - "Meshing": "7.0", + "ImageSegmentation": "1.2", "KeyframeSelection": "5.0", - "ApplyCalibration": "1.0", - "ConvertSfMFormat": "2.0", - "DepthMap": "5.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "ScenePreview": "2.0", "SfMTransfer": "2.1", - "StructureFromMotion": "3.3", "SfMTriangulation": "1.0", - "FeatureMatching": "2.0", - "ScenePreview": "2.0", - "ImageSegmentation": "1.2", - "FeatureExtraction": "1.3", - "CameraInit": "10.0" + "StructureFromMotion": "3.3", + "Texturing": "6.0" } }, "graph": { + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, "CameraInit_1": { "nodeType": "CameraInit", "position": [ @@ -41,6 +54,23 @@ "color": "#575963" } }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 3000, + 200 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "json", + "describerTypes": "{StructureFromMotion_1.describerTypes}", + "structure": false, + "observations": false + }, + "internalInputs": { + "color": "#4c594c" + } + }, "DepthMapFilter_1": { "nodeType": "DepthMapFilter", "position": [ @@ -70,6 +100,20 @@ "color": "#3f3138" } }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 1600, + 200 + ], + "inputs": { + "input": "{StructureFromMotion_1.output}", + "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" + } + }, "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ @@ -102,6 +146,39 @@ "color": "#575963" } }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 1200, + 360 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames", + "color": "#80766f" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1200, + 200 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" + } + }, "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ @@ -140,6 +217,39 @@ "color": "#575963" } }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 1000, + 360 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true, + "keepFilename": true + }, + "internalInputs": { + "color": "#575963" + } + }, "KeyframeSelection_1": { "nodeType": "KeyframeSelection", "position": [ @@ -186,66 +296,36 @@ "color": "#3f3138" } }, - "PrepareDenseScene_1": { - "nodeType": "PrepareDenseScene", - "position": [ - 2000, - 0 - ], - "inputs": { - "input": "{SfMTriangulation_1.output}", - "masksFolders": [ - "{ImageSegmentation_1.output}" - ], - "maskExtension": "exr" - }, - "internalInputs": { - "color": "#3f3138" - } - }, - "SfMTransfer_1": { - "nodeType": "SfMTransfer", - "position": [ - 1600, - 0 - ], - "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "reference": "{StructureFromMotion_1.output}", - "transferLandmarks": false - }, - "internalInputs": { - "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", - "color": "#3f3138" - } - }, - "SfMTriangulation_1": { - "nodeType": "SfMTriangulation", + "Meshing_1": { + "nodeType": "Meshing", "position": [ - 1800, + 2600, 0 ], "inputs": { - "input": "{SfMTransfer_1.output}", - "featuresFolders": "{StructureFromMotion_2.featuresFolders}", - "matchesFolders": "{StructureFromMotion_2.matchesFolders}", - "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5 + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "estimateSpaceFromSfM": false, + "minStep": 1, + "fullWeight": 10.0, + "saveRawDensePointCloud": true }, "internalInputs": { "color": "#3f3138" } }, - "Texturing_1": { - "nodeType": "Texturing", + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", "position": [ - 3200, + 2000, 0 ], "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{PrepareDenseScene_1.output}", - "inputMesh": "{MeshDecimate_1.output}" + "input": "{SfMTriangulation_1.output}", + "masksFolders": [ + "{ImageSegmentation_1.output}" + ], + "maskExtension": "exr" }, "internalInputs": { "color": "#3f3138" @@ -266,82 +346,53 @@ ] } }, - "ExportAnimatedCamera_1": { - "nodeType": "ExportAnimatedCamera", + "ScenePreview_1": { + "nodeType": "ScenePreview", "position": [ - 1600, + 3200, 200 ], "inputs": { - "input": "{StructureFromMotion_1.output}", - "exportUndistortedImages": true + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentation_1.output}" }, "internalInputs": { - "color": "#80766f" + "color": "#4c594c" } }, - "Meshing_1": { - "nodeType": "Meshing", + "SfMTransfer_1": { + "nodeType": "SfMTransfer", "position": [ - 2600, + 1600, 0 ], "inputs": { - "input": "{DepthMapFilter_1.input}", - "depthMapsFolder": "{DepthMapFilter_1.output}", - "estimateSpaceFromSfM": false, - "minStep": 1, - "fullWeight": 10.0, - "saveRawDensePointCloud": true + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "reference": "{StructureFromMotion_1.output}", + "transferLandmarks": false }, "internalInputs": { + "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", "color": "#3f3138" } }, - "ApplyCalibration_1": { - "nodeType": "ApplyCalibration", + "SfMTriangulation_1": { + "nodeType": "SfMTriangulation", "position": [ - 0, + 1800, 0 ], "inputs": { - "input": "{CameraInit_1.output}" - }, - "internalInputs": { - "color": "#575963" - } - }, - "ScenePreview_1": { - "nodeType": "ScenePreview", - "position": [ - 3200, - 200 - ], - "inputs": { - "cameras": "{ConvertSfMFormat_1.output}", - "model": "{MeshDecimate_1.output}", - "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}" - }, - "internalInputs": { - "color": "#4c594c" - } - }, - "ConvertSfMFormat_1": { - "nodeType": "ConvertSfMFormat", - "position": [ - 3000, - 200 - ], - "inputs": { - "input": "{ExportAnimatedCamera_1.input}", - "fileExt": "json", - "describerTypes": "{StructureFromMotion_1.describerTypes}", - "structure": false, - "observations": false + "input": "{SfMTransfer_1.output}", + "featuresFolders": "{StructureFromMotion_2.featuresFolders}", + "matchesFolders": "{StructureFromMotion_2.matchesFolders}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 }, "internalInputs": { - "color": "#4c594c" + "color": "#3f3138" } }, "StructureFromMotion_1": { @@ -372,21 +423,6 @@ "color": "#80766f" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", - "position": [ - 0, - 200 - ], - "inputs": { - "input": "{CameraInit_1.output}", - "maskInvert": true, - "keepFilename": true - }, - "internalInputs": { - "color": "#575963" - } - }, "StructureFromMotion_2": { "nodeType": "StructureFromMotion", "position": [ @@ -410,55 +446,19 @@ "color": "#575963" } }, - "FeatureMatching_2": { - "nodeType": "FeatureMatching", - "position": [ - 1200, - 360 - ], - "inputs": { - "input": "{ImageMatching_2.input}", - "featuresFolders": "{ImageMatching_2.featuresFolders}", - "imagePairsList": "{ImageMatching_2.output}" - }, - "internalInputs": { - "label": "FeatureMatchingAllFrames", - "color": "#80766f" - } - }, - "ImageMatching_2": { - "nodeType": "ImageMatching", - "position": [ - 1000, - 360 - ], - "inputs": { - "input": "{ApplyCalibration_1.output}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "Sequential", - "nbNeighbors": 20 - }, - "internalInputs": { - "color": "#80766f" - } - }, - "FeatureMatching_3": { - "nodeType": "FeatureMatching", + "Texturing_1": { + "nodeType": "Texturing", "position": [ - 1200, - 200 + 3200, + 0 ], "inputs": { - "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", - "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", - "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshDecimate_1.output}" }, "internalInputs": { - "label": "FeatureMatchingFramesToKeyframes", - "color": "#80766f" + "color": "#3f3138" } } } diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index a588884bd6..381a085a6b 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -1,18 +1,26 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportDistortion": "1.0", "CameraInit": "10.0", "CheckerboardDetection": "1.0", "DistortionCalibration": "4.0", + "ExportDistortion": "1.0", "Publish": "1.3" } }, "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + }, "CheckerboardDetection_1": { "nodeType": "CheckerboardDetection", "position": [ @@ -56,14 +64,6 @@ "{ExportDistortion_1.output}" ] } - }, - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - 0, - 0 - ], - "inputs": {} } } } \ No newline at end of file diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 1a255467f6..f901f68884 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -1,31 +1,24 @@ { "header": { "nodesVersions": { + "CameraInit": "10.0", "LdrToHdrCalibration": "3.1", - "LdrToHdrSampling": "4.0", "LdrToHdrMerge": "4.1", - "Publish": "1.3", - "CameraInit": "10.0" + "LdrToHdrSampling": "4.0", + "Publish": "1.3" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true }, "graph": { - "LdrToHdrMerge_1": { - "nodeType": "LdrToHdrMerge", + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 600, + 0, 0 ], - "inputs": { - "input": "{LdrToHdrCalibration_1.input}", - "response": "{LdrToHdrCalibration_1.response}", - "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", - "byPass": "{LdrToHdrCalibration_1.byPass}", - "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", - "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" - } + "inputs": {} }, "LdrToHdrCalibration_1": { "nodeType": "LdrToHdrCalibration", @@ -43,23 +36,30 @@ "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" } }, - "LdrToHdrSampling_1": { - "nodeType": "LdrToHdrSampling", + "LdrToHdrMerge_1": { + "nodeType": "LdrToHdrMerge", "position": [ - 200, + 600, 0 ], "inputs": { - "input": "{CameraInit_1.output}" + "input": "{LdrToHdrCalibration_1.input}", + "response": "{LdrToHdrCalibration_1.response}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "byPass": "{LdrToHdrCalibration_1.byPass}", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", + "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" } }, - "CameraInit_1": { - "nodeType": "CameraInit", + "LdrToHdrSampling_1": { + "nodeType": "LdrToHdrSampling", "position": [ - 0, + 200, 0 ], - "inputs": {} + "inputs": { + "input": "{CameraInit_1.output}" + } }, "Publish_1": { "nodeType": "Publish", diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 82fb30cb07..26e6108958 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -5,50 +5,34 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "FeatureMatching": "2.0", - "ExportDistortion": "1.0", - "ExportAnimatedCamera": "2.0", - "ScenePreview": "2.0", - "ConvertSfMFormat": "2.0", - "CheckerboardDetection": "1.0", "ApplyCalibration": "1.0", - "ImageMatching": "2.0", "CameraInit": "10.0", - "Publish": "1.3", + "CheckerboardDetection": "1.0", + "ConvertSfMFormat": "2.0", "DistortionCalibration": "4.0", - "ImageSegmentation": "1.2", - "RelativePoseEstimating": "2.0", + "ExportAnimatedCamera": "2.0", + "ExportDistortion": "1.0", "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "ImageSegmentation": "1.2", "NodalSfM": "2.0", + "Publish": "1.3", + "RelativePoseEstimating": "2.0", + "ScenePreview": "2.0", "TracksBuilding": "1.0" } }, "graph": { - "ImageMatching_1": { - "nodeType": "ImageMatching", - "position": [ - 400, - 0 - ], - "inputs": { - "input": "{FeatureExtraction_1.input}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ] - }, - "internalInputs": { - "color": "#80766f" - } - }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", "position": [ - 200, + 0, 0 ], "inputs": { - "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentation_1.output}" + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" }, "internalInputs": { "color": "#80766f" @@ -65,67 +49,61 @@ "color": "#80766f" } }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", + "CameraInit_2": { + "nodeType": "CameraInit", "position": [ - 600, - 0 + -600, + -160 ], - "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" - }, + "inputs": {}, "internalInputs": { - "color": "#80766f" + "label": "CameraInitLensGrid", + "color": "#302e2e" } }, - "TracksBuilding_1": { - "nodeType": "TracksBuilding", + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", "position": [ - 800, - 0 + -400, + -160 ], "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ] + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true }, "internalInputs": { - "color": "#80766f" + "color": "#302e2e" } }, - "RelativePoseEstimating_1": { - "nodeType": "RelativePoseEstimating", + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", "position": [ - 1000, - 0 + 1400, + 200 ], "inputs": { - "input": "{TracksBuilding_1.input}", - "tracksFilename": "{TracksBuilding_1.output}", - "enforcePureRotation": true + "input": "{NodalSfM_1.output}", + "fileExt": "sfm", + "structure": false, + "observations": false }, "internalInputs": { - "color": "#80766f" + "color": "#4c594c" } }, - "NodalSfM_1": { - "nodeType": "NodalSfM", + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", "position": [ - 1200, - 0 + -200, + -160 ], "inputs": { - "input": "{RelativePoseEstimating_1.input}", - "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", - "pairs": "{RelativePoseEstimating_1.output}" + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" }, "internalInputs": { - "color": "#80766f" + "color": "#302e2e" } }, "ExportAnimatedCamera_1": { @@ -142,54 +120,63 @@ "color": "#80766f" } }, - "ConvertSfMFormat_1": { - "nodeType": "ConvertSfMFormat", + "ExportDistortion_1": { + "nodeType": "ExportDistortion", "position": [ - 1400, - 200 + 0, + -160 ], "inputs": { - "input": "{NodalSfM_1.output}", - "fileExt": "sfm", - "structure": false, - "observations": false + "input": "{DistortionCalibration_1.output}" }, "internalInputs": { - "color": "#4c594c" + "color": "#302e2e" } }, - "ScenePreview_1": { - "nodeType": "ScenePreview", + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 1600, - 200 + 200, + 0 ], "inputs": { - "cameras": "{ConvertSfMFormat_1.output}", - "model": "{NodalSfM_1.output}", - "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}", - "pointCloudParams": { - "particleSize": 0.001, - "particleColor": "Red" - } + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentation_1.output}" }, "internalInputs": { - "color": "#4c594c" + "color": "#80766f" } }, - "Publish_1": { - "nodeType": "Publish", + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 1800, + 600, 0 ], "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}", - "{ScenePreview_1.output}", - "{ExportDistortion_1.output}" + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" ] + }, + "internalInputs": { + "color": "#80766f" } }, "ImageSegmentation_1": { @@ -207,72 +194,85 @@ "color": "#80766f" } }, - "CheckerboardDetection_1": { - "nodeType": "CheckerboardDetection", + "NodalSfM_1": { + "nodeType": "NodalSfM", "position": [ - -400, - -160 + 1200, + 0 ], "inputs": { - "input": "{CameraInit_2.output}", - "useNestedGrids": true, - "exportDebugImages": true + "input": "{RelativePoseEstimating_1.input}", + "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", + "pairs": "{RelativePoseEstimating_1.output}" }, "internalInputs": { - "color": "#302e2e" + "color": "#80766f" } }, - "DistortionCalibration_1": { - "nodeType": "DistortionCalibration", + "Publish_1": { + "nodeType": "Publish", "position": [ - -200, - -160 + 1800, + 0 ], "inputs": { - "input": "{CheckerboardDetection_1.input}", - "checkerboards": "{CheckerboardDetection_1.output}" - }, - "internalInputs": { - "color": "#302e2e" + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}" + ] } }, - "ExportDistortion_1": { - "nodeType": "ExportDistortion", + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", "position": [ - 0, - -160 + 1000, + 0 ], "inputs": { - "input": "{DistortionCalibration_1.output}" + "input": "{TracksBuilding_1.input}", + "tracksFilename": "{TracksBuilding_1.output}", + "enforcePureRotation": true }, "internalInputs": { - "color": "#302e2e" + "color": "#80766f" } }, - "ApplyCalibration_1": { - "nodeType": "ApplyCalibration", + "ScenePreview_1": { + "nodeType": "ScenePreview", "position": [ - 0, - 0 + 1600, + 200 ], "inputs": { - "input": "{CameraInit_1.output}", - "calibration": "{DistortionCalibration_1.output}" + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{NodalSfM_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentation_1.output}", + "pointCloudParams": { + "particleSize": 0.001, + "particleColor": "Red" + } }, "internalInputs": { - "color": "#80766f" + "color": "#4c594c" } }, - "CameraInit_2": { - "nodeType": "CameraInit", + "TracksBuilding_1": { + "nodeType": "TracksBuilding", "position": [ - -600, - -160 + 800, + 0 ], - "inputs": {}, + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ] + }, "internalInputs": { - "label": "CameraInitLensGrid", - "color": "#302e2e" + "color": "#80766f" } } } diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 3577f0ed6a..b7711aadd6 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -5,58 +5,72 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "FeatureMatching": "2.0", - "ExportAnimatedCamera": "2.0", - "ScenePreview": "2.0", + "CameraInit": "10.0", "ConvertSfMFormat": "2.0", + "ExportAnimatedCamera": "2.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", "ImageMatching": "2.0", - "CameraInit": "10.0", - "Publish": "1.3", "ImageSegmentation": "1.2", - "RelativePoseEstimating": "2.0", - "FeatureExtraction": "1.3", "NodalSfM": "2.0", + "Publish": "1.3", + "RelativePoseEstimating": "2.0", + "ScenePreview": "2.0", "TracksBuilding": "1.0" } }, "graph": { - "ImageMatching_1": { - "nodeType": "ImageMatching", + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 400, + -200, 0 ], + "inputs": {}, + "internalInputs": { + "color": "#80766f" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 1400, + 200 + ], "inputs": { - "input": "{FeatureExtraction_1.input}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ] + "input": "{NodalSfM_1.output}", + "fileExt": "sfm", + "structure": false, + "observations": false }, "internalInputs": { - "color": "#80766f" + "color": "#4c594c" } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", "position": [ - 200, + 1400, 0 ], "inputs": { - "input": "{ImageSegmentation_1.input}", - "masksFolder": "{ImageSegmentation_1.output}" + "input": "{NodalSfM_1.output}", + "exportUndistortedImages": true }, "internalInputs": { "color": "#80766f" } }, - "CameraInit_1": { - "nodeType": "CameraInit", + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - -200, + 200, 0 ], - "inputs": {}, + "inputs": { + "input": "{ImageSegmentation_1.input}", + "masksFolder": "{ImageSegmentation_1.output}" + }, "internalInputs": { "color": "#80766f" } @@ -77,33 +91,32 @@ "color": "#80766f" } }, - "TracksBuilding_1": { - "nodeType": "TracksBuilding", + "ImageMatching_1": { + "nodeType": "ImageMatching", "position": [ - 800, + 400, 0 ], "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" ] }, "internalInputs": { "color": "#80766f" } }, - "RelativePoseEstimating_1": { - "nodeType": "RelativePoseEstimating", + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", "position": [ - 1000, + 0, 0 ], "inputs": { - "input": "{TracksBuilding_1.input}", - "tracksFilename": "{TracksBuilding_1.output}", - "enforcePureRotation": true + "input": "{CameraInit_1.output}", + "maskInvert": true, + "keepFilename": true }, "internalInputs": { "color": "#80766f" @@ -124,34 +137,32 @@ "color": "#80766f" } }, - "ExportAnimatedCamera_1": { - "nodeType": "ExportAnimatedCamera", + "Publish_1": { + "nodeType": "Publish", "position": [ - 1400, + 1800, 0 ], "inputs": { - "input": "{NodalSfM_1.output}", - "exportUndistortedImages": true - }, - "internalInputs": { - "color": "#80766f" + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{ScenePreview_1.output}" + ] } }, - "ConvertSfMFormat_1": { - "nodeType": "ConvertSfMFormat", + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", "position": [ - 1400, - 200 + 1000, + 0 ], "inputs": { - "input": "{NodalSfM_1.output}", - "fileExt": "sfm", - "structure": false, - "observations": false + "input": "{TracksBuilding_1.input}", + "tracksFilename": "{TracksBuilding_1.output}", + "enforcePureRotation": true }, "internalInputs": { - "color": "#4c594c" + "color": "#80766f" } }, "ScenePreview_1": { @@ -174,29 +185,18 @@ "color": "#4c594c" } }, - "Publish_1": { - "nodeType": "Publish", + "TracksBuilding_1": { + "nodeType": "TracksBuilding", "position": [ - 1800, + 800, 0 ], "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}", - "{ScenePreview_1.output}" + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" ] - } - }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", - "position": [ - 0, - 0 - ], - "inputs": { - "input": "{CameraInit_1.output}", - "maskInvert": true, - "keepFilename": true }, "internalInputs": { "color": "#80766f" diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 57dcaa061b..7df104761b 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,52 +1,78 @@ { "header": { "nodesVersions": { + "CameraInit": "10.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", "LdrToHdrCalibration": "3.1", + "LdrToHdrMerge": "4.1", "LdrToHdrSampling": "4.0", - "PanoramaSeams": "2.0", - "PanoramaWarping": "1.1", - "PanoramaPostProcessing": "2.0", - "ImageMatching": "2.0", - "PanoramaPrepareImages": "1.1", "PanoramaCompositing": "2.0", - "SfMTransform": "3.1", - "PanoramaInit": "2.0", "PanoramaEstimation": "1.0", - "FeatureExtraction": "1.3", + "PanoramaInit": "2.0", "PanoramaMerging": "1.0", - "LdrToHdrMerge": "4.1", + "PanoramaPostProcessing": "2.0", + "PanoramaPrepareImages": "1.1", + "PanoramaSeams": "2.0", + "PanoramaWarping": "1.1", "Publish": "1.3", - "CameraInit": "10.0", - "FeatureMatching": "2.0" + "SfMTransform": "3.1" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true }, "graph": { - "LdrToHdrMerge_1": { - "nodeType": "LdrToHdrMerge", + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 800, + 0, + 0 + ], + "inputs": {} + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 1200, 0 ], "inputs": { - "input": "{LdrToHdrCalibration_1.input}", - "response": "{LdrToHdrCalibration_1.response}", - "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", - "byPass": "{LdrToHdrCalibration_1.byPass}", - "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", - "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" + "input": "{PanoramaInit_1.outSfMData}", + "describerTypes": [ + "sift" + ], + "describerPreset": "high", + "describerQuality": "high" } }, - "PanoramaWarping_1": { - "nodeType": "PanoramaWarping", + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 2200, + 1600, 0 ], "inputs": { - "input": "{SfMTransform_1.output}" + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "minRequired2DMotion": 5.0 + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 1400, + 0 + ], + "inputs": { + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "FrustumOrVocabularyTree" } }, "LdrToHdrCalibration_1": { @@ -65,6 +91,21 @@ "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" } }, + "LdrToHdrMerge_1": { + "nodeType": "LdrToHdrMerge", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{LdrToHdrCalibration_1.input}", + "response": "{LdrToHdrCalibration_1.response}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "byPass": "{LdrToHdrCalibration_1.byPass}", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", + "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" + } + }, "LdrToHdrSampling_1": { "nodeType": "LdrToHdrSampling", "position": [ @@ -75,68 +116,57 @@ "input": "{PanoramaPrepareImages_1.output}" } }, - "ImageMatching_1": { - "nodeType": "ImageMatching", + "PanoramaCompositing_1": { + "nodeType": "PanoramaCompositing", "position": [ - 1400, + 2600, 0 ], "inputs": { - "input": "{FeatureExtraction_1.input}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "FrustumOrVocabularyTree" + "input": "{PanoramaSeams_1.outputSfm}", + "warpingFolder": "{PanoramaSeams_1.warpingFolder}", + "labels": "{PanoramaSeams_1.output}", + "useTiling": false } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "PanoramaEstimation_1": { + "nodeType": "PanoramaEstimation", "position": [ - 1200, + 1800, 0 ], "inputs": { - "input": "{PanoramaInit_1.outSfMData}", - "describerTypes": [ - "sift" + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" ], - "describerPreset": "high", - "describerQuality": "high" + "describerTypes": "{FeatureMatching_1.describerTypes}" } }, - "PanoramaMerging_1": { - "nodeType": "PanoramaMerging", + "PanoramaInit_1": { + "nodeType": "PanoramaInit", "position": [ - 2800, + 1000, 0 ], "inputs": { - "input": "{PanoramaCompositing_1.input}", - "compositingFolder": "{PanoramaCompositing_1.output}", - "useTiling": "{PanoramaCompositing_1.useTiling}" + "input": "{LdrToHdrMerge_1.outSfMData}", + "useFisheye": true } }, - "PanoramaCompositing_1": { - "nodeType": "PanoramaCompositing", + "PanoramaMerging_1": { + "nodeType": "PanoramaMerging", "position": [ - 2600, + 2800, 0 ], "inputs": { - "input": "{PanoramaSeams_1.outputSfm}", - "warpingFolder": "{PanoramaSeams_1.warpingFolder}", - "labels": "{PanoramaSeams_1.output}", - "useTiling": false + "input": "{PanoramaCompositing_1.input}", + "compositingFolder": "{PanoramaCompositing_1.output}", + "useTiling": "{PanoramaCompositing_1.useTiling}" } }, - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - 0, - 0 - ], - "inputs": {} - }, "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ @@ -158,17 +188,6 @@ "input": "{CameraInit_1.output}" } }, - "SfMTransform_1": { - "nodeType": "SfMTransform", - "position": [ - 2000, - 0 - ], - "inputs": { - "input": "{PanoramaEstimation_1.output}", - "method": "manual" - } - }, "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ @@ -180,44 +199,14 @@ "warpingFolder": "{PanoramaWarping_1.output}" } }, - "PanoramaEstimation_1": { - "nodeType": "PanoramaEstimation", - "position": [ - 1800, - 0 - ], - "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}" - } - }, - "PanoramaInit_1": { - "nodeType": "PanoramaInit", - "position": [ - 1000, - 0 - ], - "inputs": { - "input": "{LdrToHdrMerge_1.outSfMData}", - "useFisheye": true - } - }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", + "PanoramaWarping_1": { + "nodeType": "PanoramaWarping", "position": [ - 1600, + 2200, 0 ], "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "minRequired2DMotion": 5.0 + "input": "{SfMTransform_1.output}" } }, "Publish_1": { @@ -233,6 +222,17 @@ "{PanoramaPostProcessing_1.downscaledPanoramaLevels}" ] } + }, + "SfMTransform_1": { + "nodeType": "SfMTransform", + "position": [ + 2000, + 0 + ], + "inputs": { + "input": "{PanoramaEstimation_1.output}", + "method": "manual" + } } } } \ No newline at end of file diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index c7ffc25386..c83eadcd84 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,52 +1,74 @@ { "header": { "nodesVersions": { + "CameraInit": "10.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", "LdrToHdrCalibration": "3.1", + "LdrToHdrMerge": "4.1", "LdrToHdrSampling": "4.0", - "PanoramaSeams": "2.0", - "PanoramaWarping": "1.1", - "PanoramaPostProcessing": "2.0", - "ImageMatching": "2.0", - "PanoramaPrepareImages": "1.1", "PanoramaCompositing": "2.0", - "SfMTransform": "3.1", - "PanoramaInit": "2.0", "PanoramaEstimation": "1.0", - "FeatureExtraction": "1.3", + "PanoramaInit": "2.0", "PanoramaMerging": "1.0", - "LdrToHdrMerge": "4.1", + "PanoramaPostProcessing": "2.0", + "PanoramaPrepareImages": "1.1", + "PanoramaSeams": "2.0", + "PanoramaWarping": "1.1", "Publish": "1.3", - "CameraInit": "10.0", - "FeatureMatching": "2.0" + "SfMTransform": "3.1" }, "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true }, "graph": { - "LdrToHdrMerge_1": { - "nodeType": "LdrToHdrMerge", + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 800, + 0, 0 ], + "inputs": {} + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 1000, + 70 + ], "inputs": { - "input": "{LdrToHdrCalibration_1.input}", - "response": "{LdrToHdrCalibration_1.response}", - "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", - "byPass": "{LdrToHdrCalibration_1.byPass}", - "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", - "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" + "input": "{LdrToHdrMerge_1.outSfMData}", + "describerQuality": "high" } }, - "PanoramaWarping_1": { - "nodeType": "PanoramaWarping", + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 2000, + 1400, 0 ], "inputs": { - "input": "{SfMTransform_1.output}" + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "minRequired2DMotion": 5.0 + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 1200, + 0 + ], + "inputs": { + "input": "{PanoramaInit_1.outSfMData}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "FrustumOrVocabularyTree" } }, "LdrToHdrCalibration_1": { @@ -65,6 +87,21 @@ "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" } }, + "LdrToHdrMerge_1": { + "nodeType": "LdrToHdrMerge", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{LdrToHdrCalibration_1.input}", + "response": "{LdrToHdrCalibration_1.response}", + "userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}", + "byPass": "{LdrToHdrCalibration_1.byPass}", + "channelQuantizationPower": "{LdrToHdrCalibration_1.channelQuantizationPower}", + "workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}" + } + }, "LdrToHdrSampling_1": { "nodeType": "LdrToHdrSampling", "position": [ @@ -75,29 +112,41 @@ "input": "{PanoramaPrepareImages_1.output}" } }, - "ImageMatching_1": { - "nodeType": "ImageMatching", + "PanoramaCompositing_1": { + "nodeType": "PanoramaCompositing", "position": [ - 1200, + 2400, 0 ], "inputs": { - "input": "{PanoramaInit_1.outSfMData}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" + "input": "{PanoramaSeams_1.outputSfm}", + "warpingFolder": "{PanoramaSeams_1.warpingFolder}", + "labels": "{PanoramaSeams_1.output}" + } + }, + "PanoramaEstimation_1": { + "nodeType": "PanoramaEstimation", + "position": [ + 1600, + 0 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" ], - "method": "FrustumOrVocabularyTree" + "describerTypes": "{FeatureMatching_1.describerTypes}" } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "PanoramaInit_1": { + "nodeType": "PanoramaInit", "position": [ 1000, - 70 + -50 ], "inputs": { - "input": "{LdrToHdrMerge_1.outSfMData}", - "describerQuality": "high" + "input": "{LdrToHdrMerge_1.outSfMData}" } }, "PanoramaMerging_1": { @@ -112,26 +161,6 @@ "useTiling": "{PanoramaCompositing_1.useTiling}" } }, - "PanoramaCompositing_1": { - "nodeType": "PanoramaCompositing", - "position": [ - 2400, - 0 - ], - "inputs": { - "input": "{PanoramaSeams_1.outputSfm}", - "warpingFolder": "{PanoramaSeams_1.warpingFolder}", - "labels": "{PanoramaSeams_1.output}" - } - }, - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - 0, - 0 - ], - "inputs": {} - }, "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ @@ -154,17 +183,6 @@ "input": "{CameraInit_1.output}" } }, - "SfMTransform_1": { - "nodeType": "SfMTransform", - "position": [ - 1800, - 0 - ], - "inputs": { - "input": "{PanoramaEstimation_1.output}", - "method": "manual" - } - }, "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ @@ -176,43 +194,14 @@ "warpingFolder": "{PanoramaWarping_1.output}" } }, - "PanoramaEstimation_1": { - "nodeType": "PanoramaEstimation", - "position": [ - 1600, - 0 - ], - "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}" - } - }, - "PanoramaInit_1": { - "nodeType": "PanoramaInit", - "position": [ - 1000, - -50 - ], - "inputs": { - "input": "{LdrToHdrMerge_1.outSfMData}" - } - }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", + "PanoramaWarping_1": { + "nodeType": "PanoramaWarping", "position": [ - 1400, + 2000, 0 ], "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "minRequired2DMotion": 5.0 + "input": "{SfMTransform_1.output}" } }, "Publish_1": { @@ -228,6 +217,17 @@ "{PanoramaPostProcessing_1.downscaledPanoramaLevels}" ] } + }, + "SfMTransform_1": { + "nodeType": "SfMTransform", + "position": [ + 1800, + 0 + ], + "inputs": { + "input": "{PanoramaEstimation_1.output}", + "method": "manual" + } } } } \ No newline at end of file diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 5d072870a9..484b997c28 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -1,71 +1,76 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { - "StructureFromMotion": "3.3", + "CameraInit": "10.0", "DepthMap": "5.0", - "Meshing": "7.0", + "DepthMapFilter": "4.0", + "FeatureExtraction": "1.3", "FeatureMatching": "2.0", - "CameraInit": "10.0", - "Texturing": "6.0", + "ImageMatching": "2.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", "PrepareDenseScene": "3.1", "Publish": "1.3", - "MeshFiltering": "3.0", - "FeatureExtraction": "1.3", - "DepthMapFilter": "4.0", - "ImageMatching": "2.0" + "StructureFromMotion": "3.3", + "Texturing": "6.0" } }, "graph": { - "Publish_1": { - "nodeType": "Publish", + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 2200, + 0, + 0 + ], + "inputs": {} + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 1400, 0 ], "inputs": { - "inputFiles": [ - "{Texturing_1.outputMesh}", - "{Texturing_1.outputMaterial}", - "{Texturing_1.outputTextures}" - ] + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" } }, - "Texturing_1": { - "nodeType": "Texturing", + "DepthMap_1": { + "nodeType": "DepthMap", "position": [ - 2000, + 1200, 0 ], "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{DepthMap_1.imagesFolder}", - "inputMesh": "{MeshFiltering_1.outputMesh}" + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}" } }, - "Meshing_1": { - "nodeType": "Meshing", + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - 1600, + 200, 0 ], "inputs": { - "input": "{DepthMapFilter_1.input}", - "depthMapsFolder": "{DepthMapFilter_1.output}" + "input": "{CameraInit_1.output}" } }, - "DepthMapFilter_1": { - "nodeType": "DepthMapFilter", + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 1400, + 600, 0 ], "inputs": { - "input": "{DepthMap_1.input}", - "depthMapsFolder": "{DepthMap_1.output}" + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" } }, "ImageMatching_1": { @@ -81,29 +86,25 @@ ] } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "MeshFiltering_1": { + "nodeType": "MeshFiltering", "position": [ - 200, + 1800, 0 ], "inputs": { - "input": "{CameraInit_1.output}" + "inputMesh": "{Meshing_1.outputMesh}" } }, - "StructureFromMotion_1": { - "nodeType": "StructureFromMotion", + "Meshing_1": { + "nodeType": "Meshing", "position": [ - 800, + 1600, 0 ], "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}" + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}" } }, "PrepareDenseScene_1": { @@ -116,46 +117,45 @@ "input": "{StructureFromMotion_1.output}" } }, - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - 0, - 0 - ], - "inputs": {} - }, - "DepthMap_1": { - "nodeType": "DepthMap", + "Publish_1": { + "nodeType": "Publish", "position": [ - 1200, + 2200, 0 ], "inputs": { - "input": "{PrepareDenseScene_1.input}", - "imagesFolder": "{PrepareDenseScene_1.output}" + "inputFiles": [ + "{Texturing_1.outputMesh}", + "{Texturing_1.outputMaterial}", + "{Texturing_1.outputTextures}" + ] } }, - "MeshFiltering_1": { - "nodeType": "MeshFiltering", + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", "position": [ - 1800, + 800, 0 ], "inputs": { - "inputMesh": "{Meshing_1.outputMesh}" + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" } }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", + "Texturing_1": { + "nodeType": "Texturing", "position": [ - 600, + 2000, 0 ], "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "input": "{Meshing_1.output}", + "imagesFolder": "{DepthMap_1.imagesFolder}", + "inputMesh": "{MeshFiltering_1.outputMesh}" } } } diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 695a9a91c2..92cb8d6159 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,32 +5,46 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "ExportAnimatedCamera": "2.0", - "Texturing": "6.0", - "ImageMatching": "2.0", - "Publish": "1.3", - "MeshFiltering": "3.0", - "MeshDecimate": "1.0", - "DepthMapFilter": "4.0", - "ExportDistortion": "1.0", - "PrepareDenseScene": "3.1", - "ImageMatchingMultiSfM": "1.0", - "Meshing": "7.0", - "KeyframeSelection": "5.0", - "CheckerboardDetection": "1.0", "ApplyCalibration": "1.0", + "CameraInit": "10.0", + "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", - "StructureFromMotion": "3.3", + "DepthMapFilter": "4.0", "DistortionCalibration": "4.0", + "ExportAnimatedCamera": "2.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", "FeatureMatching": "2.0", - "ScenePreview": "2.0", + "ImageMatching": "2.0", + "ImageMatchingMultiSfM": "1.0", "ImageSegmentation": "1.2", - "FeatureExtraction": "1.3", - "CameraInit": "10.0" + "KeyframeSelection": "5.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "ScenePreview": "2.0", + "StructureFromMotion": "3.3", + "Texturing": "6.0" } }, "graph": { + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, "CameraInit_1": { "nodeType": "CameraInit", "position": [ @@ -43,121 +57,102 @@ "color": "#575963" } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", + "CameraInit_2": { + "nodeType": "CameraInit", "position": [ - 200, - 200 + -600, + -160 ], - "inputs": { - "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentation_1.output}", - "maskExtension": "exr" - }, + "inputs": {}, "internalInputs": { - "color": "#575963" + "label": "InitLensGrid", + "color": "#302e2e" } }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", + "CameraInit_3": { + "nodeType": "CameraInit", "position": [ - 600, - 0 + -594, + -584 ], - "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" - }, + "inputs": {}, "internalInputs": { - "label": "FeatureMatchingKeyframes", - "color": "#575963" + "label": "InitPhotogrammetry", + "color": "#384a55" } }, - "ImageMatchingMultiSfM_1": { - "nodeType": "ImageMatchingMultiSfM", + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", "position": [ - 1000, - 200 + -400, + -160 ], "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataFrames}", - "inputB": "{StructureFromMotion_2.output}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "VocabularyTree", - "matchingMode": "a/b", - "nbMatches": 20 + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true }, "internalInputs": { - "color": "#80766f" + "color": "#302e2e" } }, - "ImageMatching_1": { - "nodeType": "ImageMatching", + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", "position": [ - 400, - 0 + 1948, + 211 ], "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "Exhaustive" + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "sfm", + "describerTypes": "{StructureFromMotion_1.describerTypes}", + "structure": false, + "observations": false }, "internalInputs": { - "label": "ImageMatchingKeyframes", - "color": "#575963" + "color": "#4c594c" } }, - "KeyframeSelection_1": { - "nodeType": "KeyframeSelection", + "DepthMapFilter_2": { + "nodeType": "DepthMapFilter", "position": [ - 200, - 0 + 806, + -584 ], "inputs": { - "inputPaths": [ - "{ApplyCalibration_1.output}" - ], - "maskPaths": [ - "{ImageSegmentation_1.output}" - ] + "input": "{DepthMap_2.input}", + "depthMapsFolder": "{DepthMap_2.output}" }, "internalInputs": { - "color": "#575963" + "color": "#384a55" } }, - "MeshDecimate_1": { - "nodeType": "MeshDecimate", + "DepthMap_2": { + "nodeType": "DepthMap", "position": [ - 1947, - 123 + 606, + -584 ], "inputs": { - "input": "{MeshFiltering_2.outputMesh}", - "simplificationFactor": 0.05 + "input": "{PrepareDenseScene_2.input}", + "imagesFolder": "{PrepareDenseScene_2.output}" }, "internalInputs": { - "color": "#4c594c" + "color": "#384a55" } }, - "Publish_1": { - "nodeType": "Publish", + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", "position": [ - 2362, - -139 + -200, + -160 ], "inputs": { - "inputFiles": [ - "{ExportAnimatedCamera_1.output}", - "{ScenePreview_1.output}", - "{ExportDistortion_1.output}", - "{Texturing_2.output}" - ] + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + }, + "internalInputs": { + "color": "#302e2e" } }, "ExportAnimatedCamera_1": { @@ -175,179 +170,184 @@ "color": "#80766f" } }, - "CheckerboardDetection_1": { - "nodeType": "CheckerboardDetection", + "ExportDistortion_1": { + "nodeType": "ExportDistortion", "position": [ - -400, + 0, -160 ], "inputs": { - "input": "{CameraInit_2.output}", - "useNestedGrids": true, - "exportDebugImages": true + "input": "{DistortionCalibration_1.output}" }, "internalInputs": { "color": "#302e2e" } }, - "DistortionCalibration_1": { - "nodeType": "DistortionCalibration", + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", "position": [ - -200, - -160 + 200, + 200 ], "inputs": { - "input": "{CheckerboardDetection_1.input}", - "checkerboards": "{CheckerboardDetection_1.output}" + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentation_1.output}", + "maskExtension": "exr" }, "internalInputs": { - "color": "#302e2e" + "color": "#575963" } }, - "ExportDistortion_1": { - "nodeType": "ExportDistortion", + "FeatureExtraction_2": { + "nodeType": "FeatureExtraction", "position": [ - 0, - -160 + -394, + -584 ], "inputs": { - "input": "{DistortionCalibration_1.output}" + "input": "{CameraInit_3.output}" }, "internalInputs": { - "color": "#302e2e" + "color": "#384a55" } }, - "ApplyCalibration_1": { - "nodeType": "ApplyCalibration", + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 0, + 600, 0 ], "inputs": { - "input": "{CameraInit_1.output}", - "calibration": "{DistortionCalibration_1.output}" + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" }, "internalInputs": { + "label": "FeatureMatchingKeyframes", "color": "#575963" } }, - "ScenePreview_1": { - "nodeType": "ScenePreview", + "FeatureMatching_2": { + "nodeType": "FeatureMatching", "position": [ - 2148, - 211 + 1200, + 360 ], "inputs": { - "cameras": "{ConvertSfMFormat_1.output}", - "model": "{MeshDecimate_1.output}", - "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}" + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" }, "internalInputs": { - "color": "#4c594c" + "label": "FeatureMatchingAllFrames", + "color": "#80766f" } }, - "ConvertSfMFormat_1": { - "nodeType": "ConvertSfMFormat", + "FeatureMatching_3": { + "nodeType": "FeatureMatching", "position": [ - 1948, - 211 + 1200, + 200 ], "inputs": { - "input": "{ExportAnimatedCamera_1.input}", - "fileExt": "sfm", - "describerTypes": "{StructureFromMotion_1.describerTypes}", - "structure": false, - "observations": false + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" }, "internalInputs": { - "color": "#4c594c" + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" } }, - "StructureFromMotion_1": { - "nodeType": "StructureFromMotion", + "FeatureMatching_4": { + "nodeType": "FeatureMatching", "position": [ - 1400, - 200 + 6, + -584 ], "inputs": { - "input": "{FeatureMatching_3.input}", - "featuresFolders": "{FeatureMatching_3.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_3.output}", - "{FeatureMatching_2.output}" - ], - "describerTypes": "{FeatureMatching_3.describerTypes}", - "nbFirstUnstableCameras": 0, - "maxImagesPerGroup": 0, - "bundleAdjustmentMaxOutliers": -1, - "minInputTrackLength": 5, - "minNumberOfObservationsForTriangulation": 3, - "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5, - "filterTrackForks": true, - "useAutoTransform": false + "input": "{ImageMatching_3.input}", + "featuresFolders": "{ImageMatching_3.featuresFolders}", + "imagePairsList": "{ImageMatching_3.output}", + "describerTypes": "{FeatureExtraction_2.describerTypes}" }, "internalInputs": { - "comment": "Estimate cameras parameters for the complete camera tracking sequence.", - "color": "#80766f" + "color": "#384a55" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", + "FeatureMatching_5": { + "nodeType": "FeatureMatching", "position": [ - 0, - 200 + 607, + -300 ], "inputs": { - "input": "{CameraInit_1.output}", - "maskInvert": true, - "keepFilename": true + "input": "{ImageMatchingMultiSfM_2.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_2.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_2.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" }, "internalInputs": { "color": "#575963" } }, - "StructureFromMotion_2": { - "nodeType": "StructureFromMotion", + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", "position": [ - 800, - 0 + 1000, + 200 ], "inputs": { - "input": "{FeatureMatching_5.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}", - "{FeatureMatching_5.output}" + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{StructureFromMotion_2.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" ], - "describerTypes": "{FeatureMatching_1.describerTypes}", - "lockScenePreviouslyReconstructed": true, - "minAngleForTriangulation": 1.0, - "minAngleForLandmark": 0.5, - "filterTrackForks": true, - "useAutoTransform": false + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageMatchingMultiSfM_2": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 401, + -299 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "inputB": "{StructureFromMotion_3.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive", + "matchingMode": "a/b" }, "internalInputs": { - "comment": "Solve all keyframes first.", - "label": "StructureFromMotionKeyframes", "color": "#575963" } }, - "FeatureMatching_2": { - "nodeType": "FeatureMatching", + "ImageMatching_1": { + "nodeType": "ImageMatching", "position": [ - 1200, - 360 + 400, + 0 ], "inputs": { - "input": "{ImageMatching_2.input}", - "featuresFolders": "{ImageMatching_2.featuresFolders}", - "imagePairsList": "{ImageMatching_2.output}" + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive" }, "internalInputs": { - "label": "FeatureMatchingAllFrames", - "color": "#80766f" + "label": "ImageMatchingKeyframes", + "color": "#575963" } }, "ImageMatching_2": { @@ -368,164 +368,193 @@ "color": "#80766f" } }, - "CameraInit_2": { - "nodeType": "CameraInit", + "ImageMatching_3": { + "nodeType": "ImageMatching", "position": [ - -600, - -160 + -194, + -584 ], - "inputs": {}, + "inputs": { + "input": "{FeatureExtraction_2.input}", + "featuresFolders": [ + "{FeatureExtraction_2.output}" + ] + }, "internalInputs": { - "label": "InitLensGrid", - "color": "#302e2e" + "color": "#384a55" } }, - "Texturing_2": { - "nodeType": "Texturing", + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", "position": [ - 1406, - -584 + 0, + 200 ], "inputs": { - "input": "{Meshing_2.output}", - "imagesFolder": "{DepthMap_2.imagesFolder}", - "inputMesh": "{MeshFiltering_2.outputMesh}" + "input": "{CameraInit_1.output}", + "maskInvert": true, + "keepFilename": true }, "internalInputs": { - "color": "#384a55" + "color": "#575963" } }, - "Meshing_2": { - "nodeType": "Meshing", + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", "position": [ - 1006, - -584 + 200, + 0 ], "inputs": { - "input": "{DepthMapFilter_2.input}", - "depthMapsFolder": "{DepthMapFilter_2.output}" + "inputPaths": [ + "{ApplyCalibration_1.output}" + ], + "maskPaths": [ + "{ImageSegmentation_1.output}" + ] }, "internalInputs": { - "color": "#384a55" + "color": "#575963" } }, - "DepthMapFilter_2": { - "nodeType": "DepthMapFilter", + "MeshDecimate_1": { + "nodeType": "MeshDecimate", "position": [ - 806, - -584 + 1947, + 123 ], "inputs": { - "input": "{DepthMap_2.input}", - "depthMapsFolder": "{DepthMap_2.output}" + "input": "{MeshFiltering_2.outputMesh}", + "simplificationFactor": 0.05 }, "internalInputs": { - "color": "#384a55" + "color": "#4c594c" } }, - "FeatureExtraction_2": { - "nodeType": "FeatureExtraction", + "MeshFiltering_2": { + "nodeType": "MeshFiltering", "position": [ - -394, + 1206, -584 ], "inputs": { - "input": "{CameraInit_3.output}" + "inputMesh": "{Meshing_2.outputMesh}" }, "internalInputs": { "color": "#384a55" } }, - "PrepareDenseScene_2": { - "nodeType": "PrepareDenseScene", + "Meshing_2": { + "nodeType": "Meshing", "position": [ - 406, + 1006, -584 ], "inputs": { - "input": "{StructureFromMotion_3.output}" + "input": "{DepthMapFilter_2.input}", + "depthMapsFolder": "{DepthMapFilter_2.output}" }, "internalInputs": { "color": "#384a55" } }, - "DepthMap_2": { - "nodeType": "DepthMap", + "PrepareDenseScene_2": { + "nodeType": "PrepareDenseScene", "position": [ - 606, + 406, -584 ], "inputs": { - "input": "{PrepareDenseScene_2.input}", - "imagesFolder": "{PrepareDenseScene_2.output}" + "input": "{StructureFromMotion_3.output}" }, "internalInputs": { "color": "#384a55" } }, - "MeshFiltering_2": { - "nodeType": "MeshFiltering", + "Publish_1": { + "nodeType": "Publish", "position": [ - 1206, - -584 + 2362, + -139 ], "inputs": { - "inputMesh": "{Meshing_2.outputMesh}" - }, - "internalInputs": { - "color": "#384a55" + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}", + "{Texturing_2.output}" + ] } }, - "ImageMatchingMultiSfM_2": { - "nodeType": "ImageMatchingMultiSfM", + "ScenePreview_1": { + "nodeType": "ScenePreview", "position": [ - 401, - -299 + 2148, + 211 ], "inputs": { - "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", - "inputB": "{StructureFromMotion_3.output}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "Exhaustive", - "matchingMode": "a/b" + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentation_1.output}" }, "internalInputs": { - "color": "#575963" + "color": "#4c594c" } }, - "FeatureMatching_3": { - "nodeType": "FeatureMatching", + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", "position": [ - 1200, + 1400, 200 ], "inputs": { - "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", - "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", - "imagePairsList": "{ImageMatchingMultiSfM_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_3.output}", + "{FeatureMatching_2.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "nbFirstUnstableCameras": 0, + "maxImagesPerGroup": 0, + "bundleAdjustmentMaxOutliers": -1, + "minInputTrackLength": 5, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5, + "filterTrackForks": true, + "useAutoTransform": false }, "internalInputs": { - "label": "FeatureMatchingFramesToKeyframes", + "comment": "Estimate cameras parameters for the complete camera tracking sequence.", "color": "#80766f" } }, - "ImageMatching_3": { - "nodeType": "ImageMatching", + "StructureFromMotion_2": { + "nodeType": "StructureFromMotion", "position": [ - -194, - -584 + 800, + 0 ], "inputs": { - "input": "{FeatureExtraction_2.input}", - "featuresFolders": [ - "{FeatureExtraction_2.output}" - ] + "input": "{FeatureMatching_5.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}", + "{FeatureMatching_5.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}", + "lockScenePreviouslyReconstructed": true, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5, + "filterTrackForks": true, + "useAutoTransform": false }, "internalInputs": { - "color": "#384a55" + "comment": "Solve all keyframes first.", + "label": "StructureFromMotionKeyframes", + "color": "#575963" } }, "StructureFromMotion_3": { @@ -546,49 +575,20 @@ "color": "#384a55" } }, - "CameraInit_3": { - "nodeType": "CameraInit", - "position": [ - -594, - -584 - ], - "inputs": {}, - "internalInputs": { - "label": "InitPhotogrammetry", - "color": "#384a55" - } - }, - "FeatureMatching_4": { - "nodeType": "FeatureMatching", + "Texturing_2": { + "nodeType": "Texturing", "position": [ - 6, + 1406, -584 ], "inputs": { - "input": "{ImageMatching_3.input}", - "featuresFolders": "{ImageMatching_3.featuresFolders}", - "imagePairsList": "{ImageMatching_3.output}", - "describerTypes": "{FeatureExtraction_2.describerTypes}" + "input": "{Meshing_2.output}", + "imagesFolder": "{DepthMap_2.imagesFolder}", + "inputMesh": "{MeshFiltering_2.outputMesh}" }, "internalInputs": { "color": "#384a55" } - }, - "FeatureMatching_5": { - "nodeType": "FeatureMatching", - "position": [ - 607, - -300 - ], - "inputs": { - "input": "{ImageMatchingMultiSfM_2.outputCombinedSfM}", - "featuresFolders": "{ImageMatchingMultiSfM_2.featuresFolders}", - "imagePairsList": "{ImageMatchingMultiSfM_2.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" - }, - "internalInputs": { - "color": "#575963" - } } } } \ No newline at end of file diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 331f29ba39..1471e5fd5d 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -1,42 +1,51 @@ { "header": { "nodesVersions": { - "StructureFromMotion": "3.3", - "FeatureMatching": "2.0", - "Meshing": "7.0", "CameraInit": "10.0", - "Texturing": "6.0", - "Publish": "1.3", - "MeshFiltering": "3.0", "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", "PrepareDenseScene": "3.1", - "ImageMatching": "2.0" + "Publish": "1.3", + "StructureFromMotion": "3.3", + "Texturing": "6.0" }, - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true }, "graph": { - "Texturing_1": { - "nodeType": "Texturing", + "CameraInit_1": { + "nodeType": "CameraInit", "position": [ - 1600, + 0, + 0 + ], + "inputs": {} + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 200, 0 ], "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{PrepareDenseScene_1.output}", - "inputMesh": "{MeshFiltering_1.outputMesh}" + "input": "{CameraInit_1.output}" } }, - "Meshing_1": { - "nodeType": "Meshing", + "FeatureMatching_1": { + "nodeType": "FeatureMatching", "position": [ - 1200, + 600, 0 ], "inputs": { - "input": "{PrepareDenseScene_1.input}" + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" } }, "ImageMatching_1": { @@ -52,60 +61,34 @@ ] } }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", - "position": [ - 200, - 0 - ], - "inputs": { - "input": "{CameraInit_1.output}" - } - }, - "StructureFromMotion_1": { - "nodeType": "StructureFromMotion", + "MeshFiltering_1": { + "nodeType": "MeshFiltering", "position": [ - 800, + 1400, 0 ], "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}" + "inputMesh": "{Meshing_1.outputMesh}" } }, - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - 0, - 0 - ], - "inputs": {} - }, - "MeshFiltering_1": { - "nodeType": "MeshFiltering", + "Meshing_1": { + "nodeType": "Meshing", "position": [ - 1400, + 1200, 0 ], "inputs": { - "inputMesh": "{Meshing_1.outputMesh}" + "input": "{PrepareDenseScene_1.input}" } }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", "position": [ - 600, + 1000, 0 ], "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}" + "input": "{StructureFromMotion_1.output}" } }, "Publish_1": { @@ -122,14 +105,31 @@ ] } }, - "PrepareDenseScene_1": { - "nodeType": "PrepareDenseScene", + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", "position": [ - 1000, + 800, 0 ], "inputs": { - "input": "{StructureFromMotion_1.output}" + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 1600, + 0 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshFiltering_1.outputMesh}" } } } diff --git a/meshroom/stereoPhotometry.mg b/meshroom/stereoPhotometry.mg index b7a530e1fc..39f3a6879d 100644 --- a/meshroom/stereoPhotometry.mg +++ b/meshroom/stereoPhotometry.mg @@ -1,15 +1,15 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2023.3.0", + "releaseVersion": "2024.1.0-develop", "fileVersion": "1.1", "template": true, "nodesVersions": { - "PhotometricStereo": "1.0", "CameraInit": "10.0", - "SphereDetection": "1.0", "LightingCalibration": "1.0", - "Publish": "1.3" + "PhotometricStereo": "1.0", + "Publish": "1.3", + "SphereDetection": "1.0" } }, "graph": { @@ -21,17 +21,6 @@ ], "inputs": {} }, - "SphereDetection_1": { - "nodeType": "SphereDetection", - "position": [ - 200, - 0 - ], - "inputs": { - "input": "{CameraInit_1.output}", - "autoDetect": true - } - }, "LightingCalibration_1": { "nodeType": "LightingCalibration", "position": [ @@ -70,6 +59,17 @@ "{PhotometricStereo_1.outputSfmDataAlbedo}" ] } + }, + "SphereDetection_1": { + "nodeType": "SphereDetection", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "autoDetect": true + } } } } \ No newline at end of file From c792d25c7660fe54695b1784b93cf76742fae19e Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 21 Jun 2024 15:58:36 +0200 Subject: [PATCH 0991/1093] add 3de undistortion models --- meshroom/aliceVision/CameraInit.py | 24 +++---------------- meshroom/aliceVision/DistortionCalibration.py | 4 ++-- meshroom/aliceVision/ExportDistortion.py | 2 +- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 8c822c7ccf..feb39e56d7 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "10.0" +__version__ = "11.0" import os import json @@ -138,12 +138,9 @@ " - radialk3pt: radial distortion with three parameters and normalized with the sum of parameters (Best for equidistant cameras).\n" " - brown: distortion with 3 radial and 2 tangential parameters.\n" " - fisheye1: distortion with 1 parameter suited for fisheye optics (like 120deg FoV).\n" - " - fisheye4: distortion with 4 parameters suited for fisheye optics (like 120deg FoV).\n" - " - 3deanamorphic4: Pinhole camera with 4 anamorphic distortion coefficients.\n" - " - 3declassicld: Pinhole camera with 10 anamorphic distortion coefficients.\n" - " - 3deradial4: Pinhole camera with 3DE radial4 model.\n", + " - fisheye4: distortion with 4 parameters suited for fisheye optics (like 120deg FoV).\n", value="radialk3", - values=["none", "radialk1", "radialk3", "radialk3pt", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3declassicld", "3deradial4"], + values=["none", "radialk1", "radialk3", "radialk3pt", "brown", "fisheye4", "fisheye1"], exclusive=True, uid=[0], ), @@ -551,11 +548,6 @@ def upgradeTypes(self, intrinsic, itype): intrinsic['distortionType'] = "radialk3" intrinsic['undistortionType'] = "none" - elif itype == "3deradial4": - intrinsic['type'] = "pinhole" - intrinsic['distortionType'] = "3deradial4" - intrinsic['undistortionType'] = "none" - elif itype == "brown": intrinsic['type'] = "pinhole" intrinsic['distortionType'] = "brown" @@ -571,16 +563,6 @@ def upgradeTypes(self, intrinsic, itype): intrinsic['distortionType'] = "fisheye1" intrinsic['undistortionType'] = "none" - elif itype == "3deanamorphic4": - intrinsic['type'] = "pinhole" - intrinsic['distortionType'] = "none" - intrinsic['undistortionType'] = "3deanamorphic4" - - elif itype == "3declassicld": - intrinsic['type'] = "pinhole" - intrinsic['distortionType'] = "3declassicld" - intrinsic['undistortionType'] = "none" - elif itype == "equidistant": intrinsic['type'] = "equidistant" intrinsic['distortionType'] = "none" diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index c614c9425e..4ca4a03968 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -1,4 +1,4 @@ -__version__ = '4.0' +__version__ = '5.0' from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL @@ -33,7 +33,7 @@ class DistortionCalibration(desc.AVCommandLineNode): label="Undistortion Model", description="model used to estimate undistortion.", value="3deanamorphic4", - values=["3deanamorphic4"], + values=["3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, uid=[0], ), diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 9368e53196..9019827aee 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -24,7 +24,7 @@ class ExportDistortion(desc.AVCommandLineNode): name="exportNukeNode", label="Export Nuke Node", description="Export Nuke LensDistortion node as nuke file.\n" - "Only supports 3DEqualizer/3DE4 Anamorphic lens model.", + "Only supports 3DEqualizer lens models.", value=True, uid=[0], ), From d90e4311ade9930cfc02af1d61ccf74abb2f872a Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 21 Jun 2024 15:58:42 +0200 Subject: [PATCH 0992/1093] Update pipelines --- meshroom/cameraTracking.mg | 4 ++-- meshroom/cameraTrackingWithoutCalibration.mg | 2 +- meshroom/distortionCalibration.mg | 5 +++-- meshroom/hdrFusion.mg | 2 +- meshroom/nodalCameraTracking.mg | 4 ++-- meshroom/nodalCameraTrackingWithoutCalibration.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 4 ++-- meshroom/photogrammetryDraft.mg | 2 +- meshroom/stereoPhotometry.mg | 2 +- 12 files changed, 17 insertions(+), 16 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 4d8c15f01f..8b1e7a9110 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -6,12 +6,12 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "10.0", + "CameraInit": "11.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", "DepthMapFilter": "4.0", - "DistortionCalibration": "4.0", + "DistortionCalibration": "5.0", "ExportAnimatedCamera": "2.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 7bebfd9b0c..71468eb394 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -6,7 +6,7 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "10.0", + "CameraInit": "11.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", "DepthMapFilter": "4.0", diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index 381a085a6b..5300622bc6 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -5,9 +5,9 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "CheckerboardDetection": "1.0", - "DistortionCalibration": "4.0", + "DistortionCalibration": "5.0", "ExportDistortion": "1.0", "Publish": "1.3" } @@ -29,6 +29,7 @@ ], "inputs": { "input": "{CameraInit_1.output}", + "useNestedGrids": true, "exportDebugImages": true } }, diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index f901f68884..1b70e3f3af 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "LdrToHdrCalibration": "3.1", "LdrToHdrMerge": "4.1", "LdrToHdrSampling": "4.0", diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 26e6108958..6eca9099c7 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -6,10 +6,10 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "10.0", + "CameraInit": "11.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", - "DistortionCalibration": "4.0", + "DistortionCalibration": "5.0", "ExportAnimatedCamera": "2.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index b7711aadd6..226bd621fd 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -5,7 +5,7 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", "FeatureExtraction": "1.3", diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 7df104761b..d4efc083ee 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index c83eadcd84..6ab09d8ae5 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index 484b997c28..ab42fa33fa 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -5,7 +5,7 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "DepthMap": "5.0", "DepthMapFilter": "4.0", "FeatureExtraction": "1.3", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 92cb8d6159..31339d0dd3 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -6,12 +6,12 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "10.0", + "CameraInit": "11.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", "DepthMapFilter": "4.0", - "DistortionCalibration": "4.0", + "DistortionCalibration": "5.0", "ExportAnimatedCamera": "2.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 1471e5fd5d..d6289bd2e4 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/stereoPhotometry.mg b/meshroom/stereoPhotometry.mg index 39f3a6879d..c4d31df292 100644 --- a/meshroom/stereoPhotometry.mg +++ b/meshroom/stereoPhotometry.mg @@ -5,7 +5,7 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "CameraInit": "10.0", + "CameraInit": "11.0", "LightingCalibration": "1.0", "PhotometricStereo": "1.0", "Publish": "1.3", From 33a9b7cc35bfa3b78fc4c76f033963ca4c432adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 10 Jul 2024 17:51:48 +0200 Subject: [PATCH 0993/1093] [nodes] SphereDetection: Increase max value for `sphereRadius` --- meshroom/aliceVision/SphereDetection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 5a782bb0dc..c8a9de7255 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -73,7 +73,7 @@ class SphereDetection(desc.CommandLineNode): label="Radius", description="Sphere radius in pixels.", value=500.0, - range=(0.0, 1000.0, 0.1), + range=(0.0, 10000.0, 0.1), enabled=lambda node: not node.autoDetect.value, uid=[0], ), From 2662b638e18d06c2edc4059d2679553a52038011 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 11 Jul 2024 13:59:29 +0200 Subject: [PATCH 0994/1093] Add squeeze option --- meshroom/aliceVision/DistortionCalibration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 4ca4a03968..8d91f25bd8 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -37,6 +37,13 @@ class DistortionCalibration(desc.AVCommandLineNode): exclusive=True, uid=[0], ), + desc.BoolParam( + name="handleSqueeze", + label="Handle Squeeze", + description="Estimate squeeze.", + value=True, + uid=[0], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From d6888ef4942f6a1d1d6b0c314d27aea08c7e5d0b Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 28 May 2024 17:07:02 +0200 Subject: [PATCH 0995/1093] add sfmExpanding --- meshroom/aliceVision/SfmExpanding.py | 186 +++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 meshroom/aliceVision/SfmExpanding.py diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py new file mode 100644 index 0000000000..336788217f --- /dev/null +++ b/meshroom/aliceVision/SfmExpanding.py @@ -0,0 +1,186 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL + + +class SfMExpanding(desc.AVCommandLineNode): + commandLine = 'aliceVision_sfmExpanding {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Sparse Reconstruction' + documentation = ''' +''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="SfMData file.", + value="", + uid=[0], + ), + desc.File( + name="tracksFilename", + label="Tracks File", + description="Tracks file.", + value="", + uid=[0], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + uid=[], + ), + + desc.IntParam( + name="localizerEstimatorMaxIterations", + label="Localizer Max Ransac Iterations", + description="Maximum number of iterations allowed in the Ransac step.", + value=50000, + range=(1, 100000, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="localizerEstimatorError", + label="Localizer Max Ransac Error", + description="Maximum error (in pixels) allowed for camera localization (resectioning).\n" + "If set to 0, it will select a threshold according to the localizer estimator used\n" + "(if ACRansac, it will analyze the input data to select the optimal value).", + value=0.0, + range=(0.0, 100.0, 0.1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="lockScenePreviouslyReconstructed", + label="Lock Previously Reconstructed Scene", + description="Lock previously reconstructed poses and intrinsics.\n" + "This option is useful for SfM augmentation.", + value=False, + uid=[0], + ), + desc.BoolParam( + name="useLocalBA", + label="Local Bundle Adjustment", + description="It reduces the reconstruction time, especially for large datasets (500+ images),\n" + "by avoiding computation of the Bundle Adjustment on areas that are not changing.", + value=True, + uid=[0], + ), + desc.IntParam( + name="localBAGraphDistance", + label="LocalBA Graph Distance", + description="Graph-distance limit to define the active region in the Local Bundle Adjustment strategy.", + value=1, + range=(2, 10, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name="nbFirstUnstableCameras", + label="First Unstable Cameras Nb", + description="Number of cameras for which the bundle adjustment is performed every single time a camera is added.\n" + "This leads to more stable results while computations are not too expensive, as there is little data.\n" + "Past this number, the bundle adjustment will only be performed once for N added cameras.", + value=30, + range=(0, 100, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name="maxImagesPerGroup", + label="Max Images Per Group", + description="Maximum number of cameras that can be added before the bundle adjustment has to be performed again.\n" + "This prevents adding too much data at once without performing the bundle adjustment.", + value=30, + range=(0, 100, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name="bundleAdjustmentMaxOutliers", + label="Max Nb Of Outliers After BA", + description="Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.\n" + "Using a negative value for this threshold will disable BA iterations.", + value=50, + range=(-1, 1000, 1), + uid=[0], + advanced=True, + ), + desc.IntParam( + name="minNumberOfObservationsForTriangulation", + label="Min Observations For Triangulation", + description="Minimum number of observations to triangulate a point.\n" + "Setting it to 3 (or more) reduces drastically the noise in the point cloud,\n" + "but the number of final poses is a little bit reduced\n" + "(from 1.5% to 11% on the tested datasets).", + value=2, + range=(2, 10, 1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="minAngleForTriangulation", + label="Min Angle For Triangulation", + description="Minimum angle for triangulation.", + value=3.0, + range=(0.1, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="minAngleForLandmark", + label="Min Angle For Landmark", + description="Minimum angle for landmark.", + value=2.0, + range=(0.1, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="maxReprojectionError", + label="Max Reprojection Error", + description="Maximum reprojection error.", + value=4.0, + range=(0.1, 10.0, 0.1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="lockAllIntrinsics", + label="Lock All Intrinsic Camera Parameters", + description="Force to keep all the intrinsic parameters of the cameras (focal length, \n" + "principal point, distortion if any) constant during the reconstruction.\n" + "This may be helpful if the input cameras are already fully calibrated.", + value=False, + uid=[0], + ), + desc.IntParam( + name="minNbCamerasToRefinePrincipalPoint", + label="Min Nb Cameras To Refine Principal Point", + description="Minimum number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera).\n" + "If we do not have enough cameras, the principal point is considered to be in the center of the image.\n" + "If minNbCamerasToRefinePrincipalPoint <= 0, the principal point is never refined." + "If minNbCamerasToRefinePrincipalPoint is set to 1, the principal point is always refined.", + value=3, + range=(0, 20, 1), + uid=[0], + advanced=True, + ), + ] + + outputs = [ + desc.File( + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.json", + uid=[], + ), + ] From d9bfc3a5c9b3a884f586bdb8bc3b5c6288d5658b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 19 Jul 2024 16:38:50 +0200 Subject: [PATCH 0996/1093] Handle already desqueezed images --- meshroom/aliceVision/CheckerboardDetection.py | 7 +++++++ meshroom/aliceVision/DistortionCalibration.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index 94b1aed5b2..ad31ff2973 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/aliceVision/CheckerboardDetection.py @@ -38,6 +38,13 @@ class CheckerboardDetection(desc.AVCommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name="ignorePixelAspectRatio", + label="Ignore Pixel Aspect Ratio", + description="Ignore pixel aspect ratio for detection.", + value=False, + uid=[0], + ), desc.BoolParam( name="exportDebugImages", label="Export Debug Images", diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 8d91f25bd8..0c306b6afc 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -44,6 +44,13 @@ class DistortionCalibration(desc.AVCommandLineNode): value=True, uid=[0], ), + desc.BoolParam( + name="isDesqueezed", + label="Is Desqueezed", + description="True if the input image is already desqueezed.", + value=False, + uid=[0], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From 456b725ea7a92d868b04a57ce32a494874482e65 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 30 Jul 2024 18:00:09 +0200 Subject: [PATCH 0997/1093] alignment from landmarks --- meshroom/aliceVision/SfMAlignment.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 3e4b787a33..04d7cf6250 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -46,9 +46,10 @@ class SfMAlignment(desc.AVCommandLineNode): " - from_cameras_poseid: Align cameras with same pose ID.\n" " - from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'.\n" " - from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'.\n" - " - from_markers: Align from markers with the same ID.\n", + " - from_markers: Align from markers with the same ID.\n" + " - from_landmarks: Align from matched features.\n", value="from_cameras_viewid", - values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers"], + values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers", 'from_landmarks'], exclusive=True, uid=[0], ), From f1d8c400b3638dce69e3c20724ec3309ac94d9d2 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 31 Jul 2024 09:00:38 +0200 Subject: [PATCH 0998/1093] Update sfmMerge node --- meshroom/aliceVision/SfMMerge.py | 37 ++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index ee3c9fff4f..5b0d605b4f 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -1,7 +1,7 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc -from meshroom.core.utils import VERBOSE_LEVEL +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL import os.path @@ -55,6 +55,39 @@ class SfMMerge(desc.AVCommandLineNode): value="", uid=[0], ), + desc.ChoiceParam( + name="method", + label="Merge Method", + description="Merge method:\n" + " - simple copy: Straight copy without duplicate management.\n" + " - from_landmarks: Align from matched features, try to fuse.\n", + value="simple_copy", + values=["simple_copy", 'from_landmarks'], + exclusive=True, + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="matchesFolder", + label="Matches Folder", + description="", + value="", + uid=[0], + ), + name="matchesFolders", + label="Matches Folders", + description="Folder(s) in which the computed matches are stored.", + ), + desc.ChoiceParam( + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + values=DESCRIBER_TYPES, + value=["dspsift"], + exclusive=False, + uid=[0], + joinChar=",", + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From 7427f68edc18b2db1424145148b2f914ce49c1a8 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Mon, 12 Jun 2023 10:19:52 +0200 Subject: [PATCH 0999/1093] [PS] Change name of pipeline --- meshroom/{stereoPhotometry.mg => photometricStereo.mg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename meshroom/{stereoPhotometry.mg => photometricStereo.mg} (100%) diff --git a/meshroom/stereoPhotometry.mg b/meshroom/photometricStereo.mg similarity index 100% rename from meshroom/stereoPhotometry.mg rename to meshroom/photometricStereo.mg From 06de956eaad47a0042d8192a63685e2623389dc4 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Mon, 12 Jun 2023 10:23:03 +0200 Subject: [PATCH 1000/1093] [PS] Add description for NormalIntegration --- meshroom/aliceVision/NormalIntegration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 18888db946..1c96084552 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -7,7 +7,7 @@ class NormalIntegration(desc.CommandLineNode): commandLine = 'aliceVision_normalIntegration {allParams}' category = 'Photometry' documentation = ''' -TODO. +Evaluate a depth map from a normals map (currently in development) ''' inputs = [ From 6a3b52a25d55210898cde3cf433c002bcc4cdf66 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Mon, 12 Jun 2023 10:23:38 +0200 Subject: [PATCH 1001/1093] [PS] Change node category to PhotometricStereo --- meshroom/aliceVision/LightingCalibration.py | 2 +- meshroom/aliceVision/NormalIntegration.py | 2 +- meshroom/aliceVision/PhotometricStereo.py | 2 +- meshroom/aliceVision/SphereDetection.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index c612b6b529..ac6ee308bf 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -6,7 +6,7 @@ class LightingCalibration(desc.CommandLineNode): commandLine = 'aliceVision_lightingCalibration {allParams}' - category = 'Photometry' + category = 'PhotometricStereo' documentation = ''' Evaluate the lighting in a scene using spheres placed in the scene. Can also be used to calibrate a lighting dome (RTI type). diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 1c96084552..e1fcebd7d4 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -5,7 +5,7 @@ class NormalIntegration(desc.CommandLineNode): commandLine = 'aliceVision_normalIntegration {allParams}' - category = 'Photometry' + category = 'PhotometricStereo' documentation = ''' Evaluate a depth map from a normals map (currently in development) ''' diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index f174b12b2e..dfb866a183 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -5,7 +5,7 @@ class PhotometricStereo(desc.CommandLineNode): commandLine = 'aliceVision_photometricStereo {allParams}' - category = 'Photometry' + category = 'PhotometricStereo' documentation = ''' Reconstruction using Photometric Stereo. A normal map is evaluated from several photographs taken from the same point of view, but under different lighting conditions. The lighting conditions are assumed to be known. diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index c8a9de7255..44c4d3699f 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -6,7 +6,7 @@ class SphereDetection(desc.CommandLineNode): commandLine = 'aliceVision_sphereDetection {allParams}' - category = 'Photometry' + category = 'PhotometricStereo' documentation = ''' Detect spheres in pictures. These spheres will be used for lighting calibration. Spheres can be automatically detected or manually defined in the interface. From eb3ed389ace240a99fad17e65ce6a64f518cd8c3 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 13 Sep 2023 16:30:54 +0200 Subject: [PATCH 1002/1093] [nodes] texturing : add normals folder --- meshroom/aliceVision/Texturing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index f67eaf0f85..cce12fc8ed 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -41,6 +41,13 @@ class Texturing(desc.AVCommandLineNode): value="", uid=[0], ), + desc.File( + name="normalsFolder", + label="Normals Folder", + description="Use normal maps from a specific folder to texture the mesh.\nFilename should be : uid_normalMap.", + value="", + uid=[0], + ), desc.File( name="inputMesh", label="Mesh", From ad5850c4209d94b886f45df4d57d16440ac34aee Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Mon, 30 Oct 2023 16:00:47 +0100 Subject: [PATCH 1003/1093] [nodes] Spherical Harmonic Lighting calibration --- meshroom/aliceVision/LightingCalibration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index ac6ee308bf..bcc55cef12 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -39,7 +39,7 @@ class LightingCalibration(desc.CommandLineNode): label="Calibration Method", description="Method used for light calibration.\n" "Use 'brightestPoint' for shiny spheres and 'whiteSphere' for white matte spheres.", - values=["brightestPoint", "whiteSphere"], + values=["brightestPoint", "whiteSphere", "HS"], value="brightestPoint", exclusive=True, uid=[0], From c375479c9a38246bc98a50486791ab21c9e513d4 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Tue, 21 Nov 2023 16:05:35 +0100 Subject: [PATCH 1004/1093] [nodes] Lighting Calibration: add doc + change HS to SH --- meshroom/aliceVision/LightingCalibration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index bcc55cef12..d39d73b994 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -38,8 +38,9 @@ class LightingCalibration(desc.CommandLineNode): name="method", label="Calibration Method", description="Method used for light calibration.\n" - "Use 'brightestPoint' for shiny spheres and 'whiteSphere' for white matte spheres.", - values=["brightestPoint", "whiteSphere", "HS"], + "Use 'brightestPoint' for shiny spheres and 'whiteSphere' for white matte spheres.\n" + "Spherical Harmonic lighting can be estimated using 'SH' method.", + values=["brightestPoint", "whiteSphere", "SH"], value="brightestPoint", exclusive=True, uid=[0], From d7709c17d85090f2d1f6ad22d0a68e8f69409711 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Jun 2024 15:27:08 +0200 Subject: [PATCH 1005/1093] [nodes] Change some input/output names --- meshroom/aliceVision/LightingCalibration.py | 2 +- meshroom/aliceVision/PhotometricStereo.py | 34 +++++++++++++-------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index d39d73b994..e557f3e6a4 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -21,7 +21,7 @@ class LightingCalibration(desc.CommandLineNode): uid=[0], ), desc.File( - name="inputJSON", + name="inputDetection", label="Sphere Detection File", description="Input JSON file containing sphere centers and radiuses.", value="", diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index dfb866a183..1d2ccc8d2f 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -39,7 +39,7 @@ class PhotometricStereo(desc.CommandLineNode): label="Spherical Harmonics Order", description="Order of the spherical harmonics:\n" " - 0: directional.\n" - " - 1: directional + ambiant.\n" + " - 1: directional + ambient.\n" " - 2: second order spherical harmonics.", values=["0", "1", "2"], value="0", @@ -48,9 +48,9 @@ class PhotometricStereo(desc.CommandLineNode): uid=[0], ), desc.BoolParam( - name="removeAmbiant", - label="Remove Ambiant Light", - description="True if the ambiant light is to be removed on the PS images, false otherwise.", + name="removeAmbient", + label="Remove Ambient Light", + description="True if the ambient light is to be removed on the PS images, false otherwise.", value=False, advanced=True, uid=[0], @@ -91,14 +91,6 @@ class PhotometricStereo(desc.CommandLineNode): value=desc.Node.internalFolder, uid=[], ), - desc.File( - name="outputSfmData", - label="SfMData", - description="Output path for the SfMData file.", - value=desc.Node.internalFolder + "/sfmData.sfm", - uid=[], - group="", # remove from command line - ), desc.File( name="outputSfmDataAlbedo", label="SfMData Albedo", @@ -115,6 +107,14 @@ class PhotometricStereo(desc.CommandLineNode): uid=[], group="", # remove from command line ), + desc.File( + name="outputSfmDataNormalPNG", + label="SfMData Normal PNG", + description="Output SfMData file containing the normal maps information.", + value=desc.Node.internalFolder + "/normalMapsPNG.sfm", + uid=[], + group="", # remove from command line + ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) @@ -127,6 +127,15 @@ class PhotometricStereo(desc.CommandLineNode): uid=[], group="", # do not export on the command line ), + desc.File( + name="normalsPNG", + label="Normal Maps Camera (in false colors)", + description="Generated normal maps in the camera coordinate system (in false colors).", + semantic="image", + value=desc.Node.internalFolder + "<POSE_ID>_normals.png", + uid=[], + group="", # do not export on the command line + ), desc.File( name="normalsWorld", label="Normal Maps World", @@ -136,6 +145,7 @@ class PhotometricStereo(desc.CommandLineNode): uid=[], group="", # do not export on the command line ), + desc.File( name="albedo", label="Albedo Maps", From 5e94f631f16f7730004bd2df29613de7941590a4 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Jun 2024 15:27:31 +0200 Subject: [PATCH 1006/1093] [node] Normal integration : export one maps per pose --- meshroom/aliceVision/NormalIntegration.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index e1fcebd7d4..523e862925 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -47,10 +47,12 @@ class NormalIntegration(desc.CommandLineNode): outputs = [ desc.File( - name="outputPath", - label="Output Path", - description="Path to the output folder.", - value=desc.Node.internalFolder, + name="depthMap", + label="Depth Map Camera", + description="Generated depth in the camera coordinate system.", + semantic="image", + value=desc.Node.internalFolder + "<POSE_ID>_depthMap.exr", uid=[], - ), + group="", # do not export on the command line + ) ] From 535cb096fe952f569bcd300d3844654a9be16784 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Jun 2024 15:27:49 +0200 Subject: [PATCH 1007/1093] [nodes] Change output for sphere detection --- meshroom/aliceVision/SphereDetection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 44c4d3699f..bdea74554a 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -91,9 +91,9 @@ class SphereDetection(desc.CommandLineNode): outputs = [ desc.File( name="output", - label="Output Folder", + label="Output Path", description="Sphere detection information will be written here.", - value=desc.Node.internalFolder, - uid=[], - ), + value=desc.Node.internalFolder + "/detection.json", + uid=[] + ) ] From fe5e6e73847d9b846bac6d3ab350914e2da48b65 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Jun 2024 15:35:32 +0200 Subject: [PATCH 1008/1093] [node] LightCalibration : add parameters for elliptic estimation --- meshroom/aliceVision/LightingCalibration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index e557f3e6a4..a09bcdba63 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -34,6 +34,13 @@ class LightingCalibration(desc.CommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name="ellipticEstimation", + label="Use elliptic estimation", + description="Consider the right projection of the sphere. Fit the circle tool on the small axe of the ellipse.", + value=False, + uid=[0], + ), desc.ChoiceParam( name="method", label="Calibration Method", From 8c03a66c49b08aad8a2aca4f65af2e604da1c5bb Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Wed, 5 Jun 2024 16:27:08 +0200 Subject: [PATCH 1009/1093] [pipeline] Update PS pipeline --- meshroom/photometricStereo.mg | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meshroom/photometricStereo.mg b/meshroom/photometricStereo.mg index c4d31df292..e73f235928 100644 --- a/meshroom/photometricStereo.mg +++ b/meshroom/photometricStereo.mg @@ -29,7 +29,7 @@ ], "inputs": { "inputPath": "{SphereDetection_1.input}", - "inputJSON": "{SphereDetection_1.output}" + "inputDetection": "{SphereDetection_1.output}" } }, "PhotometricStereo_1": { @@ -51,12 +51,15 @@ ], "inputs": { "inputFiles": [ - "{PhotometricStereo_1.outputSfmData}", "{PhotometricStereo_1.outputSfmDataNormal}", "{PhotometricStereo_1.normals}", "{PhotometricStereo_1.normalsWorld}", "{PhotometricStereo_1.albedo}", - "{PhotometricStereo_1.outputSfmDataAlbedo}" + "{PhotometricStereo_1.outputSfmDataAlbedo}", + "{PhotometricStereo_1.inputPath}", + "{PhotometricStereo_1.outputSfmDataNormalPNG}", + "{PhotometricStereo_1.normalsPNG}", + "{PhotometricStereo_1.pathToJSONLightFile}" ] } }, @@ -72,4 +75,4 @@ } } } -} \ No newline at end of file +} From 8663da691d5753ce918cf4269234a8998f7a9553 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Thu, 6 Jun 2024 12:36:31 +0200 Subject: [PATCH 1010/1093] [node] PS : expose png albedo --- meshroom/aliceVision/PhotometricStereo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 1d2ccc8d2f..b467622a7b 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -151,7 +151,7 @@ class PhotometricStereo(desc.CommandLineNode): label="Albedo Maps", description="Generated albedo maps.", semantic="image", - value=desc.Node.internalFolder + "<POSE_ID>_albedo.exr", + value=desc.Node.internalFolder + "<POSE_ID>_albedo.png", uid=[], group="", # do not export on the command line ), From 4fdeda4f87cd14a0c0d4d01128842498fcaa20f2 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 27 Aug 2024 14:58:25 +0200 Subject: [PATCH 1011/1093] Use principal point in scenePreview --- meshroom/blender/scripts/preview.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 31cf39cc32..2d6e1a9e8f 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -104,6 +104,13 @@ def setupCamera(intrinsic, pose): camData.sensor_width = float(intrinsic['sensorWidth']) camData.lens = float(intrinsic['focalLength']) + #shift is normalized with the largest resolution + fwidth = float(intrinsic['width']) + fheight = float(intrinsic['height']) + maxSize = max(fwidth, fheight) + camData.shift_x = - float(intrinsic['principalPoint'][0]) / maxSize + camData.shift_y = float(intrinsic['principalPoint'][1]) / maxSize + tr = pose['pose']['transform'] matPose = mathutils.Matrix.Identity(4) matPose[0][0] = float(tr['rotation'][0]) @@ -301,6 +308,7 @@ def setupPointCloudShading(obj, color, size): def main(): + argv = sys.argv if "--" not in argv: From eac7f1ca80817efcfdbf177bfb5d1cace67dcdab Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 30 Aug 2024 15:20:25 +0200 Subject: [PATCH 1012/1093] Add option to use external json file --- meshroom/aliceVision/ApplyCalibration.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 79b59aa2fc..4f351dfd45 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -23,10 +23,17 @@ class ApplyCalibration(desc.AVCommandLineNode): desc.File( name="calibration", label="Calibration", - description="Calibration SfMData file.", + description="Calibration file (Either SfmData or Lens calibration file).", value="", uid=[0], ), + desc.BoolParam( + name="useJson", + label="Use lens calibration file", + description="Use Lens calibration file generated using 3Dequalizer.", + value=False, + uid=[0], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From e8147b724cb0f140386aecf0e6ba8c1fcb4d2587 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 30 Aug 2024 21:25:38 +0200 Subject: [PATCH 1013/1093] Update meshroom/nodes/aliceVision/ApplyCalibration.py --- meshroom/aliceVision/ApplyCalibration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 4f351dfd45..0c02d97a1d 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -29,8 +29,8 @@ class ApplyCalibration(desc.AVCommandLineNode): ), desc.BoolParam( name="useJson", - label="Use lens calibration file", - description="Use Lens calibration file generated using 3Dequalizer.", + label="Use Lens Calibration File", + description="Calibration is a Lens calibration file generated using 3Dequalizer instead of an sfmData.", value=False, uid=[0], ), From 82d709f3517677c680236d01c830dd568baabaad Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 30 Aug 2024 21:27:45 +0200 Subject: [PATCH 1014/1093] Update meshroom/nodes/aliceVision/ApplyCalibration.py --- meshroom/aliceVision/ApplyCalibration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 0c02d97a1d..53d6efe446 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -23,7 +23,7 @@ class ApplyCalibration(desc.AVCommandLineNode): desc.File( name="calibration", label="Calibration", - description="Calibration file (Either SfmData or Lens calibration file).", + description="Calibration file (SfmData or Lens calibration file).", value="", uid=[0], ), From cdcc8d5545bd001212351d09b7122b4aed087f2b Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 2 Sep 2024 09:41:37 +0200 Subject: [PATCH 1015/1093] Add new locks for intrinsics --- meshroom/aliceVision/CameraInit.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index feb39e56d7..c99ac66f89 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -118,6 +118,27 @@ value=True, uid=[0], ), + desc.BoolParam( + name="scaleLocked", + label="Focal length Locked", + description="The focal length is locked for estimation.", + value=False, + uid=[0], + ), + desc.BoolParam( + name="offsetLocked", + label="Optical Center Locked", + description="The optical center coordinates are locked for estimation.", + value=False, + uid=[0], + ), + desc.BoolParam( + name="distortionLocked", + label="Distortion Locked", + description="The distortion parameters are locked for estimation.", + value=False, + uid=[0], + ), desc.ChoiceParam( name="type", label="Camera Type", @@ -677,7 +698,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 8], + "version": [1, 2, 10], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From 59a48a8739ad1bc7a032615b5c37dc7a23581273 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 6 Sep 2024 11:28:14 +0200 Subject: [PATCH 1016/1093] [nodes] LightingCalibration: add visualization --- meshroom/aliceVision/LightingCalibration.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index a09bcdba63..9ba11b0fd6 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -71,4 +71,12 @@ class LightingCalibration(desc.CommandLineNode): value=desc.Node.internalFolder + "/lights.json", uid=[], ), + desc.File( + name="lightingEstimationVisualization", + label="Estimated Lighting Visualization", + description="Estimated Lighting Visualization.", + semantic="image", + value=desc.Node.internalFolder + "/<FILESTEM>_{methodValue}.png", + uid=[], + ), ] From 1b225cf7862f39d275d40fe7d718b333a341281c Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Fri, 6 Sep 2024 21:57:24 +0200 Subject: [PATCH 1017/1093] Add space in category label --- meshroom/aliceVision/LightingCalibration.py | 2 +- meshroom/aliceVision/NormalIntegration.py | 2 +- meshroom/aliceVision/PhotometricStereo.py | 4 ++-- meshroom/aliceVision/SphereDetection.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 9ba11b0fd6..97b795af19 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -6,7 +6,7 @@ class LightingCalibration(desc.CommandLineNode): commandLine = 'aliceVision_lightingCalibration {allParams}' - category = 'PhotometricStereo' + category = 'Photometric Stereo' documentation = ''' Evaluate the lighting in a scene using spheres placed in the scene. Can also be used to calibrate a lighting dome (RTI type). diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 523e862925..0f4567b0a1 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -5,7 +5,7 @@ class NormalIntegration(desc.CommandLineNode): commandLine = 'aliceVision_normalIntegration {allParams}' - category = 'PhotometricStereo' + category = 'Photometric Stereo' documentation = ''' Evaluate a depth map from a normals map (currently in development) ''' diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index b467622a7b..a316821fc8 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -5,7 +5,7 @@ class PhotometricStereo(desc.CommandLineNode): commandLine = 'aliceVision_photometricStereo {allParams}' - category = 'PhotometricStereo' + category = 'Photometric Stereo' documentation = ''' Reconstruction using Photometric Stereo. A normal map is evaluated from several photographs taken from the same point of view, but under different lighting conditions. The lighting conditions are assumed to be known. @@ -145,7 +145,7 @@ class PhotometricStereo(desc.CommandLineNode): uid=[], group="", # do not export on the command line ), - + desc.File( name="albedo", label="Albedo Maps", diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index bdea74554a..5ee3ff368b 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -6,7 +6,7 @@ class SphereDetection(desc.CommandLineNode): commandLine = 'aliceVision_sphereDetection {allParams}' - category = 'PhotometricStereo' + category = 'Photometric Stereo' documentation = ''' Detect spheres in pictures. These spheres will be used for lighting calibration. Spheres can be automatically detected or manually defined in the interface. From 11d0cc9fc62c1eff048b047af806e6602f560ecb Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 9 Sep 2024 12:43:38 +0200 Subject: [PATCH 1018/1093] add lineup to sfmTransform --- meshroom/aliceVision/SfMTransform.py | 29 ++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index b340bfda97..b462954077 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -22,7 +22,7 @@ class SfMTransform(desc.AVCommandLineNode): * from_markers: Align specific markers to custom coordinates * from_gps: Align with the gps positions from the image metadata * align_ground: Detect ground level and align to it - + * from_linup: Align using external lineup file ''' inputs = [ @@ -47,12 +47,37 @@ class SfMTransform(desc.AVCommandLineNode): " - from_center_camera: Defines the coordinate system from the camera closest to the center of the reconstruction.\n" " - from_markers: Defines the coordinate system from markers specified by --markers.\n" " - from_gps: Defines coordinate system from GPS metadata.\n" + " - from_lineup: Defines coordinate system using lineup json file.\n" " - align_ground: Defines ground level from the point cloud density. It assumes that the scene is oriented.", value="auto", - values=["transformation", "manual", "auto", "auto_from_cameras", "auto_from_cameras_x_axis", "auto_from_landmarks", "from_single_camera", "from_center_camera", "from_markers", "from_gps", "align_ground"], + values=["transformation", "manual", "auto", "auto_from_cameras", "auto_from_cameras_x_axis", "auto_from_landmarks", "from_single_camera", "from_center_camera", "from_markers", "from_gps", "from_lineup", "align_ground"], exclusive=True, uid=[0], ), + desc.File( + name="lineUp", + label="LineUp file", + description="LineUp Json file.", + value="", + uid=[0], + enabled=lambda node: node.method.value == "from_lineup" + ), + desc.File( + name="tracksFile", + label="tracks file", + description="Tracks file for lineup.", + value="", + uid=[0], + enabled=lambda node: node.method.value == "from_lineup" + ), + desc.File( + name="objectFile", + label="Mesh file", + description="Mesh file for lineup.", + value="", + uid=[0], + enabled=lambda node: node.method.value == "from_lineup" + ), desc.StringParam( name="transformation", label="Transformation", From a5bf4fb4e7c59b6c1da45e733897591785c22b21 Mon Sep 17 00:00:00 2001 From: "Fabien Servant @ TCS" <100348063+servantftechnicolor@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:06:55 +0200 Subject: [PATCH 1019/1093] Apply suggestions from code review Co-authored-by: Fabien Castan <fabcastan@gmail.com> --- meshroom/aliceVision/SfMTransform.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index b462954077..acf943a803 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -22,7 +22,7 @@ class SfMTransform(desc.AVCommandLineNode): * from_markers: Align specific markers to custom coordinates * from_gps: Align with the gps positions from the image metadata * align_ground: Detect ground level and align to it - * from_linup: Align using external lineup file + * from_lineup: Align using a camera pose (json line up file), tracks and a mesh ''' inputs = [ @@ -56,7 +56,7 @@ class SfMTransform(desc.AVCommandLineNode): ), desc.File( name="lineUp", - label="LineUp file", + label="Line Up File", description="LineUp Json file.", value="", uid=[0], @@ -64,7 +64,7 @@ class SfMTransform(desc.AVCommandLineNode): ), desc.File( name="tracksFile", - label="tracks file", + label="Tracks File", description="Tracks file for lineup.", value="", uid=[0], @@ -72,7 +72,7 @@ class SfMTransform(desc.AVCommandLineNode): ), desc.File( name="objectFile", - label="Mesh file", + label="Mesh File", description="Mesh file for lineup.", value="", uid=[0], From addea834b1abbe43047de10bfd5bc2630e8806bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 5 Sep 2024 12:27:06 +0200 Subject: [PATCH 1020/1093] [nodes] Directly use `internalFolder` variable for outputs' paths --- meshroom/aliceVision/ExportColoredPointCloud.py | 2 +- meshroom/aliceVision/Meshing.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index ae39f79dcf..2e1c9ab4ae 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -35,7 +35,7 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): name="output", label="Point Cloud Filepath", description="Output point cloud with visibilities as SfMData file.", - value="{cache}/{nodeType}/{uid0}/pointCloud.abc", + value=desc.Node.internalFolder + "pointCloud.abc", uid=[], ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index faf442228b..dc8c2e5ae1 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -526,14 +526,14 @@ class Meshing(desc.AVCommandLineNode): name="outputMesh", label="Mesh", description="Output mesh.", - value="{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}", + value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", uid=[], ), desc.File( name="output", label="Dense SfMData", description="Output dense point cloud with visibilities (SfMData file format).", - value="{cache}/{nodeType}/{uid0}/densePointCloud.abc", + value=desc.Node.internalFolder + "densePointCloud.abc", uid=[], ), ] From c054523fe383ab4d372ea02a1477f6865a3de652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 5 Sep 2024 17:05:45 +0200 Subject: [PATCH 1021/1093] [nodes] Change `uid=` into `invalidate=` for all nodes --- meshroom/aliceVision/ApplyCalibration.py | 10 +- meshroom/aliceVision/CameraCalibration.py | 30 ++-- meshroom/aliceVision/CameraInit.py | 86 +++++------ meshroom/aliceVision/CameraLocalization.py | 57 ++++---- meshroom/aliceVision/CameraRigCalibration.py | 42 +++--- meshroom/aliceVision/CameraRigLocalization.py | 44 +++--- .../aliceVision/CheckerboardCalibration.py | 10 +- meshroom/aliceVision/CheckerboardDetection.py | 16 +-- .../aliceVision/ColorCheckerCorrection.py | 14 +- meshroom/aliceVision/ColorCheckerDetection.py | 10 +- meshroom/aliceVision/ConvertDistortion.py | 10 +- meshroom/aliceVision/ConvertMesh.py | 8 +- meshroom/aliceVision/ConvertSfMFormat.py | 22 +-- meshroom/aliceVision/DepthMap.py | 132 ++++++++--------- meshroom/aliceVision/DepthMapFilter.py | 32 ++--- meshroom/aliceVision/DistortionCalibration.py | 14 +- meshroom/aliceVision/ExportAnimatedCamera.py | 26 ++-- .../aliceVision/ExportColoredPointCloud.py | 6 +- meshroom/aliceVision/ExportDistortion.py | 20 +-- meshroom/aliceVision/ExportMatches.py | 12 +- meshroom/aliceVision/ExportMaya.py | 6 +- meshroom/aliceVision/FeatureExtraction.py | 32 ++--- meshroom/aliceVision/FeatureMatching.py | 40 +++--- meshroom/aliceVision/FeatureRepeatability.py | 24 ++-- meshroom/aliceVision/GlobalSfM.py | 22 +-- meshroom/aliceVision/ImageMasking.py | 30 ++-- meshroom/aliceVision/ImageMatching.py | 22 +-- meshroom/aliceVision/ImageMatchingMultiSfM.py | 28 ++-- meshroom/aliceVision/ImageProcessing.py | 136 +++++++++--------- meshroom/aliceVision/ImageSegmentation.py | 18 +-- meshroom/aliceVision/ImportE57.py | 12 +- meshroom/aliceVision/ImportKnownPoses.py | 8 +- meshroom/aliceVision/KeyframeSelection.py | 64 ++++----- meshroom/aliceVision/LdrToHdrCalibration.py | 24 ++-- meshroom/aliceVision/LdrToHdrMerge.py | 44 +++--- meshroom/aliceVision/LdrToHdrSampling.py | 26 ++-- meshroom/aliceVision/LidarDecimating.py | 10 +- meshroom/aliceVision/LidarMerging.py | 6 +- meshroom/aliceVision/LidarMeshing.py | 28 ++-- meshroom/aliceVision/LightingCalibration.py | 16 +-- meshroom/aliceVision/LightingEstimation.py | 18 +-- meshroom/aliceVision/MergeMeshes.py | 14 +- meshroom/aliceVision/MeshDecimate.py | 16 +-- meshroom/aliceVision/MeshDenoising.py | 20 +-- meshroom/aliceVision/MeshFiltering.py | 26 ++-- meshroom/aliceVision/MeshMasking.py | 24 ++-- meshroom/aliceVision/MeshRemoveUnseenFaces.py | 14 +- meshroom/aliceVision/MeshResampling.py | 18 +-- meshroom/aliceVision/Meshing.py | 112 +++++++-------- meshroom/aliceVision/NodalSfM.py | 10 +- meshroom/aliceVision/NormalIntegration.py | 10 +- meshroom/aliceVision/PanoramaCompositing.py | 22 +-- meshroom/aliceVision/PanoramaEstimation.py | 40 +++--- meshroom/aliceVision/PanoramaInit.py | 30 ++-- meshroom/aliceVision/PanoramaMerging.py | 16 +-- .../aliceVision/PanoramaPostProcessing.py | 28 ++-- meshroom/aliceVision/PanoramaPrepareImages.py | 6 +- meshroom/aliceVision/PanoramaSeams.py | 14 +- meshroom/aliceVision/PanoramaWarping.py | 18 +-- meshroom/aliceVision/PhotometricStereo.py | 32 ++--- meshroom/aliceVision/PrepareDenseScene.py | 22 +-- meshroom/aliceVision/Publish.py | 8 +- .../aliceVision/RelativePoseEstimating.py | 10 +- meshroom/aliceVision/SelectConnectedViews.py | 12 +- meshroom/aliceVision/SfMAlignment.py | 22 +-- meshroom/aliceVision/SfMDistances.py | 12 +- meshroom/aliceVision/SfMMerge.py | 14 +- meshroom/aliceVision/SfMSplitReconstructed.py | 8 +- meshroom/aliceVision/SfMToRig.py | 6 +- meshroom/aliceVision/SfMTransfer.py | 22 +-- meshroom/aliceVision/SfMTransform.py | 50 +++---- meshroom/aliceVision/SfMTriangulation.py | 32 ++--- meshroom/aliceVision/SfmBootstraping.py | 10 +- meshroom/aliceVision/SfmExpanding.py | 36 ++--- meshroom/aliceVision/SketchfabUpload.py | 24 ++-- meshroom/aliceVision/SphereDetection.py | 18 +-- meshroom/aliceVision/Split360Images.py | 26 ++-- meshroom/aliceVision/StructureFromMotion.py | 78 +++++----- meshroom/aliceVision/Texturing.py | 80 +++++------ meshroom/aliceVision/TracksBuilding.py | 18 +-- meshroom/blender/ScenePreview.py | 28 ++-- 81 files changed, 1109 insertions(+), 1112 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 53d6efe446..893d3c374c 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -18,21 +18,21 @@ class ApplyCalibration(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="calibration", label="Calibration", description="Calibration file (SfmData or Lens calibration file).", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="useJson", label="Use Lens Calibration File", description="Calibration is a Lens calibration file generated using 3Dequalizer instead of an sfmData.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -40,8 +40,8 @@ class ApplyCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", + invalidate=False, exclusive=True, - uid=[], ), ] @@ -51,6 +51,6 @@ class ApplyCalibration(desc.AVCommandLineNode): label="SMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 41a63724b3..0c853a4e8a 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -20,7 +20,7 @@ class CameraCalibration(desc.AVCommandLineNode): " - image sequence like \"/path/to/seq.@.jpg\".\n" " - video file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="pattern", @@ -29,7 +29,7 @@ class CameraCalibration(desc.AVCommandLineNode): value="CHESSBOARD", values=["CHESSBOARD", "CIRCLES", "ASYMMETRIC_CIRCLES", "ASYMMETRIC_CCTAG"], exclusive=True, - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="size", @@ -42,7 +42,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="", value=7, range=(0, 10000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="height", @@ -50,7 +50,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="", value=5, range=(0, 10000, 1), - uid=[0], + invalidate=True, ), ], ), @@ -60,7 +60,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="Size of the grid's square cells (mm).", value=1.0, range=(0.0, 100.0, 1.0), - uid=[0], + invalidate=True, ), desc.IntParam( name="nbDistortionCoef", @@ -68,7 +68,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="Number of distortion coefficients.", value=3, range=(0, 5, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxFrames", @@ -76,7 +76,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="Maximum number of frames to extract from the video file.", value=0, range=(0, 5, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxCalibFrames", @@ -84,7 +84,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="Maximum number of frames to use to calibrate from the selected frames.", value=100, range=(0, 1000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="calibGridSize", @@ -92,7 +92,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="Define the number of cells per edge.", value=10, range=(0, 50, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minInputFrames", @@ -100,7 +100,7 @@ class CameraCalibration(desc.AVCommandLineNode): description="Minimum number of frames to limit the refinement loop.", value=10, range=(0, 100, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="maxTotalAvgErr", @@ -108,21 +108,21 @@ class CameraCalibration(desc.AVCommandLineNode): description="Maximum total average error.", value=0.10000000000000001, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.File( name="debugRejectedImgFolder", label="Debug Rejected Img Folder", description="Folder to export images that were deleted during the refinement loop.", value="", - uid=[0], + invalidate=True, ), desc.File( name="debugSelectedImgFolder", label="Debug Selected Img Folder", description="Folder to export debug images.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -131,7 +131,7 @@ class CameraCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -141,6 +141,6 @@ class CameraCalibration(desc.AVCommandLineNode): label="Output", description="Output filename for intrinsic [and extrinsic] parameters.", value=desc.Node.internalFolder + "/cameraCalibration.cal", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index c99ac66f89..646a94a0b2 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -17,7 +17,7 @@ label="ID", description="Image UID.", value=-1, - uid=[0], + invalidate=True, range=None, ), desc.IntParam( @@ -25,7 +25,7 @@ label="Pose ID", description="Pose ID.", value=-1, - uid=[0], + invalidate=True, range=None, ), desc.File( @@ -33,14 +33,14 @@ label="Image Path", description="Image filepath.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="intrinsicId", label="Intrinsic", description="Internal camera parameters.", value=-1, - uid=[0], + invalidate=True, range=None, ), desc.IntParam( @@ -48,7 +48,7 @@ label="Rig", description="Rig parameters.", value=-1, - uid=[0], + invalidate=True, range=None, ), desc.IntParam( @@ -56,7 +56,7 @@ label="Rig Sub-Pose", description="Rig sub-pose parameters.", value=-1, - uid=[0], + invalidate=True, range=None, ), desc.StringParam( @@ -70,7 +70,7 @@ " - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be " "differentiated and their internal parameters are optimized separately.", value="", - uid=[], + invalidate=False, advanced=True, ), ] @@ -81,7 +81,7 @@ label="ID", description="Intrinsic UID.", value=-1, - uid=[0], + invalidate=True, range=None, ), desc.FloatParam( @@ -92,7 +92,7 @@ "So this value is used to limit the range of possible values in the optimization.\n" "If this value is set to -1, it will not be used and the focal length will not be bounded.", value=-1.0, - uid=[0], + invalidate=True, range=None, ), desc.FloatParam( @@ -100,7 +100,7 @@ label="Focal Length", description="Known/calibrated focal length (in mm).", value=1000.0, - uid=[0], + invalidate=True, range=(0.0, 10000.0, 1.0), ), desc.FloatParam( @@ -108,7 +108,7 @@ label="Pixel Ratio", description="Ratio between the pixel width and the pixel height.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 10.0, 0.1), ), desc.BoolParam( @@ -116,28 +116,28 @@ label="Pixel Ratio Locked", description="The pixel ratio value is locked for estimation.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="scaleLocked", label="Focal length Locked", description="The focal length is locked for estimation.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="offsetLocked", label="Optical Center Locked", description="The optical center coordinates are locked for estimation.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="distortionLocked", label="Distortion Locked", description="The distortion parameters are locked for estimation.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="type", @@ -148,7 +148,7 @@ value="pinhole", values=["pinhole", "equidistant"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="distortionType", @@ -163,14 +163,14 @@ value="radialk3", values=["none", "radialk1", "radialk3", "radialk3pt", "brown", "fisheye4", "fisheye1"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="width", label="Width", description="Image width.", value=0, - uid=[0], + invalidate=True, range=(0, 10000, 1), ), desc.IntParam( @@ -178,7 +178,7 @@ label="Height", description="Image height.", value=0, - uid=[0], + invalidate=True, range=(0, 10000, 1), ), desc.FloatParam( @@ -186,7 +186,7 @@ label="Sensor Width", description="Sensor width (in mm).", value=36.0, - uid=[0], + invalidate=True, range=(0.0, 1000.0, 1.0), ), desc.FloatParam( @@ -194,7 +194,7 @@ label="Sensor Height", description="Sensor height (in mm).", value=24.0, - uid=[0], + invalidate=True, range=(0.0, 1000.0, 1.0), ), desc.StringParam( @@ -202,7 +202,7 @@ label="Serial Number", description="Device serial number (Camera UID and Lens UID combined).", value="", - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="principalPoint", @@ -214,7 +214,7 @@ label="x", description="", value=0.0, - uid=[0], + invalidate=True, range=(0.0, 10000.0, 1.0), ), desc.FloatParam( @@ -222,7 +222,7 @@ label="y", description="", value=0.0, - uid=[0], + invalidate=True, range=(0.0, 10000.0, 1.0), ), ], @@ -238,7 +238,7 @@ values=["calibrated", "estimated", "unknown", "none"], value="none", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="distortionInitializationMode", @@ -251,7 +251,7 @@ values=["calibrated", "estimated", "unknown", "none"], value="none", exclusive=True, - uid=[0], + invalidate=True, ), desc.ListAttribute( name="distortionParams", @@ -260,7 +260,7 @@ label="", description="", value=0.0, - uid=[0], + invalidate=True, range=(-0.1, 0.1, 0.01), ), label="Distortion Params", @@ -276,7 +276,7 @@ label="x", description="", value=0.0, - uid=[0], + invalidate=True, range=(0.0, 10000.0, 1.0), ), desc.FloatParam( @@ -284,7 +284,7 @@ label="y", description="", value=0.0, - uid=[0], + invalidate=True, range=(0.0, 10000.0, 1.0), ), ], @@ -296,7 +296,7 @@ label="", description="", value=0.0, - uid=[0], + invalidate=True, range=(-0.1, 0.1, 0.01), ), label="Undistortion Params", @@ -307,7 +307,7 @@ label="Locked", description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.", value=False, - uid=[0], + invalidate=True, ), ] @@ -406,21 +406,21 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): label="Sensor Database", description="Camera sensor with database path.", value="${ALICEVISION_SENSOR_DB}", - uid=[], + invalidate=False, ), desc.File( name="lensCorrectionProfileInfo", label="LCP Info", description="Lens Correction Profile filepath or database directory.", value="${ALICEVISION_LENS_PROFILE_INFO}", - uid=[], + invalidate=False, ), desc.BoolParam( name="lensCorrectionProfileSearchIgnoreCameraModel", label="LCP Generic Search", description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -429,7 +429,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): description="Default value for the field of view (in degrees) used as an initialization value when there is no focal or field of view in the image metadata.", value=45.0, range=(0.0, 180.0, 1.0), - uid=[], + invalidate=False, ), desc.ChoiceParam( name="groupCameraFallback", @@ -443,7 +443,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): values=["global", "folder", "image"], value="folder", exclusive=True, - uid=[], + invalidate=False, ), desc.ChoiceParam( name="rawColorInterpretation", @@ -457,7 +457,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", exclusive=True, - uid=[0], + invalidate=True, ), desc.File( name="colorProfileDatabase", @@ -465,7 +465,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): description="Color Profile database directory path.", value="${ALICEVISION_COLOR_PROFILE_DB}", enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), - uid=[], + invalidate=False, ), desc.BoolParam( name="errorOnMissingColorProfile", @@ -474,7 +474,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): "When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.", value=True, enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="viewIdMethod", @@ -485,7 +485,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): value="metadata", values=["metadata", "filename"], exclusive=True, - uid=[], + invalidate=False, advanced=True, ), desc.StringParam( @@ -499,7 +499,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): " - Match the first number found in filename: " r'"(\d+).*"', value=r".*?(\d+)", - uid=[], + invalidate=False, advanced=True, enabled=lambda node: node.viewIdMethod.value == "filename", ), @@ -510,7 +510,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -520,7 +520,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): label="SfMData", description="Output SfMData.", value=desc.Node.internalFolder + "cameraInit.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 29a9cc8ab0..2c4350efa0 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -18,28 +18,28 @@ class CameraLocalization(desc.AVCommandLineNode): label="SfMData", description="The SfMData file generated by AliceVision.", value="", - uid=[0], + invalidate=True, ), desc.File( name="mediafile", label="Media File", description="The folder path or the filename for the media to track.", value="", - uid=[0], + invalidate=True, ), desc.File( name="visualDebug", label="Visual Debug Folder", description="If a folder is provided, this enables visual debug and all the debugging information will be saved in that folder.", value="", - uid=[0], + invalidate=True, ), desc.File( name="descriptorPath", label="Descriptor Path", description="Folder containing the descriptors for all the images (ie. the *.desc.).", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="matchDescTypes", @@ -48,7 +48,7 @@ class CameraLocalization(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -58,7 +58,7 @@ class CameraLocalization(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -67,7 +67,7 @@ class CameraLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -76,21 +76,21 @@ class CameraLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - uid=[0], + invalidate=True, ), desc.File( name="calibration", label="Calibration", description="Calibration file.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="refineIntrinsics", label="Refine Intrinsics", description="Enable/Disable camera intrinsics refinement for each localized image.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="reprojectionError", @@ -98,7 +98,7 @@ class CameraLocalization(desc.AVCommandLineNode): description="Maximum reprojection error (in pixels) allowed for resectioning. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.1, 50.0, 0.1), - uid=[0], + invalidate=True, ), desc.IntParam( name="nbImageMatch", @@ -106,7 +106,7 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Number of images to retrieve in database.", value=4, range=(1, 1000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxResults", @@ -114,7 +114,7 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.", value=10, range=(1, 100, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="commonviews", @@ -122,21 +122,21 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking.", value=3, range=(2, 50, 1), - uid=[0], + invalidate=True, ), desc.File( name="voctree", label="Voctree", description="[voctree] Filename for the vocabulary tree.", value="${ALICEVISION_VOCTREE}", - uid=[0], + invalidate=True, ), desc.File( name="voctreeWeights", label="Voctree Weights", description="[voctree] Filename for the vocabulary tree weights.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -145,7 +145,7 @@ class CameraLocalization(desc.AVCommandLineNode): value="AllResults", values=["FirstBest", "AllResults"], exclusive=True, - uid=[0], + invalidate=True, ), desc.FloatParam( name="matchingError", @@ -153,7 +153,7 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 50.0, 1.0), - uid=[0], + invalidate=True, ), desc.IntParam( name="nbFrameBufferMatching", @@ -161,14 +161,14 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Number of previous frames of the sequence to use for matching (0 = Disable).", value=10, range=(0, 100, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="robustMatching", label="Robust Matching", description="[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.", value=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="nNearestKeyFrames", @@ -176,28 +176,28 @@ class CameraLocalization(desc.AVCommandLineNode): description="[cctag] Number of images to retrieve in the database. Parameters specific for final (optional) bundle adjustment optimization of the sequence.", value=5, range=(1, 100, 1), - uid=[0], + invalidate=True, ), desc.StringParam( name="globalBundle", label="Global Bundle", description="[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="noDistortion", label="No Distortion", description="[bundle adjustment] It does not take into account distortion during the BA, it considers the distortion coefficients to all be equal to 0.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="noBArefineIntrinsics", label="No BA Refine Intrinsics", description="[bundle adjustment] If set to true, does not refine intrinsics during BA.", value=False, - uid=[0], + invalidate=True, ), desc.IntParam( name="minPointVisibility", @@ -205,7 +205,7 @@ class CameraLocalization(desc.AVCommandLineNode): description="[bundle adjustment] Minimum number of observations that a point must have in order to be considered for bundle adjustment.", value=2, range=(2, 50, 1), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -214,7 +214,7 @@ class CameraLocalization(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -224,14 +224,13 @@ class CameraLocalization(desc.AVCommandLineNode): label="Alembic", description="Filename for the SfMData export file (where camera poses will be stored).", value=desc.Node.internalFolder + "trackedCameras.abc", - uid=[], + invalidate=False, ), desc.File( name="outputJSON", label="JSON File", description="Filename for the localization results as .json.", value=desc.Node.internalFolder + "trackedCameras.json", - uid=[], + invalidate=False, ), ] - diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index ac0f42b737..a9097936b2 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -18,7 +18,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="mediapath", @@ -26,28 +26,28 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="The path to the video file, the folder of the image sequence or a text file\n" "(one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", value="", - uid=[0], + invalidate=True, ), desc.File( name="cameraIntrinsics", label="Camera Intrinsics", description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", value="", - uid=[0], + invalidate=True, ), desc.File( name="export", label="Export File", description="Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.", value="trackedcameras.abc", - uid=[0], + invalidate=True, ), desc.File( name="descriptorPath", label="Descriptor Path", description="Folder containing the .desc.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="matchDescTypes", @@ -56,7 +56,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -66,7 +66,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -75,7 +75,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -84,14 +84,14 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - uid=[0], + invalidate=True, ), desc.StringParam( name="refineIntrinsics", label="Refine Intrinsics", description="Enable/Disable camera intrinsics refinement for each localized image.", value="", - uid=[0], + invalidate=True, ), desc.FloatParam( name="reprojectionError", @@ -100,7 +100,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxInputFrames", @@ -108,21 +108,21 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="Maximum number of frames to read in input. 0 means no limit.", value=0, range=(0, 1000, 1), - uid=[0], + invalidate=True, ), desc.File( name="voctree", label="Voctree", description="[voctree] Filename for the vocabulary tree.", value="${ALICEVISION_VOCTREE}", - uid=[0], + invalidate=True, ), desc.File( name="voctreeWeights", label="Voctree Weights", description="[voctree] Filename for the vocabulary tree weights.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -131,7 +131,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="AllResults", values=["FirstBest", "AllResults"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="nbImageMatch", @@ -139,7 +139,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 50, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxResults", @@ -147,7 +147,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If set to 0, it is ignored.", value=10, range=(0, 100, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="matchingError", @@ -156,7 +156,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, ), desc.IntParam( name="nNearestKeyFrames", @@ -164,7 +164,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 1), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -173,7 +173,7 @@ class CameraRigCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -183,6 +183,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): label="Output File", description="The name of the file to store the calibration data in.", value=desc.Node.internalFolder + "cameraRigCalibration.rigCal", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 2c4fc0c179..3147c71841 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -18,35 +18,35 @@ class CameraRigLocalization(desc.AVCommandLineNode): label="SfMData", description="The input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="mediapath", label="Media Path", description="The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", value="", - uid=[0], + invalidate=True, ), desc.File( name="calibration", label="Rig Calibration File", description="The file containing the calibration data for the rig (subposes).", value="", - uid=[0], + invalidate=True, ), desc.File( name="cameraIntrinsics", label="Camera Intrinsics", description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", value="", - uid=[0], + invalidate=True, ), desc.File( name="descriptorPath", label="Descriptor Path", description="Folder containing the .desc.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="matchDescTypes", @@ -55,7 +55,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -65,7 +65,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -74,7 +74,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -83,14 +83,14 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - uid=[0], + invalidate=True, ), desc.StringParam( name="refineIntrinsics", label="Refine Intrinsics", description="Enable/Disable camera intrinsics refinement for each localized image.", value="", - uid=[0], + invalidate=True, ), desc.FloatParam( name="reprojectionError", @@ -99,14 +99,14 @@ class CameraRigLocalization(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="useLocalizeRigNaive", label="Use Localize Rig Naive", description="Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="angularThreshold", @@ -114,21 +114,21 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.", value=0.1, range=(0.0, 10.0, 0.01), - uid=[0], + invalidate=True, ), desc.File( name="voctree", label="Voctree", description="[voctree] Filename for the vocabulary tree.""", value="${ALICEVISION_VOCTREE}", - uid=[0], + invalidate=True, ), desc.File( name="voctreeWeights", label="Voctree Weights", description="[voctree] Filename for the vocabulary tree weights.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -137,7 +137,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="AllResults", values=["FirstBest", "AllResults"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="nbImageMatch", @@ -145,7 +145,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 100, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxResults", @@ -154,7 +154,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): "If set to 0, it is ignored.", value=10, range=(0, 100, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="matchingError", @@ -163,7 +163,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, ), desc.IntParam( name="nNearestKeyFrames", @@ -171,7 +171,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 1), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -180,7 +180,7 @@ class CameraRigLocalization(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -190,6 +190,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): label="Alembic", description="Filename for the SfMData export file (where camera poses will be stored).", value=desc.Node.internalFolder + "trackedcameras.abc", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/CheckerboardCalibration.py b/meshroom/aliceVision/CheckerboardCalibration.py index be347c8173..4b9aacf15e 100644 --- a/meshroom/aliceVision/CheckerboardCalibration.py +++ b/meshroom/aliceVision/CheckerboardCalibration.py @@ -19,14 +19,14 @@ class CheckerboardCalibration(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="checkerboards", label="Checkerboards Folder", description="Folder containing checkerboard JSON files.", value="", - uid=[0], + invalidate=True, ), desc.FloatParam( name="squareSize", @@ -34,7 +34,7 @@ class CheckerboardCalibration(desc.AVCommandLineNode): description="Checkerboard square width in mm", value=10., range=(0.1, 100., 0.1), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -43,7 +43,7 @@ class CheckerboardCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -53,6 +53,6 @@ class CheckerboardCalibration(desc.AVCommandLineNode): label="SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - uid=[], + invalidate=False, ) ] diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index ad31ff2973..3d4b2e55ea 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/aliceVision/CheckerboardDetection.py @@ -22,35 +22,35 @@ class CheckerboardDetection(desc.AVCommandLineNode): label="Input", description="Input SfMData file. Viewpoints must correspond to lens calibration grids.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="useNestedGrids", label="Nested Calibration Grid", description="Enable if images contain nested calibration grids. These grids must be centered on the image center.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="doubleSize", label="Double Size", description="Double the image size prior to processing.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="ignorePixelAspectRatio", label="Ignore Pixel Aspect Ratio", description="Ignore pixel aspect ratio for detection.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportDebugImages", label="Export Debug Images", description="Export debug images.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -59,7 +59,7 @@ class CheckerboardDetection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -69,7 +69,7 @@ class CheckerboardDetection(desc.AVCommandLineNode): label="Folder", description="Output folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="checkerLines", @@ -79,6 +79,6 @@ class CheckerboardDetection(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>.png", group="", # do not export on the command line - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index cb493aa86c..978d437a10 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -28,7 +28,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): label="Color Checker Data", description="Position and colorimetric data of the color checker.", value="", - uid=[0], + invalidate=True, ), desc.File( name="input", @@ -36,7 +36,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): description="Input SfMData file, image filenames or regex(es) on the image file path.\n" "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="extension", @@ -45,7 +45,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): value="exr", values=["exr", ""], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -58,7 +58,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -67,7 +67,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -77,7 +77,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): label="SfMData", description="Output SfMData.", value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -85,6 +85,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): label="Folder", description="Output images folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 28b9170cbd..e38c7a3dc6 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -34,7 +34,7 @@ class ColorCheckerDetection(desc.AVCommandLineNode): description="SfMData file input, image filenames or regex(es) on the image file path.\n" "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="maxCount", @@ -42,7 +42,7 @@ class ColorCheckerDetection(desc.AVCommandLineNode): description="Maximum color charts count to detect in a single image.", value=1, range=(1, 3, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -50,7 +50,7 @@ class ColorCheckerDetection(desc.AVCommandLineNode): label="Debug", description="If checked, debug data will be generated.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -59,7 +59,7 @@ class ColorCheckerDetection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -69,6 +69,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode): label="Color Checker Data", description="Output position and colorimetric data extracted from detected color checkers in the images.", value=desc.Node.internalFolder + "/ccheckers.json", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ConvertDistortion.py b/meshroom/aliceVision/ConvertDistortion.py index 0e54d13f76..a61aaa1621 100644 --- a/meshroom/aliceVision/ConvertDistortion.py +++ b/meshroom/aliceVision/ConvertDistortion.py @@ -19,7 +19,7 @@ class ConvertDistortion(desc.AVCommandLineNode): label="Input", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="from", @@ -28,7 +28,7 @@ class ConvertDistortion(desc.AVCommandLineNode): value="distortion", values=["distortion", "undistortion"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="to", @@ -37,7 +37,7 @@ class ConvertDistortion(desc.AVCommandLineNode): value="undistortion", values=["distortion", "undistortion"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -46,7 +46,7 @@ class ConvertDistortion(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -56,6 +56,6 @@ class ConvertDistortion(desc.AVCommandLineNode): label="Output", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 03d4e98ce0..3b9e268a1a 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -16,7 +16,7 @@ class ConvertMesh(desc.AVCommandLineNode): label="Input Mesh", description="Input mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -25,7 +25,7 @@ class ConvertMesh(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - uid=[0], + invalidate=True, group="", ), desc.ChoiceParam( @@ -35,7 +35,7 @@ class ConvertMesh(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -45,6 +45,6 @@ class ConvertMesh(desc.AVCommandLineNode): label="Mesh", description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value=desc.Node.internalFolder + "mesh." + "{outputMeshFileTypeValue}", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 37b4aadd13..9c6756f22a 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -20,7 +20,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Input", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="fileExt", @@ -29,7 +29,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): value="abc", values=["abc", "sfm", "json", "ply", "baf"], exclusive=True, - uid=[0], + invalidate=True, group="", # exclude from command line ), desc.ChoiceParam( @@ -39,7 +39,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ListAttribute( @@ -48,7 +48,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Image ID", description="UID or path of an image to add to the white list.", value="", - uid=[0], + invalidate=True, ), name="imageWhiteList", label="Image White List", @@ -59,35 +59,35 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Views", description="Export views.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="intrinsics", label="Intrinsics", description="Export intrinsics.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="extrinsics", label="Extrinsics", description="Export extrinsics.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="structure", label="Structure", description="Export structure.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="observations", label="Observations", description="Export observations.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -96,7 +96,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -106,6 +106,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Output", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.{fileExtValue}", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index c946400a76..d941223e57 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -28,7 +28,7 @@ class DepthMap(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="imagesFolder", @@ -36,7 +36,7 @@ class DepthMap(desc.AVCommandLineNode): description="Use images from a specific folder instead of those specified in the SfMData file.\n" "Filename should be the image UID.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="downscale", @@ -48,7 +48,7 @@ class DepthMap(desc.AVCommandLineNode): value=2, values=[1, 2, 4, 8, 16], exclusive=True, - uid=[0], + invalidate=True, ), desc.FloatParam( name="minViewAngle", @@ -56,7 +56,7 @@ class DepthMap(desc.AVCommandLineNode): description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=2.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -65,7 +65,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=70.0, range=(10.0, 120.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.GroupAttribute( @@ -80,7 +80,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum tile buffer width.", value=1024, range=(-1, 2000, 10), - uid=[0], + invalidate=True, ), desc.IntParam( name="tileBufferHeight", @@ -88,7 +88,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum tile buffer height.", value=1024, range=(-1, 2000, 10), - uid=[0], + invalidate=True, ), desc.IntParam( name="tilePadding", @@ -96,7 +96,7 @@ class DepthMap(desc.AVCommandLineNode): description="Buffer padding for overlapping tiles.", value=64, range=(0, 500, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="autoAdjustSmallImage", @@ -104,7 +104,7 @@ class DepthMap(desc.AVCommandLineNode): description="Automatically adjust depth map parameters if images are smaller than one tile\n" "(maxTCamsPerTile = maxTCams, adjust step if needed).", value=True, - uid=[0], + invalidate=True, advanced=True, ), ], @@ -114,7 +114,7 @@ class DepthMap(desc.AVCommandLineNode): label="Choose Neighbour Cameras Per Tile", description="Choose neighbour cameras per tile or globally to the image.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -123,7 +123,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of neighbour cameras per image.", value=10, range=(1, 20, 1), - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="sgm", @@ -138,7 +138,7 @@ class DepthMap(desc.AVCommandLineNode): description="Downscale factor applied on source images for the SGM step (in addition to the global downscale).", value=2, range=(-1, 10, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="sgmStepXY", @@ -146,7 +146,7 @@ class DepthMap(desc.AVCommandLineNode): description="The step is used to compute the similarity volume for one pixel over N (in the XY image plane).", value=2, range=(-1, 10, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="sgmStepZ", @@ -156,7 +156,7 @@ class DepthMap(desc.AVCommandLineNode): "This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).", value=-1, range=(-1, 10, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="sgmMaxTCamsPerTile", @@ -164,7 +164,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of neighbour cameras used per tile.", value=4, range=(1, 20, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="sgmWSH", @@ -172,7 +172,7 @@ class DepthMap(desc.AVCommandLineNode): description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", value=4, range=(1, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -180,7 +180,7 @@ class DepthMap(desc.AVCommandLineNode): label="Use SfM Landmarks", description="Use landmarks from Structure-from-Motion as input seeds to define min/max depth ranges.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -189,7 +189,7 @@ class DepthMap(desc.AVCommandLineNode): description="Inflate factor to add margins around SfM seeds.", value=0.2, range=(0.0, 2.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -198,7 +198,7 @@ class DepthMap(desc.AVCommandLineNode): description="Inflate factor to add margins to the depth thickness.", value=0.0, range=(0.0, 2.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -207,7 +207,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum similarity threshold (between 0 and 1) used to filter out poorly supported depth values.", value=1.0, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -216,7 +216,7 @@ class DepthMap(desc.AVCommandLineNode): description="GammaC threshold used for similarity computation.", value=5.5, range=(0.0, 30.0, 0.5), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -225,7 +225,7 @@ class DepthMap(desc.AVCommandLineNode): description="GammaP threshold used for similarity computation.", value=8.0, range=(0.0, 30.0, 0.5), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -234,7 +234,7 @@ class DepthMap(desc.AVCommandLineNode): description="P1 parameter for SGM filtering.", value=10.0, range=(0.0, 255.0, 0.5), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -243,7 +243,7 @@ class DepthMap(desc.AVCommandLineNode): description="P2 weighting parameter for SGM filtering.", value=100.0, range=(-255.0, 255.0, 0.5), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -252,7 +252,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of depths in the similarity volume.", value=1500, range=(1, 5000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.StringParam( @@ -260,7 +260,7 @@ class DepthMap(desc.AVCommandLineNode): label="Filtering Axes", description="Define axes for the filtering of the similarity volume.", value="YX", - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -268,7 +268,7 @@ class DepthMap(desc.AVCommandLineNode): label="Depth List Per Tile", description="Select the list of depth planes per tile or globally to the image.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -276,7 +276,7 @@ class DepthMap(desc.AVCommandLineNode): label="Consistent Scale", description="Compare patch with consistent scale for similarity volume computation.", value=False, - uid=[0], + invalidate=True, ), ], ), @@ -292,7 +292,7 @@ class DepthMap(desc.AVCommandLineNode): label="Enable", description="Enable depth/similarity map refinement process.", value=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="refineScale", @@ -300,7 +300,7 @@ class DepthMap(desc.AVCommandLineNode): description="Downscale factor applied on source images for the Refine step (in addition to the global downscale).", value=1, range=(-1, 10, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( @@ -309,7 +309,7 @@ class DepthMap(desc.AVCommandLineNode): description="The step is used to compute the refine volume for one pixel over N (in the XY image plane).", value=1, range=(-1, 10, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( @@ -318,7 +318,7 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of neighbour cameras used per tile.", value=4, range=(1, 20, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( @@ -327,7 +327,7 @@ class DepthMap(desc.AVCommandLineNode): description="The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).", value=10, range=(1, 30, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -339,7 +339,7 @@ class DepthMap(desc.AVCommandLineNode): "for which we evaluate the similarity with a finer z sampling.", value=15, range=(1, 50, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -349,7 +349,7 @@ class DepthMap(desc.AVCommandLineNode): description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", value=3, range=(1, 20, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -359,7 +359,7 @@ class DepthMap(desc.AVCommandLineNode): description="Sigma (2*sigma^2) of the Gaussian filter used to extract the best depth from the refine volume.", value=15.0, range=(0.0, 30.0, 0.5), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -369,7 +369,7 @@ class DepthMap(desc.AVCommandLineNode): description="GammaC threshold used for similarity computation.", value=15.5, range=(0.0, 30.0, 0.5), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -379,7 +379,7 @@ class DepthMap(desc.AVCommandLineNode): description="GammaP threshold used for similarity computation.", value=8.0, range=(0.0, 30.0, 0.5), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -388,7 +388,7 @@ class DepthMap(desc.AVCommandLineNode): label="Interpolate Middle Depth", description="Enable middle depth bilinear interpolation.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.BoolParam( @@ -396,7 +396,7 @@ class DepthMap(desc.AVCommandLineNode): label="Consistent Scale", description="Compare patch with consistent scale for similarity volume computation.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), ], @@ -412,7 +412,7 @@ class DepthMap(desc.AVCommandLineNode): label="Enable", description="Enable depth/similarity map post-process color optimization.", value=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="colorOptimizationNbIterations", @@ -420,7 +420,7 @@ class DepthMap(desc.AVCommandLineNode): description="Number of iterations for the optimization.", value=100, range=(1, 500, 10), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.colorOptimization.colorOptimizationEnabled.value, ), @@ -438,7 +438,7 @@ class DepthMap(desc.AVCommandLineNode): label="Enable For SGM", description="Enable custom patch pattern for similarity volume computation at the SGM step.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -446,7 +446,7 @@ class DepthMap(desc.AVCommandLineNode): label="Enable For Refine", description="Enable custom patch pattern for similarity volume computation at the Refine step.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.ListAttribute( @@ -469,7 +469,7 @@ class DepthMap(desc.AVCommandLineNode): value="full", values=["full", "circle"], exclusive=True, - uid=[0], + invalidate=True, ), desc.FloatParam( name="customPatchPatternSubpartRadius", @@ -477,7 +477,7 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart half-width or circle radius.", value=2.5, range=(0.5, 30.0, 0.1), - uid=[0], + invalidate=True, ), desc.IntParam( name="customPatchPatternSubpartNbCoords", @@ -485,7 +485,7 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart number of coordinates (for circle or ignore).", value=12, range=(3, 24, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="customPatchPatternSubpartLevel", @@ -493,7 +493,7 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart image level.", value=0, range=(0, 2, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="customPatchPatternSubpartWeight", @@ -501,7 +501,7 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart weight.", value=1.0, range=(0.0, 1.0, 0.1), - uid=[0], + invalidate=True, ), ], ), @@ -511,7 +511,7 @@ class DepthMap(desc.AVCommandLineNode): label="Group Subparts Per Level", description="Group all subparts with the same image level.", value=False, - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), ), @@ -530,7 +530,7 @@ class DepthMap(desc.AVCommandLineNode): label="Export Depth Maps", description="Export intermediate depth/similarity maps from the SGM and Refine steps.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -538,7 +538,7 @@ class DepthMap(desc.AVCommandLineNode): label="Export Normal Maps", description="Export intermediate normal maps from the SGM and Refine steps.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -546,7 +546,7 @@ class DepthMap(desc.AVCommandLineNode): label="Export Volumes", description="Export intermediate full similarity volumes from the SGM and Refine steps.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -554,7 +554,7 @@ class DepthMap(desc.AVCommandLineNode): label="Export Cross Volumes", description="Export intermediate similarity cross volumes from the SGM and Refine steps.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -562,7 +562,7 @@ class DepthMap(desc.AVCommandLineNode): label="Export Cut Volumes", description="Export intermediate similarity topographic cut volumes from the SGM and Refine steps.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -570,7 +570,7 @@ class DepthMap(desc.AVCommandLineNode): label="Export 9 Points", description="Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -578,7 +578,7 @@ class DepthMap(desc.AVCommandLineNode): label="Export Tile Pattern", description="Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.", value=False, - uid=[0], + invalidate=True, advanced=True, ), ], @@ -589,7 +589,7 @@ class DepthMap(desc.AVCommandLineNode): description="Number of GPUs to use (0 means that all the available GPUs will be used).", value=0, range=(0, 5, 1), - uid=[], + invalidate=False, advanced=True, ), desc.ChoiceParam( @@ -599,7 +599,7 @@ class DepthMap(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -609,7 +609,7 @@ class DepthMap(desc.AVCommandLineNode): label="Folder", description="Output folder for generated depth maps.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images @@ -620,7 +620,7 @@ class DepthMap(desc.AVCommandLineNode): description="Generated depth maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -629,7 +629,7 @@ class DepthMap(desc.AVCommandLineNode): description="Generated sim maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -637,7 +637,7 @@ class DepthMap(desc.AVCommandLineNode): label="Tile Pattern", description="Debug: Tile pattern.", value=desc.Node.internalFolder + "<VIEW_ID>_tilePattern.obj", - uid=[], + invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportTilePattern.value, ), @@ -647,7 +647,7 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps SGM", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgm.exr", - uid=[], + invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), @@ -657,7 +657,7 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps SGM upscaled.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgmUpscaled.exr", - uid=[], + invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), @@ -667,7 +667,7 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps after refinement", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_refinedFused.exr", - uid=[], + invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index ebf7787df3..fc09736d29 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -23,14 +23,14 @@ class DepthMapFilter(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="depthMapsFolder", label="Depth Maps Folder", description="Input depth maps folder.", value="", - uid=[0], + invalidate=True, ), desc.FloatParam( name="minViewAngle", @@ -38,7 +38,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Minimum angle between two views.", value=2.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -47,7 +47,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Maximum angle between two views.", value=70.0, range=(10.0, 120.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -56,7 +56,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Number of nearest cameras used for filtering.", value=10, range=(0, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -65,7 +65,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Minimum number of consistent cameras.", value=3, range=(0, 10, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minNumOfConsistentCamsWithLowSimilarity", @@ -73,7 +73,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Minimum number of consistent cameras for pixels with weak similarity value.", value=4, range=(0, 10, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="pixToleranceFactor", @@ -81,7 +81,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtering tolerance size factor, in pixels.", value=2.0, range=(0.001, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -90,7 +90,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtering size in pixels.", value=0, range=(0, 10, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -99,7 +99,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtering size in pixels for low similarity.", value=0, range=(0, 10, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -107,7 +107,7 @@ class DepthMapFilter(desc.AVCommandLineNode): label="Compute Normal Maps", description="Compute normal maps for each depth map.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -117,7 +117,7 @@ class DepthMapFilter(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -127,7 +127,7 @@ class DepthMapFilter(desc.AVCommandLineNode): label="Filtered Depth Maps Folder", description="Output folder for generated depth maps.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images @@ -138,7 +138,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtered depth maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -147,7 +147,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtered sim maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -156,7 +156,7 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Normal maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr", - uid=[], + invalidate=False, enabled=lambda node: node.computeNormalMaps.value, group="", # do not export on the command line ), diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 0c306b6afc..ce07b6bf31 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -19,14 +19,14 @@ class DistortionCalibration(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="checkerboards", label="Checkerboards Folder", description="Folder containing checkerboard JSON files.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="undistortionModelName", @@ -35,21 +35,21 @@ class DistortionCalibration(desc.AVCommandLineNode): value="3deanamorphic4", values=["3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="handleSqueeze", label="Handle Squeeze", description="Estimate squeeze.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="isDesqueezed", label="Is Desqueezed", description="True if the input image is already desqueezed.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -58,7 +58,7 @@ class DistortionCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -68,6 +68,6 @@ class DistortionCalibration(desc.AVCommandLineNode): label="SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 2286336b3a..5cdeabd46b 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -20,7 +20,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file containing a complete SfM.", value="", - uid=[0], + invalidate=True, ), desc.File( name="sfmDataFilter", @@ -28,7 +28,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Filter out cameras from the export if they are part of this SfMData.\n" "If empty, export all cameras.", value="", - uid=[0], + invalidate=True, ), desc.File( name="viewFilter", @@ -36,7 +36,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Select the cameras to export using an expression based on the image filepath.\n" "If empty, export all cameras.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportSTMaps", @@ -44,14 +44,14 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Export ST maps. Motion (x, y) is encoded in the image channels to correct the lens distortion.\n" "It represents the absolute pixel positions of an image normalized between 0 and 1.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportUndistortedImages", label="Export Undistorted Images", description="Export undistorted images.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="undistortedImageType", @@ -60,7 +60,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): value="exr", values=["jpg", "png", "tif", "exr"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.exportUndistortedImages.value, ), desc.BoolParam( @@ -69,14 +69,14 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Export full ROD.", value=False, enabled=lambda node: node.exportUndistortedImages.value and node.undistortedImageType.value == "exr", - uid=[0], + invalidate=True, ), desc.BoolParam( name="correctPrincipalPoint", label="Correct Principal Point", description="Correct principal point.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -85,7 +85,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -95,7 +95,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): label="Folder", description="Output folder with animated camera and undistorted images.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outputCamera", @@ -103,7 +103,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Output filename for the animated camera in Alembic format.", value=desc.Node.internalFolder + "camera.abc", group="", # exclude from command line - uid=[], + invalidate=False, ), desc.File( name="outputUndistorted", @@ -111,7 +111,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Output undistorted folder.", value=desc.Node.internalFolder + "undistort/", group="", # exclude from command line - uid=[], + invalidate=False, ), desc.File( name="outputImages", @@ -121,6 +121,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): semantic="image", group="", # exclude from command line enabled=lambda node: node.exportUndistortedImages.value, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index 2e1c9ab4ae..a24a4194a2 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -17,7 +17,7 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file containing a complete SfM.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -26,7 +26,7 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -36,6 +36,6 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): label="Point Cloud Filepath", description="Output point cloud with visibilities as SfMData file.", value=desc.Node.internalFolder + "pointCloud.abc", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 9019827aee..4da48bd529 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -18,7 +18,7 @@ class ExportDistortion(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportNukeNode", @@ -26,21 +26,21 @@ class ExportDistortion(desc.AVCommandLineNode): description="Export Nuke LensDistortion node as nuke file.\n" "Only supports 3DEqualizer lens models.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportLensGridsUndistorted", label="Export Lens Grids Undistorted", description="Export the lens grids undistorted for validation.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportSTMaps", label="Export STMaps", description="Export STMaps for distortion and undistortion.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -49,7 +49,7 @@ class ExportDistortion(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -59,7 +59,7 @@ class ExportDistortion(desc.AVCommandLineNode): label="Folder", description="Output folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="distortionNukeNode", @@ -67,7 +67,7 @@ class ExportDistortion(desc.AVCommandLineNode): description="Calibrated distortion ST map.", value=desc.Node.internalFolder + "nukeLensDistortion_<INTRINSIC_ID>.nk", group="", # do not export on the command line - uid=[], + invalidate=False, enabled=lambda node: node.exportNukeNode.value, ), desc.File( @@ -77,7 +77,7 @@ class ExportDistortion(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "lensgrid_<VIEW_ID>_undistort.exr", group="", # do not export on the command line - uid=[], + invalidate=False, enabled=lambda node: node.exportLensGridsUndistorted.value, ), desc.File( @@ -87,7 +87,7 @@ class ExportDistortion(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_distort.exr", group="", # do not export on the command line - uid=[], + invalidate=False, enabled=lambda node: node.exportSTMaps.value, ), desc.File( @@ -97,7 +97,7 @@ class ExportDistortion(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_undistort.exr", group="", # do not export on the command line - uid=[], + invalidate=False, enabled=lambda node: node.exportSTMaps.value, ), ] diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index f83dd9f9d5..fd67a71486 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -18,7 +18,7 @@ class ExportMatches(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -27,7 +27,7 @@ class ExportMatches(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ListAttribute( @@ -36,7 +36,7 @@ class ExportMatches(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -48,7 +48,7 @@ class ExportMatches(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some computed matches.", value="", - uid=[0], + invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -61,7 +61,7 @@ class ExportMatches(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -71,6 +71,6 @@ class ExportMatches(desc.AVCommandLineNode): label="Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index d28b7a23f2..14f26dcda8 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -21,7 +21,7 @@ class ExportMaya(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -30,7 +30,7 @@ class ExportMaya(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -40,6 +40,6 @@ class ExportMaya(desc.AVCommandLineNode): label="Folder", description="Folder for MeshroomMaya outputs: undistorted images and thumbnails.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index cd5f517edf..aefce14acb 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -37,14 +37,14 @@ class FeatureExtraction(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="masksFolder", label="Masks Folder", description="Use masks to filter features. Filename should be the same or the image UID.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="maskExtension", @@ -53,14 +53,14 @@ class FeatureExtraction(desc.AVCommandLineNode): value="png", values=["png", "exr", "jpg"], exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="maskInvert", label="Invert Masks", description="Invert mask values.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -69,7 +69,7 @@ class FeatureExtraction(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -80,7 +80,7 @@ class FeatureExtraction(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra", "custom"], exclusive=True, - uid=[0], + invalidate=True, group=lambda node: 'allParams' if node.describerPreset.value != 'custom' else None, ), desc.IntParam( @@ -89,7 +89,7 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Maximum number of features extracted (0 means default value based on Describer Density).", value=0, range=(0, 100000, 1000), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: (node.describerPreset.value == "custom"), ), @@ -100,7 +100,7 @@ class FeatureExtraction(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="contrastFiltering", @@ -117,7 +117,7 @@ class FeatureExtraction(desc.AVCommandLineNode): values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, - uid=[0], + invalidate=True, ), desc.FloatParam( name="relativePeakThreshold", @@ -126,7 +126,7 @@ class FeatureExtraction(desc.AVCommandLineNode): value=0.01, range=(0.01, 1.0, 0.001), advanced=True, - uid=[0], + invalidate=True, enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( @@ -135,7 +135,7 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Enable grid filtering. Highly recommended to ensure usable number of features.", value=True, advanced=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -144,14 +144,14 @@ class FeatureExtraction(desc.AVCommandLineNode): values=COLORSPACES, value="sRGB", exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="forceCpuExtraction", label="Force CPU Extraction", description="Use only CPU feature extraction.", value=True, - uid=[], + invalidate=False, advanced=True, ), desc.IntParam( @@ -160,7 +160,7 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Maximum number of threads to run simultaneously (0 for automatic mode).", value=0, range=(0, 24, 1), - uid=[], + invalidate=False, advanced=True, ), desc.ChoiceParam( @@ -170,7 +170,7 @@ class FeatureExtraction(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -180,6 +180,6 @@ class FeatureExtraction(desc.AVCommandLineNode): label="Features Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index e5746e184f..39673cc897 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -39,7 +39,7 @@ class FeatureMatching(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -47,7 +47,7 @@ class FeatureMatching(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -58,7 +58,7 @@ class FeatureMatching(desc.AVCommandLineNode): label="Image Pairs", description="Path to a file which contains the list of image pairs to match.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -67,7 +67,7 @@ class FeatureMatching(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -83,7 +83,7 @@ class FeatureMatching(desc.AVCommandLineNode): value="ANN_L2", values=["BRUTE_FORCE_L2", "ANN_L2", "CASCADE_HASHING_L2", "FAST_CASCADE_HASHING_L2", "BRUTE_FORCE_HAMMING"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -95,7 +95,7 @@ class FeatureMatching(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -111,7 +111,7 @@ class FeatureMatching(desc.AVCommandLineNode): value="fundamental_matrix", values=["fundamental_matrix", "fundamental_with_distortion", "essential_matrix", "homography_matrix", "homography_growing", "no_filtering"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -120,7 +120,7 @@ class FeatureMatching(desc.AVCommandLineNode): description="Distance ratio to discard non meaningful matches.", value=0.8, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -129,7 +129,7 @@ class FeatureMatching(desc.AVCommandLineNode): description="Maximum number of iterations allowed in the Ransac step.", value=50000, range=(1, 100000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -140,7 +140,7 @@ class FeatureMatching(desc.AVCommandLineNode): "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -150,7 +150,7 @@ class FeatureMatching(desc.AVCommandLineNode): "If set to 0 it lets the ACRansac select an optimal value.", value=5.0, range=(0.0, 100.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -161,7 +161,7 @@ class FeatureMatching(desc.AVCommandLineNode): "Useful for filtering the background during acquisition with a turntable and a static camera.", value=-1.0, range=(0.0, 10.0, 1.0), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxMatches", @@ -169,7 +169,7 @@ class FeatureMatching(desc.AVCommandLineNode): description="Maximum number of matches to keep.", value=0, range=(0, 10000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -177,7 +177,7 @@ class FeatureMatching(desc.AVCommandLineNode): label="Save Putative Matches", description="Save putative matches.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -185,14 +185,14 @@ class FeatureMatching(desc.AVCommandLineNode): label="Cross Matching", description="Ensure that the matching process is symmetric (same matches for I->J than for J->I).", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="guidedMatching", label="Guided Matching", description="Use the found model to improve the pairwise correspondences.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="matchFromKnownCameraPoses", @@ -200,14 +200,14 @@ class FeatureMatching(desc.AVCommandLineNode): description="Enable the usage of geometric information from known camera poses to guide the feature matching.\n" "If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportDebugFiles", label="Export Debug Files", description="Export debug files (svg, dot).", value=False, - uid=[], + invalidate=False, advanced=True, ), desc.ChoiceParam( @@ -217,7 +217,7 @@ class FeatureMatching(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] outputs = [ @@ -226,6 +226,6 @@ class FeatureMatching(desc.AVCommandLineNode): label="Matches Folder", description="Path to a folder in which the computed matches are stored.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index d40ea48bc8..b09a05e0de 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -21,7 +21,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): label="Input Folder", description="Input folder with evaluation datasets.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -30,7 +30,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["sift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -41,7 +41,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="describerQuality", @@ -50,7 +50,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="contrastFiltering", @@ -67,7 +67,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, - uid=[0], + invalidate=True, ), desc.FloatParam( name="relativePeakThreshold", @@ -76,7 +76,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): value=0.01, range=(0.01, 1.0, 0.001), advanced=True, - uid=[0], + invalidate=True, enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( @@ -85,14 +85,14 @@ class FeatureRepeatability(desc.AVCommandLineNode): description="Enable grid filtering. Highly recommended to ensure a usable number of features.", value=True, advanced=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="forceCpuExtraction", label="Force CPU Extraction", description="Use only CPU feature extraction.", value=True, - uid=[], + invalidate=False, advanced=True, ), desc.IntParam( @@ -102,7 +102,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): value=0, range=(0, 10000, 1), group="", - uid=[0], + invalidate=True, ), desc.StringParam( name="comments", @@ -110,7 +110,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): description="Comments.", value="", group="", - uid=[], + invalidate=False, ), desc.ChoiceParam( name="verboseLevel", @@ -119,7 +119,7 @@ class FeatureRepeatability(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -129,6 +129,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): label="Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index dafa75e3ab..890e654959 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -23,7 +23,7 @@ class GlobalSfM(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -31,7 +31,7 @@ class GlobalSfM(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -43,7 +43,7 @@ class GlobalSfM(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some computed matches.", value="", - uid=[0], + invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -56,7 +56,7 @@ class GlobalSfM(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -68,7 +68,7 @@ class GlobalSfM(desc.AVCommandLineNode): values=["L1_minimization", "L2_minimization"], value="L2_minimization", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="translationAveraging", @@ -80,7 +80,7 @@ class GlobalSfM(desc.AVCommandLineNode): values=["L1_minimization", "L2_minimization", "L1_soft_minimization"], value="L1_soft_minimization", exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="lockAllIntrinsics", @@ -89,7 +89,7 @@ class GlobalSfM(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -98,7 +98,7 @@ class GlobalSfM(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -108,20 +108,20 @@ class GlobalSfM(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - uid=[], + invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Output Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - uid=[], + invalidate=False, ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index ee481904d8..cf0b209dc1 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -19,7 +19,7 @@ class ImageMasking(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -28,7 +28,7 @@ class ImageMasking(desc.AVCommandLineNode): value="HSV", values=["HSV", "AutoGrayscaleThreshold"], exclusive=True, - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="hsv", @@ -48,7 +48,7 @@ class ImageMasking(desc.AVCommandLineNode): semantic="color/hue", value=0.33, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="hsvHueRange", @@ -56,7 +56,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Tolerance around the hue value to isolate.", value=0.1, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="hsvMinSaturation", @@ -64,7 +64,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Hue is meaningless if saturation is low. Do not mask pixels below this threshold.", value=0.3, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="hsvMaxSaturation", @@ -72,7 +72,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", value=1.0, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="hsvMinValue", @@ -80,7 +80,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Hue is meaningless if the value is low. Do not mask pixels below this threshold.", value=0.3, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="hsvMaxValue", @@ -88,7 +88,7 @@ class ImageMasking(desc.AVCommandLineNode): description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", value=1.0, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), ], ), @@ -98,7 +98,7 @@ class ImageMasking(desc.AVCommandLineNode): description="If selected, the selected area is ignored.\n" "If not, only the selected area is considered.", value=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="growRadius", @@ -107,7 +107,7 @@ class ImageMasking(desc.AVCommandLineNode): "It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.", value=0, range=(0, 50, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="shrinkRadius", @@ -115,21 +115,21 @@ class ImageMasking(desc.AVCommandLineNode): description="Shrink the selected area.", value=0, range=(0, 50, 1), - uid=[0], + invalidate=True, ), desc.File( name="depthMapFolder", label="Depth Mask Folder", description="Depth mask folder.", value="", - uid=[0], + invalidate=True, ), desc.StringParam( name="depthMapExp", label="Depth Mask Expression", description="Depth mask expression, like '{inputFolder}/{stem}-depth.{ext}'.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -138,7 +138,7 @@ class ImageMasking(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -148,6 +148,6 @@ class ImageMasking(desc.AVCommandLineNode): label="Output", description="Output folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index bdbf69f728..eec56d50d5 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -40,7 +40,7 @@ class ImageMatching(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -48,7 +48,7 @@ class ImageMatching(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -69,14 +69,14 @@ class ImageMatching(desc.AVCommandLineNode): value="SequentialAndVocabularyTree", values=["VocabularyTree", "Sequential", "SequentialAndVocabularyTree", "Exhaustive", "Frustum", "FrustumOrVocabularyTree"], exclusive=True, - uid=[0], + invalidate=True, ), desc.File( name="tree", label="Voc Tree: Tree", description="Input name for the vocabulary tree file.", value="${ALICEVISION_VOCTREE}", - uid=[], + invalidate=False, enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.File( @@ -85,7 +85,7 @@ class ImageMatching(desc.AVCommandLineNode): description="Input name for the weight file.\n" "If not provided, the weights will be computed on the database built with the provided set.", value="", - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -96,7 +96,7 @@ class ImageMatching(desc.AVCommandLineNode): "If we have less features than this threshold, we will compute all matching combinations.", value=200, range=(0, 500, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -106,7 +106,7 @@ class ImageMatching(desc.AVCommandLineNode): description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -116,7 +116,7 @@ class ImageMatching(desc.AVCommandLineNode): description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -126,7 +126,7 @@ class ImageMatching(desc.AVCommandLineNode): description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "Sequential" in node.method.value, ), @@ -137,7 +137,7 @@ class ImageMatching(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -147,6 +147,6 @@ class ImageMatching(desc.AVCommandLineNode): label="Image Pairs", description="Filepath to the output file with the list of selected image pairs.", value=desc.Node.internalFolder + "imageMatches.txt", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index ea87aec1ec..d68ab9d70a 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -25,14 +25,14 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): label="Input A", description="First input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="inputB", label="Input B", description="Second input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -40,7 +40,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -60,14 +60,14 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): value="SequentialAndVocabularyTree", values=["VocabularyTree", "SequentialAndVocabularyTree", "Exhaustive", "Frustum"], exclusive=True, - uid=[0], + invalidate=True, ), desc.File( name="tree", label="Voc Tree: Tree", description="Input name for the vocabulary tree file.", value="${ALICEVISION_VOCTREE}", - uid=[], + invalidate=False, enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.File( @@ -76,7 +76,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="Input name for the weight file.\n" "If not provided, the weights will be computed on the database built with the provided set.", value="", - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -90,7 +90,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): value="a/a+a/b", values=["a/a+a/b","a/ab", "a/b"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="minNbImages", @@ -99,7 +99,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): "If we have less features than this threshold, we will compute all the matching combinations.", value=200, range=(0, 500, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -109,7 +109,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -119,7 +119,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -129,7 +129,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: "Sequential" in node.method.value, ), @@ -140,7 +140,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -150,13 +150,13 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): label="List File", description="Filepath to the output file with the list of selected image pairs.", value=desc.Node.internalFolder + "imageMatches.txt", - uid=[], + invalidate=False, ), desc.File( name="outputCombinedSfM", label="Combined SfM", description="Path for the combined SfMData file.", value=desc.Node.internalFolder + "combineSfM.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 62b074678a..38e05c7fc1 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -52,7 +52,7 @@ class ImageProcessing(desc.AVCommandLineNode): " - '?' matches one character.\n" " - '*' matches zero character or more.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -60,7 +60,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Input Folder", description="Folder containing images.", value="", - uid=[0], + invalidate=True, ), name="inputFolders", label="Input Images Folders", @@ -72,7 +72,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Metadata Folder", description="Specific folder containing images with metadata.", value="", - uid=[0], + invalidate=True, ), name="metadataFolders", label="Input Metadata Folders", @@ -86,49 +86,49 @@ class ImageProcessing(desc.AVCommandLineNode): value="", values=["", "exr", "jpg", "tiff", "png"], exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="reconstructedViewsOnly", label="Only Reconstructed Views", description="Only process reconstructed views.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="keepImageFilename", label="Keep Image Name", description="Keep the original image name instead of the view name.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="reorient", label="Automatic Reorientation", description="Automatic image reorientation.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="fixNonFinite", label="Fix Non-Finite", description="Fix non-finite pixels based on neighboring pixels average.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="exposureCompensation", label="Exposure Compensation", description="Exposure compensation (only valid for SfMData).", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="rawAutoBright", label="RAW Auto Bright", description="Enable automatic exposure adjustment for RAW images.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="rawExposureAdjust", @@ -136,7 +136,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Manual exposure adjustment in fstops for RAW images.", value=0.0, range=(-2.0, 3.0, 0.125), - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="lensCorrection", @@ -149,14 +149,14 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Enable lens correction.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="geometry", label="Geometry", description="Geometry correction if a model is available in the SfMData.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), desc.BoolParam( @@ -164,7 +164,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Vignetting", description="Vignetting correction if the model parameters are available in the metadata.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), desc.BoolParam( @@ -172,7 +172,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Chromatic Aberration", description="Chromatic aberration (fringing) correction if the model parameters are available in the metadata.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), ], @@ -183,7 +183,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Scale factor.", value=1.0, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxWidth", @@ -191,7 +191,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Maximum width of the output images (0: ignored).", value=0, range=(0, 10000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxHeight", @@ -199,7 +199,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Maximum height of the output images (0: ignored).", value=0, range=(0, 10000, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="contrast", @@ -207,7 +207,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Contrast.", value=1.0, range=(0.0, 100.0, 0.1), - uid=[0], + invalidate=True, ), desc.IntParam( name="medianFilter", @@ -215,7 +215,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Median filter.", value=0, range=(0, 10, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="fillHoles", @@ -223,7 +223,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Fill holes based on the alpha channel.\n" "Note: It will enable 'fixNonFinite', as it is required for the image pyramid construction used to fill holes.", value=False, - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="sharpenFilter", @@ -236,7 +236,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use sharpen filter.", value=False, - uid=[0], + invalidate=True, ), desc.IntParam( name="width", @@ -244,7 +244,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Sharpening width.", value=3, range=(1, 9, 2), - uid=[0], + invalidate=True, enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), desc.FloatParam( @@ -253,7 +253,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Sharpening contrast.", value=1.0, range=(0.0, 100.0, 0.1), - uid=[0], + invalidate=True, enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), desc.FloatParam( @@ -262,7 +262,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Sharpening threshold.", value=0.0, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), ], @@ -278,7 +278,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use bilateral filter.", value=False, - uid=[0], + invalidate=True, ), desc.IntParam( name="bilateralFilterDistance", @@ -287,7 +287,7 @@ class ImageProcessing(desc.AVCommandLineNode): "Could be very slow for large filters, so it is recommended to use 5.", value=0, range=(0, 9, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), desc.FloatParam( @@ -296,7 +296,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Bilateral filter sigma in the coordinate space.", value=0.0, range=(0.0, 150.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), desc.FloatParam( @@ -305,7 +305,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Bilateral filter sigma in the color space.", value=0.0, range=(0.0, 150.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), ], @@ -321,7 +321,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use Contrast Limited Adaptive Histogram Equalization (CLAHE) filter.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="claheClipLimit", @@ -329,7 +329,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Threshold for contrast limiting.", value=4.0, range=(0.0, 8.0, 1.0), - uid=[0], + invalidate=True, enabled=lambda node: node.claheFilter.claheEnabled.value, ), desc.IntParam( @@ -339,7 +339,7 @@ class ImageProcessing(desc.AVCommandLineNode): "Input image will be divided into equally sized rectangular tiles.", value=8, range=(4, 64, 4), - uid=[0], + invalidate=True, enabled=lambda node: node.claheFilter.claheEnabled.value, ), ], @@ -355,7 +355,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Add noise.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="noiseMethod", @@ -367,7 +367,7 @@ class ImageProcessing(desc.AVCommandLineNode): value="uniform", values=["uniform", "gaussian", "salt"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.FloatParam( @@ -379,7 +379,7 @@ class ImageProcessing(desc.AVCommandLineNode): " - salt: the value of the specified portion of pixels.", value=0.0, range=(0.0, 1.0, 0.0001), - uid=[0], + invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.FloatParam( @@ -391,7 +391,7 @@ class ImageProcessing(desc.AVCommandLineNode): " - salt: the portion of pixels to set to a specified value.", value=1.0, range=(0.0, 1.0, 0.0001), - uid=[0], + invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.BoolParam( @@ -400,7 +400,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="If selected, a single noise value will be applied to all channels.\n" "Otherwise, a separate noise value will be computed for each channel.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), ], @@ -417,7 +417,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use Non-Local Mean Denoising from OpenCV to denoise images.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="nlmFilterH", @@ -427,7 +427,7 @@ class ImageProcessing(desc.AVCommandLineNode): "smaller H value preserves details but also preserves some noise.", value=5.0, range=(1.0, 1000.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.FloatParam( @@ -438,7 +438,7 @@ class ImageProcessing(desc.AVCommandLineNode): "smaller HColor value preserves details but also preserves some noise.", value=10.0, range=(0.0, 1000.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.IntParam( @@ -447,7 +447,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="Size in pixels of the template patch that is used to compute weights. Should be odd.", value=7, range=(1, 101, 2), - uid=[0], + invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.IntParam( @@ -457,7 +457,7 @@ class ImageProcessing(desc.AVCommandLineNode): "Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.", value=21, range=(1, 1001, 2), - uid=[0], + invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), ], @@ -473,7 +473,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Apply pixel aspect ratio.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="parRowDecimation", @@ -481,7 +481,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="If selected, reduce image height by decimating the number of rows.\n" "Otherwise, increase width by upsampling image columns.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.parFilter.parEnabled.value, ), ], @@ -493,7 +493,7 @@ class ImageProcessing(desc.AVCommandLineNode): value="rgba", values=["rgba", "rgb", "grayscale"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="inputColorSpace", @@ -502,7 +502,7 @@ class ImageProcessing(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputColorSpace", @@ -511,7 +511,7 @@ class ImageProcessing(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -520,7 +520,7 @@ class ImageProcessing(desc.AVCommandLineNode): values=COLORSPACES, value="Linear", exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: not node.applyDcpMetadata.value, ), desc.ChoiceParam( @@ -530,21 +530,21 @@ class ImageProcessing(desc.AVCommandLineNode): values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="applyDcpMetadata", label="Apply DCP Metadata", description="If the image contains some DCP metadata, then generate a DCP profile from them and apply it to the image content.", value=False, - uid=[0], + invalidate=True, ), desc.File( name="colorProfileDatabase", label="Color Profile Database", description="Color profile database directory path.", value="${ALICEVISION_COLOR_PROFILE_DB}", - uid=[], + invalidate=False, enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( @@ -552,7 +552,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Error On Missing DCP Color Profile", description="If a color profile database is specified but no color profile is found for at least one image, then an error is thrown.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( @@ -560,7 +560,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Use DCP Color Matrix Only", description="Use only the Color Matrix information from the DCP and ignore the Forward Matrix.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( @@ -568,7 +568,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="WB After Demosaicing", description="Do White Balance after demosaicing, just before DCP profile application.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.ChoiceParam( @@ -578,7 +578,7 @@ class ImageProcessing(desc.AVCommandLineNode): value="AHD", values=["linear", "VNG", "PPG", "AHD", "DCB", "AHD-Mod", "AFD", "VCD", "Mixed", "LMMSE", "AMaZE", "DHT", "AAHD", "none"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="highlightMode", @@ -591,7 +591,7 @@ class ImageProcessing(desc.AVCommandLineNode): value=0, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], exclusive=True, - uid=[0], + invalidate=True, ), desc.FloatParam( name="correlatedColorTemperature", @@ -600,21 +600,21 @@ class ImageProcessing(desc.AVCommandLineNode): "A negative or null value indicates that the metadata information will be used.", value=-1.0, range=(-1.0, 10000.0, 1.0), - uid=[0], + invalidate=True, ), desc.File( name="lensCorrectionProfileInfo", label="Lens Correction Profile Info", description="Lens Correction Profile filepath or database directory.", value="${ALICEVISION_LENS_PROFILE_INFO}", - uid=[], + invalidate=False, ), desc.BoolParam( name="lensCorrectionProfileSearchIgnoreCameraModel", label="LCP Generic Search", description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -628,7 +628,7 @@ class ImageProcessing(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="exrCompressionMethod", @@ -637,7 +637,7 @@ class ImageProcessing(desc.AVCommandLineNode): value="auto", values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="exrCompressionLevel", @@ -647,7 +647,7 @@ class ImageProcessing(desc.AVCommandLineNode): "A value of 0 will be ignored, and the default value for the selected method will be used.", value=0, range=(0, 500, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.exrCompressionMethod.value in ["dwaa", "dwab", "zip", "zips"], ), desc.BoolParam( @@ -655,7 +655,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="JPEG Compress", description="Enable JPEG compression.", value=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="jpegQuality", @@ -663,7 +663,7 @@ class ImageProcessing(desc.AVCommandLineNode): description="JPEG images quality after compression.", value=90, range=(0, 100, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.jpegCompress.value, ), desc.ChoiceParam( @@ -673,7 +673,7 @@ class ImageProcessing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -683,7 +683,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="SfMData", description="Output SfMData file.", value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -691,7 +691,7 @@ class ImageProcessing(desc.AVCommandLineNode): label="Folder", description="Output images folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outputImages", @@ -700,6 +700,6 @@ class ImageProcessing(desc.AVCommandLineNode): semantic="image", value=outputImagesValueFunct, group="", # do not export on the command line - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index ebeeaee3f6..50267bed55 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -22,14 +22,14 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Input", description="SfMData file input.", value="", - uid=[0], + invalidate=True, ), desc.File( name="modelPath", label="Segmentation Model", description="Weights file for the internal model.", value="${ALICEVISION_SEMANTIC_SEGMENTATION_MODEL}", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="validClasses", @@ -49,28 +49,28 @@ class ImageSegmentation(desc.AVCommandLineNode): "train", "tvmonitor" ], exclusive=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="maskInvert", label="Invert Masks", description="Invert mask values. If selected, the pixels corresponding to the mask will be set to 0 instead of 255.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="useGpu", label="Use GPU", description="Use GPU for computation if available", value=True, - uid=[], + invalidate=False, ), desc.BoolParam( name="keepFilename", label="Keep Filename", description="Keep Input Filename", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -79,7 +79,7 @@ class ImageSegmentation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -89,7 +89,7 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Masks Folder", description="Output path for the masks.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="masks", @@ -98,6 +98,6 @@ class ImageSegmentation(desc.AVCommandLineNode): semantic="image", value=lambda attr: desc.Node.internalFolder + "<VIEW_ID>.exr" if not attr.node.keepFilename.value else desc.Node.internalFolder + "<FILESTEM>.exr", group="", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index 5f8d54da23..d439ceb0ef 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -20,7 +20,7 @@ class ImportE57(desc.AVCommandLineNode): label="E57 File", description="Path to an E57 file.", value="", - uid=[0], + invalidate=True, ), name="input", label="Input Files", @@ -32,7 +32,7 @@ class ImportE57(desc.AVCommandLineNode): description="Ensure each point has no neighbour closer than maxDensity meters.", value=0.01, range=(0.0, 0.2, 0.001), - uid=[0], + invalidate=True, ), desc.FloatParam( name="minIntensity", @@ -40,7 +40,7 @@ class ImportE57(desc.AVCommandLineNode): description="Ensure no point has an intensity lower than this value.", value=0.03, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxPointsPerBlock", @@ -48,7 +48,7 @@ class ImportE57(desc.AVCommandLineNode): description="Limit the number of points per computation region (For memory usage, 0 means no limit).", value=5000000, range=(0, 10000000, 100000), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -57,7 +57,7 @@ class ImportE57(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -67,6 +67,6 @@ class ImportE57(desc.AVCommandLineNode): label="Output", description="Path to the output JSON file.", value=desc.Node.internalFolder + "inputset.json", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index c09ae09a11..2c142f3f57 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -18,14 +18,14 @@ class ImportKnownPoses(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="knownPosesData", label="Known Poses Data", description="Known poses data in the JSON or XMP format.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -34,7 +34,7 @@ class ImportKnownPoses(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -44,7 +44,7 @@ class ImportKnownPoses(desc.AVCommandLineNode): label="Output", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "/sfmData.abc", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 914204460f..fdd2bd163e 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -73,7 +73,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Input Path", description="Input path.", value="", - uid=[0], + invalidate=True, ), name="inputPaths", label="Input Paths", @@ -85,7 +85,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Brand", description="Camera brand.", value="", - uid=[0], + invalidate=True, ), name="brands", label="Brands", @@ -97,7 +97,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Model", description="Camera model.", value="", - uid=[0], + invalidate=True, ), name="models", label="Models", @@ -110,7 +110,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Focal in mm (will be used if not 0).", value=0.0, range=(0.0, 500.0, 1.0), - uid=[0], + invalidate=True, ), name="mmFocals", label="Focals", @@ -121,7 +121,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Sensor Database", description="Camera sensor width database path.", value="${ALICEVISION_SENSOR_DB}", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -129,7 +129,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Masks Path", description="Directory containing masks to apply to the frames.", value="", - uid=[0], + invalidate=True, ), name="maskPaths", label="Masks", @@ -150,7 +150,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Use Smart Keyframe Selection", description="Use the smart keyframe selection.", value=True, - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="regularSelection", @@ -166,7 +166,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Minimum number of frames between two keyframes.", value=12, range=(1, 1000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.regularSelection.enabled, ), desc.IntParam( @@ -175,7 +175,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Maximum number of frames between two keyframes. Ignored if equal to 0.", value=0, range=(0, 1000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.regularSelection.enabled, ), desc.IntParam( @@ -186,7 +186,7 @@ class KeyframeSelection(desc.AVCommandLineNode): "might cause the selection to stop before reaching the end of the input sequence(s).", value=0, range=(0, 10000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.regularSelection.enabled, ), ], @@ -205,7 +205,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection.", value=10.0, range=(0.0, 100.0, 1.0), - uid=[0], + invalidate=True, enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( @@ -214,7 +214,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Minimum number of frames selected to be keyframes.", value=40, range=(1, 100, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( @@ -223,7 +223,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Maximum number of frames selected to be keyframes.", value=2000, range=(1, 10000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( @@ -233,7 +233,7 @@ class KeyframeSelection(desc.AVCommandLineNode): "Aspect ratio will be preserved. No rescale will be performed if equal to 0.", value=720, range=(0, 4000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -244,7 +244,7 @@ class KeyframeSelection(desc.AVCommandLineNode): "Aspect ratio will be preserved. No rescale will be performed if equal to 0.", value=720, range=(0, 4000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -254,7 +254,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="The size, in pixels, of the sliding window used to evaluate a frame's sharpness.", value=200, range=(1, 10000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -264,7 +264,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="The size, in pixels, of the cells within a frame in which the optical flow scores is evaluated.", value=90, range=(10, 2000, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -276,7 +276,7 @@ class KeyframeSelection(desc.AVCommandLineNode): "and each will process at least 'minBlockSize' (except maybe for the very last thread, that might process less).", value=10, range=(1, 1000, 1), - uid=[], + invalidate=False, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -292,7 +292,7 @@ class KeyframeSelection(desc.AVCommandLineNode): "option enabled instead of [00015.exr, 00294.exr, 00825.exr].", value=False, enabled=lambda node: node.outputExtension.value != "none", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputExtension", @@ -305,7 +305,7 @@ class KeyframeSelection(desc.AVCommandLineNode): exclusive=True, validValue=lambda node: not (any(ext in input.value.lower() for ext in videoExts for input in node.inputPaths.value) and node.outputExtension.value == "none"), errorMessage="A video input has been provided. The output extension should be different from 'none'.", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -318,7 +318,7 @@ class KeyframeSelection(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.outputExtension.value == "exr", advanced=True, ), @@ -342,14 +342,14 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Export Scores To CSV", description="Export the computed sharpness and optical flow scores to a CSV file.", value=False, - uid=[0], + invalidate=True, ), desc.StringParam( name="csvFilename", label="CSV Filename", description="Name of the CSV file to export. It will be written in the node's output folder.", value="scores.csv", - uid=[0], + invalidate=True, enabled=lambda node: node.debugOptions.debugScores.exportScores.value, ), desc.BoolParam( @@ -357,7 +357,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Export Selected Frames", description="Add a column in the CSV file containing 1s for frames that were selected and 0s for those that were not.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.debugOptions.debugScores.exportScores.value, ), ], @@ -374,7 +374,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Visualise Optical Flow", description="Export each frame's optical flow HSV visualisation as PNG images.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled, ), desc.BoolParam( @@ -383,7 +383,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Export each frame's optical flow HSV visualisation as PNG images, but do not perform any score computation or frame selection.\n" "If this option is selected, all the other options will be ignored.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled, ), ], @@ -393,7 +393,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Skip Sharpness Computation", description="Skip the sharpness score computation. A fixed score of 1.0 will be applied by default to all the frames.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.debugOptions.enabled, ), desc.BoolParam( @@ -401,7 +401,7 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Skip Frame Selection", description="Compute the sharpness and optical flow scores, but do not proceed to the frame selection.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.debugOptions.enabled, ), ], @@ -413,7 +413,7 @@ class KeyframeSelection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -423,14 +423,14 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Folder", description="Output keyframes folder for extracted frames.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outputSfMDataKeyframes", label="Keyframes SfMData", description="Output SfMData file containing all the selected keyframes.", value=desc.Node.internalFolder + "keyframes.sfm", - uid=[], + invalidate=False, ), desc.File( name="outputSfMDataFrames", @@ -438,7 +438,7 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Output SfMData file containing all the frames that were not selected as keyframes.\n" "If the input contains videos, this file will not be written since all the frames that were not selected do not actually exist on disk.", value=desc.Node.internalFolder + "frames.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 0cfb336268..67cb05c391 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -44,14 +44,14 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="samples", label="Samples Folder", description="Samples folder.", value=desc.Node.internalFolder, - uid=[0], + invalidate=True, ), desc.IntParam( name="userNbBrackets", @@ -59,7 +59,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), - uid=[], + invalidate=False, group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" "Errors will occur during the computation.", @@ -72,7 +72,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): "else it is equal to 'userNbBrackets'.", value=0, range=(0, 15, 1), - uid=[0], + invalidate=True, group="bracketsParams", ), desc.BoolParam( @@ -80,7 +80,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( @@ -95,7 +95,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): values=["auto", "linear", "debevec", "grossberg", "laguerre"], value="auto", exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( @@ -109,7 +109,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): value="default", values=["default", "gaussian", "triangle", "plateau"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -118,7 +118,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -130,7 +130,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - uid=[], + invalidate=False, group="user", # not used directly on the command line enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -142,7 +142,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): "can be managed by the calibration step (in term of computation time and memory usage).", value=1000000, range=(8, 10000000, 1000), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -153,7 +153,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -163,7 +163,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="Response File", description="Path to the output response file.", value=desc.Node.internalFolder + "response_<INTRINSIC_ID>.csv", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index a353411f60..6178a1ca4d 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -43,14 +43,14 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="response", label="Response File", description="Response file.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="userNbBrackets", @@ -58,7 +58,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), - uid=[], + invalidate=False, group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" "Errors will occur during the computation.", @@ -71,7 +71,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 15, 1), - uid=[0], + invalidate=True, group="bracketsParams", ), desc.BoolParam( @@ -79,7 +79,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Manually Specify Ref Bracket", description="Manually specify the reference bracket index to control the exposure of the HDR image.", value=False, - uid=[0], + invalidate=True, group="user", # not used directly on the command line ), desc.IntParam( @@ -89,7 +89,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "+N to use a more exposed bracket or -N to use a less exposed bracket.", value=1, range=(-4, 4, 1), - uid=[0], + invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( @@ -98,7 +98,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Expected mean luminance of the HDR images used to compute the final panorama.", value=0.4, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( @@ -107,7 +107,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Minimum channel input value to be considered in advanced pixelwise merging.", value=0.05, range=(0.0, 1.0, 0.001), - uid=[0], + invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1), ), desc.FloatParam( @@ -116,7 +116,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Maximum channel input value to be considered in advanced pixelwise merging.", value=0.995, range=(0.0, 1.0, 0.001), - uid=[0], + invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1), ), desc.BoolParam( @@ -124,7 +124,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Compute Light Masks", description="Compute masks of low and high lights and missing info.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( @@ -132,7 +132,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( @@ -140,7 +140,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Keep Source Image Name", description="Keep the filename of the input image selected as central image for the output image filename.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="fusionWeight", @@ -152,7 +152,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value="gaussian", values=["gaussian", "triangle", "plateau"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -161,7 +161,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -173,7 +173,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( @@ -181,7 +181,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Enable Highlight", description="Enable highlights correction.", value=False, - uid=[0], + invalidate=True, group="user", # not used directly on the command line enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -195,7 +195,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "This parameter is float to enable to weight this correction.", value=1.0, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: node.enableHighlight.enabled and node.enableHighlight.value, ), desc.FloatParam( @@ -218,7 +218,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): " - 150 lux: Home\n", value=120000.0, range=(1000.0, 150000.0, 1.0), - uid=[0], + invalidate=True, enabled=lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( @@ -232,7 +232,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -241,7 +241,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -251,7 +251,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Folder", description="Path to the folder containing the merged HDR images.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -259,7 +259,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index fb53cd1520..f9e5c6668d 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -65,7 +65,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="userNbBrackets", @@ -73,7 +73,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), - uid=[], + invalidate=False, group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" "Errors will occur during the computation.", @@ -86,7 +86,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 15, 1), - uid=[0], + invalidate=True, group="bracketsParams", ), desc.BoolParam( @@ -94,7 +94,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( @@ -109,7 +109,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): values=["auto", "linear", "debevec", "grossberg", "laguerre"], value="auto", exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -118,7 +118,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -130,7 +130,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -139,7 +139,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Size of the image tile to extract a sample.", value=256, range=(8, 1024, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -149,7 +149,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Radius of the patch used to analyze the sample statistics.", value=5, range=(0, 10, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -159,7 +159,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Maximum number of samples per image group.", value=200, range=(10, 1000, 10), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -168,7 +168,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="Export Debug Files", description="Export debug files to analyze the sampling strategy.", value=False, - uid=[], + invalidate=False, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( @@ -178,7 +178,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -188,7 +188,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="Folder", description="Output path for the samples.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LidarDecimating.py b/meshroom/aliceVision/LidarDecimating.py index f92291b223..4403696aea 100644 --- a/meshroom/aliceVision/LidarDecimating.py +++ b/meshroom/aliceVision/LidarDecimating.py @@ -24,7 +24,7 @@ class LidarDecimating(desc.AVCommandLineNode): label="Input JSON", description="Input JSON file with description of inputs.", value="", - uid=[0], + invalidate=True, ), desc.FloatParam( name="errorLimit", @@ -32,7 +32,7 @@ class LidarDecimating(desc.AVCommandLineNode): description="Maximal distance (in meters) allowed.", value=0.001, range=(0.0, 1.0, 0.001), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -41,7 +41,7 @@ class LidarDecimating(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -51,13 +51,13 @@ class LidarDecimating(desc.AVCommandLineNode): label="Sub-Meshes Directory", description="Output directory for sub-meshes.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outputJson", label="Scene Description", description="Output scene description.", value=desc.Node.internalFolder + "scene.json", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LidarMerging.py b/meshroom/aliceVision/LidarMerging.py index 2740d0105a..53b0722643 100644 --- a/meshroom/aliceVision/LidarMerging.py +++ b/meshroom/aliceVision/LidarMerging.py @@ -20,7 +20,7 @@ class LidarMerging(desc.AVCommandLineNode): label="Input JSON", description="Input JSON file with description of inputs.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -29,7 +29,7 @@ class LidarMerging(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -39,6 +39,6 @@ class LidarMerging(desc.AVCommandLineNode): label="Mesh Path Output", description="Output directory for mesh.", value=desc.Node.internalFolder + "output.obj", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LidarMeshing.py b/meshroom/aliceVision/LidarMeshing.py index 98af094226..12688994ba 100644 --- a/meshroom/aliceVision/LidarMeshing.py +++ b/meshroom/aliceVision/LidarMeshing.py @@ -24,7 +24,7 @@ class LidarMeshing(desc.AVCommandLineNode): label="Input JSON", description="Input JSON file with description of inputs.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="useBoundingBox", @@ -33,7 +33,7 @@ class LidarMeshing(desc.AVCommandLineNode): "If enabled, it takes priority over the 'Estimate Space From SfM' option.\n" "Parameters can be adjusted in advanced settings.", value=False, - uid=[0], + invalidate=True, group="", ), desc.GroupAttribute( @@ -49,19 +49,19 @@ class LidarMeshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), ], @@ -75,19 +75,19 @@ class LidarMeshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="Euler X rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-90.0, 90.0, 1.0), ), desc.FloatParam( name="y", label="y", description="Euler Y rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-180.0, 180.0, 1.0), ), desc.FloatParam( name="z", label="z", description="Euler Z rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-180.0, 180.0, 1.0), ), ], @@ -101,19 +101,19 @@ class LidarMeshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X scale.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y scale.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z scale.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 20.0, 0.01), ), ], @@ -130,7 +130,7 @@ class LidarMeshing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -140,13 +140,13 @@ class LidarMeshing(desc.AVCommandLineNode): label="Sub-Meshes Directory", description="Output directory for sub-meshes", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outputJson", label="Scene Description", description="Output scene description.", value=desc.Node.internalFolder + "scene.json", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 97b795af19..9b1133cfab 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -18,28 +18,28 @@ class LightingCalibration(desc.CommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="inputDetection", label="Sphere Detection File", description="Input JSON file containing sphere centers and radiuses.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="saveAsModel", label="Save As Model", description="Check if this calibration file will be used with other datasets.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="ellipticEstimation", label="Use elliptic estimation", description="Consider the right projection of the sphere. Fit the circle tool on the small axe of the ellipse.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="method", @@ -50,7 +50,7 @@ class LightingCalibration(desc.CommandLineNode): values=["brightestPoint", "whiteSphere", "SH"], value="brightestPoint", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -59,7 +59,7 @@ class LightingCalibration(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -69,7 +69,7 @@ class LightingCalibration(desc.CommandLineNode): label="Light File", description="Light information will be written here.", value=desc.Node.internalFolder + "/lights.json", - uid=[], + invalidate=False, ), desc.File( name="lightingEstimationVisualization", @@ -77,6 +77,6 @@ class LightingCalibration(desc.CommandLineNode): description="Estimated Lighting Visualization.", semantic="image", value=desc.Node.internalFolder + "/<FILESTEM>_{methodValue}.png", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index 014dbdf6d6..899196a492 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -17,14 +17,14 @@ class LightingEstimation(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="depthMapsFilterFolder", label="Filtered Depth Maps Folder", description="Input filtered depth maps folder.", value="", - uid=[0], + invalidate=True, ), desc.File( name="imagesFolder", @@ -32,7 +32,7 @@ class LightingEstimation(desc.AVCommandLineNode): description="Use images from a specific folder instead of those specify in the SfMData file.\n" "Filename should be the image UID.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="lightingEstimationMode", @@ -41,7 +41,7 @@ class LightingEstimation(desc.AVCommandLineNode): value="global", values=["global", "per_image"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -51,7 +51,7 @@ class LightingEstimation(desc.AVCommandLineNode): value="RGB", values=["RGB", "Luminance"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -61,7 +61,7 @@ class LightingEstimation(desc.AVCommandLineNode): value="constant", values=["constant", "picture", "median_filter", "blur_filter"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -70,7 +70,7 @@ class LightingEstimation(desc.AVCommandLineNode): description="Albedo filter size for estimation method using filter.", value=3, range=(0, 100, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -80,7 +80,7 @@ class LightingEstimation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -90,6 +90,6 @@ class LightingEstimation(desc.AVCommandLineNode): label="Folder", description="Folder for output lighting vector files.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index fffc9d84d6..7254886b8c 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -24,14 +24,14 @@ class MergeMeshes(desc.AVCommandLineNode): label="First Mesh", description="Input first mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value="", - uid=[0], + invalidate=True, ), desc.File( name="inputSecondMesh", label="Second Mesh", description="Input second mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="mergeOperation", @@ -40,21 +40,21 @@ class MergeMeshes(desc.AVCommandLineNode): value="boolean_union", values=["boolean_union", "boolean_intersection", "boolean_difference"], exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="preProcess", label="Pre-Process", description="Pre-process the input meshes in order to avoid geometric errors in the merging process.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="postProcess", label="Post-Process", description="Post-process the output mesh in order to avoid future geometric errors.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -63,7 +63,7 @@ class MergeMeshes(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -73,6 +73,6 @@ class MergeMeshes(desc.AVCommandLineNode): label="Mesh", description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value=desc.Node.internalFolder + "mesh.stl", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index e2463ebd4a..8c8393a64a 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -20,7 +20,7 @@ class MeshDecimate(desc.AVCommandLineNode): label="Mesh", description="Input mesh in the OBJ format.", value="", - uid=[0], + invalidate=True, ), desc.FloatParam( name="simplificationFactor", @@ -28,7 +28,7 @@ class MeshDecimate(desc.AVCommandLineNode): description="Simplification factor for the decimation.", value=0.5, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.IntParam( name="nbVertices", @@ -36,7 +36,7 @@ class MeshDecimate(desc.AVCommandLineNode): description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minVertices", @@ -44,7 +44,7 @@ class MeshDecimate(desc.AVCommandLineNode): description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxVertices", @@ -52,7 +52,7 @@ class MeshDecimate(desc.AVCommandLineNode): description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="flipNormals", @@ -61,7 +61,7 @@ class MeshDecimate(desc.AVCommandLineNode): "It can be needed as it depends on the vertices order in triangles\n" "and the convention changes from one software to another.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -71,7 +71,7 @@ class MeshDecimate(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -81,6 +81,6 @@ class MeshDecimate(desc.AVCommandLineNode): label="Mesh", description="Output mesh in the OBJ file format.", value=desc.Node.internalFolder + "mesh.obj", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 99556e3141..8aa76a59b0 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -19,7 +19,7 @@ class MeshDenoising(desc.AVCommandLineNode): label="Mesh", description="Input mesh in the OBJ file format.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="denoisingIterations", @@ -27,7 +27,7 @@ class MeshDenoising(desc.AVCommandLineNode): description="Number of denoising iterations.", value=5, range=(0, 30, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="meshUpdateClosenessWeight", @@ -35,7 +35,7 @@ class MeshDenoising(desc.AVCommandLineNode): description="Closeness weight for mesh update. Must be positive.", value=0.001, range=(0.0, 0.1, 0.001), - uid=[0], + invalidate=True, ), desc.FloatParam( name="lambda", @@ -43,7 +43,7 @@ class MeshDenoising(desc.AVCommandLineNode): description="Regularization weight.", value=2.0, range=(0.0, 10.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="eta", @@ -53,7 +53,7 @@ class MeshDenoising(desc.AVCommandLineNode): "Must be positive.", value=1.5, range=(0.0, 20.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="mu", @@ -61,7 +61,7 @@ class MeshDenoising(desc.AVCommandLineNode): description="Gaussian standard deviation for guidance weight.", value=1.5, range=(0.0, 10.0, 0.01), - uid=[0], + invalidate=True, ), desc.FloatParam( name="nu", @@ -69,7 +69,7 @@ class MeshDenoising(desc.AVCommandLineNode): description="Gaussian standard deviation for signal weight.", value=0.3, range=(0.0, 5.0, 0.01), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="meshUpdateMethod", @@ -80,7 +80,7 @@ class MeshDenoising(desc.AVCommandLineNode): value=0, values=[0, 1], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -89,7 +89,7 @@ class MeshDenoising(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -99,6 +99,6 @@ class MeshDenoising(desc.AVCommandLineNode): label="Output", description="Output mesh in the OBJ file format.", value=desc.Node.internalFolder + "mesh.obj", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 71a84eee6a..17f116aede 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -18,7 +18,7 @@ class MeshFiltering(desc.AVCommandLineNode): label="Mesh", description="Input mesh file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -27,7 +27,7 @@ class MeshFiltering(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - uid=[0], + invalidate=True, group="", ), desc.BoolParam( @@ -35,7 +35,7 @@ class MeshFiltering(desc.AVCommandLineNode): label="Keep Only The Largest Mesh", description="Keep only the largest connected triangles group.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="smoothingSubset", @@ -44,7 +44,7 @@ class MeshFiltering(desc.AVCommandLineNode): value="all", values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -53,7 +53,7 @@ class MeshFiltering(desc.AVCommandLineNode): description="Neighbours of the boundaries to consider.", value=0, range=(0, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -62,7 +62,7 @@ class MeshFiltering(desc.AVCommandLineNode): description="Number of smoothing iterations.", value=5, range=(0, 50, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="smoothingLambda", @@ -70,7 +70,7 @@ class MeshFiltering(desc.AVCommandLineNode): description="Smoothing size.", value=1.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -80,7 +80,7 @@ class MeshFiltering(desc.AVCommandLineNode): value="all", values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -89,7 +89,7 @@ class MeshFiltering(desc.AVCommandLineNode): description="Number of filtering iterations.", value=1, range=(0, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -100,7 +100,7 @@ class MeshFiltering(desc.AVCommandLineNode): "0 disables the filtering.", value=60.0, range=(0.0, 100.0, 0.1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="filterTrianglesRatio", @@ -109,7 +109,7 @@ class MeshFiltering(desc.AVCommandLineNode): "0 disables the filtering.", value=0.0, range=(1.0, 50.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -119,7 +119,7 @@ class MeshFiltering(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -129,6 +129,6 @@ class MeshFiltering(desc.AVCommandLineNode): label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index c05fedf58c..7acd1011f0 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -17,14 +17,14 @@ class MeshMasking(desc.AVCommandLineNode): label="Dense SfMData", description="Dense SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="inputMesh", label="Input Mesh", description="Input mesh.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -33,7 +33,7 @@ class MeshMasking(desc.AVCommandLineNode): value="obj", values=["obj", "gltf", "fbx", "stl"], exclusive=True, - uid=[0], + invalidate=True, group="", ), desc.ListAttribute( @@ -42,7 +42,7 @@ class MeshMasking(desc.AVCommandLineNode): label="Masks Folder", description="Folder containing some masks.", value="", - uid=[0], + invalidate=True, ), name="masksFolders", label="Masks Folders", @@ -55,7 +55,7 @@ class MeshMasking(desc.AVCommandLineNode): value="png", values=["exr", "jpg", "png"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="threshold", @@ -63,14 +63,14 @@ class MeshMasking(desc.AVCommandLineNode): description="The minimum number of visibilities to keep a vertex.", value=1, range=(1, 100, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="smoothBoundary", label="Smooth Boundary", description="Modify the triangles at the boundary to fit the masks.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="invert", @@ -78,7 +78,7 @@ class MeshMasking(desc.AVCommandLineNode): description="If ticked, the selected area is ignored.\n" "If not, only the selected area is considered.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="undistortMasks", @@ -86,7 +86,7 @@ class MeshMasking(desc.AVCommandLineNode): description="Undistort the masks with the same parameters as the matching image.\n" "Select it if the masks are drawn on the original images.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="usePointsVisibilities", @@ -94,7 +94,7 @@ class MeshMasking(desc.AVCommandLineNode): description="Use the points visibilities from the meshing to filter triangles.\n" "Example: when they are occluded, back-face, etc.", value=False, - uid=[0] + invalidate=True ), desc.ChoiceParam( name="verboseLevel", @@ -103,7 +103,7 @@ class MeshMasking(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -113,6 +113,6 @@ class MeshMasking(desc.AVCommandLineNode): label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshRemoveUnseenFaces.py b/meshroom/aliceVision/MeshRemoveUnseenFaces.py index 63b977ff2a..3e0db120a1 100644 --- a/meshroom/aliceVision/MeshRemoveUnseenFaces.py +++ b/meshroom/aliceVision/MeshRemoveUnseenFaces.py @@ -21,14 +21,14 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="inputMesh", label="Mesh", description="Input Mesh file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -37,7 +37,7 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - uid=[0], + invalidate=True, group="", ), desc.IntParam( @@ -46,7 +46,7 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): description="Minimal number of observations to keep a vertex.", value=1, range=(0, 5, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minVertices", @@ -54,7 +54,7 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): description="Minimal number of killed vertices in a triangle to remove the triangle.", value=3, range=(1, 3, 1), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -63,7 +63,7 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -73,6 +73,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index e2175fdc37..9ceb357bb1 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -20,7 +20,7 @@ class MeshResampling(desc.AVCommandLineNode): label="Input Mesh", description="Input mesh in the OBJ file format.", value="", - uid=[0], + invalidate=True, ), desc.FloatParam( name="simplificationFactor", @@ -28,7 +28,7 @@ class MeshResampling(desc.AVCommandLineNode): description="Simplification factor for the resampling.", value=0.5, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.IntParam( name="nbVertices", @@ -36,7 +36,7 @@ class MeshResampling(desc.AVCommandLineNode): description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minVertices", @@ -44,7 +44,7 @@ class MeshResampling(desc.AVCommandLineNode): description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxVertices", @@ -52,7 +52,7 @@ class MeshResampling(desc.AVCommandLineNode): description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="nbLloydIter", @@ -60,7 +60,7 @@ class MeshResampling(desc.AVCommandLineNode): description="Number of iterations for Lloyd pre-smoothing.", value=40, range=(0, 100, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="flipNormals", @@ -68,7 +68,7 @@ class MeshResampling(desc.AVCommandLineNode): description="Option to flip face normals.\n" "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -77,7 +77,7 @@ class MeshResampling(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -87,6 +87,6 @@ class MeshResampling(desc.AVCommandLineNode): label="Mesh", description="Output mesh in the OBJ file format.", value=desc.Node.internalFolder + "mesh.obj", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index dc8c2e5ae1..9df76bbf00 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -28,14 +28,14 @@ class Meshing(desc.AVCommandLineNode): label="SfmData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="depthMapsFolder", label="Depth Maps Folder", description="Input depth maps folder.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -44,7 +44,7 @@ class Meshing(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - uid=[0], + invalidate=True, group="", ), desc.BoolParam( @@ -54,7 +54,7 @@ class Meshing(desc.AVCommandLineNode): "If enabled, it takes priority over the 'Estimate Space From SfM' option.\n" "Parameters can be adjusted in advanced settings.", value=False, - uid=[0], + invalidate=True, group="", ), desc.GroupAttribute( @@ -70,19 +70,19 @@ class Meshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), ], @@ -96,19 +96,19 @@ class Meshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="Euler X rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-90.0, 90.0, 1.0) ), desc.FloatParam( name="y", label="y", description="Euler Y rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-180.0, 180.0, 1.0) ), desc.FloatParam( name="z", label="z", description="Euler Z rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-180.0, 180.0, 1.0) ), ], @@ -122,19 +122,19 @@ class Meshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X scale.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y scale.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z scale.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 20.0, 0.01), ), ], @@ -149,7 +149,7 @@ class Meshing(desc.AVCommandLineNode): label="Estimate Space From SfM", description="Estimate the 3D space from the SfM.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -158,7 +158,7 @@ class Meshing(desc.AVCommandLineNode): description="Minimum number of observations for the space estimation from the SfM.", value=3, range=(0, 100, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.estimateSpaceFromSfM.value, ), @@ -168,7 +168,7 @@ class Meshing(desc.AVCommandLineNode): description="Minimum angle between two observations for the space estimation from the SfM.", value=10.0, range=(0.0, 120.0, 1.0), - uid=[0], + invalidate=True, enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.IntParam( @@ -177,7 +177,7 @@ class Meshing(desc.AVCommandLineNode): description="Maximum input points loaded from depth map images.", value=50000000, range=(500000, 500000000, 1000), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxPoints", @@ -185,7 +185,7 @@ class Meshing(desc.AVCommandLineNode): description="Maximum points at the end of the depth maps fusion.", value=5000000, range=(100000, 10000000, 1000), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxPointsPerVoxel", @@ -193,7 +193,7 @@ class Meshing(desc.AVCommandLineNode): description="Maximum points per voxel.", value=1000000, range=(500000, 30000000, 1000), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -204,7 +204,7 @@ class Meshing(desc.AVCommandLineNode): "too much time at the beginning loading all the depth values.", value=2, range=(1, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -214,7 +214,7 @@ class Meshing(desc.AVCommandLineNode): value="singleBlock", values=["singleBlock", "auto"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -224,7 +224,7 @@ class Meshing(desc.AVCommandLineNode): value="multiResolution", values=["multiResolution", "regularGrid"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -233,7 +233,7 @@ class Meshing(desc.AVCommandLineNode): description="Angle factor.", value=15.0, range=(0.0, 200.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -242,7 +242,7 @@ class Meshing(desc.AVCommandLineNode): description="Sim factor.", value=15.0, range=(0.0, 200.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -251,7 +251,7 @@ class Meshing(desc.AVCommandLineNode): description="Filter points based on their number of observations.", value=2, range=(1, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -260,7 +260,7 @@ class Meshing(desc.AVCommandLineNode): description="Size of the margin init coefficient, in pixels.", value=2.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -269,7 +269,7 @@ class Meshing(desc.AVCommandLineNode): description="Size of the margin final coefficient, in pixels.", value=4.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -278,7 +278,7 @@ class Meshing(desc.AVCommandLineNode): description="Vote margin factor.", value=4.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -287,7 +287,7 @@ class Meshing(desc.AVCommandLineNode): description="Contribute margin factor.", value=2.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -296,7 +296,7 @@ class Meshing(desc.AVCommandLineNode): description="Sim Gaussian size init.", value=10.0, range=(0.0, 50.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -305,7 +305,7 @@ class Meshing(desc.AVCommandLineNode): description="Sim Gaussian size.", value=10.0, range=(0.0, 50.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -314,7 +314,7 @@ class Meshing(desc.AVCommandLineNode): description="Minimum angle threshold.", value=1.0, range=(0.0, 10.0, 0.01), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -322,7 +322,7 @@ class Meshing(desc.AVCommandLineNode): label="Refine Fuse", description="Refine depth map fusion with the new pixels size defined by angle and similarity scores.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -331,7 +331,7 @@ class Meshing(desc.AVCommandLineNode): description="Grid size for the helper points.", value=10, range=(0, 50, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -339,7 +339,7 @@ class Meshing(desc.AVCommandLineNode): label="Densify", description="Densify scene with helper points around vertices.", value=False, - uid=[], + invalidate=False, advanced=True, group="", ), @@ -349,7 +349,7 @@ class Meshing(desc.AVCommandLineNode): description="Densify vertices: front.", value=1, range=(0, 5, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.densify.value, ), @@ -359,7 +359,7 @@ class Meshing(desc.AVCommandLineNode): description="Densify vertices: back.", value=1, range=(0, 5, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.densify.value, ), @@ -369,7 +369,7 @@ class Meshing(desc.AVCommandLineNode): description="Scale between points used to densify the scene.", value=20.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.densify.value, ), @@ -379,7 +379,7 @@ class Meshing(desc.AVCommandLineNode): description="Number of pixel size units to vote behind the vertex as FULL status.", value=4.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -388,7 +388,7 @@ class Meshing(desc.AVCommandLineNode): description="Weighting for full status.", value=1.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -396,14 +396,14 @@ class Meshing(desc.AVCommandLineNode): label="Weakly Supported Surface Support", description="Improve support of weakly supported surfaces with a tetrahedra fullness score filtering.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="addLandmarksToTheDensePointCloud", label="Add Landmarks To The Dense Point Cloud", description="Add SfM landmarks to the dense point cloud.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -413,7 +413,7 @@ class Meshing(desc.AVCommandLineNode): "Set to 0 to disable.", value=10, range=(0, 30, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -423,7 +423,7 @@ class Meshing(desc.AVCommandLineNode): "ratio between full/empty parts. Set to 0 to disable.", value=0.2, range=(0.0, 0.5, 0.01), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -433,7 +433,7 @@ class Meshing(desc.AVCommandLineNode): "between full/empty parts. Set to 0 to disable.", value=2, range=(0, 30, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -441,14 +441,14 @@ class Meshing(desc.AVCommandLineNode): label="Colorize Output", description="Whether to colorize output dense point cloud and mesh.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="addMaskHelperPoints", label="Add Mask Helper Points", description="Add Helper points on the outline of the depth maps masks.", value=False, - uid=[], + invalidate=False, advanced=True, group="", ), @@ -458,7 +458,7 @@ class Meshing(desc.AVCommandLineNode): description="Weight value for mask helper points. 0 means no helper point.", value=1.0, range=(0.0, 20.0, 1.0), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.addMaskHelperPoints.value, ), @@ -468,7 +468,7 @@ class Meshing(desc.AVCommandLineNode): description="Number of pixels on mask borders.", value=4, range=(0, 20, 1), - uid=[0], + invalidate=True, advanced=True, enabled=lambda node: node.addMaskHelperPoints.value, ), @@ -480,7 +480,7 @@ class Meshing(desc.AVCommandLineNode): "0 means that all helper points are removed. -1 means that helper points are not filtered at all.", value=50, range=(-1, 100, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -488,7 +488,7 @@ class Meshing(desc.AVCommandLineNode): label="Save Raw Dense Point Cloud", description="Save dense point cloud before cut and filtering.", value=False, - uid=[], + invalidate=False, advanced=True, ), desc.BoolParam( @@ -497,7 +497,7 @@ class Meshing(desc.AVCommandLineNode): description="Export debug cells score as tetrahedral mesh.\n" "WARNING: Could create HUGE meshes, only use on very small datasets.", value=False, - uid=[], + invalidate=False, advanced=True, ), desc.IntParam( @@ -507,7 +507,7 @@ class Meshing(desc.AVCommandLineNode): "0 means use of random device instead of a fixed seed.", value=0, range=(0, 10000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -517,7 +517,7 @@ class Meshing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -527,13 +527,13 @@ class Meshing(desc.AVCommandLineNode): label="Mesh", description="Output mesh.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - uid=[], + invalidate=False, ), desc.File( name="output", label="Dense SfMData", description="Output dense point cloud with visibilities (SfMData file format).", value=desc.Node.internalFolder + "densePointCloud.abc", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index fae09a7dc6..25573e5de2 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -19,21 +19,21 @@ class NodalSfM(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Input tracks file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="pairs", label="Pairs File", description="Information on pairs.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -42,7 +42,7 @@ class NodalSfM(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -52,6 +52,6 @@ class NodalSfM(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 0f4567b0a1..2f56637817 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -16,14 +16,14 @@ class NormalIntegration(desc.CommandLineNode): label="Normal Maps Folder", description="Path to the folder containing the normal maps and the masks.", value="", - uid=[0], + invalidate=True, ), desc.File( name="sfmDataFile", label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="downscale", @@ -32,7 +32,7 @@ class NormalIntegration(desc.CommandLineNode): value=1, range=(1, 10, 1), advanced=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -41,7 +41,7 @@ class NormalIntegration(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -52,7 +52,7 @@ class NormalIntegration(desc.CommandLineNode): description="Generated depth in the camera coordinate system.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_depthMap.exr", - uid=[], + invalidate=False, group="", # do not export on the command line ) ] diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index eb214aae08..a76d982564 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -29,21 +29,21 @@ class PanoramaCompositing(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="warpingFolder", label="Warping Folder", description="Panorama warping results folder.", value="", - uid=[0], + invalidate=True, ), desc.File( name="labels", label="Labels Images", description="Panorama seams results images.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="compositerType", @@ -55,7 +55,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): value="multiband", values=["replace", "alpha", "multiband"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="forceMinPyramidLevels", @@ -63,7 +63,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): description="Force the minimal number of levels in the pyramid for multiband compositer.", value=0, range=(0, 16, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.compositerType.value and node.compositerType.value == "multiband", ), desc.IntParam( @@ -72,7 +72,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): description="Specifies the maximum number of threads to run simultaneously.", value=4, range=(0, 48, 1), - uid=[], + invalidate=False, advanced=True, ), desc.BoolParam( @@ -80,7 +80,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): label="Use Tiling", description="Enable tiling mode for parallelization.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -93,7 +93,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="overlayType", @@ -107,7 +107,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): values=["none", "borders", "seams", "all"], exclusive=True, advanced=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -116,7 +116,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -126,6 +126,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): label="Folder", description="Output folder containing the composited panorama.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 5f11e13ad8..a03819505e 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -22,7 +22,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -30,7 +30,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -42,7 +42,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some matches.", value="", - uid=[0], + invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -55,7 +55,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["sift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.FloatParam( @@ -64,7 +64,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Offset to the panorama longitude (in degrees).", value=0.0, range=(-180.0, 180.0, 1.0), - uid=[0], + invalidate=True, ), desc.FloatParam( name="offsetLatitude", @@ -72,7 +72,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Offset to the panorama latitude (in degrees).", value=0.0, range=(-90.0, 90.0, 1.0), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="rotationAveraging", @@ -83,7 +83,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=["L1_minimization", "L2_minimization"], value="L2_minimization", exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -96,7 +96,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=["essential_matrix", "homography_matrix", "rotation_matrix"], value="rotation_matrix", exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -104,7 +104,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Rotation Averaging Weighting", description="Rotation averaging weighting based on the number of feature matches.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -112,14 +112,14 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Filter Matches", description="Filter the matches.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="refine", label="Refine", description="Refine camera relative poses, points and optionally internal camera parameters.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="lockAllIntrinsics", @@ -128,7 +128,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="maxAngleToPrior", @@ -136,7 +136,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Maximum angle allowed regarding the input prior (in degrees) before refinement.", value=20.0, range=(0.0, 360.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -145,7 +145,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Maximum angle allowed regarding the input prior (in degrees) after refinement.", value=2.0, range=(0.0, 360.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -154,7 +154,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Maximum angular error in global rotation averging (in degrees).", value=100.0, range=(0.0, 360.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -162,7 +162,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Intermediate Refine: Focal", description="Intermediate refine with rotation and focal length only.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -170,7 +170,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Intermediate Refine: Focal And Distortion", description="Intermediate refine with rotation, focal length and distortion.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -180,7 +180,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -190,13 +190,13 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="SfM File", description="Path to the output SfM file.", value=desc.Node.internalFolder + "panorama.abc", - uid=[], + invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Views And Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 4ee66852f6..322a7a6b81 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -27,7 +27,7 @@ class PanoramaInit(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="initializeCameras", @@ -36,14 +36,14 @@ class PanoramaInit(desc.AVCommandLineNode): value="No", values=["No", "File", "Horizontal", "Horizontal+Zenith", "Zenith+Horizontal", "Spherical"], exclusive=True, - uid=[0], + invalidate=True, ), desc.File( name="config", label="XML Config", description="XML data file.", value="", - uid=[0], + invalidate=True, enabled=lambda node: node.initializeCameras.value == "File", ), desc.BoolParam( @@ -51,7 +51,7 @@ class PanoramaInit(desc.AVCommandLineNode): label="Yaw CW", description="If selected, the yaw rotation will be clockwise. Otherwise, it will be counter-clockwise.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: ("Horizontal" in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), ), desc.BoolParam( @@ -60,7 +60,7 @@ class PanoramaInit(desc.AVCommandLineNode): description="Build the contact sheet for the panorama if an XML data file is provided.\n" "The contact sheet consists in a preview of the panorama using the input images.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: node.config.enabled and node.config.value != "", ), desc.ListAttribute( @@ -70,7 +70,7 @@ class PanoramaInit(desc.AVCommandLineNode): description="Number of views for a line.", value=-1, range=(-1, 20, 1), - uid=[0], + invalidate=True, ), name="nbViewsPerLine", label="Spherical: Nb Views Per Line", @@ -85,14 +85,14 @@ class PanoramaInit(desc.AVCommandLineNode): label="Full Fisheye", description="Set this option to declare a full fisheye panorama setup.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="estimateFisheyeCircle", label="Estimate Fisheye Circle", description="Automatically estimate the fisheye circle center and radius instead of using user values.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: node.useFisheye.value, ), desc.GroupAttribute( @@ -105,7 +105,7 @@ class PanoramaInit(desc.AVCommandLineNode): label="x", description="X offset in pixels.", value=0.0, - uid=[0], + invalidate=True, range=(-1000.0, 10000.0, 1.0), ), desc.FloatParam( @@ -113,7 +113,7 @@ class PanoramaInit(desc.AVCommandLineNode): label="y", description="Y offset in pixels.", value=0.0, - uid=[0], + invalidate=True, range=(-1000.0, 10000.0, 1.0), ), ], @@ -126,7 +126,7 @@ class PanoramaInit(desc.AVCommandLineNode): description="Fisheye visibillity circle radius (in % of image's shortest side).", value=96.0, range=(0.0, 150.0, 0.01), - uid=[0], + invalidate=True, enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.ChoiceParam( @@ -136,14 +136,14 @@ class PanoramaInit(desc.AVCommandLineNode): value="None", values=["None", "rotate90", "rotate180", "rotate270"], exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="debugFisheyeCircleEstimation", label="Debug Fisheye Circle Detection", description="Debug fisheye circle detection.", value=False, - uid=[0], + invalidate=True, enabled=lambda node: node.useFisheye.value, advanced=True, ), @@ -154,7 +154,7 @@ class PanoramaInit(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -164,6 +164,6 @@ class PanoramaInit(desc.AVCommandLineNode): label="SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 66a4cda361..051047cd26 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -24,14 +24,14 @@ class PanoramaMerging(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="compositingFolder", label="Compositing Folder", description="Panorama compositing results.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputFileType", @@ -40,15 +40,15 @@ class PanoramaMerging(desc.AVCommandLineNode): value="exr", values=["jpg", "png", "tif", "exr"], exclusive=True, - uid=[0], - group="", # not part of allParams, as this is not a parameter for the command line + invalidate=True, + group="", # not part of allParams, as this is not a parameter for the command line ), desc.BoolParam( name="useTiling", label="Use Tiling", description="Enable tiling mode for parallelization.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -61,7 +61,7 @@ class PanoramaMerging(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -70,7 +70,7 @@ class PanoramaMerging(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -81,6 +81,6 @@ class PanoramaMerging(desc.AVCommandLineNode): description="Output merged panorama image.", semantic="image", value=desc.Node.internalFolder + "panorama.{outputFileTypeValue}", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 6f78b5f6f8..b99cec836f 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -23,21 +23,21 @@ class PanoramaPostProcessing(desc.CommandLineNode): label="Input Panorama", description="Input panorama image.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="fillHoles", label="Fill Holes Algorithm", description="Fill the non attributed pixels with push pull algorithm if set.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="exportLevels", label="Export Downscaled Levels", description="Export downscaled panorama levels.", value=False, - uid=[0], + invalidate=True, ), desc.IntParam( name="lastLevelMaxSize", @@ -45,7 +45,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Maximum width of smallest downscaled panorama level.", value=3840, range=(1, 100000), - uid=[0], + invalidate=True, ), desc.IntParam( name="previewSize", @@ -53,7 +53,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="The width (in pixels) of the output panorama preview.", value=1000, range=(0, 5000, 100), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputColorSpace", @@ -62,7 +62,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): values=COLORSPACES, value="Linear", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="compressionMethod", @@ -71,7 +71,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): value="auto", values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="compressionLevel", @@ -81,7 +81,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): "A value of 0 will be ignored, default value for the selected method will be used.", value=0, range=(0, 500, 1), - uid=[0], + invalidate=True, enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"], ), desc.StringParam( @@ -89,7 +89,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): label="Output Panorama Name", description="Name of the output panorama.", value="panorama.exr", - uid=[], + invalidate=False, group=None, advanced=True, ), @@ -98,7 +98,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): label="Panorama Preview Name", description="Name of the preview of the output panorama.", value="panoramaPreview.jpg", - uid=[], + invalidate=False, group=None, advanced=True, ), @@ -109,7 +109,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -120,7 +120,7 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Generated panorama in EXR format.", semantic="image", value=lambda attr: desc.Node.internalFolder + attr.node.panoramaName.value, - uid=[], + invalidate=False, ), desc.File( name="outputPanoramaPreview", @@ -128,14 +128,14 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Preview of the generated panorama in JPG format.", semantic="image", value=lambda attr: desc.Node.internalFolder + attr.node.previewName.value, - uid=[], + invalidate=False, ), desc.File( name="downscaledPanoramaLevels", label="Downscaled Panorama Levels", description="Downscaled versions of the generated panorama.", value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.panoramaName.value)[0] + "_level_*.exr", - uid=[], + invalidate=False, group="", ), ] diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index ace260e674..062c73225f 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -21,7 +21,7 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -30,7 +30,7 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -40,6 +40,6 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): label="SfMData", description="Output SfMData file.", value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value), - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 1f90b29824..d860a0e016 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -24,14 +24,14 @@ class PanoramaSeams(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="warpingFolder", label="Warping Folder", description="Panorama warping results.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="maxWidth", @@ -39,14 +39,14 @@ class PanoramaSeams(desc.AVCommandLineNode): description="Maximal resolution for the panorama seams estimation.", value=5000, range=(0, 100000, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="useGraphCut", label="Use Smart Seams", description="Use a graphcut algorithm to optimize seams for better transitions between images.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -55,7 +55,7 @@ class PanoramaSeams(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -66,13 +66,13 @@ class PanoramaSeams(desc.AVCommandLineNode): description="", semantic="image", value=desc.Node.internalFolder + "labels.exr", - uid=[], + invalidate=False, ), desc.File( name="outputSfm", label="Output SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "panorama.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index 4f29edd456..ba654662ff 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -24,14 +24,14 @@ class PanoramaWarping(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="estimateResolution", label="Estimate Resolution", description="Estimate output panorama resolution automatically based on the resolution of input images.", value=True, - uid=[0], + invalidate=True, group=None, # skip group from command line ), desc.IntParam( @@ -40,7 +40,7 @@ class PanoramaWarping(desc.AVCommandLineNode): description="Choose the output panorama width (in pixels).", value=10000, range=(0, 50000, 1000), - uid=[0], + invalidate=True, enabled=lambda node: (not node.estimateResolution.value), ), desc.IntParam( @@ -55,7 +55,7 @@ class PanoramaWarping(desc.AVCommandLineNode): value=50, range=(0, 100, 1), enabled=lambda node: (node.estimateResolution.value), - uid=[0], + invalidate=True, ), desc.IntParam( name="maxPanoramaWidth", @@ -63,7 +63,7 @@ class PanoramaWarping(desc.AVCommandLineNode): description="Choose the maximum width for the output panorama (in pixels). 0 means no limit.", value=70000, range=(0, 100000, 1000), - uid=[0], + invalidate=True, enabled=lambda node: (node.estimateResolution.value), ), desc.ChoiceParam( @@ -73,7 +73,7 @@ class PanoramaWarping(desc.AVCommandLineNode): values=COLORSPACES, value="Linear", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -86,7 +86,7 @@ class PanoramaWarping(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -95,7 +95,7 @@ class PanoramaWarping(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -105,6 +105,6 @@ class PanoramaWarping(desc.AVCommandLineNode): label="Folder", description="Output folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index a316821fc8..2779c7bda6 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -17,7 +17,7 @@ class PhotometricStereo(desc.CommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="pathToJSONLightFile", @@ -25,14 +25,14 @@ class PhotometricStereo(desc.CommandLineNode): description="Path to a JSON file containing the lighting information.\n" "If empty, .txt files are expected in the image folder.", value="defaultJSON.txt", - uid=[0], + invalidate=True, ), desc.File( name="maskPath", label="Mask Folder Path", description="Path to a folder containing masks or to a mask directly.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="SHOrder", @@ -45,7 +45,7 @@ class PhotometricStereo(desc.CommandLineNode): value="0", exclusive=True, advanced=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="removeAmbient", @@ -53,7 +53,7 @@ class PhotometricStereo(desc.CommandLineNode): description="True if the ambient light is to be removed on the PS images, false otherwise.", value=False, advanced=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="isRobust", @@ -61,7 +61,7 @@ class PhotometricStereo(desc.CommandLineNode): description="True to use the robust algorithm, false otherwise.", value=False, advanced=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="downscale", @@ -70,7 +70,7 @@ class PhotometricStereo(desc.CommandLineNode): value=1, range=(1, 10, 1), advanced=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -79,7 +79,7 @@ class PhotometricStereo(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -89,14 +89,14 @@ class PhotometricStereo(desc.CommandLineNode): label="Output Folder", description="Path to the output folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outputSfmDataAlbedo", label="SfMData Albedo", description="Output SfMData file containing the albedo information.", value=desc.Node.internalFolder + "/albedoMaps.sfm", - uid=[], + invalidate=False, group="", # remove from command line ), desc.File( @@ -104,7 +104,7 @@ class PhotometricStereo(desc.CommandLineNode): label="SfMData Normal", description="Output SfMData file containing the normal maps information.", value=desc.Node.internalFolder + "/normalMaps.sfm", - uid=[], + invalidate=False, group="", # remove from command line ), desc.File( @@ -112,7 +112,7 @@ class PhotometricStereo(desc.CommandLineNode): label="SfMData Normal PNG", description="Output SfMData file containing the normal maps information.", value=desc.Node.internalFolder + "/normalMapsPNG.sfm", - uid=[], + invalidate=False, group="", # remove from command line ), # these attributes are only here to describe more accurately the output of the node @@ -124,7 +124,7 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated normal maps in the camera coordinate system.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals.exr", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -133,7 +133,7 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated normal maps in the camera coordinate system (in false colors).", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals.png", - uid=[], + invalidate=False, group="", # do not export on the command line ), desc.File( @@ -142,7 +142,7 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated normal maps in the world coordinate system.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals_w.exr", - uid=[], + invalidate=False, group="", # do not export on the command line ), @@ -152,7 +152,7 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated albedo maps.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_albedo.png", - uid=[], + invalidate=False, group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index a9be30e484..a9661dcd6d 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -21,7 +21,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -29,7 +29,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Images Folder", description="", value="", - uid=[0], + invalidate=True, ), name="imagesFolders", label="Images Folders", @@ -41,7 +41,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Masks Folder", description="", value="", - uid=[0], + invalidate=True, ), name="masksFolders", label="Masks Folders", @@ -54,7 +54,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): value="png", values=["exr", "jpg", "png"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputFileType", @@ -63,7 +63,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): value="exr", values=["jpg", "png", "tif", "exr"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -71,7 +71,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Save Metadata", description="Save projections and intrinsics information in images metadata (only for .exr images).", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -79,7 +79,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Save Matrices Text Files", description="Save projections and intrinsics information in text files.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -87,7 +87,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Correct Images Exposure", description="Apply a correction on images' exposure value.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -97,7 +97,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -107,7 +107,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Images Folder", description="Output folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="undistorted", @@ -115,7 +115,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="List of undistorted images.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>.{outputFileTypeValue}", - uid=[], + invalidate=False, group="", advanced=True, ), diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 7479383c11..9cdfed47a7 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -1,5 +1,3 @@ -from __future__ import print_function - __version__ = "1.3" from meshroom.core import desc @@ -26,7 +24,7 @@ class Publish(desc.Node): label="Input", description="File or folder to publish.", value="", - uid=[0], + invalidate=True, ), name="inputFiles", label="Input Files", @@ -38,7 +36,7 @@ class Publish(desc.Node): label="Output Folder", description="Folder to publish to.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -47,7 +45,7 @@ class Publish(desc.Node): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index c525946db6..b3e0653d1b 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -21,21 +21,21 @@ class RelativePoseEstimating(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Tracks file.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="enforcePureRotation", label="Enforce pure rotation", description="Enforce pure rotation as a model", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -44,7 +44,7 @@ class RelativePoseEstimating(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -54,6 +54,6 @@ class RelativePoseEstimating(desc.AVCommandLineNode): label="Pairs Info", description="Path to the output Pairs info files directory.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SelectConnectedViews.py b/meshroom/aliceVision/SelectConnectedViews.py index 329a7dfa4f..7adf5660da 100644 --- a/meshroom/aliceVision/SelectConnectedViews.py +++ b/meshroom/aliceVision/SelectConnectedViews.py @@ -21,7 +21,7 @@ class SelectConnectedViews(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.IntParam( name="maxTCams", @@ -29,7 +29,7 @@ class SelectConnectedViews(desc.AVCommandLineNode): description="Maximum number of neighbour cameras per image.", value=10, range=(1, 20, 1), - uid=[0], + invalidate=True, ), desc.FloatParam( name="minViewAngle", @@ -37,7 +37,7 @@ class SelectConnectedViews(desc.AVCommandLineNode): description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=2.0, range=(0.0, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -46,7 +46,7 @@ class SelectConnectedViews(desc.AVCommandLineNode): description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=70.0, range=(10.0, 120.0, 1.0), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -56,7 +56,7 @@ class SelectConnectedViews(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -66,6 +66,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): label="Connected Views", description="List of connected views in a text file.", value=desc.Node.internalFolder + "connectedViews.txt", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 04d7cf6250..d99ed73604 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -29,14 +29,14 @@ class SfMAlignment(desc.AVCommandLineNode): label="Input", description="Input SfMData file .", value="", - uid=[0], + invalidate=True, ), desc.File( name="reference", label="Reference", description="Path to the scene used as the reference coordinate system.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="method", @@ -51,7 +51,7 @@ class SfMAlignment(desc.AVCommandLineNode): value="from_cameras_viewid", values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers", 'from_landmarks'], exclusive=True, - uid=[0], + invalidate=True, ), desc.StringParam( name="fileMatchingPattern", @@ -66,7 +66,7 @@ class SfMAlignment(desc.AVCommandLineNode): " - Match the filename prefix before '_': " r'".*\/(.*?)_.*\.\w{3}"', value=r".*\/(.*?)\.\w{3}", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -74,7 +74,7 @@ class SfMAlignment(desc.AVCommandLineNode): label="Metadata", description="", value="Metadata that should match to create the correspondences.", - uid=[0], + invalidate=True, ), name="metadataMatchingList", label="Metadata Matching List", @@ -86,21 +86,21 @@ class SfMAlignment(desc.AVCommandLineNode): label="Scale", description="Apply scale transformation.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="applyRotation", label="Rotation", description="Apply rotation transformation.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="applyTranslation", label="Translation", description="Apply translation transformation.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -109,7 +109,7 @@ class SfMAlignment(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -119,13 +119,13 @@ class SfMAlignment(desc.AVCommandLineNode): label="SfMData File", description="Output SfMData file.", value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", - uid=[], + invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py index c82dc14811..184d0aac46 100644 --- a/meshroom/aliceVision/SfMDistances.py +++ b/meshroom/aliceVision/SfMDistances.py @@ -17,7 +17,7 @@ class SfMDistances(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="objectType", @@ -26,7 +26,7 @@ class SfMDistances(desc.AVCommandLineNode): value="landmarks", values=["landmarks", "cameras"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="landmarksDescriberTypes", @@ -35,7 +35,7 @@ class SfMDistances(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["cctag3"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.StringParam( @@ -45,7 +45,7 @@ class SfMDistances(desc.AVCommandLineNode): "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" "It will list all elements if empty.", value="", - uid=[0], + invalidate=True, ), desc.StringParam( name="B", @@ -54,7 +54,7 @@ class SfMDistances(desc.AVCommandLineNode): "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" "It will list all elements if empty.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -63,7 +63,7 @@ class SfMDistances(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index 5b0d605b4f..4dc5969a98 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -46,14 +46,14 @@ class SfMMerge(desc.AVCommandLineNode): label="First SfMData", description="First input SfMData file to merge.", value="", - uid=[0], + invalidate=True, ), desc.File( name="secondinput", label="Second SfMData", description="Second input SfMData file to merge.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="method", @@ -64,7 +64,7 @@ class SfMMerge(desc.AVCommandLineNode): value="simple_copy", values=["simple_copy", 'from_landmarks'], exclusive=True, - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -72,7 +72,7 @@ class SfMMerge(desc.AVCommandLineNode): label="Matches Folder", description="", value="", - uid=[0], + invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -85,7 +85,7 @@ class SfMMerge(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -95,7 +95,7 @@ class SfMMerge(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -105,6 +105,6 @@ class SfMMerge(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM file (in SfMData format).", value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index 0b2e33cd55..03a5c756d2 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -21,7 +21,7 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -30,7 +30,7 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -40,13 +40,13 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): label="Reconstructed SfMData File", description="SfMData file containing the reconstructed cameras.", value=desc.Node.internalFolder + "sfmReconstructed.abc", - uid=[], + invalidate=False, ), desc.File( name="notReconstructedOutput", label="Not Reconstructed SfMData File", description="SfMData file containing the non-reconstructed cameras.", value=desc.Node.internalFolder + "sfmNonReconstructed.abc", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py index 7e7f79057f..51453404b5 100644 --- a/meshroom/aliceVision/SfMToRig.py +++ b/meshroom/aliceVision/SfMToRig.py @@ -20,7 +20,7 @@ class SfMToRig(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -29,7 +29,7 @@ class SfMToRig(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -39,6 +39,6 @@ class SfMToRig(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM file (in SfMData format).", value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index d080c886ed..3951a12648 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -21,14 +21,14 @@ class SfMTransfer(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="reference", label="Reference", description="Path to the scene used as the reference to retrieve resolved poses and intrinsics.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="method", @@ -41,7 +41,7 @@ class SfMTransfer(desc.AVCommandLineNode): value="from_viewid", values=["from_viewid", "from_filepath", "from_metadata", "from_intrinsicid"], exclusive=True, - uid=[0], + invalidate=True, ), desc.StringParam( name="fileMatchingPattern", @@ -56,7 +56,7 @@ class SfMTransfer(desc.AVCommandLineNode): " - Match the filename prefix before \"_\": " r'".*\/(.*?)_.*\.\w{3}"', value=r'.*\/(.*?)\.\w{3}', - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -64,7 +64,7 @@ class SfMTransfer(desc.AVCommandLineNode): label="Metadata", description="Metadata that should match to create correspondences.", value="", - uid=[0], + invalidate=True, ), name="metadataMatchingList", label="Metadata Matching List", @@ -77,21 +77,21 @@ class SfMTransfer(desc.AVCommandLineNode): label="Poses", description="Transfer poses.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="transferIntrinsics", label="Intrinsics", description="Transfer cameras intrinsics.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="transferLandmarks", label="Landmarks", description="Transfer landmarks.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -100,7 +100,7 @@ class SfMTransfer(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -110,13 +110,13 @@ class SfMTransfer(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM point cloud file (in SfMData format).", value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", - uid=[], + invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index acf943a803..19f9d39e8c 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -31,7 +31,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="method", @@ -52,14 +52,14 @@ class SfMTransform(desc.AVCommandLineNode): value="auto", values=["transformation", "manual", "auto", "auto_from_cameras", "auto_from_cameras_x_axis", "auto_from_landmarks", "from_single_camera", "from_center_camera", "from_markers", "from_gps", "from_lineup", "align_ground"], exclusive=True, - uid=[0], + invalidate=True, ), desc.File( name="lineUp", label="Line Up File", description="LineUp Json file.", value="", - uid=[0], + invalidate=True, enabled=lambda node: node.method.value == "from_lineup" ), desc.File( @@ -67,7 +67,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Tracks File", description="Tracks file for lineup.", value="", - uid=[0], + invalidate=True, enabled=lambda node: node.method.value == "from_lineup" ), desc.File( @@ -75,7 +75,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Mesh File", description="Mesh file for lineup.", value="", - uid=[0], + invalidate=True, enabled=lambda node: node.method.value == "from_lineup" ), desc.StringParam( @@ -85,7 +85,7 @@ class SfMTransform(desc.AVCommandLineNode): " - transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" " - from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg').", value="", - uid=[0], + invalidate=True, enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera" or node.method.value == "auto_from_cameras_x_axis", ), desc.GroupAttribute( @@ -103,7 +103,7 @@ class SfMTransform(desc.AVCommandLineNode): label="x", description="X offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( @@ -111,7 +111,7 @@ class SfMTransform(desc.AVCommandLineNode): label="y", description="Y offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( @@ -119,7 +119,7 @@ class SfMTransform(desc.AVCommandLineNode): label="z", description="Z offset.", value=0.0, - uid=[0], + invalidate=True, range=(-20.0, 20.0, 0.01), ), ], @@ -135,7 +135,7 @@ class SfMTransform(desc.AVCommandLineNode): label="x", description="Euler X rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-90.0, 90.0, 1.0), ), desc.FloatParam( @@ -143,7 +143,7 @@ class SfMTransform(desc.AVCommandLineNode): label="y", description="Euler Y rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-180.0, 180.0, 1.0), ), desc.FloatParam( @@ -151,7 +151,7 @@ class SfMTransform(desc.AVCommandLineNode): label="z", description="Euler Z rotation.", value=0.0, - uid=[0], + invalidate=True, range=(-180.0, 180.0, 1.0), ), ], @@ -162,7 +162,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Scale", description="Uniform scale.", value=1.0, - uid=[0], + invalidate=True, range=(0.0, 20.0, 0.01), ), ], @@ -176,7 +176,7 @@ class SfMTransform(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["sift", "dspsift", "akaze"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.FloatParam( @@ -185,7 +185,7 @@ class SfMTransform(desc.AVCommandLineNode): description="Additional scale to apply.", value=1.0, range=(0.0, 100.0, 0.1), - uid=[0], + invalidate=True, ), desc.ListAttribute( name="markers", @@ -200,7 +200,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Marker", description="Marker ID.", value=0, - uid=[0], + invalidate=True, range=(0, 32, 1), ), desc.GroupAttribute( @@ -214,7 +214,7 @@ class SfMTransform(desc.AVCommandLineNode): label="x", description="X coordinates for the marker.", value=0.0, - uid=[0], + invalidate=True, range=(-2.0, 2.0, 1.0), ), desc.FloatParam( @@ -222,7 +222,7 @@ class SfMTransform(desc.AVCommandLineNode): label="y", description="Y coordinates for the marker.", value=0.0, - uid=[0], + invalidate=True, range=(-2.0, 2.0, 1.0), ), desc.FloatParam( @@ -230,7 +230,7 @@ class SfMTransform(desc.AVCommandLineNode): label="z", description="Z coordinates for the marker.", value=0.0, - uid=[0], + invalidate=True, range=(-2.0, 2.0, 1.0), ), ], @@ -245,7 +245,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Scale", description="Apply scale transformation.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( @@ -253,7 +253,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Rotation", description="Apply rotation transformation.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( @@ -261,7 +261,7 @@ class SfMTransform(desc.AVCommandLineNode): label="Translation", description="Apply translation transformation.", value=True, - uid=[0], + invalidate=True, enabled=lambda node: node.method.value != "manual", ), desc.ChoiceParam( @@ -271,7 +271,7 @@ class SfMTransform(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -281,13 +281,13 @@ class SfMTransform(desc.AVCommandLineNode): label="SfMData File", description="Aligned SfMData file.", value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", - uid=[], + invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index f28d38bc8a..2453452e19 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -20,7 +20,7 @@ class SfMTriangulation(desc.AVCommandLineNode): label="SfMData", description="SfMData file. Must contain the camera calibration.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -28,7 +28,7 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -40,7 +40,7 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Matches Folder", description="Folder in which some computed matches are stored.", value="", - uid=[0], + invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -53,7 +53,7 @@ class SfMTriangulation(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.IntParam( @@ -64,7 +64,7 @@ class SfMTriangulation(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minNumberOfMatches", @@ -74,7 +74,7 @@ class SfMTriangulation(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minNumberOfObservationsForTriangulation", @@ -85,7 +85,7 @@ class SfMTriangulation(desc.AVCommandLineNode): "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -94,7 +94,7 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -103,7 +103,7 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -111,7 +111,7 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Use Rig Constraint", description="Enable/Disable rig constraint.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -120,7 +120,7 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -128,7 +128,7 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Compute Structure Color", description="Enable/Disable color computation of each 3D point.", value=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="interFileExtension", @@ -137,7 +137,7 @@ class SfMTriangulation(desc.AVCommandLineNode): value=".abc", values=[".abc", ".ply"], exclusive=True, - uid=[], + invalidate=False, advanced=True, ), desc.ChoiceParam( @@ -147,7 +147,7 @@ class SfMTriangulation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -157,13 +157,13 @@ class SfMTriangulation(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - uid=[], + invalidate=False, ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index f8572fa5d3..9e08e978d8 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -18,21 +18,21 @@ class SfMBootStraping(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Tracks file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="pairs", label="Pairs File", description="Information on pairs.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -41,7 +41,7 @@ class SfMBootStraping(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -51,6 +51,6 @@ class SfMBootStraping(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.json", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index 336788217f..17fa723e5e 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -18,14 +18,14 @@ class SfMExpanding(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Tracks file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -34,7 +34,7 @@ class SfMExpanding(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), desc.IntParam( @@ -43,7 +43,7 @@ class SfMExpanding(desc.AVCommandLineNode): description="Maximum number of iterations allowed in the Ransac step.", value=50000, range=(1, 100000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -54,7 +54,7 @@ class SfMExpanding(desc.AVCommandLineNode): "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 100.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -63,7 +63,7 @@ class SfMExpanding(desc.AVCommandLineNode): description="Lock previously reconstructed poses and intrinsics.\n" "This option is useful for SfM augmentation.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="useLocalBA", @@ -71,7 +71,7 @@ class SfMExpanding(desc.AVCommandLineNode): description="It reduces the reconstruction time, especially for large datasets (500+ images),\n" "by avoiding computation of the Bundle Adjustment on areas that are not changing.", value=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="localBAGraphDistance", @@ -79,7 +79,7 @@ class SfMExpanding(desc.AVCommandLineNode): description="Graph-distance limit to define the active region in the Local Bundle Adjustment strategy.", value=1, range=(2, 10, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -90,7 +90,7 @@ class SfMExpanding(desc.AVCommandLineNode): "Past this number, the bundle adjustment will only be performed once for N added cameras.", value=30, range=(0, 100, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -100,7 +100,7 @@ class SfMExpanding(desc.AVCommandLineNode): "This prevents adding too much data at once without performing the bundle adjustment.", value=30, range=(0, 100, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -110,7 +110,7 @@ class SfMExpanding(desc.AVCommandLineNode): "Using a negative value for this threshold will disable BA iterations.", value=50, range=(-1, 1000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -122,7 +122,7 @@ class SfMExpanding(desc.AVCommandLineNode): "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -131,7 +131,7 @@ class SfMExpanding(desc.AVCommandLineNode): description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -140,7 +140,7 @@ class SfMExpanding(desc.AVCommandLineNode): description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -149,7 +149,7 @@ class SfMExpanding(desc.AVCommandLineNode): description="Maximum reprojection error.", value=4.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -159,7 +159,7 @@ class SfMExpanding(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - uid=[0], + invalidate=True, ), desc.IntParam( name="minNbCamerasToRefinePrincipalPoint", @@ -170,7 +170,7 @@ class SfMExpanding(desc.AVCommandLineNode): "If minNbCamerasToRefinePrincipalPoint is set to 1, the principal point is always refined.", value=3, range=(0, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), ] @@ -181,6 +181,6 @@ class SfMExpanding(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.json", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 7d64ee15dd..79592fd9fc 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -66,7 +66,7 @@ class SketchfabUpload(desc.Node): label="Input", description="", value="", - uid=[0], + invalidate=True, ), name="inputFiles", label="Input Files", @@ -78,21 +78,21 @@ class SketchfabUpload(desc.Node): label="API Token", description="Get your token from https://sketchfab.com/settings/password.", value="", - uid=[0], + invalidate=True, ), desc.StringParam( name="title", label="Title", description="Title cannot be longer than 48 characters.", value="", - uid=[0], + invalidate=True, ), desc.StringParam( name="description", label="Description", description="Description cannot be longer than 1024 characters.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="license", @@ -106,7 +106,7 @@ class SketchfabUpload(desc.Node): "CC Attribution-NonCommercial-ShareAlike", "CC Attribution-NonCommercial-NoDerivs"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.StringParam( @@ -114,7 +114,7 @@ class SketchfabUpload(desc.Node): label="Tag", description="Tag cannot be longer than 48 characters.", value="", - uid=[0], + invalidate=True, ), name="tags", label="Tags", @@ -146,35 +146,35 @@ class SketchfabUpload(desc.Node): "sports-fitness", "weapons-military"], exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="isPublished", label="Publish", description="If the model is not published, it will be saved as a draft.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="isInspectable", label="Inspectable", description="Allow 2D view in model inspector.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="isPrivate", label="Private", description="Requires a pro account.", value=False, - uid=[0], + invalidate=True, ), desc.StringParam( name="password", label="Password", description="Requires a pro account.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -183,7 +183,7 @@ class SketchfabUpload(desc.Node): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 5ee3ff368b..b6dcb45c12 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -18,21 +18,21 @@ class SphereDetection(desc.CommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="modelPath", label="Detection Network", description="Deep learning network for automatic calibration sphere detection.", value="${ALICEVISION_SPHERE_DETECTION_MODEL}", - uid=[0], + invalidate=True, ), desc.BoolParam( name="autoDetect", label="Automatic Sphere Detection", description="Automatic detection of calibration spheres.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="minScore", @@ -41,7 +41,7 @@ class SphereDetection(desc.CommandLineNode): value=0.0, range=(0.0, 50.0, 0.01), advanced=True, - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="sphereCenter", @@ -53,7 +53,7 @@ class SphereDetection(desc.CommandLineNode): label="x", description="X offset in pixels.", value=0.0, - uid=[0], + invalidate=True, range=(-1000.0, 10000.0, 1.0), ), desc.FloatParam( @@ -61,7 +61,7 @@ class SphereDetection(desc.CommandLineNode): label="y", description="Y offset in pixels.", value=0.0, - uid=[0], + invalidate=True, range=(-1000.0, 10000.0, 1.0), ), ], @@ -75,7 +75,7 @@ class SphereDetection(desc.CommandLineNode): value=500.0, range=(0.0, 10000.0, 0.1), enabled=lambda node: not node.autoDetect.value, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -84,7 +84,7 @@ class SphereDetection(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -94,6 +94,6 @@ class SphereDetection(desc.CommandLineNode): label="Output Path", description="Sphere detection information will be written here.", value=desc.Node.internalFolder + "/detection.json", - uid=[] + invalidate=False, ) ] diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index cd83347110..3eb1068d78 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -33,7 +33,7 @@ class Split360Images(desc.AVCommandLineNode): label="Input", description="Single image, image folder or SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="splitMode", @@ -42,7 +42,7 @@ class Split360Images(desc.AVCommandLineNode): value="equirectangular", values=["equirectangular", "dualfisheye"], exclusive=True, - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="dualFisheyeGroup", @@ -58,7 +58,7 @@ class Split360Images(desc.AVCommandLineNode): value="center", values=["center", "left", "right"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="dualFisheyeOffsetPresetY", @@ -67,7 +67,7 @@ class Split360Images(desc.AVCommandLineNode): value="center", values=["center", "top", "bottom"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="dualFisheyeCameraModel", @@ -76,7 +76,7 @@ class Split360Images(desc.AVCommandLineNode): value="fisheye4", values=["fisheye4", "equidistant_r3"], exclusive=True, - uid=[0], + invalidate=True, ), ], ), @@ -93,7 +93,7 @@ class Split360Images(desc.AVCommandLineNode): description="Equirectangular number of splits.", value=2, range=(1, 100, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="equirectangularSplitResolution", @@ -101,14 +101,14 @@ class Split360Images(desc.AVCommandLineNode): description="Equirectangular split resolution.", value=1200, range=(100, 10000, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="equirectangularPreviewMode", label="Preview Mode", description="Export a SVG file that simulates the split.", value=False, - uid=[0], + invalidate=True, ), desc.FloatParam( name="fov", @@ -116,7 +116,7 @@ class Split360Images(desc.AVCommandLineNode): description="Field of View to extract (in degrees).", value=110.0, range=(0.0, 180.0, 1.0), - uid=[0], + invalidate=True, ), ], ), @@ -127,7 +127,7 @@ class Split360Images(desc.AVCommandLineNode): value="", values=["", "exr", "jpg", "tiff", "png"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -136,7 +136,7 @@ class Split360Images(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -146,13 +146,13 @@ class Split360Images(desc.AVCommandLineNode): label="Folder", description="Output folder for extracted frames.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outSfMData", label="SfMData File", description="Output SfMData file.", value=desc.Node.internalFolder + "rig.sfm", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 87e3b3e156..b64904db6f 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -71,7 +71,7 @@ class StructureFromMotion(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -79,7 +79,7 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Features Folder", description="", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -91,7 +91,7 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Matches Folder", description="", value="", - uid=[0], + invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -104,7 +104,7 @@ class StructureFromMotion(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -114,7 +114,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value="acransac", values=["acransac", "ransac", "lsmeds", "loransac", "maxconsensus"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -126,7 +126,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value="Scale", values=["Basic", "Scale"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -135,7 +135,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Maximum number of iterations allowed in the Ransac step.", value=50000, range=(1, 100000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -146,7 +146,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 100.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -155,7 +155,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Lock previously reconstructed poses and intrinsics.\n" "This option is useful for SfM augmentation.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="useLocalBA", @@ -163,7 +163,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="It reduces the reconstruction time, especially for large datasets (500+ images),\n" "by avoiding computation of the Bundle Adjustment on areas that are not changing.", value=True, - uid=[0], + invalidate=True, ), desc.IntParam( name="localBAGraphDistance", @@ -171,7 +171,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Graph-distance limit to define the active region in the Local Bundle Adjustment strategy.", value=1, range=(2, 10, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -182,7 +182,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "Past this number, the bundle adjustment will only be performed once for N added cameras.", value=30, range=(0, 100, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -192,7 +192,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "This prevents adding too much data at once without performing the bundle adjustment.", value=30, range=(0, 100, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -202,7 +202,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "Using a negative value for this threshold will disable BA iterations.", value=50, range=(-1, 1000, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -213,7 +213,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minNumberOfMatches", @@ -223,7 +223,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minInputTrackLength", @@ -231,7 +231,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum track length in input of SfM.", value=2, range=(2, 10, 1), - uid=[0], + invalidate=True, ), desc.IntParam( name="minNumberOfObservationsForTriangulation", @@ -242,7 +242,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -251,7 +251,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -260,7 +260,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -269,7 +269,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Maximum reprojection error.", value=4.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -278,7 +278,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum angle for the initial pair.", value=5.0, range=(0.1, 10.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -287,7 +287,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Maximum angle for the initial pair.", value=40.0, range=(0.1, 60.0, 0.1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -296,7 +296,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Use only matches from the input matchesFolder parameter.\n" "Matches folders previously added to the SfMData file will be ignored.", value=False, - uid=[], + invalidate=False, advanced=True, ), desc.BoolParam( @@ -304,7 +304,7 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Use Rig Constraint", description="Enable/Disable rig constraint.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -313,7 +313,7 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -323,7 +323,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - uid=[0], + invalidate=True, ), desc.IntParam( name="minNbCamerasToRefinePrincipalPoint", @@ -334,7 +334,7 @@ class StructureFromMotion(desc.AVCommandLineNode): "If minNbCamerasToRefinePrincipalPoint is set to 1, the principal point is always refined.", value=3, range=(0, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -343,14 +343,14 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n" "lead to multiple features in the same image for a single track.", value=False, - uid=[0], + invalidate=True, ), desc.BoolParam( name="computeStructureColor", label="Compute Structure Color", description="Enable/Disable color computation of every 3D point.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="useAutoTransform", @@ -360,21 +360,21 @@ class StructureFromMotion(desc.AVCommandLineNode): "determines north and scale from GPS information if available,\n" "and defines ground level from the point cloud.", value=True, - uid=[0], + invalidate=True, ), desc.File( name="initialPairA", label="Initial Pair A", description="View ID or filename of the first image (either with or without the full path).", value="", - uid=[0], + invalidate=True, ), desc.File( name="initialPairB", label="Initial Pair B", description="View ID or filename of the second image (either with or without the full path).", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="interFileExtension", @@ -383,7 +383,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value=".abc", values=[".abc", ".ply"], exclusive=True, - uid=[], + invalidate=False, advanced=True, ), desc.BoolParam( @@ -391,7 +391,7 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Log Intermediate Steps", description="Dump the current state of the scene as an SfMData file every 3 resections.", value=False, - uid=[], + invalidate=False, advanced=True, ), desc.ChoiceParam( @@ -401,7 +401,7 @@ class StructureFromMotion(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -411,20 +411,20 @@ class StructureFromMotion(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM point cloud file (in SfMData format).", value=desc.Node.internalFolder + "sfm.abc", - uid=[], + invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Views And Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - uid=[], + invalidate=False, ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index cce12fc8ed..e530157e5a 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -31,7 +31,7 @@ class Texturing(desc.AVCommandLineNode): label="Dense SfMData", description="SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.File( name="imagesFolder", @@ -39,21 +39,21 @@ class Texturing(desc.AVCommandLineNode): description="Use images from a specific folder instead of those specified in the SfMData file.\n" "Filename should be the image UID.", value="", - uid=[0], + invalidate=True, ), desc.File( name="normalsFolder", label="Normals Folder", description="Use normal maps from a specific folder to texture the mesh.\nFilename should be : uid_normalMap.", value="", - uid=[0], + invalidate=True, ), desc.File( name="inputMesh", label="Mesh", description="Optional input mesh to texture. By default, it will texture the result of the reconstruction.", value="", - uid=[0], + invalidate=True, ), desc.File( name="inputRefMesh", @@ -61,7 +61,7 @@ class Texturing(desc.AVCommandLineNode): description="Optional input mesh to compute height maps and normal maps.\n" "If not provided, no additional map with geometric information will be generated.", value="", - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="textureSide", @@ -70,7 +70,7 @@ class Texturing(desc.AVCommandLineNode): value=8192, values=[1024, 2048, 4096, 8192, 16384], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="downscale", @@ -79,7 +79,7 @@ class Texturing(desc.AVCommandLineNode): value=2, values=[1, 2, 4, 8], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -88,7 +88,7 @@ class Texturing(desc.AVCommandLineNode): value="obj", values=["obj", "gltf", "fbx", "stl"], exclusive=True, - uid=[0], + invalidate=True, ), desc.GroupAttribute( name="colorMapping", @@ -102,7 +102,7 @@ class Texturing(desc.AVCommandLineNode): label="Enable", description="Generate textures if set to true.", value=True, - uid=[], + invalidate=False, group=None, ), desc.ChoiceParam( @@ -112,7 +112,7 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr", "png", "tiff", "jpg"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.colorMapping.enable.value, ), ], @@ -129,7 +129,7 @@ class Texturing(desc.AVCommandLineNode): label="Enable", description="Generate normal / bump maps if set to true.", value=True, - uid=[], + invalidate=False, group=None, ), desc.ChoiceParam( @@ -139,7 +139,7 @@ class Texturing(desc.AVCommandLineNode): value="Normal", values=["Height", "Normal"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.bumpMapping.enable.value, ), desc.ChoiceParam( @@ -149,7 +149,7 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr", "png", "tiff", "jpg"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal", ), desc.ChoiceParam( @@ -159,7 +159,7 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr",], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height", ), ], @@ -176,7 +176,7 @@ class Texturing(desc.AVCommandLineNode): label="Enable", description="Generate height maps for displacement.", value=True, - uid=[], + invalidate=False, group=None, ), desc.ChoiceParam( @@ -186,7 +186,7 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr"], exclusive=True, - uid=[0], + invalidate=True, enabled=lambda node: node.displacementMapping.enable.value, ), ], @@ -201,21 +201,21 @@ class Texturing(desc.AVCommandLineNode): value="Basic", values=["Basic", "LSCM", "ABF"], exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="useUDIM", label="Use UDIM", description="Use UDIM UV mapping.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="fillHoles", label="Fill Holes", description="Fill texture holes with plausible values.", value=False, - uid=[0], + invalidate=True, ), desc.IntParam( name="padding", @@ -223,7 +223,7 @@ class Texturing(desc.AVCommandLineNode): description="Texture edge padding size in pixels.", value=5, range=(0, 20, 1), - uid=[0], + invalidate=True, advanced=True, ), desc.IntParam( @@ -232,7 +232,7 @@ class Texturing(desc.AVCommandLineNode): description="Width of frequency bands for multiband blending.", value=4, range=(0, 8, 2), - uid=[0], + invalidate=True, advanced=True, ), desc.GroupAttribute( @@ -244,7 +244,7 @@ class Texturing(desc.AVCommandLineNode): label="High Freq", description="High frequency band.", value=1, - uid=[0], + invalidate=True, range=None, ), desc.IntParam( @@ -252,7 +252,7 @@ class Texturing(desc.AVCommandLineNode): label="Mid-High Freq", description="Mid-high frequency band.", value=5, - uid=[0], + invalidate=True, range=None, ), desc.IntParam( @@ -260,7 +260,7 @@ class Texturing(desc.AVCommandLineNode): label="Mid-Low Freq", description="Mid-low frequency band.", value=10, - uid=[0], + invalidate=True, range=None, ), desc.IntParam( @@ -268,7 +268,7 @@ class Texturing(desc.AVCommandLineNode): label="Low Freq", description="Low frequency band", value=0, - uid=[0], + invalidate=True, range=None, ), ], @@ -280,7 +280,7 @@ class Texturing(desc.AVCommandLineNode): label="Use Score", description="Use triangles scores (ie. reprojection area) for multi-band blending.", value=True, - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -289,7 +289,7 @@ class Texturing(desc.AVCommandLineNode): description="Setting this parameter to 0.0 disables filtering based on threshold to relative best score.", value=0.1, range=(0.0, 1.0, 0.01), - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -298,7 +298,7 @@ class Texturing(desc.AVCommandLineNode): description="Setting this parameter to 0.0 disables angle hard threshold filtering.", value=90.0, range=(0.0, 180.0, 0.01), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -308,7 +308,7 @@ class Texturing(desc.AVCommandLineNode): values=COLORSPACES, value="sRGB", exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -318,21 +318,21 @@ class Texturing(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="correctEV", label="Correct Exposure", description="Uniformize images exposure values.", value=True, - uid=[0], + invalidate=True, ), desc.BoolParam( name="forceVisibleByAllVertices", label="Force Visible By All Vertices", description="Triangle visibility is based on the union of vertices visibility.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.BoolParam( @@ -341,7 +341,7 @@ class Texturing(desc.AVCommandLineNode): description="Option to flip face normals.\n" "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", value=False, - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -351,7 +351,7 @@ class Texturing(desc.AVCommandLineNode): value="PullPush", values=["Pull", "Push", "PullPush", "MeshItself"], exclusive=True, - uid=[0], + invalidate=True, advanced=True, ), desc.FloatParam( @@ -363,7 +363,7 @@ class Texturing(desc.AVCommandLineNode): " - 1: full density of the reconstruction).", value=0.8, range=(0.0, 1.0, 0.001), - uid=[0], + invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -373,7 +373,7 @@ class Texturing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -383,14 +383,14 @@ class Texturing(desc.AVCommandLineNode): label="Folder", description="Folder for output mesh: OBJ, material and texture files.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="outputMesh", label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "texturedMesh.{outputMeshFileTypeValue}", - uid=[], + invalidate=False, group="", ), desc.File( @@ -399,7 +399,7 @@ class Texturing(desc.AVCommandLineNode): label="Material", description="Output material file.", value=desc.Node.internalFolder + "texturedMesh.mtl", - uid=[], + invalidate=False, group="", ), desc.File( @@ -407,7 +407,7 @@ class Texturing(desc.AVCommandLineNode): label="Textures", description="Output texture files.", value=lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", - uid=[], + invalidate=False, group="", ), ] diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index fbab55f202..a9397c13f2 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -19,7 +19,7 @@ class TracksBuilding(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - uid=[0], + invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -27,7 +27,7 @@ class TracksBuilding(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - uid=[0], + invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -39,7 +39,7 @@ class TracksBuilding(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some matches.", value="", - uid=[0], + invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -52,7 +52,7 @@ class TracksBuilding(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - uid=[0], + invalidate=True, joinChar=",", ), desc.IntParam( @@ -61,7 +61,7 @@ class TracksBuilding(desc.AVCommandLineNode): description="Minimum track length.", value=2, range=(2, 10, 1), - uid=[0], + invalidate=True, ), desc.BoolParam( name="useOnlyMatchesFromInputFolder", @@ -69,7 +69,7 @@ class TracksBuilding(desc.AVCommandLineNode): description="Use only matches from the input 'matchesFolder' parameter.\n" "Matches folders previously added to the SfMData file will be ignored.", value=False, - uid=[], + invalidate=False, advanced=True, ), desc.BoolParam( @@ -78,7 +78,7 @@ class TracksBuilding(desc.AVCommandLineNode): description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches\n" "lead to multiple features in the same image for a single track.", value=False, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -87,7 +87,7 @@ class TracksBuilding(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - uid=[], + invalidate=False, ), ] @@ -97,6 +97,6 @@ class TracksBuilding(desc.AVCommandLineNode): label="Tracks", description="Path to the output tracks file.", value=desc.Node.internalFolder + "tracksFile.json", - uid=[], + invalidate=False, ), ] diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 5748a43872..9900ec4fcc 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -25,7 +25,7 @@ class ScenePreview(desc.CommandLineNode): label="Blender Command", description="Command to launch Blender.", value="blender", - uid=[], + invalidate=False, group="", ), desc.File( @@ -33,7 +33,7 @@ class ScenePreview(desc.CommandLineNode): label="Script", description="Path to the internal script for rendering in Blender.", value=os.path.join(currentDir, "scripts", "preview.py"), - uid=[], + invalidate=False, group="", advanced=True, ), @@ -42,28 +42,28 @@ class ScenePreview(desc.CommandLineNode): label="Cameras", description="SfMData with the views, poses and intrinsics to use (in JSON format).", value="", - uid=[0], + invalidate=True, ), desc.File( name="model", label="Model", description="Point cloud (.abc) or mesh (.obj) to render.", value="", - uid=[0], + invalidate=True, ), desc.BoolParam( name="useBackground", label="Display Background", description="Use the undistorted images as background.", value=True, - uid=[0], + invalidate=True, ), desc.File( name="undistortedImages", label="Undistorted Images", description="Folder containing the undistorted images.", value="", - uid=[0], + invalidate=True, enabled=lambda node: node.useBackground.value, ), desc.BoolParam( @@ -71,14 +71,14 @@ class ScenePreview(desc.CommandLineNode): label="Apply Masks", description="Apply mask to the rendered geometry.", value=True, - uid=[0], + invalidate=True, ), desc.File( name="masks", label="Masks", description="Folder containing the masks.", value="", - uid=[0], + invalidate=True, enabled=lambda node: node.useMasks.value, ), desc.GroupAttribute( @@ -94,7 +94,7 @@ class ScenePreview(desc.CommandLineNode): description="Scale of particles used for the point cloud.", value=0.01, range=(0.01, 1.0, 0.01), - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="particleColor", @@ -103,7 +103,7 @@ class ScenePreview(desc.CommandLineNode): value="Red", values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, - uid=[0], + invalidate=True, ), ], ), @@ -121,7 +121,7 @@ class ScenePreview(desc.CommandLineNode): value="wireframe", values=["wireframe", "line_art"], exclusive=True, - uid=[0], + invalidate=True, ), desc.ChoiceParam( name="edgeColor", @@ -130,7 +130,7 @@ class ScenePreview(desc.CommandLineNode): value="Red", values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, - uid=[0], + invalidate=True, ), ], ), @@ -142,7 +142,7 @@ class ScenePreview(desc.CommandLineNode): label="Output", description="Output folder.", value=desc.Node.internalFolder, - uid=[], + invalidate=False, ), desc.File( name="frames", @@ -150,7 +150,7 @@ class ScenePreview(desc.CommandLineNode): description="Frames rendered in Blender.", semantic="image", value=desc.Node.internalFolder + "<FILESTEM>_preview.jpg", - uid=[], + invalidate=False, group="", ), ] From 52dd343ff02611d855215f67bb4250127dd398c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 5 Sep 2024 17:47:51 +0200 Subject: [PATCH 1022/1093] [pipelines] Update file version for all templates Additionally, the `pipelineVersion` key has been removed for all the templates that had it. --- meshroom/cameraTracking.mg | 3 +-- meshroom/cameraTrackingWithoutCalibration.mg | 3 +-- meshroom/distortionCalibration.mg | 3 +-- meshroom/hdrFusion.mg | 2 +- meshroom/nodalCameraTracking.mg | 3 +-- meshroom/nodalCameraTrackingWithoutCalibration.mg | 3 +-- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- meshroom/photogrammetry.mg | 3 +-- meshroom/photogrammetryAndCameraTracking.mg | 3 +-- meshroom/photogrammetryDraft.mg | 2 +- meshroom/photometricStereo.mg | 3 +-- 12 files changed, 12 insertions(+), 20 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 8b1e7a9110..924299fdeb 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "ApplyCalibration": "1.0", diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 71468eb394..a7afc920ad 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "ApplyCalibration": "1.0", diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index 5300622bc6..f30ab461c6 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "CameraInit": "11.0", diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 1b70e3f3af..78e518a830 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -8,7 +8,7 @@ "Publish": "1.3" }, "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true }, "graph": { diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 6eca9099c7..372509a234 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "ApplyCalibration": "1.0", diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 226bd621fd..dbe89928d9 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "CameraInit": "11.0", diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index d4efc083ee..764b204aba 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -20,7 +20,7 @@ "SfMTransform": "3.1" }, "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true }, "graph": { diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 6ab09d8ae5..4d67f0f3fe 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -20,7 +20,7 @@ "SfMTransform": "3.1" }, "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true }, "graph": { diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index ab42fa33fa..cc6181fd40 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "CameraInit": "11.0", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 31339d0dd3..6ad033207a 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "ApplyCalibration": "1.0", diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index d6289bd2e4..6e41617d24 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -13,7 +13,7 @@ "Texturing": "6.0" }, "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true }, "graph": { diff --git a/meshroom/photometricStereo.mg b/meshroom/photometricStereo.mg index e73f235928..9a76d73794 100644 --- a/meshroom/photometricStereo.mg +++ b/meshroom/photometricStereo.mg @@ -1,8 +1,7 @@ { "header": { - "pipelineVersion": "2.2", "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", + "fileVersion": "2.0", "template": true, "nodesVersions": { "CameraInit": "11.0", From 3c16b5662a2825a8b1aa521884e91959b78eccc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 6 Sep 2024 17:30:22 +0200 Subject: [PATCH 1023/1093] [nodes] Remove `invalidate=True` from descriptions --- meshroom/aliceVision/ApplyCalibration.py | 5 -- meshroom/aliceVision/CameraCalibration.py | 15 ----- meshroom/aliceVision/CameraInit.py | 35 ---------- meshroom/aliceVision/CameraLocalization.py | 28 -------- meshroom/aliceVision/CameraRigCalibration.py | 21 ------ meshroom/aliceVision/CameraRigLocalization.py | 22 ------- .../aliceVision/CheckerboardCalibration.py | 5 -- meshroom/aliceVision/CheckerboardDetection.py | 8 --- .../aliceVision/ColorCheckerCorrection.py | 7 -- meshroom/aliceVision/ColorCheckerDetection.py | 5 -- meshroom/aliceVision/ConvertDistortion.py | 5 -- meshroom/aliceVision/ConvertMesh.py | 4 -- meshroom/aliceVision/ConvertSfMFormat.py | 11 ---- meshroom/aliceVision/DepthMap.py | 65 ------------------ meshroom/aliceVision/DepthMapFilter.py | 16 ----- meshroom/aliceVision/DistortionCalibration.py | 7 -- meshroom/aliceVision/ExportAnimatedCamera.py | 13 ---- .../aliceVision/ExportColoredPointCloud.py | 3 - meshroom/aliceVision/ExportDistortion.py | 10 --- meshroom/aliceVision/ExportMatches.py | 6 -- meshroom/aliceVision/ExportMaya.py | 3 - meshroom/aliceVision/FeatureExtraction.py | 15 ----- meshroom/aliceVision/FeatureMatching.py | 19 ------ meshroom/aliceVision/FeatureRepeatability.py | 10 --- meshroom/aliceVision/GlobalSfM.py | 11 ---- meshroom/aliceVision/ImageMasking.py | 15 ----- meshroom/aliceVision/ImageMatching.py | 10 --- meshroom/aliceVision/ImageMatchingMultiSfM.py | 13 ---- meshroom/aliceVision/ImageProcessing.py | 66 ------------------- meshroom/aliceVision/ImageSegmentation.py | 8 --- meshroom/aliceVision/ImportE57.py | 6 -- meshroom/aliceVision/ImportKnownPoses.py | 4 -- meshroom/aliceVision/KeyframeSelection.py | 31 --------- meshroom/aliceVision/LdrToHdrCalibration.py | 10 --- meshroom/aliceVision/LdrToHdrMerge.py | 21 ------ meshroom/aliceVision/LdrToHdrSampling.py | 11 ---- meshroom/aliceVision/LidarDecimating.py | 5 -- meshroom/aliceVision/LidarMerging.py | 3 - meshroom/aliceVision/LidarMeshing.py | 14 ---- meshroom/aliceVision/LightingCalibration.py | 8 --- meshroom/aliceVision/LightingEstimation.py | 9 --- meshroom/aliceVision/MergeMeshes.py | 7 -- meshroom/aliceVision/MeshDecimate.py | 8 --- meshroom/aliceVision/MeshDenoising.py | 10 --- meshroom/aliceVision/MeshFiltering.py | 13 ---- meshroom/aliceVision/MeshMasking.py | 12 ---- meshroom/aliceVision/MeshRemoveUnseenFaces.py | 7 -- meshroom/aliceVision/MeshResampling.py | 9 --- meshroom/aliceVision/Meshing.py | 52 --------------- meshroom/aliceVision/NodalSfM.py | 5 -- meshroom/aliceVision/NormalIntegration.py | 5 -- meshroom/aliceVision/PanoramaCompositing.py | 10 --- meshroom/aliceVision/PanoramaEstimation.py | 20 ------ meshroom/aliceVision/PanoramaInit.py | 15 ----- meshroom/aliceVision/PanoramaMerging.py | 7 -- .../aliceVision/PanoramaPostProcessing.py | 12 ---- meshroom/aliceVision/PanoramaPrepareImages.py | 3 - meshroom/aliceVision/PanoramaSeams.py | 7 -- meshroom/aliceVision/PanoramaWarping.py | 9 --- meshroom/aliceVision/PhotometricStereo.py | 16 ----- meshroom/aliceVision/PrepareDenseScene.py | 11 ---- meshroom/aliceVision/Publish.py | 3 - .../aliceVision/RelativePoseEstimating.py | 5 -- meshroom/aliceVision/SelectConnectedViews.py | 6 -- meshroom/aliceVision/SfMAlignment.py | 11 ---- meshroom/aliceVision/SfMDistances.py | 6 -- meshroom/aliceVision/SfMMerge.py | 7 -- meshroom/aliceVision/SfMSplitReconstructed.py | 4 -- meshroom/aliceVision/SfMToRig.py | 3 - meshroom/aliceVision/SfMTransfer.py | 11 ---- meshroom/aliceVision/SfMTransform.py | 25 ------- meshroom/aliceVision/SfMTriangulation.py | 15 ----- meshroom/aliceVision/SfmBootstraping.py | 5 -- meshroom/aliceVision/SfmExpanding.py | 35 +++------- meshroom/aliceVision/SketchfabUpload.py | 12 ---- meshroom/aliceVision/SphereDetection.py | 9 --- meshroom/aliceVision/Split360Images.py | 13 ---- meshroom/aliceVision/StructureFromMotion.py | 36 ---------- meshroom/aliceVision/Texturing.py | 37 ----------- meshroom/aliceVision/TracksBuilding.py | 8 --- meshroom/blender/ScenePreview.py | 12 ---- 81 files changed, 8 insertions(+), 1076 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 893d3c374c..c95d45851f 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -18,21 +18,18 @@ class ApplyCalibration(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="calibration", label="Calibration", description="Calibration file (SfmData or Lens calibration file).", value="", - invalidate=True, ), desc.BoolParam( name="useJson", label="Use Lens Calibration File", description="Calibration is a Lens calibration file generated using 3Dequalizer instead of an sfmData.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -40,7 +37,6 @@ class ApplyCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - invalidate=False, exclusive=True, ), ] @@ -51,6 +47,5 @@ class ApplyCalibration(desc.AVCommandLineNode): label="SMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 0c853a4e8a..68afb405a6 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -20,7 +20,6 @@ class CameraCalibration(desc.AVCommandLineNode): " - image sequence like \"/path/to/seq.@.jpg\".\n" " - video file.", value="", - invalidate=True, ), desc.ChoiceParam( name="pattern", @@ -29,7 +28,6 @@ class CameraCalibration(desc.AVCommandLineNode): value="CHESSBOARD", values=["CHESSBOARD", "CIRCLES", "ASYMMETRIC_CIRCLES", "ASYMMETRIC_CCTAG"], exclusive=True, - invalidate=True, ), desc.GroupAttribute( name="size", @@ -42,7 +40,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="", value=7, range=(0, 10000, 1), - invalidate=True, ), desc.IntParam( name="height", @@ -50,7 +47,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="", value=5, range=(0, 10000, 1), - invalidate=True, ), ], ), @@ -60,7 +56,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Size of the grid's square cells (mm).", value=1.0, range=(0.0, 100.0, 1.0), - invalidate=True, ), desc.IntParam( name="nbDistortionCoef", @@ -68,7 +63,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Number of distortion coefficients.", value=3, range=(0, 5, 1), - invalidate=True, ), desc.IntParam( name="maxFrames", @@ -76,7 +70,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Maximum number of frames to extract from the video file.", value=0, range=(0, 5, 1), - invalidate=True, ), desc.IntParam( name="maxCalibFrames", @@ -84,7 +77,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Maximum number of frames to use to calibrate from the selected frames.", value=100, range=(0, 1000, 1), - invalidate=True, ), desc.IntParam( name="calibGridSize", @@ -92,7 +84,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Define the number of cells per edge.", value=10, range=(0, 50, 1), - invalidate=True, ), desc.IntParam( name="minInputFrames", @@ -100,7 +91,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Minimum number of frames to limit the refinement loop.", value=10, range=(0, 100, 1), - invalidate=True, ), desc.FloatParam( name="maxTotalAvgErr", @@ -108,21 +98,18 @@ class CameraCalibration(desc.AVCommandLineNode): description="Maximum total average error.", value=0.10000000000000001, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.File( name="debugRejectedImgFolder", label="Debug Rejected Img Folder", description="Folder to export images that were deleted during the refinement loop.", value="", - invalidate=True, ), desc.File( name="debugSelectedImgFolder", label="Debug Selected Img Folder", description="Folder to export debug images.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -131,7 +118,6 @@ class CameraCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -141,6 +127,5 @@ class CameraCalibration(desc.AVCommandLineNode): label="Output", description="Output filename for intrinsic [and extrinsic] parameters.", value=desc.Node.internalFolder + "/cameraCalibration.cal", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 646a94a0b2..ae5883ecb0 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -17,7 +17,6 @@ label="ID", description="Image UID.", value=-1, - invalidate=True, range=None, ), desc.IntParam( @@ -25,7 +24,6 @@ label="Pose ID", description="Pose ID.", value=-1, - invalidate=True, range=None, ), desc.File( @@ -33,14 +31,12 @@ label="Image Path", description="Image filepath.", value="", - invalidate=True, ), desc.IntParam( name="intrinsicId", label="Intrinsic", description="Internal camera parameters.", value=-1, - invalidate=True, range=None, ), desc.IntParam( @@ -48,7 +44,6 @@ label="Rig", description="Rig parameters.", value=-1, - invalidate=True, range=None, ), desc.IntParam( @@ -56,7 +51,6 @@ label="Rig Sub-Pose", description="Rig sub-pose parameters.", value=-1, - invalidate=True, range=None, ), desc.StringParam( @@ -81,7 +75,6 @@ label="ID", description="Intrinsic UID.", value=-1, - invalidate=True, range=None, ), desc.FloatParam( @@ -92,7 +85,6 @@ "So this value is used to limit the range of possible values in the optimization.\n" "If this value is set to -1, it will not be used and the focal length will not be bounded.", value=-1.0, - invalidate=True, range=None, ), desc.FloatParam( @@ -100,7 +92,6 @@ label="Focal Length", description="Known/calibrated focal length (in mm).", value=1000.0, - invalidate=True, range=(0.0, 10000.0, 1.0), ), desc.FloatParam( @@ -108,7 +99,6 @@ label="Pixel Ratio", description="Ratio between the pixel width and the pixel height.", value=1.0, - invalidate=True, range=(0.0, 10.0, 0.1), ), desc.BoolParam( @@ -116,28 +106,24 @@ label="Pixel Ratio Locked", description="The pixel ratio value is locked for estimation.", value=True, - invalidate=True, ), desc.BoolParam( name="scaleLocked", label="Focal length Locked", description="The focal length is locked for estimation.", value=False, - invalidate=True, ), desc.BoolParam( name="offsetLocked", label="Optical Center Locked", description="The optical center coordinates are locked for estimation.", value=False, - invalidate=True, ), desc.BoolParam( name="distortionLocked", label="Distortion Locked", description="The distortion parameters are locked for estimation.", value=False, - invalidate=True, ), desc.ChoiceParam( name="type", @@ -148,7 +134,6 @@ value="pinhole", values=["pinhole", "equidistant"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="distortionType", @@ -163,14 +148,12 @@ value="radialk3", values=["none", "radialk1", "radialk3", "radialk3pt", "brown", "fisheye4", "fisheye1"], exclusive=True, - invalidate=True, ), desc.IntParam( name="width", label="Width", description="Image width.", value=0, - invalidate=True, range=(0, 10000, 1), ), desc.IntParam( @@ -178,7 +161,6 @@ label="Height", description="Image height.", value=0, - invalidate=True, range=(0, 10000, 1), ), desc.FloatParam( @@ -186,7 +168,6 @@ label="Sensor Width", description="Sensor width (in mm).", value=36.0, - invalidate=True, range=(0.0, 1000.0, 1.0), ), desc.FloatParam( @@ -194,7 +175,6 @@ label="Sensor Height", description="Sensor height (in mm).", value=24.0, - invalidate=True, range=(0.0, 1000.0, 1.0), ), desc.StringParam( @@ -202,7 +182,6 @@ label="Serial Number", description="Device serial number (Camera UID and Lens UID combined).", value="", - invalidate=True, ), desc.GroupAttribute( name="principalPoint", @@ -214,7 +193,6 @@ label="x", description="", value=0.0, - invalidate=True, range=(0.0, 10000.0, 1.0), ), desc.FloatParam( @@ -222,7 +200,6 @@ label="y", description="", value=0.0, - invalidate=True, range=(0.0, 10000.0, 1.0), ), ], @@ -238,7 +215,6 @@ values=["calibrated", "estimated", "unknown", "none"], value="none", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="distortionInitializationMode", @@ -251,7 +227,6 @@ values=["calibrated", "estimated", "unknown", "none"], value="none", exclusive=True, - invalidate=True, ), desc.ListAttribute( name="distortionParams", @@ -260,7 +235,6 @@ label="", description="", value=0.0, - invalidate=True, range=(-0.1, 0.1, 0.01), ), label="Distortion Params", @@ -276,7 +250,6 @@ label="x", description="", value=0.0, - invalidate=True, range=(0.0, 10000.0, 1.0), ), desc.FloatParam( @@ -284,7 +257,6 @@ label="y", description="", value=0.0, - invalidate=True, range=(0.0, 10000.0, 1.0), ), ], @@ -296,7 +268,6 @@ label="", description="", value=0.0, - invalidate=True, range=(-0.1, 0.1, 0.01), ), label="Undistortion Params", @@ -307,7 +278,6 @@ label="Locked", description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.", value=False, - invalidate=True, ), ] @@ -420,7 +390,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): label="LCP Generic Search", description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.", value=True, - invalidate=True, advanced=True, ), desc.FloatParam( @@ -457,7 +426,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", exclusive=True, - invalidate=True, ), desc.File( name="colorProfileDatabase", @@ -474,7 +442,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): "When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.", value=True, enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), - invalidate=True, ), desc.ChoiceParam( name="viewIdMethod", @@ -510,7 +477,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -520,7 +486,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): label="SfMData", description="Output SfMData.", value=desc.Node.internalFolder + "cameraInit.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 2c4350efa0..16c15475b1 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -18,28 +18,24 @@ class CameraLocalization(desc.AVCommandLineNode): label="SfMData", description="The SfMData file generated by AliceVision.", value="", - invalidate=True, ), desc.File( name="mediafile", label="Media File", description="The folder path or the filename for the media to track.", value="", - invalidate=True, ), desc.File( name="visualDebug", label="Visual Debug Folder", description="If a folder is provided, this enables visual debug and all the debugging information will be saved in that folder.", value="", - invalidate=True, ), desc.File( name="descriptorPath", label="Descriptor Path", description="Folder containing the descriptors for all the images (ie. the *.desc.).", value="", - invalidate=True, ), desc.ChoiceParam( name="matchDescTypes", @@ -48,7 +44,6 @@ class CameraLocalization(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -58,7 +53,6 @@ class CameraLocalization(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -67,7 +61,6 @@ class CameraLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -76,21 +69,18 @@ class CameraLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - invalidate=True, ), desc.File( name="calibration", label="Calibration", description="Calibration file.", value="", - invalidate=True, ), desc.BoolParam( name="refineIntrinsics", label="Refine Intrinsics", description="Enable/Disable camera intrinsics refinement for each localized image.", value=False, - invalidate=True, ), desc.FloatParam( name="reprojectionError", @@ -98,7 +88,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="Maximum reprojection error (in pixels) allowed for resectioning. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.1, 50.0, 0.1), - invalidate=True, ), desc.IntParam( name="nbImageMatch", @@ -106,7 +95,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Number of images to retrieve in database.", value=4, range=(1, 1000, 1), - invalidate=True, ), desc.IntParam( name="maxResults", @@ -114,7 +102,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.", value=10, range=(1, 100, 1), - invalidate=True, ), desc.IntParam( name="commonviews", @@ -122,21 +109,18 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking.", value=3, range=(2, 50, 1), - invalidate=True, ), desc.File( name="voctree", label="Voctree", description="[voctree] Filename for the vocabulary tree.", value="${ALICEVISION_VOCTREE}", - invalidate=True, ), desc.File( name="voctreeWeights", label="Voctree Weights", description="[voctree] Filename for the vocabulary tree weights.", value="", - invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -145,7 +129,6 @@ class CameraLocalization(desc.AVCommandLineNode): value="AllResults", values=["FirstBest", "AllResults"], exclusive=True, - invalidate=True, ), desc.FloatParam( name="matchingError", @@ -153,7 +136,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 50.0, 1.0), - invalidate=True, ), desc.IntParam( name="nbFrameBufferMatching", @@ -161,14 +143,12 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Number of previous frames of the sequence to use for matching (0 = Disable).", value=10, range=(0, 100, 1), - invalidate=True, ), desc.BoolParam( name="robustMatching", label="Robust Matching", description="[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.", value=True, - invalidate=True, ), desc.IntParam( name="nNearestKeyFrames", @@ -176,28 +156,24 @@ class CameraLocalization(desc.AVCommandLineNode): description="[cctag] Number of images to retrieve in the database. Parameters specific for final (optional) bundle adjustment optimization of the sequence.", value=5, range=(1, 100, 1), - invalidate=True, ), desc.StringParam( name="globalBundle", label="Global Bundle", description="[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.", value="", - invalidate=True, ), desc.BoolParam( name="noDistortion", label="No Distortion", description="[bundle adjustment] It does not take into account distortion during the BA, it considers the distortion coefficients to all be equal to 0.", value=False, - invalidate=True, ), desc.BoolParam( name="noBArefineIntrinsics", label="No BA Refine Intrinsics", description="[bundle adjustment] If set to true, does not refine intrinsics during BA.", value=False, - invalidate=True, ), desc.IntParam( name="minPointVisibility", @@ -205,7 +181,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="[bundle adjustment] Minimum number of observations that a point must have in order to be considered for bundle adjustment.", value=2, range=(2, 50, 1), - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -214,7 +189,6 @@ class CameraLocalization(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -224,13 +198,11 @@ class CameraLocalization(desc.AVCommandLineNode): label="Alembic", description="Filename for the SfMData export file (where camera poses will be stored).", value=desc.Node.internalFolder + "trackedCameras.abc", - invalidate=False, ), desc.File( name="outputJSON", label="JSON File", description="Filename for the localization results as .json.", value=desc.Node.internalFolder + "trackedCameras.json", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index a9097936b2..621edda743 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -18,7 +18,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="mediapath", @@ -26,28 +25,24 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="The path to the video file, the folder of the image sequence or a text file\n" "(one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", value="", - invalidate=True, ), desc.File( name="cameraIntrinsics", label="Camera Intrinsics", description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", value="", - invalidate=True, ), desc.File( name="export", label="Export File", description="Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.", value="trackedcameras.abc", - invalidate=True, ), desc.File( name="descriptorPath", label="Descriptor Path", description="Folder containing the .desc.", value="", - invalidate=True, ), desc.ChoiceParam( name="matchDescTypes", @@ -56,7 +51,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -66,7 +60,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -75,7 +68,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -84,14 +76,12 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - invalidate=True, ), desc.StringParam( name="refineIntrinsics", label="Refine Intrinsics", description="Enable/Disable camera intrinsics refinement for each localized image.", value="", - invalidate=True, ), desc.FloatParam( name="reprojectionError", @@ -100,7 +90,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - invalidate=True, ), desc.IntParam( name="maxInputFrames", @@ -108,21 +97,18 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="Maximum number of frames to read in input. 0 means no limit.", value=0, range=(0, 1000, 1), - invalidate=True, ), desc.File( name="voctree", label="Voctree", description="[voctree] Filename for the vocabulary tree.", value="${ALICEVISION_VOCTREE}", - invalidate=True, ), desc.File( name="voctreeWeights", label="Voctree Weights", description="[voctree] Filename for the vocabulary tree weights.", value="", - invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -131,7 +117,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): value="AllResults", values=["FirstBest", "AllResults"], exclusive=True, - invalidate=True, ), desc.IntParam( name="nbImageMatch", @@ -139,7 +124,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 50, 1), - invalidate=True, ), desc.IntParam( name="maxResults", @@ -147,7 +131,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If set to 0, it is ignored.", value=10, range=(0, 100, 1), - invalidate=True, ), desc.FloatParam( name="matchingError", @@ -156,7 +139,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - invalidate=True, ), desc.IntParam( name="nNearestKeyFrames", @@ -164,7 +146,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 1), - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -173,7 +154,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -183,6 +163,5 @@ class CameraRigCalibration(desc.AVCommandLineNode): label="Output File", description="The name of the file to store the calibration data in.", value=desc.Node.internalFolder + "cameraRigCalibration.rigCal", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 3147c71841..54f456ccdd 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -18,35 +18,30 @@ class CameraRigLocalization(desc.AVCommandLineNode): label="SfMData", description="The input SfMData file.", value="", - invalidate=True, ), desc.File( name="mediapath", label="Media Path", description="The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", value="", - invalidate=True, ), desc.File( name="calibration", label="Rig Calibration File", description="The file containing the calibration data for the rig (subposes).", value="", - invalidate=True, ), desc.File( name="cameraIntrinsics", label="Camera Intrinsics", description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", value="", - invalidate=True, ), desc.File( name="descriptorPath", label="Descriptor Path", description="Folder containing the .desc.", value="", - invalidate=True, ), desc.ChoiceParam( name="matchDescTypes", @@ -55,7 +50,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -65,7 +59,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -74,7 +67,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -83,14 +75,12 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - invalidate=True, ), desc.StringParam( name="refineIntrinsics", label="Refine Intrinsics", description="Enable/Disable camera intrinsics refinement for each localized image.", value="", - invalidate=True, ), desc.FloatParam( name="reprojectionError", @@ -99,14 +89,12 @@ class CameraRigLocalization(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - invalidate=True, ), desc.BoolParam( name="useLocalizeRigNaive", label="Use Localize Rig Naive", description="Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.", value=False, - invalidate=True, ), desc.FloatParam( name="angularThreshold", @@ -114,21 +102,18 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.", value=0.1, range=(0.0, 10.0, 0.01), - invalidate=True, ), desc.File( name="voctree", label="Voctree", description="[voctree] Filename for the vocabulary tree.""", value="${ALICEVISION_VOCTREE}", - invalidate=True, ), desc.File( name="voctreeWeights", label="Voctree Weights", description="[voctree] Filename for the vocabulary tree weights.", value="", - invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -137,7 +122,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): value="AllResults", values=["FirstBest", "AllResults"], exclusive=True, - invalidate=True, ), desc.IntParam( name="nbImageMatch", @@ -145,7 +129,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 100, 1), - invalidate=True, ), desc.IntParam( name="maxResults", @@ -154,7 +137,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): "If set to 0, it is ignored.", value=10, range=(0, 100, 1), - invalidate=True, ), desc.FloatParam( name="matchingError", @@ -163,7 +145,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), - invalidate=True, ), desc.IntParam( name="nNearestKeyFrames", @@ -171,7 +152,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 1), - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -180,7 +160,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -190,6 +169,5 @@ class CameraRigLocalization(desc.AVCommandLineNode): label="Alembic", description="Filename for the SfMData export file (where camera poses will be stored).", value=desc.Node.internalFolder + "trackedcameras.abc", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/CheckerboardCalibration.py b/meshroom/aliceVision/CheckerboardCalibration.py index 4b9aacf15e..65b7b357d8 100644 --- a/meshroom/aliceVision/CheckerboardCalibration.py +++ b/meshroom/aliceVision/CheckerboardCalibration.py @@ -19,14 +19,12 @@ class CheckerboardCalibration(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="checkerboards", label="Checkerboards Folder", description="Folder containing checkerboard JSON files.", value="", - invalidate=True, ), desc.FloatParam( name="squareSize", @@ -34,7 +32,6 @@ class CheckerboardCalibration(desc.AVCommandLineNode): description="Checkerboard square width in mm", value=10., range=(0.1, 100., 0.1), - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -43,7 +40,6 @@ class CheckerboardCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -53,6 +49,5 @@ class CheckerboardCalibration(desc.AVCommandLineNode): label="SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - invalidate=False, ) ] diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index 3d4b2e55ea..c302a4eca7 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/aliceVision/CheckerboardDetection.py @@ -22,35 +22,30 @@ class CheckerboardDetection(desc.AVCommandLineNode): label="Input", description="Input SfMData file. Viewpoints must correspond to lens calibration grids.", value="", - invalidate=True, ), desc.BoolParam( name="useNestedGrids", label="Nested Calibration Grid", description="Enable if images contain nested calibration grids. These grids must be centered on the image center.", value=False, - invalidate=True, ), desc.BoolParam( name="doubleSize", label="Double Size", description="Double the image size prior to processing.", value=False, - invalidate=True, ), desc.BoolParam( name="ignorePixelAspectRatio", label="Ignore Pixel Aspect Ratio", description="Ignore pixel aspect ratio for detection.", value=False, - invalidate=True, ), desc.BoolParam( name="exportDebugImages", label="Export Debug Images", description="Export debug images.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -59,7 +54,6 @@ class CheckerboardDetection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -69,7 +63,6 @@ class CheckerboardDetection(desc.AVCommandLineNode): label="Folder", description="Output folder.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="checkerLines", @@ -79,6 +72,5 @@ class CheckerboardDetection(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>.png", group="", # do not export on the command line - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 978d437a10..830b530d53 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -28,7 +28,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): label="Color Checker Data", description="Position and colorimetric data of the color checker.", value="", - invalidate=True, ), desc.File( name="input", @@ -36,7 +35,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): description="Input SfMData file, image filenames or regex(es) on the image file path.\n" "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", value="", - invalidate=True, ), desc.ChoiceParam( name="extension", @@ -45,7 +43,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): value="exr", values=["exr", ""], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -58,7 +55,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -67,7 +63,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -77,7 +72,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): label="SfMData", description="Output SfMData.", value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -85,6 +79,5 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): label="Folder", description="Output images folder.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index e38c7a3dc6..901a3ba48e 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -34,7 +34,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode): description="SfMData file input, image filenames or regex(es) on the image file path.\n" "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", value="", - invalidate=True, ), desc.IntParam( name="maxCount", @@ -42,7 +41,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode): description="Maximum color charts count to detect in a single image.", value=1, range=(1, 3, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -50,7 +48,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode): label="Debug", description="If checked, debug data will be generated.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -59,7 +56,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -69,6 +65,5 @@ class ColorCheckerDetection(desc.AVCommandLineNode): label="Color Checker Data", description="Output position and colorimetric data extracted from detected color checkers in the images.", value=desc.Node.internalFolder + "/ccheckers.json", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ConvertDistortion.py b/meshroom/aliceVision/ConvertDistortion.py index a61aaa1621..38dd85f32c 100644 --- a/meshroom/aliceVision/ConvertDistortion.py +++ b/meshroom/aliceVision/ConvertDistortion.py @@ -19,7 +19,6 @@ class ConvertDistortion(desc.AVCommandLineNode): label="Input", description="Input SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="from", @@ -28,7 +27,6 @@ class ConvertDistortion(desc.AVCommandLineNode): value="distortion", values=["distortion", "undistortion"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="to", @@ -37,7 +35,6 @@ class ConvertDistortion(desc.AVCommandLineNode): value="undistortion", values=["distortion", "undistortion"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -46,7 +43,6 @@ class ConvertDistortion(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -56,6 +52,5 @@ class ConvertDistortion(desc.AVCommandLineNode): label="Output", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 3b9e268a1a..28392136d2 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -16,7 +16,6 @@ class ConvertMesh(desc.AVCommandLineNode): label="Input Mesh", description="Input mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value="", - invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -25,7 +24,6 @@ class ConvertMesh(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - invalidate=True, group="", ), desc.ChoiceParam( @@ -35,7 +33,6 @@ class ConvertMesh(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -45,6 +42,5 @@ class ConvertMesh(desc.AVCommandLineNode): label="Mesh", description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value=desc.Node.internalFolder + "mesh." + "{outputMeshFileTypeValue}", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 9c6756f22a..de64850574 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -20,7 +20,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Input", description="Input SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="fileExt", @@ -29,7 +28,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): value="abc", values=["abc", "sfm", "json", "ply", "baf"], exclusive=True, - invalidate=True, group="", # exclude from command line ), desc.ChoiceParam( @@ -39,7 +37,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ListAttribute( @@ -48,7 +45,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Image ID", description="UID or path of an image to add to the white list.", value="", - invalidate=True, ), name="imageWhiteList", label="Image White List", @@ -59,35 +55,30 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Views", description="Export views.", value=True, - invalidate=True, ), desc.BoolParam( name="intrinsics", label="Intrinsics", description="Export intrinsics.", value=True, - invalidate=True, ), desc.BoolParam( name="extrinsics", label="Extrinsics", description="Export extrinsics.", value=True, - invalidate=True, ), desc.BoolParam( name="structure", label="Structure", description="Export structure.", value=True, - invalidate=True, ), desc.BoolParam( name="observations", label="Observations", description="Export observations.", value=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -96,7 +87,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -106,6 +96,5 @@ class ConvertSfMFormat(desc.AVCommandLineNode): label="Output", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.{fileExtValue}", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index d941223e57..00cbac5e60 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -28,7 +28,6 @@ class DepthMap(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="imagesFolder", @@ -36,7 +35,6 @@ class DepthMap(desc.AVCommandLineNode): description="Use images from a specific folder instead of those specified in the SfMData file.\n" "Filename should be the image UID.", value="", - invalidate=True, ), desc.ChoiceParam( name="downscale", @@ -48,7 +46,6 @@ class DepthMap(desc.AVCommandLineNode): value=2, values=[1, 2, 4, 8, 16], exclusive=True, - invalidate=True, ), desc.FloatParam( name="minViewAngle", @@ -56,7 +53,6 @@ class DepthMap(desc.AVCommandLineNode): description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=2.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -65,7 +61,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=70.0, range=(10.0, 120.0, 1.0), - invalidate=True, advanced=True, ), desc.GroupAttribute( @@ -80,7 +75,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum tile buffer width.", value=1024, range=(-1, 2000, 10), - invalidate=True, ), desc.IntParam( name="tileBufferHeight", @@ -88,7 +82,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum tile buffer height.", value=1024, range=(-1, 2000, 10), - invalidate=True, ), desc.IntParam( name="tilePadding", @@ -96,7 +89,6 @@ class DepthMap(desc.AVCommandLineNode): description="Buffer padding for overlapping tiles.", value=64, range=(0, 500, 1), - invalidate=True, ), desc.BoolParam( name="autoAdjustSmallImage", @@ -104,7 +96,6 @@ class DepthMap(desc.AVCommandLineNode): description="Automatically adjust depth map parameters if images are smaller than one tile\n" "(maxTCamsPerTile = maxTCams, adjust step if needed).", value=True, - invalidate=True, advanced=True, ), ], @@ -114,7 +105,6 @@ class DepthMap(desc.AVCommandLineNode): label="Choose Neighbour Cameras Per Tile", description="Choose neighbour cameras per tile or globally to the image.", value=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -123,7 +113,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of neighbour cameras per image.", value=10, range=(1, 20, 1), - invalidate=True, ), desc.GroupAttribute( name="sgm", @@ -138,7 +127,6 @@ class DepthMap(desc.AVCommandLineNode): description="Downscale factor applied on source images for the SGM step (in addition to the global downscale).", value=2, range=(-1, 10, 1), - invalidate=True, ), desc.IntParam( name="sgmStepXY", @@ -146,7 +134,6 @@ class DepthMap(desc.AVCommandLineNode): description="The step is used to compute the similarity volume for one pixel over N (in the XY image plane).", value=2, range=(-1, 10, 1), - invalidate=True, ), desc.IntParam( name="sgmStepZ", @@ -156,7 +143,6 @@ class DepthMap(desc.AVCommandLineNode): "This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).", value=-1, range=(-1, 10, 1), - invalidate=True, ), desc.IntParam( name="sgmMaxTCamsPerTile", @@ -164,7 +150,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of neighbour cameras used per tile.", value=4, range=(1, 20, 1), - invalidate=True, ), desc.IntParam( name="sgmWSH", @@ -172,7 +157,6 @@ class DepthMap(desc.AVCommandLineNode): description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", value=4, range=(1, 20, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -180,7 +164,6 @@ class DepthMap(desc.AVCommandLineNode): label="Use SfM Landmarks", description="Use landmarks from Structure-from-Motion as input seeds to define min/max depth ranges.", value=True, - invalidate=True, advanced=True, ), desc.FloatParam( @@ -189,7 +172,6 @@ class DepthMap(desc.AVCommandLineNode): description="Inflate factor to add margins around SfM seeds.", value=0.2, range=(0.0, 2.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -198,7 +180,6 @@ class DepthMap(desc.AVCommandLineNode): description="Inflate factor to add margins to the depth thickness.", value=0.0, range=(0.0, 2.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -207,7 +188,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum similarity threshold (between 0 and 1) used to filter out poorly supported depth values.", value=1.0, range=(0.0, 1.0, 0.01), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -216,7 +196,6 @@ class DepthMap(desc.AVCommandLineNode): description="GammaC threshold used for similarity computation.", value=5.5, range=(0.0, 30.0, 0.5), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -225,7 +204,6 @@ class DepthMap(desc.AVCommandLineNode): description="GammaP threshold used for similarity computation.", value=8.0, range=(0.0, 30.0, 0.5), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -234,7 +212,6 @@ class DepthMap(desc.AVCommandLineNode): description="P1 parameter for SGM filtering.", value=10.0, range=(0.0, 255.0, 0.5), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -243,7 +220,6 @@ class DepthMap(desc.AVCommandLineNode): description="P2 weighting parameter for SGM filtering.", value=100.0, range=(-255.0, 255.0, 0.5), - invalidate=True, advanced=True, ), desc.IntParam( @@ -252,7 +228,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of depths in the similarity volume.", value=1500, range=(1, 5000, 1), - invalidate=True, advanced=True, ), desc.StringParam( @@ -260,7 +235,6 @@ class DepthMap(desc.AVCommandLineNode): label="Filtering Axes", description="Define axes for the filtering of the similarity volume.", value="YX", - invalidate=True, advanced=True, ), desc.BoolParam( @@ -268,7 +242,6 @@ class DepthMap(desc.AVCommandLineNode): label="Depth List Per Tile", description="Select the list of depth planes per tile or globally to the image.", value=True, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -276,7 +249,6 @@ class DepthMap(desc.AVCommandLineNode): label="Consistent Scale", description="Compare patch with consistent scale for similarity volume computation.", value=False, - invalidate=True, ), ], ), @@ -292,7 +264,6 @@ class DepthMap(desc.AVCommandLineNode): label="Enable", description="Enable depth/similarity map refinement process.", value=True, - invalidate=True, ), desc.IntParam( name="refineScale", @@ -300,7 +271,6 @@ class DepthMap(desc.AVCommandLineNode): description="Downscale factor applied on source images for the Refine step (in addition to the global downscale).", value=1, range=(-1, 10, 1), - invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( @@ -309,7 +279,6 @@ class DepthMap(desc.AVCommandLineNode): description="The step is used to compute the refine volume for one pixel over N (in the XY image plane).", value=1, range=(-1, 10, 1), - invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( @@ -318,7 +287,6 @@ class DepthMap(desc.AVCommandLineNode): description="Maximum number of neighbour cameras used per tile.", value=4, range=(1, 20, 1), - invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.IntParam( @@ -327,7 +295,6 @@ class DepthMap(desc.AVCommandLineNode): description="The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).", value=10, range=(1, 30, 1), - invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -339,7 +306,6 @@ class DepthMap(desc.AVCommandLineNode): "for which we evaluate the similarity with a finer z sampling.", value=15, range=(1, 50, 1), - invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -349,7 +315,6 @@ class DepthMap(desc.AVCommandLineNode): description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", value=3, range=(1, 20, 1), - invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -359,7 +324,6 @@ class DepthMap(desc.AVCommandLineNode): description="Sigma (2*sigma^2) of the Gaussian filter used to extract the best depth from the refine volume.", value=15.0, range=(0.0, 30.0, 0.5), - invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -369,7 +333,6 @@ class DepthMap(desc.AVCommandLineNode): description="GammaC threshold used for similarity computation.", value=15.5, range=(0.0, 30.0, 0.5), - invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -379,7 +342,6 @@ class DepthMap(desc.AVCommandLineNode): description="GammaP threshold used for similarity computation.", value=8.0, range=(0.0, 30.0, 0.5), - invalidate=True, advanced=True, enabled=lambda node: node.refine.refineEnabled.value, ), @@ -388,7 +350,6 @@ class DepthMap(desc.AVCommandLineNode): label="Interpolate Middle Depth", description="Enable middle depth bilinear interpolation.", value=False, - invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), desc.BoolParam( @@ -396,7 +357,6 @@ class DepthMap(desc.AVCommandLineNode): label="Consistent Scale", description="Compare patch with consistent scale for similarity volume computation.", value=False, - invalidate=True, enabled=lambda node: node.refine.refineEnabled.value, ), ], @@ -412,7 +372,6 @@ class DepthMap(desc.AVCommandLineNode): label="Enable", description="Enable depth/similarity map post-process color optimization.", value=True, - invalidate=True, ), desc.IntParam( name="colorOptimizationNbIterations", @@ -420,7 +379,6 @@ class DepthMap(desc.AVCommandLineNode): description="Number of iterations for the optimization.", value=100, range=(1, 500, 10), - invalidate=True, advanced=True, enabled=lambda node: node.colorOptimization.colorOptimizationEnabled.value, ), @@ -438,7 +396,6 @@ class DepthMap(desc.AVCommandLineNode): label="Enable For SGM", description="Enable custom patch pattern for similarity volume computation at the SGM step.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -446,7 +403,6 @@ class DepthMap(desc.AVCommandLineNode): label="Enable For Refine", description="Enable custom patch pattern for similarity volume computation at the Refine step.", value=False, - invalidate=True, advanced=True, ), desc.ListAttribute( @@ -469,7 +425,6 @@ class DepthMap(desc.AVCommandLineNode): value="full", values=["full", "circle"], exclusive=True, - invalidate=True, ), desc.FloatParam( name="customPatchPatternSubpartRadius", @@ -477,7 +432,6 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart half-width or circle radius.", value=2.5, range=(0.5, 30.0, 0.1), - invalidate=True, ), desc.IntParam( name="customPatchPatternSubpartNbCoords", @@ -485,7 +439,6 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart number of coordinates (for circle or ignore).", value=12, range=(3, 24, 1), - invalidate=True, ), desc.IntParam( name="customPatchPatternSubpartLevel", @@ -493,7 +446,6 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart image level.", value=0, range=(0, 2, 1), - invalidate=True, ), desc.FloatParam( name="customPatchPatternSubpartWeight", @@ -501,7 +453,6 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart weight.", value=1.0, range=(0.0, 1.0, 0.1), - invalidate=True, ), ], ), @@ -511,7 +462,6 @@ class DepthMap(desc.AVCommandLineNode): label="Group Subparts Per Level", description="Group all subparts with the same image level.", value=False, - invalidate=True, advanced=True, enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), ), @@ -530,7 +480,6 @@ class DepthMap(desc.AVCommandLineNode): label="Export Depth Maps", description="Export intermediate depth/similarity maps from the SGM and Refine steps.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -538,7 +487,6 @@ class DepthMap(desc.AVCommandLineNode): label="Export Normal Maps", description="Export intermediate normal maps from the SGM and Refine steps.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -546,7 +494,6 @@ class DepthMap(desc.AVCommandLineNode): label="Export Volumes", description="Export intermediate full similarity volumes from the SGM and Refine steps.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -554,7 +501,6 @@ class DepthMap(desc.AVCommandLineNode): label="Export Cross Volumes", description="Export intermediate similarity cross volumes from the SGM and Refine steps.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -562,7 +508,6 @@ class DepthMap(desc.AVCommandLineNode): label="Export Cut Volumes", description="Export intermediate similarity topographic cut volumes from the SGM and Refine steps.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -570,7 +515,6 @@ class DepthMap(desc.AVCommandLineNode): label="Export 9 Points", description="Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -578,7 +522,6 @@ class DepthMap(desc.AVCommandLineNode): label="Export Tile Pattern", description="Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.", value=False, - invalidate=True, advanced=True, ), ], @@ -599,7 +542,6 @@ class DepthMap(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -609,7 +551,6 @@ class DepthMap(desc.AVCommandLineNode): label="Folder", description="Output folder for generated depth maps.", value=desc.Node.internalFolder, - invalidate=False, ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images @@ -620,7 +561,6 @@ class DepthMap(desc.AVCommandLineNode): description="Generated depth maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -629,7 +569,6 @@ class DepthMap(desc.AVCommandLineNode): description="Generated sim maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -637,7 +576,6 @@ class DepthMap(desc.AVCommandLineNode): label="Tile Pattern", description="Debug: Tile pattern.", value=desc.Node.internalFolder + "<VIEW_ID>_tilePattern.obj", - invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportTilePattern.value, ), @@ -647,7 +585,6 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps SGM", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgm.exr", - invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), @@ -657,7 +594,6 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps SGM upscaled.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgmUpscaled.exr", - invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), @@ -667,7 +603,6 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps after refinement", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_refinedFused.exr", - invalidate=False, group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index fc09736d29..90c7710841 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -23,14 +23,12 @@ class DepthMapFilter(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="depthMapsFolder", label="Depth Maps Folder", description="Input depth maps folder.", value="", - invalidate=True, ), desc.FloatParam( name="minViewAngle", @@ -38,7 +36,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Minimum angle between two views.", value=2.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -47,7 +44,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Maximum angle between two views.", value=70.0, range=(10.0, 120.0, 1.0), - invalidate=True, advanced=True, ), desc.IntParam( @@ -56,7 +52,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Number of nearest cameras used for filtering.", value=10, range=(0, 20, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -65,7 +60,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Minimum number of consistent cameras.", value=3, range=(0, 10, 1), - invalidate=True, ), desc.IntParam( name="minNumOfConsistentCamsWithLowSimilarity", @@ -73,7 +67,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Minimum number of consistent cameras for pixels with weak similarity value.", value=4, range=(0, 10, 1), - invalidate=True, ), desc.FloatParam( name="pixToleranceFactor", @@ -81,7 +74,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtering tolerance size factor, in pixels.", value=2.0, range=(0.001, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -90,7 +82,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtering size in pixels.", value=0, range=(0, 10, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -99,7 +90,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtering size in pixels for low similarity.", value=0, range=(0, 10, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -107,7 +97,6 @@ class DepthMapFilter(desc.AVCommandLineNode): label="Compute Normal Maps", description="Compute normal maps for each depth map.", value=False, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -117,7 +106,6 @@ class DepthMapFilter(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -127,7 +115,6 @@ class DepthMapFilter(desc.AVCommandLineNode): label="Filtered Depth Maps Folder", description="Output folder for generated depth maps.", value=desc.Node.internalFolder, - invalidate=False, ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images @@ -138,7 +125,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtered depth maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -147,7 +133,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Filtered sim maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -156,7 +141,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Normal maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr", - invalidate=False, enabled=lambda node: node.computeNormalMaps.value, group="", # do not export on the command line ), diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index ce07b6bf31..5e9fe72ff0 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -19,14 +19,12 @@ class DistortionCalibration(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="checkerboards", label="Checkerboards Folder", description="Folder containing checkerboard JSON files.", value="", - invalidate=True, ), desc.ChoiceParam( name="undistortionModelName", @@ -35,21 +33,18 @@ class DistortionCalibration(desc.AVCommandLineNode): value="3deanamorphic4", values=["3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, - invalidate=True, ), desc.BoolParam( name="handleSqueeze", label="Handle Squeeze", description="Estimate squeeze.", value=True, - invalidate=True, ), desc.BoolParam( name="isDesqueezed", label="Is Desqueezed", description="True if the input image is already desqueezed.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -58,7 +53,6 @@ class DistortionCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -68,6 +62,5 @@ class DistortionCalibration(desc.AVCommandLineNode): label="SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 5cdeabd46b..bae602c27c 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -20,7 +20,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file containing a complete SfM.", value="", - invalidate=True, ), desc.File( name="sfmDataFilter", @@ -28,7 +27,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Filter out cameras from the export if they are part of this SfMData.\n" "If empty, export all cameras.", value="", - invalidate=True, ), desc.File( name="viewFilter", @@ -36,7 +34,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Select the cameras to export using an expression based on the image filepath.\n" "If empty, export all cameras.", value="", - invalidate=True, ), desc.BoolParam( name="exportSTMaps", @@ -44,14 +41,12 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Export ST maps. Motion (x, y) is encoded in the image channels to correct the lens distortion.\n" "It represents the absolute pixel positions of an image normalized between 0 and 1.", value=True, - invalidate=True, ), desc.BoolParam( name="exportUndistortedImages", label="Export Undistorted Images", description="Export undistorted images.", value=False, - invalidate=True, ), desc.ChoiceParam( name="undistortedImageType", @@ -60,7 +55,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): value="exr", values=["jpg", "png", "tif", "exr"], exclusive=True, - invalidate=True, enabled=lambda node: node.exportUndistortedImages.value, ), desc.BoolParam( @@ -69,14 +63,12 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Export full ROD.", value=False, enabled=lambda node: node.exportUndistortedImages.value and node.undistortedImageType.value == "exr", - invalidate=True, ), desc.BoolParam( name="correctPrincipalPoint", label="Correct Principal Point", description="Correct principal point.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -85,7 +77,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -95,7 +86,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): label="Folder", description="Output folder with animated camera and undistorted images.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outputCamera", @@ -103,7 +93,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Output filename for the animated camera in Alembic format.", value=desc.Node.internalFolder + "camera.abc", group="", # exclude from command line - invalidate=False, ), desc.File( name="outputUndistorted", @@ -111,7 +100,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Output undistorted folder.", value=desc.Node.internalFolder + "undistort/", group="", # exclude from command line - invalidate=False, ), desc.File( name="outputImages", @@ -121,6 +109,5 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): semantic="image", group="", # exclude from command line enabled=lambda node: node.exportUndistortedImages.value, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index a24a4194a2..f283209810 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -17,7 +17,6 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): label="Input SfMData", description="SfMData file containing a complete SfM.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -26,7 +25,6 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -36,6 +34,5 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): label="Point Cloud Filepath", description="Output point cloud with visibilities as SfMData file.", value=desc.Node.internalFolder + "pointCloud.abc", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 4da48bd529..f05ac5000b 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -18,7 +18,6 @@ class ExportDistortion(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.BoolParam( name="exportNukeNode", @@ -26,21 +25,18 @@ class ExportDistortion(desc.AVCommandLineNode): description="Export Nuke LensDistortion node as nuke file.\n" "Only supports 3DEqualizer lens models.", value=True, - invalidate=True, ), desc.BoolParam( name="exportLensGridsUndistorted", label="Export Lens Grids Undistorted", description="Export the lens grids undistorted for validation.", value=True, - invalidate=True, ), desc.BoolParam( name="exportSTMaps", label="Export STMaps", description="Export STMaps for distortion and undistortion.", value=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -49,7 +45,6 @@ class ExportDistortion(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -59,7 +54,6 @@ class ExportDistortion(desc.AVCommandLineNode): label="Folder", description="Output folder.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="distortionNukeNode", @@ -67,7 +61,6 @@ class ExportDistortion(desc.AVCommandLineNode): description="Calibrated distortion ST map.", value=desc.Node.internalFolder + "nukeLensDistortion_<INTRINSIC_ID>.nk", group="", # do not export on the command line - invalidate=False, enabled=lambda node: node.exportNukeNode.value, ), desc.File( @@ -77,7 +70,6 @@ class ExportDistortion(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "lensgrid_<VIEW_ID>_undistort.exr", group="", # do not export on the command line - invalidate=False, enabled=lambda node: node.exportLensGridsUndistorted.value, ), desc.File( @@ -87,7 +79,6 @@ class ExportDistortion(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_distort.exr", group="", # do not export on the command line - invalidate=False, enabled=lambda node: node.exportSTMaps.value, ), desc.File( @@ -97,7 +88,6 @@ class ExportDistortion(desc.AVCommandLineNode): semantic="image", value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_undistort.exr", group="", # do not export on the command line - invalidate=False, enabled=lambda node: node.exportSTMaps.value, ), ] diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index fd67a71486..3b61fe65b5 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -18,7 +18,6 @@ class ExportMatches(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -27,7 +26,6 @@ class ExportMatches(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ListAttribute( @@ -36,7 +34,6 @@ class ExportMatches(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -48,7 +45,6 @@ class ExportMatches(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some computed matches.", value="", - invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -61,7 +57,6 @@ class ExportMatches(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -71,6 +66,5 @@ class ExportMatches(desc.AVCommandLineNode): label="Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 14f26dcda8..09c5ed2c54 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -21,7 +21,6 @@ class ExportMaya(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -30,7 +29,6 @@ class ExportMaya(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -40,6 +38,5 @@ class ExportMaya(desc.AVCommandLineNode): label="Folder", description="Folder for MeshroomMaya outputs: undistorted images and thumbnails.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index aefce14acb..29e7afd483 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -37,14 +37,12 @@ class FeatureExtraction(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="masksFolder", label="Masks Folder", description="Use masks to filter features. Filename should be the same or the image UID.", value="", - invalidate=True, ), desc.ChoiceParam( name="maskExtension", @@ -53,14 +51,12 @@ class FeatureExtraction(desc.AVCommandLineNode): value="png", values=["png", "exr", "jpg"], exclusive=True, - invalidate=True, ), desc.BoolParam( name="maskInvert", label="Invert Masks", description="Invert mask values.", value=False, - invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -69,7 +65,6 @@ class FeatureExtraction(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -80,7 +75,6 @@ class FeatureExtraction(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra", "custom"], exclusive=True, - invalidate=True, group=lambda node: 'allParams' if node.describerPreset.value != 'custom' else None, ), desc.IntParam( @@ -89,7 +83,6 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Maximum number of features extracted (0 means default value based on Describer Density).", value=0, range=(0, 100000, 1000), - invalidate=True, advanced=True, enabled=lambda node: (node.describerPreset.value == "custom"), ), @@ -100,7 +93,6 @@ class FeatureExtraction(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="contrastFiltering", @@ -117,7 +109,6 @@ class FeatureExtraction(desc.AVCommandLineNode): values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, - invalidate=True, ), desc.FloatParam( name="relativePeakThreshold", @@ -126,7 +117,6 @@ class FeatureExtraction(desc.AVCommandLineNode): value=0.01, range=(0.01, 1.0, 0.001), advanced=True, - invalidate=True, enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( @@ -135,7 +125,6 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Enable grid filtering. Highly recommended to ensure usable number of features.", value=True, advanced=True, - invalidate=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -144,14 +133,12 @@ class FeatureExtraction(desc.AVCommandLineNode): values=COLORSPACES, value="sRGB", exclusive=True, - invalidate=True, ), desc.BoolParam( name="forceCpuExtraction", label="Force CPU Extraction", description="Use only CPU feature extraction.", value=True, - invalidate=False, advanced=True, ), desc.IntParam( @@ -170,7 +157,6 @@ class FeatureExtraction(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -180,6 +166,5 @@ class FeatureExtraction(desc.AVCommandLineNode): label="Features Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 39673cc897..10aba6f0e0 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -39,7 +39,6 @@ class FeatureMatching(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -47,7 +46,6 @@ class FeatureMatching(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -58,7 +56,6 @@ class FeatureMatching(desc.AVCommandLineNode): label="Image Pairs", description="Path to a file which contains the list of image pairs to match.", value="", - invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -67,7 +64,6 @@ class FeatureMatching(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -83,7 +79,6 @@ class FeatureMatching(desc.AVCommandLineNode): value="ANN_L2", values=["BRUTE_FORCE_L2", "ANN_L2", "CASCADE_HASHING_L2", "FAST_CASCADE_HASHING_L2", "BRUTE_FORCE_HAMMING"], exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -95,7 +90,6 @@ class FeatureMatching(desc.AVCommandLineNode): value="acransac", values=["acransac", "loransac"], exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -111,7 +105,6 @@ class FeatureMatching(desc.AVCommandLineNode): value="fundamental_matrix", values=["fundamental_matrix", "fundamental_with_distortion", "essential_matrix", "homography_matrix", "homography_growing", "no_filtering"], exclusive=True, - invalidate=True, advanced=True, ), desc.FloatParam( @@ -120,7 +113,6 @@ class FeatureMatching(desc.AVCommandLineNode): description="Distance ratio to discard non meaningful matches.", value=0.8, range=(0.0, 1.0, 0.01), - invalidate=True, advanced=True, ), desc.IntParam( @@ -129,7 +121,6 @@ class FeatureMatching(desc.AVCommandLineNode): description="Maximum number of iterations allowed in the Ransac step.", value=50000, range=(1, 100000, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -140,7 +131,6 @@ class FeatureMatching(desc.AVCommandLineNode): "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -150,7 +140,6 @@ class FeatureMatching(desc.AVCommandLineNode): "If set to 0 it lets the ACRansac select an optimal value.", value=5.0, range=(0.0, 100.0, 1.0), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -161,7 +150,6 @@ class FeatureMatching(desc.AVCommandLineNode): "Useful for filtering the background during acquisition with a turntable and a static camera.", value=-1.0, range=(0.0, 10.0, 1.0), - invalidate=True, ), desc.IntParam( name="maxMatches", @@ -169,7 +157,6 @@ class FeatureMatching(desc.AVCommandLineNode): description="Maximum number of matches to keep.", value=0, range=(0, 10000, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -177,7 +164,6 @@ class FeatureMatching(desc.AVCommandLineNode): label="Save Putative Matches", description="Save putative matches.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -185,14 +171,12 @@ class FeatureMatching(desc.AVCommandLineNode): label="Cross Matching", description="Ensure that the matching process is symmetric (same matches for I->J than for J->I).", value=False, - invalidate=True, ), desc.BoolParam( name="guidedMatching", label="Guided Matching", description="Use the found model to improve the pairwise correspondences.", value=False, - invalidate=True, ), desc.BoolParam( name="matchFromKnownCameraPoses", @@ -200,7 +184,6 @@ class FeatureMatching(desc.AVCommandLineNode): description="Enable the usage of geometric information from known camera poses to guide the feature matching.\n" "If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.", value=False, - invalidate=True, ), desc.BoolParam( name="exportDebugFiles", @@ -217,7 +200,6 @@ class FeatureMatching(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] outputs = [ @@ -226,6 +208,5 @@ class FeatureMatching(desc.AVCommandLineNode): label="Matches Folder", description="Path to a folder in which the computed matches are stored.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index b09a05e0de..5a16b104c3 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -21,7 +21,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): label="Input Folder", description="Input folder with evaluation datasets.", value="", - invalidate=True, ), desc.ChoiceParam( name="describerTypes", @@ -30,7 +29,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["sift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -41,7 +39,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="describerQuality", @@ -50,7 +47,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): value="normal", values=["low", "medium", "normal", "high", "ultra"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="contrastFiltering", @@ -67,7 +63,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, - invalidate=True, ), desc.FloatParam( name="relativePeakThreshold", @@ -76,7 +71,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): value=0.01, range=(0.01, 1.0, 0.001), advanced=True, - invalidate=True, enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( @@ -85,7 +79,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): description="Enable grid filtering. Highly recommended to ensure a usable number of features.", value=True, advanced=True, - invalidate=True, ), desc.BoolParam( name="forceCpuExtraction", @@ -102,7 +95,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): value=0, range=(0, 10000, 1), group="", - invalidate=True, ), desc.StringParam( name="comments", @@ -119,7 +111,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -129,6 +120,5 @@ class FeatureRepeatability(desc.AVCommandLineNode): label="Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 890e654959..8c720ade2a 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -23,7 +23,6 @@ class GlobalSfM(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -31,7 +30,6 @@ class GlobalSfM(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -43,7 +41,6 @@ class GlobalSfM(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some computed matches.", value="", - invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -56,7 +53,6 @@ class GlobalSfM(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -68,7 +64,6 @@ class GlobalSfM(desc.AVCommandLineNode): values=["L1_minimization", "L2_minimization"], value="L2_minimization", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="translationAveraging", @@ -80,7 +75,6 @@ class GlobalSfM(desc.AVCommandLineNode): values=["L1_minimization", "L2_minimization", "L1_soft_minimization"], value="L1_soft_minimization", exclusive=True, - invalidate=True, ), desc.BoolParam( name="lockAllIntrinsics", @@ -89,7 +83,6 @@ class GlobalSfM(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -98,7 +91,6 @@ class GlobalSfM(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -108,20 +100,17 @@ class GlobalSfM(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Output Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - invalidate=False, ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index cf0b209dc1..064cecee22 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -19,7 +19,6 @@ class ImageMasking(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="algorithm", @@ -28,7 +27,6 @@ class ImageMasking(desc.AVCommandLineNode): value="HSV", values=["HSV", "AutoGrayscaleThreshold"], exclusive=True, - invalidate=True, ), desc.GroupAttribute( name="hsv", @@ -48,7 +46,6 @@ class ImageMasking(desc.AVCommandLineNode): semantic="color/hue", value=0.33, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.FloatParam( name="hsvHueRange", @@ -56,7 +53,6 @@ class ImageMasking(desc.AVCommandLineNode): description="Tolerance around the hue value to isolate.", value=0.1, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.FloatParam( name="hsvMinSaturation", @@ -64,7 +60,6 @@ class ImageMasking(desc.AVCommandLineNode): description="Hue is meaningless if saturation is low. Do not mask pixels below this threshold.", value=0.3, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.FloatParam( name="hsvMaxSaturation", @@ -72,7 +67,6 @@ class ImageMasking(desc.AVCommandLineNode): description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", value=1.0, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.FloatParam( name="hsvMinValue", @@ -80,7 +74,6 @@ class ImageMasking(desc.AVCommandLineNode): description="Hue is meaningless if the value is low. Do not mask pixels below this threshold.", value=0.3, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.FloatParam( name="hsvMaxValue", @@ -88,7 +81,6 @@ class ImageMasking(desc.AVCommandLineNode): description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", value=1.0, range=(0.0, 1.0, 0.01), - invalidate=True, ), ], ), @@ -98,7 +90,6 @@ class ImageMasking(desc.AVCommandLineNode): description="If selected, the selected area is ignored.\n" "If not, only the selected area is considered.", value=True, - invalidate=True, ), desc.IntParam( name="growRadius", @@ -107,7 +98,6 @@ class ImageMasking(desc.AVCommandLineNode): "It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.", value=0, range=(0, 50, 1), - invalidate=True, ), desc.IntParam( name="shrinkRadius", @@ -115,21 +105,18 @@ class ImageMasking(desc.AVCommandLineNode): description="Shrink the selected area.", value=0, range=(0, 50, 1), - invalidate=True, ), desc.File( name="depthMapFolder", label="Depth Mask Folder", description="Depth mask folder.", value="", - invalidate=True, ), desc.StringParam( name="depthMapExp", label="Depth Mask Expression", description="Depth mask expression, like '{inputFolder}/{stem}-depth.{ext}'.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -138,7 +125,6 @@ class ImageMasking(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -148,6 +134,5 @@ class ImageMasking(desc.AVCommandLineNode): label="Output", description="Output folder.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index eec56d50d5..d895905395 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -40,7 +40,6 @@ class ImageMatching(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -48,7 +47,6 @@ class ImageMatching(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -69,7 +67,6 @@ class ImageMatching(desc.AVCommandLineNode): value="SequentialAndVocabularyTree", values=["VocabularyTree", "Sequential", "SequentialAndVocabularyTree", "Exhaustive", "Frustum", "FrustumOrVocabularyTree"], exclusive=True, - invalidate=True, ), desc.File( name="tree", @@ -85,7 +82,6 @@ class ImageMatching(desc.AVCommandLineNode): description="Input name for the weight file.\n" "If not provided, the weights will be computed on the database built with the provided set.", value="", - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -96,7 +92,6 @@ class ImageMatching(desc.AVCommandLineNode): "If we have less features than this threshold, we will compute all matching combinations.", value=200, range=(0, 500, 1), - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -106,7 +101,6 @@ class ImageMatching(desc.AVCommandLineNode): description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -116,7 +110,6 @@ class ImageMatching(desc.AVCommandLineNode): description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -126,7 +119,6 @@ class ImageMatching(desc.AVCommandLineNode): description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), - invalidate=True, advanced=True, enabled=lambda node: "Sequential" in node.method.value, ), @@ -137,7 +129,6 @@ class ImageMatching(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -147,6 +138,5 @@ class ImageMatching(desc.AVCommandLineNode): label="Image Pairs", description="Filepath to the output file with the list of selected image pairs.", value=desc.Node.internalFolder + "imageMatches.txt", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index d68ab9d70a..6bba21b649 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -25,14 +25,12 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): label="Input A", description="First input SfMData file.", value="", - invalidate=True, ), desc.File( name="inputB", label="Input B", description="Second input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -40,7 +38,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -60,7 +57,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): value="SequentialAndVocabularyTree", values=["VocabularyTree", "SequentialAndVocabularyTree", "Exhaustive", "Frustum"], exclusive=True, - invalidate=True, ), desc.File( name="tree", @@ -76,7 +72,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="Input name for the weight file.\n" "If not provided, the weights will be computed on the database built with the provided set.", value="", - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -90,7 +85,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): value="a/a+a/b", values=["a/a+a/b","a/ab", "a/b"], exclusive=True, - invalidate=True, ), desc.IntParam( name="minNbImages", @@ -99,7 +93,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): "If we have less features than this threshold, we will compute all the matching combinations.", value=200, range=(0, 500, 1), - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -109,7 +102,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -119,7 +111,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), - invalidate=True, advanced=True, enabled=lambda node: "VocabularyTree" in node.method.value, ), @@ -129,7 +120,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), - invalidate=True, advanced=True, enabled=lambda node: "Sequential" in node.method.value, ), @@ -140,7 +130,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -150,13 +139,11 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): label="List File", description="Filepath to the output file with the list of selected image pairs.", value=desc.Node.internalFolder + "imageMatches.txt", - invalidate=False, ), desc.File( name="outputCombinedSfM", label="Combined SfM", description="Path for the combined SfMData file.", value=desc.Node.internalFolder + "combineSfM.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 38e05c7fc1..fb8515faf8 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -52,7 +52,6 @@ class ImageProcessing(desc.AVCommandLineNode): " - '?' matches one character.\n" " - '*' matches zero character or more.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -60,7 +59,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Input Folder", description="Folder containing images.", value="", - invalidate=True, ), name="inputFolders", label="Input Images Folders", @@ -72,7 +70,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Metadata Folder", description="Specific folder containing images with metadata.", value="", - invalidate=True, ), name="metadataFolders", label="Input Metadata Folders", @@ -86,49 +83,42 @@ class ImageProcessing(desc.AVCommandLineNode): value="", values=["", "exr", "jpg", "tiff", "png"], exclusive=True, - invalidate=True, ), desc.BoolParam( name="reconstructedViewsOnly", label="Only Reconstructed Views", description="Only process reconstructed views.", value=False, - invalidate=True, ), desc.BoolParam( name="keepImageFilename", label="Keep Image Name", description="Keep the original image name instead of the view name.", value=False, - invalidate=True, ), desc.BoolParam( name="reorient", label="Automatic Reorientation", description="Automatic image reorientation.", value=False, - invalidate=True, ), desc.BoolParam( name="fixNonFinite", label="Fix Non-Finite", description="Fix non-finite pixels based on neighboring pixels average.", value=False, - invalidate=True, ), desc.BoolParam( name="exposureCompensation", label="Exposure Compensation", description="Exposure compensation (only valid for SfMData).", value=False, - invalidate=True, ), desc.BoolParam( name="rawAutoBright", label="RAW Auto Bright", description="Enable automatic exposure adjustment for RAW images.", value=False, - invalidate=True, ), desc.FloatParam( name="rawExposureAdjust", @@ -136,7 +126,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Manual exposure adjustment in fstops for RAW images.", value=0.0, range=(-2.0, 3.0, 0.125), - invalidate=True, ), desc.GroupAttribute( name="lensCorrection", @@ -149,14 +138,12 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Enable lens correction.", value=False, - invalidate=True, ), desc.BoolParam( name="geometry", label="Geometry", description="Geometry correction if a model is available in the SfMData.", value=False, - invalidate=True, enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), desc.BoolParam( @@ -164,7 +151,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Vignetting", description="Vignetting correction if the model parameters are available in the metadata.", value=False, - invalidate=True, enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), desc.BoolParam( @@ -172,7 +158,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Chromatic Aberration", description="Chromatic aberration (fringing) correction if the model parameters are available in the metadata.", value=False, - invalidate=True, enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, ), ], @@ -183,7 +168,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Scale factor.", value=1.0, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.IntParam( name="maxWidth", @@ -191,7 +175,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Maximum width of the output images (0: ignored).", value=0, range=(0, 10000, 1), - invalidate=True, ), desc.IntParam( name="maxHeight", @@ -199,7 +182,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Maximum height of the output images (0: ignored).", value=0, range=(0, 10000, 1), - invalidate=True, ), desc.FloatParam( name="contrast", @@ -207,7 +189,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Contrast.", value=1.0, range=(0.0, 100.0, 0.1), - invalidate=True, ), desc.IntParam( name="medianFilter", @@ -215,7 +196,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Median filter.", value=0, range=(0, 10, 1), - invalidate=True, ), desc.BoolParam( name="fillHoles", @@ -223,7 +203,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Fill holes based on the alpha channel.\n" "Note: It will enable 'fixNonFinite', as it is required for the image pyramid construction used to fill holes.", value=False, - invalidate=True, ), desc.GroupAttribute( name="sharpenFilter", @@ -236,7 +215,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use sharpen filter.", value=False, - invalidate=True, ), desc.IntParam( name="width", @@ -244,7 +222,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Sharpening width.", value=3, range=(1, 9, 2), - invalidate=True, enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), desc.FloatParam( @@ -253,7 +230,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Sharpening contrast.", value=1.0, range=(0.0, 100.0, 0.1), - invalidate=True, enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), desc.FloatParam( @@ -262,7 +238,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Sharpening threshold.", value=0.0, range=(0.0, 1.0, 0.01), - invalidate=True, enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, ), ], @@ -278,7 +253,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use bilateral filter.", value=False, - invalidate=True, ), desc.IntParam( name="bilateralFilterDistance", @@ -287,7 +261,6 @@ class ImageProcessing(desc.AVCommandLineNode): "Could be very slow for large filters, so it is recommended to use 5.", value=0, range=(0, 9, 1), - invalidate=True, enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), desc.FloatParam( @@ -296,7 +269,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Bilateral filter sigma in the coordinate space.", value=0.0, range=(0.0, 150.0, 0.01), - invalidate=True, enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), desc.FloatParam( @@ -305,7 +277,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Bilateral filter sigma in the color space.", value=0.0, range=(0.0, 150.0, 0.01), - invalidate=True, enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, ), ], @@ -321,7 +292,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use Contrast Limited Adaptive Histogram Equalization (CLAHE) filter.", value=False, - invalidate=True, ), desc.FloatParam( name="claheClipLimit", @@ -329,7 +299,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Threshold for contrast limiting.", value=4.0, range=(0.0, 8.0, 1.0), - invalidate=True, enabled=lambda node: node.claheFilter.claheEnabled.value, ), desc.IntParam( @@ -339,7 +308,6 @@ class ImageProcessing(desc.AVCommandLineNode): "Input image will be divided into equally sized rectangular tiles.", value=8, range=(4, 64, 4), - invalidate=True, enabled=lambda node: node.claheFilter.claheEnabled.value, ), ], @@ -355,7 +323,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Add noise.", value=False, - invalidate=True, ), desc.ChoiceParam( name="noiseMethod", @@ -367,7 +334,6 @@ class ImageProcessing(desc.AVCommandLineNode): value="uniform", values=["uniform", "gaussian", "salt"], exclusive=True, - invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.FloatParam( @@ -379,7 +345,6 @@ class ImageProcessing(desc.AVCommandLineNode): " - salt: the value of the specified portion of pixels.", value=0.0, range=(0.0, 1.0, 0.0001), - invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.FloatParam( @@ -391,7 +356,6 @@ class ImageProcessing(desc.AVCommandLineNode): " - salt: the portion of pixels to set to a specified value.", value=1.0, range=(0.0, 1.0, 0.0001), - invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.BoolParam( @@ -400,7 +364,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="If selected, a single noise value will be applied to all channels.\n" "Otherwise, a separate noise value will be computed for each channel.", value=True, - invalidate=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), ], @@ -417,7 +380,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Use Non-Local Mean Denoising from OpenCV to denoise images.", value=False, - invalidate=True, ), desc.FloatParam( name="nlmFilterH", @@ -427,7 +389,6 @@ class ImageProcessing(desc.AVCommandLineNode): "smaller H value preserves details but also preserves some noise.", value=5.0, range=(1.0, 1000.0, 0.01), - invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.FloatParam( @@ -438,7 +399,6 @@ class ImageProcessing(desc.AVCommandLineNode): "smaller HColor value preserves details but also preserves some noise.", value=10.0, range=(0.0, 1000.0, 0.01), - invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.IntParam( @@ -447,7 +407,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Size in pixels of the template patch that is used to compute weights. Should be odd.", value=7, range=(1, 101, 2), - invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), desc.IntParam( @@ -457,7 +416,6 @@ class ImageProcessing(desc.AVCommandLineNode): "Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.", value=21, range=(1, 1001, 2), - invalidate=True, enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, ), ], @@ -473,7 +431,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Enable", description="Apply pixel aspect ratio.", value=False, - invalidate=True, ), desc.BoolParam( name="parRowDecimation", @@ -481,7 +438,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="If selected, reduce image height by decimating the number of rows.\n" "Otherwise, increase width by upsampling image columns.", value=False, - invalidate=True, enabled=lambda node: node.parFilter.parEnabled.value, ), ], @@ -493,7 +449,6 @@ class ImageProcessing(desc.AVCommandLineNode): value="rgba", values=["rgba", "rgb", "grayscale"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="inputColorSpace", @@ -502,7 +457,6 @@ class ImageProcessing(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="outputColorSpace", @@ -511,7 +465,6 @@ class ImageProcessing(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -520,7 +473,6 @@ class ImageProcessing(desc.AVCommandLineNode): values=COLORSPACES, value="Linear", exclusive=True, - invalidate=True, enabled=lambda node: not node.applyDcpMetadata.value, ), desc.ChoiceParam( @@ -530,14 +482,12 @@ class ImageProcessing(desc.AVCommandLineNode): values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", exclusive=True, - invalidate=True, ), desc.BoolParam( name="applyDcpMetadata", label="Apply DCP Metadata", description="If the image contains some DCP metadata, then generate a DCP profile from them and apply it to the image content.", value=False, - invalidate=True, ), desc.File( name="colorProfileDatabase", @@ -552,7 +502,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Error On Missing DCP Color Profile", description="If a color profile database is specified but no color profile is found for at least one image, then an error is thrown.", value=True, - invalidate=True, enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( @@ -560,7 +509,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Use DCP Color Matrix Only", description="Use only the Color Matrix information from the DCP and ignore the Forward Matrix.", value=True, - invalidate=True, enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( @@ -568,7 +516,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="WB After Demosaicing", description="Do White Balance after demosaicing, just before DCP profile application.", value=False, - invalidate=True, enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.ChoiceParam( @@ -578,7 +525,6 @@ class ImageProcessing(desc.AVCommandLineNode): value="AHD", values=["linear", "VNG", "PPG", "AHD", "DCB", "AHD-Mod", "AFD", "VCD", "Mixed", "LMMSE", "AMaZE", "DHT", "AAHD", "none"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="highlightMode", @@ -591,7 +537,6 @@ class ImageProcessing(desc.AVCommandLineNode): value=0, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], exclusive=True, - invalidate=True, ), desc.FloatParam( name="correlatedColorTemperature", @@ -600,7 +545,6 @@ class ImageProcessing(desc.AVCommandLineNode): "A negative or null value indicates that the metadata information will be used.", value=-1.0, range=(-1.0, 10000.0, 1.0), - invalidate=True, ), desc.File( name="lensCorrectionProfileInfo", @@ -614,7 +558,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="LCP Generic Search", description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.", value=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -628,7 +571,6 @@ class ImageProcessing(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="exrCompressionMethod", @@ -637,7 +579,6 @@ class ImageProcessing(desc.AVCommandLineNode): value="auto", values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, - invalidate=True, ), desc.IntParam( name="exrCompressionLevel", @@ -647,7 +588,6 @@ class ImageProcessing(desc.AVCommandLineNode): "A value of 0 will be ignored, and the default value for the selected method will be used.", value=0, range=(0, 500, 1), - invalidate=True, enabled=lambda node: node.exrCompressionMethod.value in ["dwaa", "dwab", "zip", "zips"], ), desc.BoolParam( @@ -655,7 +595,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="JPEG Compress", description="Enable JPEG compression.", value=True, - invalidate=True, ), desc.IntParam( name="jpegQuality", @@ -663,7 +602,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="JPEG images quality after compression.", value=90, range=(0, 100, 1), - invalidate=True, enabled=lambda node: node.jpegCompress.value, ), desc.ChoiceParam( @@ -673,7 +611,6 @@ class ImageProcessing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -683,7 +620,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="SfMData", description="Output SfMData file.", value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -691,7 +627,6 @@ class ImageProcessing(desc.AVCommandLineNode): label="Folder", description="Output images folder.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outputImages", @@ -700,6 +635,5 @@ class ImageProcessing(desc.AVCommandLineNode): semantic="image", value=outputImagesValueFunct, group="", # do not export on the command line - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 50267bed55..46b538cb5c 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -22,14 +22,12 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Input", description="SfMData file input.", value="", - invalidate=True, ), desc.File( name="modelPath", label="Segmentation Model", description="Weights file for the internal model.", value="${ALICEVISION_SEMANTIC_SEGMENTATION_MODEL}", - invalidate=True, ), desc.ChoiceParam( name="validClasses", @@ -49,14 +47,12 @@ class ImageSegmentation(desc.AVCommandLineNode): "train", "tvmonitor" ], exclusive=False, - invalidate=True, ), desc.BoolParam( name="maskInvert", label="Invert Masks", description="Invert mask values. If selected, the pixels corresponding to the mask will be set to 0 instead of 255.", value=False, - invalidate=True, ), desc.BoolParam( name="useGpu", @@ -70,7 +66,6 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Keep Filename", description="Keep Input Filename", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -79,7 +74,6 @@ class ImageSegmentation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -89,7 +83,6 @@ class ImageSegmentation(desc.AVCommandLineNode): label="Masks Folder", description="Output path for the masks.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="masks", @@ -98,6 +91,5 @@ class ImageSegmentation(desc.AVCommandLineNode): semantic="image", value=lambda attr: desc.Node.internalFolder + "<VIEW_ID>.exr" if not attr.node.keepFilename.value else desc.Node.internalFolder + "<FILESTEM>.exr", group="", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index d439ceb0ef..ee6588b4d9 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -20,7 +20,6 @@ class ImportE57(desc.AVCommandLineNode): label="E57 File", description="Path to an E57 file.", value="", - invalidate=True, ), name="input", label="Input Files", @@ -32,7 +31,6 @@ class ImportE57(desc.AVCommandLineNode): description="Ensure each point has no neighbour closer than maxDensity meters.", value=0.01, range=(0.0, 0.2, 0.001), - invalidate=True, ), desc.FloatParam( name="minIntensity", @@ -40,7 +38,6 @@ class ImportE57(desc.AVCommandLineNode): description="Ensure no point has an intensity lower than this value.", value=0.03, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.IntParam( name="maxPointsPerBlock", @@ -48,7 +45,6 @@ class ImportE57(desc.AVCommandLineNode): description="Limit the number of points per computation region (For memory usage, 0 means no limit).", value=5000000, range=(0, 10000000, 100000), - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -57,7 +53,6 @@ class ImportE57(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -67,6 +62,5 @@ class ImportE57(desc.AVCommandLineNode): label="Output", description="Path to the output JSON file.", value=desc.Node.internalFolder + "inputset.json", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index 2c142f3f57..f26928eff9 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -18,14 +18,12 @@ class ImportKnownPoses(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="knownPosesData", label="Known Poses Data", description="Known poses data in the JSON or XMP format.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -34,7 +32,6 @@ class ImportKnownPoses(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -44,7 +41,6 @@ class ImportKnownPoses(desc.AVCommandLineNode): label="Output", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "/sfmData.abc", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index fdd2bd163e..89554bf9f0 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -73,7 +73,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Input Path", description="Input path.", value="", - invalidate=True, ), name="inputPaths", label="Input Paths", @@ -85,7 +84,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Brand", description="Camera brand.", value="", - invalidate=True, ), name="brands", label="Brands", @@ -97,7 +95,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Model", description="Camera model.", value="", - invalidate=True, ), name="models", label="Models", @@ -110,7 +107,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Focal in mm (will be used if not 0).", value=0.0, range=(0.0, 500.0, 1.0), - invalidate=True, ), name="mmFocals", label="Focals", @@ -121,7 +117,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Sensor Database", description="Camera sensor width database path.", value="${ALICEVISION_SENSOR_DB}", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -129,7 +124,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Masks Path", description="Directory containing masks to apply to the frames.", value="", - invalidate=True, ), name="maskPaths", label="Masks", @@ -150,7 +144,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Use Smart Keyframe Selection", description="Use the smart keyframe selection.", value=True, - invalidate=True, ), desc.GroupAttribute( name="regularSelection", @@ -166,7 +159,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Minimum number of frames between two keyframes.", value=12, range=(1, 1000, 1), - invalidate=True, enabled=lambda node: node.regularSelection.enabled, ), desc.IntParam( @@ -175,7 +167,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Maximum number of frames between two keyframes. Ignored if equal to 0.", value=0, range=(0, 1000, 1), - invalidate=True, enabled=lambda node: node.regularSelection.enabled, ), desc.IntParam( @@ -186,7 +177,6 @@ class KeyframeSelection(desc.AVCommandLineNode): "might cause the selection to stop before reaching the end of the input sequence(s).", value=0, range=(0, 10000, 1), - invalidate=True, enabled=lambda node: node.regularSelection.enabled, ), ], @@ -205,7 +195,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection.", value=10.0, range=(0.0, 100.0, 1.0), - invalidate=True, enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( @@ -214,7 +203,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Minimum number of frames selected to be keyframes.", value=40, range=(1, 100, 1), - invalidate=True, enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( @@ -223,7 +211,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Maximum number of frames selected to be keyframes.", value=2000, range=(1, 10000, 1), - invalidate=True, enabled=lambda node: node.smartSelection.enabled, ), desc.IntParam( @@ -233,7 +220,6 @@ class KeyframeSelection(desc.AVCommandLineNode): "Aspect ratio will be preserved. No rescale will be performed if equal to 0.", value=720, range=(0, 4000, 1), - invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -244,7 +230,6 @@ class KeyframeSelection(desc.AVCommandLineNode): "Aspect ratio will be preserved. No rescale will be performed if equal to 0.", value=720, range=(0, 4000, 1), - invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -254,7 +239,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="The size, in pixels, of the sliding window used to evaluate a frame's sharpness.", value=200, range=(1, 10000, 1), - invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -264,7 +248,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="The size, in pixels, of the cells within a frame in which the optical flow scores is evaluated.", value=90, range=(10, 2000, 1), - invalidate=True, enabled=lambda node: node.smartSelection.enabled, advanced=True, ), @@ -292,7 +275,6 @@ class KeyframeSelection(desc.AVCommandLineNode): "option enabled instead of [00015.exr, 00294.exr, 00825.exr].", value=False, enabled=lambda node: node.outputExtension.value != "none", - invalidate=True, ), desc.ChoiceParam( name="outputExtension", @@ -305,7 +287,6 @@ class KeyframeSelection(desc.AVCommandLineNode): exclusive=True, validValue=lambda node: not (any(ext in input.value.lower() for ext in videoExts for input in node.inputPaths.value) and node.outputExtension.value == "none"), errorMessage="A video input has been provided. The output extension should be different from 'none'.", - invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -318,7 +299,6 @@ class KeyframeSelection(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - invalidate=True, enabled=lambda node: node.outputExtension.value == "exr", advanced=True, ), @@ -342,14 +322,12 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Export Scores To CSV", description="Export the computed sharpness and optical flow scores to a CSV file.", value=False, - invalidate=True, ), desc.StringParam( name="csvFilename", label="CSV Filename", description="Name of the CSV file to export. It will be written in the node's output folder.", value="scores.csv", - invalidate=True, enabled=lambda node: node.debugOptions.debugScores.exportScores.value, ), desc.BoolParam( @@ -357,7 +335,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Export Selected Frames", description="Add a column in the CSV file containing 1s for frames that were selected and 0s for those that were not.", value=False, - invalidate=True, enabled=lambda node: node.debugOptions.debugScores.exportScores.value, ), ], @@ -374,7 +351,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Visualise Optical Flow", description="Export each frame's optical flow HSV visualisation as PNG images.", value=False, - invalidate=True, enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled, ), desc.BoolParam( @@ -383,7 +359,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Export each frame's optical flow HSV visualisation as PNG images, but do not perform any score computation or frame selection.\n" "If this option is selected, all the other options will be ignored.", value=False, - invalidate=True, enabled=lambda node: node.debugOptions.opticalFlowVisualisation.enabled, ), ], @@ -393,7 +368,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Skip Sharpness Computation", description="Skip the sharpness score computation. A fixed score of 1.0 will be applied by default to all the frames.", value=False, - invalidate=True, enabled=lambda node: node.debugOptions.enabled, ), desc.BoolParam( @@ -401,7 +375,6 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Skip Frame Selection", description="Compute the sharpness and optical flow scores, but do not proceed to the frame selection.", value=False, - invalidate=True, enabled=lambda node: node.debugOptions.enabled, ), ], @@ -413,7 +386,6 @@ class KeyframeSelection(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -423,14 +395,12 @@ class KeyframeSelection(desc.AVCommandLineNode): label="Folder", description="Output keyframes folder for extracted frames.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outputSfMDataKeyframes", label="Keyframes SfMData", description="Output SfMData file containing all the selected keyframes.", value=desc.Node.internalFolder + "keyframes.sfm", - invalidate=False, ), desc.File( name="outputSfMDataFrames", @@ -438,7 +408,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Output SfMData file containing all the frames that were not selected as keyframes.\n" "If the input contains videos, this file will not be written since all the frames that were not selected do not actually exist on disk.", value=desc.Node.internalFolder + "frames.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 67cb05c391..1270e6e743 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -44,14 +44,12 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="samples", label="Samples Folder", description="Samples folder.", value=desc.Node.internalFolder, - invalidate=True, ), desc.IntParam( name="userNbBrackets", @@ -72,7 +70,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): "else it is equal to 'userNbBrackets'.", value=0, range=(0, 15, 1), - invalidate=True, group="bracketsParams", ), desc.BoolParam( @@ -80,7 +77,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, - invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( @@ -95,7 +91,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): values=["auto", "linear", "debevec", "grossberg", "laguerre"], value="auto", exclusive=True, - invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( @@ -109,7 +104,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): value="default", values=["default", "gaussian", "triangle", "plateau"], exclusive=True, - invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -118,7 +112,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), - invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -142,7 +135,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): "can be managed by the calibration step (in term of computation time and memory usage).", value=1000000, range=(8, 10000000, 1000), - invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -153,7 +145,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -163,7 +154,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): label="Response File", description="Path to the output response file.", value=desc.Node.internalFolder + "response_<INTRINSIC_ID>.csv", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 6178a1ca4d..624e32ccb4 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -43,14 +43,12 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="response", label="Response File", description="Response file.", value="", - invalidate=True, ), desc.IntParam( name="userNbBrackets", @@ -71,7 +69,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 15, 1), - invalidate=True, group="bracketsParams", ), desc.BoolParam( @@ -79,7 +76,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Manually Specify Ref Bracket", description="Manually specify the reference bracket index to control the exposure of the HDR image.", value=False, - invalidate=True, group="user", # not used directly on the command line ), desc.IntParam( @@ -89,7 +85,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "+N to use a more exposed bracket or -N to use a less exposed bracket.", value=1, range=(-4, 4, 1), - invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( @@ -98,7 +93,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Expected mean luminance of the HDR images used to compute the final panorama.", value=0.4, range=(0.0, 1.0, 0.01), - invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( @@ -107,7 +101,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Minimum channel input value to be considered in advanced pixelwise merging.", value=0.05, range=(0.0, 1.0, 0.001), - invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1), ), desc.FloatParam( @@ -116,7 +109,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Maximum channel input value to be considered in advanced pixelwise merging.", value=0.995, range=(0.0, 1.0, 0.001), - invalidate=True, enabled=lambda node: (node.nbBrackets.value != 1), ), desc.BoolParam( @@ -124,7 +116,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Compute Light Masks", description="Compute masks of low and high lights and missing info.", value=False, - invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( @@ -132,7 +123,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, - invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( @@ -140,7 +130,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Keep Source Image Name", description="Keep the filename of the input image selected as central image for the output image filename.", value=False, - invalidate=True, ), desc.ChoiceParam( name="fusionWeight", @@ -152,7 +141,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value="gaussian", values=["gaussian", "triangle", "plateau"], exclusive=True, - invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -161,7 +149,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), - invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -173,7 +160,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( @@ -181,7 +167,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Enable Highlight", description="Enable highlights correction.", value=False, - invalidate=True, group="user", # not used directly on the command line enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -195,7 +180,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "This parameter is float to enable to weight this correction.", value=1.0, range=(0.0, 1.0, 0.01), - invalidate=True, enabled=lambda node: node.enableHighlight.enabled and node.enableHighlight.value, ), desc.FloatParam( @@ -218,7 +202,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): " - 150 lux: Home\n", value=120000.0, range=(1000.0, 150000.0, 1.0), - invalidate=True, enabled=lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( @@ -232,7 +215,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -241,7 +223,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -251,7 +232,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="Folder", description="Path to the folder containing the merged HDR images.", value=desc.Node.internalFolder, - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -259,7 +239,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index f9e5c6668d..19a359fef6 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -65,7 +65,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.IntParam( name="userNbBrackets", @@ -86,7 +85,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 15, 1), - invalidate=True, group="bracketsParams", ), desc.BoolParam( @@ -94,7 +92,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, - invalidate=True, enabled=lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( @@ -109,7 +106,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): values=["auto", "linear", "debevec", "grossberg", "laguerre"], value="auto", exclusive=True, - invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -118,7 +114,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), - invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -130,7 +125,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - invalidate=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -139,7 +133,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Size of the image tile to extract a sample.", value=256, range=(8, 1024, 1), - invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -149,7 +142,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Radius of the patch used to analyze the sample statistics.", value=5, range=(0, 10, 1), - invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -159,7 +151,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Maximum number of samples per image group.", value=200, range=(10, 1000, 10), - invalidate=True, advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), @@ -178,7 +169,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -188,7 +178,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): label="Folder", description="Output path for the samples.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LidarDecimating.py b/meshroom/aliceVision/LidarDecimating.py index 4403696aea..0f90bec547 100644 --- a/meshroom/aliceVision/LidarDecimating.py +++ b/meshroom/aliceVision/LidarDecimating.py @@ -24,7 +24,6 @@ class LidarDecimating(desc.AVCommandLineNode): label="Input JSON", description="Input JSON file with description of inputs.", value="", - invalidate=True, ), desc.FloatParam( name="errorLimit", @@ -32,7 +31,6 @@ class LidarDecimating(desc.AVCommandLineNode): description="Maximal distance (in meters) allowed.", value=0.001, range=(0.0, 1.0, 0.001), - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -41,7 +39,6 @@ class LidarDecimating(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -51,13 +48,11 @@ class LidarDecimating(desc.AVCommandLineNode): label="Sub-Meshes Directory", description="Output directory for sub-meshes.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outputJson", label="Scene Description", description="Output scene description.", value=desc.Node.internalFolder + "scene.json", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LidarMerging.py b/meshroom/aliceVision/LidarMerging.py index 53b0722643..08b98831d3 100644 --- a/meshroom/aliceVision/LidarMerging.py +++ b/meshroom/aliceVision/LidarMerging.py @@ -20,7 +20,6 @@ class LidarMerging(desc.AVCommandLineNode): label="Input JSON", description="Input JSON file with description of inputs.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -29,7 +28,6 @@ class LidarMerging(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -39,6 +37,5 @@ class LidarMerging(desc.AVCommandLineNode): label="Mesh Path Output", description="Output directory for mesh.", value=desc.Node.internalFolder + "output.obj", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LidarMeshing.py b/meshroom/aliceVision/LidarMeshing.py index 12688994ba..9eb7fddef8 100644 --- a/meshroom/aliceVision/LidarMeshing.py +++ b/meshroom/aliceVision/LidarMeshing.py @@ -24,7 +24,6 @@ class LidarMeshing(desc.AVCommandLineNode): label="Input JSON", description="Input JSON file with description of inputs.", value="", - invalidate=True, ), desc.BoolParam( name="useBoundingBox", @@ -33,7 +32,6 @@ class LidarMeshing(desc.AVCommandLineNode): "If enabled, it takes priority over the 'Estimate Space From SfM' option.\n" "Parameters can be adjusted in advanced settings.", value=False, - invalidate=True, group="", ), desc.GroupAttribute( @@ -49,19 +47,16 @@ class LidarMeshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), ], @@ -75,19 +70,16 @@ class LidarMeshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="Euler X rotation.", value=0.0, - invalidate=True, range=(-90.0, 90.0, 1.0), ), desc.FloatParam( name="y", label="y", description="Euler Y rotation.", value=0.0, - invalidate=True, range=(-180.0, 180.0, 1.0), ), desc.FloatParam( name="z", label="z", description="Euler Z rotation.", value=0.0, - invalidate=True, range=(-180.0, 180.0, 1.0), ), ], @@ -101,19 +93,16 @@ class LidarMeshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X scale.", value=1.0, - invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y scale.", value=1.0, - invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z scale.", value=1.0, - invalidate=True, range=(0.0, 20.0, 0.01), ), ], @@ -130,7 +119,6 @@ class LidarMeshing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -140,13 +128,11 @@ class LidarMeshing(desc.AVCommandLineNode): label="Sub-Meshes Directory", description="Output directory for sub-meshes", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outputJson", label="Scene Description", description="Output scene description.", value=desc.Node.internalFolder + "scene.json", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 9b1133cfab..6c88fead9c 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -18,28 +18,24 @@ class LightingCalibration(desc.CommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="inputDetection", label="Sphere Detection File", description="Input JSON file containing sphere centers and radiuses.", value="", - invalidate=True, ), desc.BoolParam( name="saveAsModel", label="Save As Model", description="Check if this calibration file will be used with other datasets.", value=False, - invalidate=True, ), desc.BoolParam( name="ellipticEstimation", label="Use elliptic estimation", description="Consider the right projection of the sphere. Fit the circle tool on the small axe of the ellipse.", value=False, - invalidate=True, ), desc.ChoiceParam( name="method", @@ -50,7 +46,6 @@ class LightingCalibration(desc.CommandLineNode): values=["brightestPoint", "whiteSphere", "SH"], value="brightestPoint", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -59,7 +54,6 @@ class LightingCalibration(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -69,7 +63,6 @@ class LightingCalibration(desc.CommandLineNode): label="Light File", description="Light information will be written here.", value=desc.Node.internalFolder + "/lights.json", - invalidate=False, ), desc.File( name="lightingEstimationVisualization", @@ -77,6 +70,5 @@ class LightingCalibration(desc.CommandLineNode): description="Estimated Lighting Visualization.", semantic="image", value=desc.Node.internalFolder + "/<FILESTEM>_{methodValue}.png", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index 899196a492..c9269e4cbc 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -17,14 +17,12 @@ class LightingEstimation(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="depthMapsFilterFolder", label="Filtered Depth Maps Folder", description="Input filtered depth maps folder.", value="", - invalidate=True, ), desc.File( name="imagesFolder", @@ -32,7 +30,6 @@ class LightingEstimation(desc.AVCommandLineNode): description="Use images from a specific folder instead of those specify in the SfMData file.\n" "Filename should be the image UID.", value="", - invalidate=True, ), desc.ChoiceParam( name="lightingEstimationMode", @@ -41,7 +38,6 @@ class LightingEstimation(desc.AVCommandLineNode): value="global", values=["global", "per_image"], exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -51,7 +47,6 @@ class LightingEstimation(desc.AVCommandLineNode): value="RGB", values=["RGB", "Luminance"], exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -61,7 +56,6 @@ class LightingEstimation(desc.AVCommandLineNode): value="constant", values=["constant", "picture", "median_filter", "blur_filter"], exclusive=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -70,7 +64,6 @@ class LightingEstimation(desc.AVCommandLineNode): description="Albedo filter size for estimation method using filter.", value=3, range=(0, 100, 1), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -80,7 +73,6 @@ class LightingEstimation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -90,6 +82,5 @@ class LightingEstimation(desc.AVCommandLineNode): label="Folder", description="Folder for output lighting vector files.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 7254886b8c..38f0820b30 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -24,14 +24,12 @@ class MergeMeshes(desc.AVCommandLineNode): label="First Mesh", description="Input first mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value="", - invalidate=True, ), desc.File( name="inputSecondMesh", label="Second Mesh", description="Input second mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value="", - invalidate=True, ), desc.ChoiceParam( name="mergeOperation", @@ -40,21 +38,18 @@ class MergeMeshes(desc.AVCommandLineNode): value="boolean_union", values=["boolean_union", "boolean_intersection", "boolean_difference"], exclusive=True, - invalidate=True, ), desc.BoolParam( name="preProcess", label="Pre-Process", description="Pre-process the input meshes in order to avoid geometric errors in the merging process.", value=True, - invalidate=True, ), desc.BoolParam( name="postProcess", label="Post-Process", description="Post-process the output mesh in order to avoid future geometric errors.", value=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -63,7 +58,6 @@ class MergeMeshes(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -73,6 +67,5 @@ class MergeMeshes(desc.AVCommandLineNode): label="Mesh", description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", value=desc.Node.internalFolder + "mesh.stl", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 8c8393a64a..69f2e1c706 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -20,7 +20,6 @@ class MeshDecimate(desc.AVCommandLineNode): label="Mesh", description="Input mesh in the OBJ format.", value="", - invalidate=True, ), desc.FloatParam( name="simplificationFactor", @@ -28,7 +27,6 @@ class MeshDecimate(desc.AVCommandLineNode): description="Simplification factor for the decimation.", value=0.5, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.IntParam( name="nbVertices", @@ -36,7 +34,6 @@ class MeshDecimate(desc.AVCommandLineNode): description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), - invalidate=True, ), desc.IntParam( name="minVertices", @@ -44,7 +41,6 @@ class MeshDecimate(desc.AVCommandLineNode): description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), - invalidate=True, ), desc.IntParam( name="maxVertices", @@ -52,7 +48,6 @@ class MeshDecimate(desc.AVCommandLineNode): description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), - invalidate=True, ), desc.BoolParam( name="flipNormals", @@ -61,7 +56,6 @@ class MeshDecimate(desc.AVCommandLineNode): "It can be needed as it depends on the vertices order in triangles\n" "and the convention changes from one software to another.", value=False, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -71,7 +65,6 @@ class MeshDecimate(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -81,6 +74,5 @@ class MeshDecimate(desc.AVCommandLineNode): label="Mesh", description="Output mesh in the OBJ file format.", value=desc.Node.internalFolder + "mesh.obj", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 8aa76a59b0..0f4ad826f0 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -19,7 +19,6 @@ class MeshDenoising(desc.AVCommandLineNode): label="Mesh", description="Input mesh in the OBJ file format.", value="", - invalidate=True, ), desc.IntParam( name="denoisingIterations", @@ -27,7 +26,6 @@ class MeshDenoising(desc.AVCommandLineNode): description="Number of denoising iterations.", value=5, range=(0, 30, 1), - invalidate=True, ), desc.FloatParam( name="meshUpdateClosenessWeight", @@ -35,7 +33,6 @@ class MeshDenoising(desc.AVCommandLineNode): description="Closeness weight for mesh update. Must be positive.", value=0.001, range=(0.0, 0.1, 0.001), - invalidate=True, ), desc.FloatParam( name="lambda", @@ -43,7 +40,6 @@ class MeshDenoising(desc.AVCommandLineNode): description="Regularization weight.", value=2.0, range=(0.0, 10.0, 0.01), - invalidate=True, ), desc.FloatParam( name="eta", @@ -53,7 +49,6 @@ class MeshDenoising(desc.AVCommandLineNode): "Must be positive.", value=1.5, range=(0.0, 20.0, 0.01), - invalidate=True, ), desc.FloatParam( name="mu", @@ -61,7 +56,6 @@ class MeshDenoising(desc.AVCommandLineNode): description="Gaussian standard deviation for guidance weight.", value=1.5, range=(0.0, 10.0, 0.01), - invalidate=True, ), desc.FloatParam( name="nu", @@ -69,7 +63,6 @@ class MeshDenoising(desc.AVCommandLineNode): description="Gaussian standard deviation for signal weight.", value=0.3, range=(0.0, 5.0, 0.01), - invalidate=True, ), desc.ChoiceParam( name="meshUpdateMethod", @@ -80,7 +73,6 @@ class MeshDenoising(desc.AVCommandLineNode): value=0, values=[0, 1], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -89,7 +81,6 @@ class MeshDenoising(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -99,6 +90,5 @@ class MeshDenoising(desc.AVCommandLineNode): label="Output", description="Output mesh in the OBJ file format.", value=desc.Node.internalFolder + "mesh.obj", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index 17f116aede..aec51331a4 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -18,7 +18,6 @@ class MeshFiltering(desc.AVCommandLineNode): label="Mesh", description="Input mesh file.", value="", - invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -27,7 +26,6 @@ class MeshFiltering(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - invalidate=True, group="", ), desc.BoolParam( @@ -35,7 +33,6 @@ class MeshFiltering(desc.AVCommandLineNode): label="Keep Only The Largest Mesh", description="Keep only the largest connected triangles group.", value=False, - invalidate=True, ), desc.ChoiceParam( name="smoothingSubset", @@ -44,7 +41,6 @@ class MeshFiltering(desc.AVCommandLineNode): value="all", values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -53,7 +49,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="Neighbours of the boundaries to consider.", value=0, range=(0, 20, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -62,7 +57,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="Number of smoothing iterations.", value=5, range=(0, 50, 1), - invalidate=True, ), desc.FloatParam( name="smoothingLambda", @@ -70,7 +64,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="Smoothing size.", value=1.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -80,7 +73,6 @@ class MeshFiltering(desc.AVCommandLineNode): value="all", values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -89,7 +81,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="Number of filtering iterations.", value=1, range=(0, 20, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -100,7 +91,6 @@ class MeshFiltering(desc.AVCommandLineNode): "0 disables the filtering.", value=60.0, range=(0.0, 100.0, 0.1), - invalidate=True, ), desc.FloatParam( name="filterTrianglesRatio", @@ -109,7 +99,6 @@ class MeshFiltering(desc.AVCommandLineNode): "0 disables the filtering.", value=0.0, range=(1.0, 50.0, 0.1), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -119,7 +108,6 @@ class MeshFiltering(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -129,6 +117,5 @@ class MeshFiltering(desc.AVCommandLineNode): label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 7acd1011f0..615ebcdb89 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -17,14 +17,12 @@ class MeshMasking(desc.AVCommandLineNode): label="Dense SfMData", description="Dense SfMData file.", value="", - invalidate=True, ), desc.File( name="inputMesh", label="Input Mesh", description="Input mesh.", value="", - invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -33,7 +31,6 @@ class MeshMasking(desc.AVCommandLineNode): value="obj", values=["obj", "gltf", "fbx", "stl"], exclusive=True, - invalidate=True, group="", ), desc.ListAttribute( @@ -42,7 +39,6 @@ class MeshMasking(desc.AVCommandLineNode): label="Masks Folder", description="Folder containing some masks.", value="", - invalidate=True, ), name="masksFolders", label="Masks Folders", @@ -55,7 +51,6 @@ class MeshMasking(desc.AVCommandLineNode): value="png", values=["exr", "jpg", "png"], exclusive=True, - invalidate=True, ), desc.IntParam( name="threshold", @@ -63,14 +58,12 @@ class MeshMasking(desc.AVCommandLineNode): description="The minimum number of visibilities to keep a vertex.", value=1, range=(1, 100, 1), - invalidate=True, ), desc.BoolParam( name="smoothBoundary", label="Smooth Boundary", description="Modify the triangles at the boundary to fit the masks.", value=False, - invalidate=True, ), desc.BoolParam( name="invert", @@ -78,7 +71,6 @@ class MeshMasking(desc.AVCommandLineNode): description="If ticked, the selected area is ignored.\n" "If not, only the selected area is considered.", value=False, - invalidate=True, ), desc.BoolParam( name="undistortMasks", @@ -86,7 +78,6 @@ class MeshMasking(desc.AVCommandLineNode): description="Undistort the masks with the same parameters as the matching image.\n" "Select it if the masks are drawn on the original images.", value=False, - invalidate=True, ), desc.BoolParam( name="usePointsVisibilities", @@ -94,7 +85,6 @@ class MeshMasking(desc.AVCommandLineNode): description="Use the points visibilities from the meshing to filter triangles.\n" "Example: when they are occluded, back-face, etc.", value=False, - invalidate=True ), desc.ChoiceParam( name="verboseLevel", @@ -103,7 +93,6 @@ class MeshMasking(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -113,6 +102,5 @@ class MeshMasking(desc.AVCommandLineNode): label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshRemoveUnseenFaces.py b/meshroom/aliceVision/MeshRemoveUnseenFaces.py index 3e0db120a1..add4ac5270 100644 --- a/meshroom/aliceVision/MeshRemoveUnseenFaces.py +++ b/meshroom/aliceVision/MeshRemoveUnseenFaces.py @@ -21,14 +21,12 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="inputMesh", label="Mesh", description="Input Mesh file.", value="", - invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -37,7 +35,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - invalidate=True, group="", ), desc.IntParam( @@ -46,7 +43,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): description="Minimal number of observations to keep a vertex.", value=1, range=(0, 5, 1), - invalidate=True, ), desc.IntParam( name="minVertices", @@ -54,7 +50,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): description="Minimal number of killed vertices in a triangle to remove the triangle.", value=3, range=(1, 3, 1), - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -63,7 +58,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -73,6 +67,5 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 9ceb357bb1..c659e65e0b 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -20,7 +20,6 @@ class MeshResampling(desc.AVCommandLineNode): label="Input Mesh", description="Input mesh in the OBJ file format.", value="", - invalidate=True, ), desc.FloatParam( name="simplificationFactor", @@ -28,7 +27,6 @@ class MeshResampling(desc.AVCommandLineNode): description="Simplification factor for the resampling.", value=0.5, range=(0.0, 1.0, 0.01), - invalidate=True, ), desc.IntParam( name="nbVertices", @@ -36,7 +34,6 @@ class MeshResampling(desc.AVCommandLineNode): description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), - invalidate=True, ), desc.IntParam( name="minVertices", @@ -44,7 +41,6 @@ class MeshResampling(desc.AVCommandLineNode): description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), - invalidate=True, ), desc.IntParam( name="maxVertices", @@ -52,7 +48,6 @@ class MeshResampling(desc.AVCommandLineNode): description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), - invalidate=True, ), desc.IntParam( name="nbLloydIter", @@ -60,7 +55,6 @@ class MeshResampling(desc.AVCommandLineNode): description="Number of iterations for Lloyd pre-smoothing.", value=40, range=(0, 100, 1), - invalidate=True, ), desc.BoolParam( name="flipNormals", @@ -68,7 +62,6 @@ class MeshResampling(desc.AVCommandLineNode): description="Option to flip face normals.\n" "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -77,7 +70,6 @@ class MeshResampling(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -87,6 +79,5 @@ class MeshResampling(desc.AVCommandLineNode): label="Mesh", description="Output mesh in the OBJ file format.", value=desc.Node.internalFolder + "mesh.obj", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 9df76bbf00..71dc15dc5f 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -28,14 +28,12 @@ class Meshing(desc.AVCommandLineNode): label="SfmData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="depthMapsFolder", label="Depth Maps Folder", description="Input depth maps folder.", value="", - invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -44,7 +42,6 @@ class Meshing(desc.AVCommandLineNode): value="obj", values=["gltf", "obj", "fbx", "stl"], exclusive=True, - invalidate=True, group="", ), desc.BoolParam( @@ -54,7 +51,6 @@ class Meshing(desc.AVCommandLineNode): "If enabled, it takes priority over the 'Estimate Space From SfM' option.\n" "Parameters can be adjusted in advanced settings.", value=False, - invalidate=True, group="", ), desc.GroupAttribute( @@ -70,19 +66,16 @@ class Meshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), ], @@ -96,19 +89,16 @@ class Meshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="Euler X rotation.", value=0.0, - invalidate=True, range=(-90.0, 90.0, 1.0) ), desc.FloatParam( name="y", label="y", description="Euler Y rotation.", value=0.0, - invalidate=True, range=(-180.0, 180.0, 1.0) ), desc.FloatParam( name="z", label="z", description="Euler Z rotation.", value=0.0, - invalidate=True, range=(-180.0, 180.0, 1.0) ), ], @@ -122,19 +112,16 @@ class Meshing(desc.AVCommandLineNode): desc.FloatParam( name="x", label="x", description="X scale.", value=1.0, - invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="y", label="y", description="Y scale.", value=1.0, - invalidate=True, range=(0.0, 20.0, 0.01), ), desc.FloatParam( name="z", label="z", description="Z scale.", value=1.0, - invalidate=True, range=(0.0, 20.0, 0.01), ), ], @@ -149,7 +136,6 @@ class Meshing(desc.AVCommandLineNode): label="Estimate Space From SfM", description="Estimate the 3D space from the SfM.", value=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -158,7 +144,6 @@ class Meshing(desc.AVCommandLineNode): description="Minimum number of observations for the space estimation from the SfM.", value=3, range=(0, 100, 1), - invalidate=True, advanced=True, enabled=lambda node: node.estimateSpaceFromSfM.value, ), @@ -168,7 +153,6 @@ class Meshing(desc.AVCommandLineNode): description="Minimum angle between two observations for the space estimation from the SfM.", value=10.0, range=(0.0, 120.0, 1.0), - invalidate=True, enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.IntParam( @@ -177,7 +161,6 @@ class Meshing(desc.AVCommandLineNode): description="Maximum input points loaded from depth map images.", value=50000000, range=(500000, 500000000, 1000), - invalidate=True, ), desc.IntParam( name="maxPoints", @@ -185,7 +168,6 @@ class Meshing(desc.AVCommandLineNode): description="Maximum points at the end of the depth maps fusion.", value=5000000, range=(100000, 10000000, 1000), - invalidate=True, ), desc.IntParam( name="maxPointsPerVoxel", @@ -193,7 +175,6 @@ class Meshing(desc.AVCommandLineNode): description="Maximum points per voxel.", value=1000000, range=(500000, 30000000, 1000), - invalidate=True, advanced=True, ), desc.IntParam( @@ -204,7 +185,6 @@ class Meshing(desc.AVCommandLineNode): "too much time at the beginning loading all the depth values.", value=2, range=(1, 20, 1), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -214,7 +194,6 @@ class Meshing(desc.AVCommandLineNode): value="singleBlock", values=["singleBlock", "auto"], exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -224,7 +203,6 @@ class Meshing(desc.AVCommandLineNode): value="multiResolution", values=["multiResolution", "regularGrid"], exclusive=True, - invalidate=True, advanced=True, ), desc.FloatParam( @@ -233,7 +211,6 @@ class Meshing(desc.AVCommandLineNode): description="Angle factor.", value=15.0, range=(0.0, 200.0, 1.0), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -242,7 +219,6 @@ class Meshing(desc.AVCommandLineNode): description="Sim factor.", value=15.0, range=(0.0, 200.0, 1.0), - invalidate=True, advanced=True, ), desc.IntParam( @@ -251,7 +227,6 @@ class Meshing(desc.AVCommandLineNode): description="Filter points based on their number of observations.", value=2, range=(1, 20, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -260,7 +235,6 @@ class Meshing(desc.AVCommandLineNode): description="Size of the margin init coefficient, in pixels.", value=2.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -269,7 +243,6 @@ class Meshing(desc.AVCommandLineNode): description="Size of the margin final coefficient, in pixels.", value=4.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -278,7 +251,6 @@ class Meshing(desc.AVCommandLineNode): description="Vote margin factor.", value=4.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -287,7 +259,6 @@ class Meshing(desc.AVCommandLineNode): description="Contribute margin factor.", value=2.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -296,7 +267,6 @@ class Meshing(desc.AVCommandLineNode): description="Sim Gaussian size init.", value=10.0, range=(0.0, 50.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -305,7 +275,6 @@ class Meshing(desc.AVCommandLineNode): description="Sim Gaussian size.", value=10.0, range=(0.0, 50.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -314,7 +283,6 @@ class Meshing(desc.AVCommandLineNode): description="Minimum angle threshold.", value=1.0, range=(0.0, 10.0, 0.01), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -322,7 +290,6 @@ class Meshing(desc.AVCommandLineNode): label="Refine Fuse", description="Refine depth map fusion with the new pixels size defined by angle and similarity scores.", value=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -331,7 +298,6 @@ class Meshing(desc.AVCommandLineNode): description="Grid size for the helper points.", value=10, range=(0, 50, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -349,7 +315,6 @@ class Meshing(desc.AVCommandLineNode): description="Densify vertices: front.", value=1, range=(0, 5, 1), - invalidate=True, advanced=True, enabled=lambda node: node.densify.value, ), @@ -359,7 +324,6 @@ class Meshing(desc.AVCommandLineNode): description="Densify vertices: back.", value=1, range=(0, 5, 1), - invalidate=True, advanced=True, enabled=lambda node: node.densify.value, ), @@ -369,7 +333,6 @@ class Meshing(desc.AVCommandLineNode): description="Scale between points used to densify the scene.", value=20.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, enabled=lambda node: node.densify.value, ), @@ -379,7 +342,6 @@ class Meshing(desc.AVCommandLineNode): description="Number of pixel size units to vote behind the vertex as FULL status.", value=4.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -388,7 +350,6 @@ class Meshing(desc.AVCommandLineNode): description="Weighting for full status.", value=1.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -396,14 +357,12 @@ class Meshing(desc.AVCommandLineNode): label="Weakly Supported Surface Support", description="Improve support of weakly supported surfaces with a tetrahedra fullness score filtering.", value=True, - invalidate=True, ), desc.BoolParam( name="addLandmarksToTheDensePointCloud", label="Add Landmarks To The Dense Point Cloud", description="Add SfM landmarks to the dense point cloud.", value=False, - invalidate=True, advanced=True, ), desc.IntParam( @@ -413,7 +372,6 @@ class Meshing(desc.AVCommandLineNode): "Set to 0 to disable.", value=10, range=(0, 30, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -423,7 +381,6 @@ class Meshing(desc.AVCommandLineNode): "ratio between full/empty parts. Set to 0 to disable.", value=0.2, range=(0.0, 0.5, 0.01), - invalidate=True, advanced=True, ), desc.IntParam( @@ -433,7 +390,6 @@ class Meshing(desc.AVCommandLineNode): "between full/empty parts. Set to 0 to disable.", value=2, range=(0, 30, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -441,7 +397,6 @@ class Meshing(desc.AVCommandLineNode): label="Colorize Output", description="Whether to colorize output dense point cloud and mesh.", value=False, - invalidate=True, ), desc.BoolParam( name="addMaskHelperPoints", @@ -458,7 +413,6 @@ class Meshing(desc.AVCommandLineNode): description="Weight value for mask helper points. 0 means no helper point.", value=1.0, range=(0.0, 20.0, 1.0), - invalidate=True, advanced=True, enabled=lambda node: node.addMaskHelperPoints.value, ), @@ -468,7 +422,6 @@ class Meshing(desc.AVCommandLineNode): description="Number of pixels on mask borders.", value=4, range=(0, 20, 1), - invalidate=True, advanced=True, enabled=lambda node: node.addMaskHelperPoints.value, ), @@ -480,7 +433,6 @@ class Meshing(desc.AVCommandLineNode): "0 means that all helper points are removed. -1 means that helper points are not filtered at all.", value=50, range=(-1, 100, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -507,7 +459,6 @@ class Meshing(desc.AVCommandLineNode): "0 means use of random device instead of a fixed seed.", value=0, range=(0, 10000, 1), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -517,7 +468,6 @@ class Meshing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -527,13 +477,11 @@ class Meshing(desc.AVCommandLineNode): label="Mesh", description="Output mesh.", value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", - invalidate=False, ), desc.File( name="output", label="Dense SfMData", description="Output dense point cloud with visibilities (SfMData file format).", value=desc.Node.internalFolder + "densePointCloud.abc", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index 25573e5de2..5cb0b075dc 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -19,21 +19,18 @@ class NodalSfM(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Input tracks file.", value="", - invalidate=True, ), desc.File( name="pairs", label="Pairs File", description="Information on pairs.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -42,7 +39,6 @@ class NodalSfM(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -52,6 +48,5 @@ class NodalSfM(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 2f56637817..fc12f158fe 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -16,14 +16,12 @@ class NormalIntegration(desc.CommandLineNode): label="Normal Maps Folder", description="Path to the folder containing the normal maps and the masks.", value="", - invalidate=True, ), desc.File( name="sfmDataFile", label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.IntParam( name="downscale", @@ -32,7 +30,6 @@ class NormalIntegration(desc.CommandLineNode): value=1, range=(1, 10, 1), advanced=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -41,7 +38,6 @@ class NormalIntegration(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -52,7 +48,6 @@ class NormalIntegration(desc.CommandLineNode): description="Generated depth in the camera coordinate system.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_depthMap.exr", - invalidate=False, group="", # do not export on the command line ) ] diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index a76d982564..983f53387c 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -29,21 +29,18 @@ class PanoramaCompositing(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="warpingFolder", label="Warping Folder", description="Panorama warping results folder.", value="", - invalidate=True, ), desc.File( name="labels", label="Labels Images", description="Panorama seams results images.", value="", - invalidate=True, ), desc.ChoiceParam( name="compositerType", @@ -55,7 +52,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): value="multiband", values=["replace", "alpha", "multiband"], exclusive=True, - invalidate=True, ), desc.IntParam( name="forceMinPyramidLevels", @@ -63,7 +59,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): description="Force the minimal number of levels in the pyramid for multiband compositer.", value=0, range=(0, 16, 1), - invalidate=True, enabled=lambda node: node.compositerType.value and node.compositerType.value == "multiband", ), desc.IntParam( @@ -80,7 +75,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): label="Use Tiling", description="Enable tiling mode for parallelization.", value=True, - invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -93,7 +87,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="overlayType", @@ -107,7 +100,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): values=["none", "borders", "seams", "all"], exclusive=True, advanced=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -116,7 +108,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -126,6 +117,5 @@ class PanoramaCompositing(desc.AVCommandLineNode): label="Folder", description="Output folder containing the composited panorama.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index a03819505e..e1361c0688 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -22,7 +22,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -30,7 +29,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -42,7 +40,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some matches.", value="", - invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -55,7 +52,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["sift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.FloatParam( @@ -64,7 +60,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Offset to the panorama longitude (in degrees).", value=0.0, range=(-180.0, 180.0, 1.0), - invalidate=True, ), desc.FloatParam( name="offsetLatitude", @@ -72,7 +67,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Offset to the panorama latitude (in degrees).", value=0.0, range=(-90.0, 90.0, 1.0), - invalidate=True, ), desc.ChoiceParam( name="rotationAveraging", @@ -83,7 +77,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=["L1_minimization", "L2_minimization"], value="L2_minimization", exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -96,7 +89,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=["essential_matrix", "homography_matrix", "rotation_matrix"], value="rotation_matrix", exclusive=True, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -104,7 +96,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Rotation Averaging Weighting", description="Rotation averaging weighting based on the number of feature matches.", value=True, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -112,14 +103,12 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Filter Matches", description="Filter the matches.", value=False, - invalidate=True, ), desc.BoolParam( name="refine", label="Refine", description="Refine camera relative poses, points and optionally internal camera parameters.", value=True, - invalidate=True, ), desc.BoolParam( name="lockAllIntrinsics", @@ -128,7 +117,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - invalidate=True, ), desc.FloatParam( name="maxAngleToPrior", @@ -136,7 +124,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Maximum angle allowed regarding the input prior (in degrees) before refinement.", value=20.0, range=(0.0, 360.0, 1.0), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -145,7 +132,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Maximum angle allowed regarding the input prior (in degrees) after refinement.", value=2.0, range=(0.0, 360.0, 1.0), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -154,7 +140,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Maximum angular error in global rotation averging (in degrees).", value=100.0, range=(0.0, 360.0, 1.0), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -162,7 +147,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Intermediate Refine: Focal", description="Intermediate refine with rotation and focal length only.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -170,7 +154,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="Intermediate Refine: Focal And Distortion", description="Intermediate refine with rotation, focal length and distortion.", value=False, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -180,7 +163,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -190,13 +172,11 @@ class PanoramaEstimation(desc.AVCommandLineNode): label="SfM File", description="Path to the output SfM file.", value=desc.Node.internalFolder + "panorama.abc", - invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Views And Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 322a7a6b81..396f24e51f 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -27,7 +27,6 @@ class PanoramaInit(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="initializeCameras", @@ -36,14 +35,12 @@ class PanoramaInit(desc.AVCommandLineNode): value="No", values=["No", "File", "Horizontal", "Horizontal+Zenith", "Zenith+Horizontal", "Spherical"], exclusive=True, - invalidate=True, ), desc.File( name="config", label="XML Config", description="XML data file.", value="", - invalidate=True, enabled=lambda node: node.initializeCameras.value == "File", ), desc.BoolParam( @@ -51,7 +48,6 @@ class PanoramaInit(desc.AVCommandLineNode): label="Yaw CW", description="If selected, the yaw rotation will be clockwise. Otherwise, it will be counter-clockwise.", value=True, - invalidate=True, enabled=lambda node: ("Horizontal" in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), ), desc.BoolParam( @@ -60,7 +56,6 @@ class PanoramaInit(desc.AVCommandLineNode): description="Build the contact sheet for the panorama if an XML data file is provided.\n" "The contact sheet consists in a preview of the panorama using the input images.", value=True, - invalidate=True, enabled=lambda node: node.config.enabled and node.config.value != "", ), desc.ListAttribute( @@ -70,7 +65,6 @@ class PanoramaInit(desc.AVCommandLineNode): description="Number of views for a line.", value=-1, range=(-1, 20, 1), - invalidate=True, ), name="nbViewsPerLine", label="Spherical: Nb Views Per Line", @@ -85,14 +79,12 @@ class PanoramaInit(desc.AVCommandLineNode): label="Full Fisheye", description="Set this option to declare a full fisheye panorama setup.", value=False, - invalidate=True, ), desc.BoolParam( name="estimateFisheyeCircle", label="Estimate Fisheye Circle", description="Automatically estimate the fisheye circle center and radius instead of using user values.", value=True, - invalidate=True, enabled=lambda node: node.useFisheye.value, ), desc.GroupAttribute( @@ -105,7 +97,6 @@ class PanoramaInit(desc.AVCommandLineNode): label="x", description="X offset in pixels.", value=0.0, - invalidate=True, range=(-1000.0, 10000.0, 1.0), ), desc.FloatParam( @@ -113,7 +104,6 @@ class PanoramaInit(desc.AVCommandLineNode): label="y", description="Y offset in pixels.", value=0.0, - invalidate=True, range=(-1000.0, 10000.0, 1.0), ), ], @@ -126,7 +116,6 @@ class PanoramaInit(desc.AVCommandLineNode): description="Fisheye visibillity circle radius (in % of image's shortest side).", value=96.0, range=(0.0, 150.0, 0.01), - invalidate=True, enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.ChoiceParam( @@ -136,14 +125,12 @@ class PanoramaInit(desc.AVCommandLineNode): value="None", values=["None", "rotate90", "rotate180", "rotate270"], exclusive=True, - invalidate=True, ), desc.BoolParam( name="debugFisheyeCircleEstimation", label="Debug Fisheye Circle Detection", description="Debug fisheye circle detection.", value=False, - invalidate=True, enabled=lambda node: node.useFisheye.value, advanced=True, ), @@ -154,7 +141,6 @@ class PanoramaInit(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -164,6 +150,5 @@ class PanoramaInit(desc.AVCommandLineNode): label="SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmData.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 051047cd26..4e5d792478 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -24,14 +24,12 @@ class PanoramaMerging(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="compositingFolder", label="Compositing Folder", description="Panorama compositing results.", value="", - invalidate=True, ), desc.ChoiceParam( name="outputFileType", @@ -40,7 +38,6 @@ class PanoramaMerging(desc.AVCommandLineNode): value="exr", values=["jpg", "png", "tif", "exr"], exclusive=True, - invalidate=True, group="", # not part of allParams, as this is not a parameter for the command line ), desc.BoolParam( @@ -48,7 +45,6 @@ class PanoramaMerging(desc.AVCommandLineNode): label="Use Tiling", description="Enable tiling mode for parallelization.", value=True, - invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -61,7 +57,6 @@ class PanoramaMerging(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -70,7 +65,6 @@ class PanoramaMerging(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -81,6 +75,5 @@ class PanoramaMerging(desc.AVCommandLineNode): description="Output merged panorama image.", semantic="image", value=desc.Node.internalFolder + "panorama.{outputFileTypeValue}", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index b99cec836f..739d5740c7 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -23,21 +23,18 @@ class PanoramaPostProcessing(desc.CommandLineNode): label="Input Panorama", description="Input panorama image.", value="", - invalidate=True, ), desc.BoolParam( name="fillHoles", label="Fill Holes Algorithm", description="Fill the non attributed pixels with push pull algorithm if set.", value=False, - invalidate=True, ), desc.BoolParam( name="exportLevels", label="Export Downscaled Levels", description="Export downscaled panorama levels.", value=False, - invalidate=True, ), desc.IntParam( name="lastLevelMaxSize", @@ -45,7 +42,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Maximum width of smallest downscaled panorama level.", value=3840, range=(1, 100000), - invalidate=True, ), desc.IntParam( name="previewSize", @@ -53,7 +49,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="The width (in pixels) of the output panorama preview.", value=1000, range=(0, 5000, 100), - invalidate=True, ), desc.ChoiceParam( name="outputColorSpace", @@ -62,7 +57,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): values=COLORSPACES, value="Linear", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="compressionMethod", @@ -71,7 +65,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): value="auto", values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, - invalidate=True, ), desc.IntParam( name="compressionLevel", @@ -81,7 +74,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): "A value of 0 will be ignored, default value for the selected method will be used.", value=0, range=(0, 500, 1), - invalidate=True, enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"], ), desc.StringParam( @@ -109,7 +101,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -120,7 +111,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Generated panorama in EXR format.", semantic="image", value=lambda attr: desc.Node.internalFolder + attr.node.panoramaName.value, - invalidate=False, ), desc.File( name="outputPanoramaPreview", @@ -128,14 +118,12 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Preview of the generated panorama in JPG format.", semantic="image", value=lambda attr: desc.Node.internalFolder + attr.node.previewName.value, - invalidate=False, ), desc.File( name="downscaledPanoramaLevels", label="Downscaled Panorama Levels", description="Downscaled versions of the generated panorama.", value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.panoramaName.value)[0] + "_level_*.exr", - invalidate=False, group="", ), ] diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index 062c73225f..3d3d66a8a8 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -21,7 +21,6 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -30,7 +29,6 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -40,6 +38,5 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): label="SfMData", description="Output SfMData file.", value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value), - invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index d860a0e016..90fc55888a 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -24,14 +24,12 @@ class PanoramaSeams(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="warpingFolder", label="Warping Folder", description="Panorama warping results.", value="", - invalidate=True, ), desc.IntParam( name="maxWidth", @@ -39,14 +37,12 @@ class PanoramaSeams(desc.AVCommandLineNode): description="Maximal resolution for the panorama seams estimation.", value=5000, range=(0, 100000, 1), - invalidate=True, ), desc.BoolParam( name="useGraphCut", label="Use Smart Seams", description="Use a graphcut algorithm to optimize seams for better transitions between images.", value=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -55,7 +51,6 @@ class PanoramaSeams(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -66,13 +61,11 @@ class PanoramaSeams(desc.AVCommandLineNode): description="", semantic="image", value=desc.Node.internalFolder + "labels.exr", - invalidate=False, ), desc.File( name="outputSfm", label="Output SfMData File", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "panorama.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index ba654662ff..b6f17b7d81 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -24,14 +24,12 @@ class PanoramaWarping(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.BoolParam( name="estimateResolution", label="Estimate Resolution", description="Estimate output panorama resolution automatically based on the resolution of input images.", value=True, - invalidate=True, group=None, # skip group from command line ), desc.IntParam( @@ -40,7 +38,6 @@ class PanoramaWarping(desc.AVCommandLineNode): description="Choose the output panorama width (in pixels).", value=10000, range=(0, 50000, 1000), - invalidate=True, enabled=lambda node: (not node.estimateResolution.value), ), desc.IntParam( @@ -55,7 +52,6 @@ class PanoramaWarping(desc.AVCommandLineNode): value=50, range=(0, 100, 1), enabled=lambda node: (node.estimateResolution.value), - invalidate=True, ), desc.IntParam( name="maxPanoramaWidth", @@ -63,7 +59,6 @@ class PanoramaWarping(desc.AVCommandLineNode): description="Choose the maximum width for the output panorama (in pixels). 0 means no limit.", value=70000, range=(0, 100000, 1000), - invalidate=True, enabled=lambda node: (node.estimateResolution.value), ), desc.ChoiceParam( @@ -73,7 +68,6 @@ class PanoramaWarping(desc.AVCommandLineNode): values=COLORSPACES, value="Linear", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="storageDataType", @@ -86,7 +80,6 @@ class PanoramaWarping(desc.AVCommandLineNode): values=EXR_STORAGE_DATA_TYPE, value="float", exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -95,7 +88,6 @@ class PanoramaWarping(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -105,6 +97,5 @@ class PanoramaWarping(desc.AVCommandLineNode): label="Folder", description="Output folder.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 2779c7bda6..2cdb939f93 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -17,7 +17,6 @@ class PhotometricStereo(desc.CommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="pathToJSONLightFile", @@ -25,14 +24,12 @@ class PhotometricStereo(desc.CommandLineNode): description="Path to a JSON file containing the lighting information.\n" "If empty, .txt files are expected in the image folder.", value="defaultJSON.txt", - invalidate=True, ), desc.File( name="maskPath", label="Mask Folder Path", description="Path to a folder containing masks or to a mask directly.", value="", - invalidate=True, ), desc.ChoiceParam( name="SHOrder", @@ -45,7 +42,6 @@ class PhotometricStereo(desc.CommandLineNode): value="0", exclusive=True, advanced=True, - invalidate=True, ), desc.BoolParam( name="removeAmbient", @@ -53,7 +49,6 @@ class PhotometricStereo(desc.CommandLineNode): description="True if the ambient light is to be removed on the PS images, false otherwise.", value=False, advanced=True, - invalidate=True, ), desc.BoolParam( name="isRobust", @@ -61,7 +56,6 @@ class PhotometricStereo(desc.CommandLineNode): description="True to use the robust algorithm, false otherwise.", value=False, advanced=True, - invalidate=True, ), desc.IntParam( name="downscale", @@ -70,7 +64,6 @@ class PhotometricStereo(desc.CommandLineNode): value=1, range=(1, 10, 1), advanced=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -79,7 +72,6 @@ class PhotometricStereo(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -89,14 +81,12 @@ class PhotometricStereo(desc.CommandLineNode): label="Output Folder", description="Path to the output folder.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outputSfmDataAlbedo", label="SfMData Albedo", description="Output SfMData file containing the albedo information.", value=desc.Node.internalFolder + "/albedoMaps.sfm", - invalidate=False, group="", # remove from command line ), desc.File( @@ -104,7 +94,6 @@ class PhotometricStereo(desc.CommandLineNode): label="SfMData Normal", description="Output SfMData file containing the normal maps information.", value=desc.Node.internalFolder + "/normalMaps.sfm", - invalidate=False, group="", # remove from command line ), desc.File( @@ -112,7 +101,6 @@ class PhotometricStereo(desc.CommandLineNode): label="SfMData Normal PNG", description="Output SfMData file containing the normal maps information.", value=desc.Node.internalFolder + "/normalMapsPNG.sfm", - invalidate=False, group="", # remove from command line ), # these attributes are only here to describe more accurately the output of the node @@ -124,7 +112,6 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated normal maps in the camera coordinate system.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals.exr", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -133,7 +120,6 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated normal maps in the camera coordinate system (in false colors).", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals.png", - invalidate=False, group="", # do not export on the command line ), desc.File( @@ -142,7 +128,6 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated normal maps in the world coordinate system.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_normals_w.exr", - invalidate=False, group="", # do not export on the command line ), @@ -152,7 +137,6 @@ class PhotometricStereo(desc.CommandLineNode): description="Generated albedo maps.", semantic="image", value=desc.Node.internalFolder + "<POSE_ID>_albedo.png", - invalidate=False, group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index a9661dcd6d..8df1218619 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -21,7 +21,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -29,7 +28,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Images Folder", description="", value="", - invalidate=True, ), name="imagesFolders", label="Images Folders", @@ -41,7 +39,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Masks Folder", description="", value="", - invalidate=True, ), name="masksFolders", label="Masks Folders", @@ -54,7 +51,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): value="png", values=["exr", "jpg", "png"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="outputFileType", @@ -63,7 +59,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): value="exr", values=["jpg", "png", "tif", "exr"], exclusive=True, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -71,7 +66,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Save Metadata", description="Save projections and intrinsics information in images metadata (only for .exr images).", value=True, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -79,7 +73,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Save Matrices Text Files", description="Save projections and intrinsics information in text files.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -87,7 +80,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Correct Images Exposure", description="Apply a correction on images' exposure value.", value=False, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -97,7 +89,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -107,7 +98,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Images Folder", description="Output folder.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="undistorted", @@ -115,7 +105,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="List of undistorted images.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>.{outputFileTypeValue}", - invalidate=False, group="", advanced=True, ), diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 9cdfed47a7..0cff844e92 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -24,7 +24,6 @@ class Publish(desc.Node): label="Input", description="File or folder to publish.", value="", - invalidate=True, ), name="inputFiles", label="Input Files", @@ -36,7 +35,6 @@ class Publish(desc.Node): label="Output Folder", description="Folder to publish to.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -45,7 +43,6 @@ class Publish(desc.Node): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index b3e0653d1b..0e7ef127ad 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -21,21 +21,18 @@ class RelativePoseEstimating(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Tracks file.", value="", - invalidate=True, ), desc.BoolParam( name="enforcePureRotation", label="Enforce pure rotation", description="Enforce pure rotation as a model", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -44,7 +41,6 @@ class RelativePoseEstimating(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -54,6 +50,5 @@ class RelativePoseEstimating(desc.AVCommandLineNode): label="Pairs Info", description="Path to the output Pairs info files directory.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SelectConnectedViews.py b/meshroom/aliceVision/SelectConnectedViews.py index 7adf5660da..5da953eec4 100644 --- a/meshroom/aliceVision/SelectConnectedViews.py +++ b/meshroom/aliceVision/SelectConnectedViews.py @@ -21,7 +21,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.IntParam( name="maxTCams", @@ -29,7 +28,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): description="Maximum number of neighbour cameras per image.", value=10, range=(1, 20, 1), - invalidate=True, ), desc.FloatParam( name="minViewAngle", @@ -37,7 +35,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=2.0, range=(0.0, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -46,7 +43,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=70.0, range=(10.0, 120.0, 1.0), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -56,7 +52,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -66,6 +61,5 @@ class SelectConnectedViews(desc.AVCommandLineNode): label="Connected Views", description="List of connected views in a text file.", value=desc.Node.internalFolder + "connectedViews.txt", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index d99ed73604..046a5e09a2 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -29,14 +29,12 @@ class SfMAlignment(desc.AVCommandLineNode): label="Input", description="Input SfMData file .", value="", - invalidate=True, ), desc.File( name="reference", label="Reference", description="Path to the scene used as the reference coordinate system.", value="", - invalidate=True, ), desc.ChoiceParam( name="method", @@ -51,7 +49,6 @@ class SfMAlignment(desc.AVCommandLineNode): value="from_cameras_viewid", values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers", 'from_landmarks'], exclusive=True, - invalidate=True, ), desc.StringParam( name="fileMatchingPattern", @@ -66,7 +63,6 @@ class SfMAlignment(desc.AVCommandLineNode): " - Match the filename prefix before '_': " r'".*\/(.*?)_.*\.\w{3}"', value=r".*\/(.*?)\.\w{3}", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -74,7 +70,6 @@ class SfMAlignment(desc.AVCommandLineNode): label="Metadata", description="", value="Metadata that should match to create the correspondences.", - invalidate=True, ), name="metadataMatchingList", label="Metadata Matching List", @@ -86,21 +81,18 @@ class SfMAlignment(desc.AVCommandLineNode): label="Scale", description="Apply scale transformation.", value=True, - invalidate=True, ), desc.BoolParam( name="applyRotation", label="Rotation", description="Apply rotation transformation.", value=True, - invalidate=True, ), desc.BoolParam( name="applyTranslation", label="Translation", description="Apply translation transformation.", value=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -109,7 +101,6 @@ class SfMAlignment(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -119,13 +110,11 @@ class SfMAlignment(desc.AVCommandLineNode): label="SfMData File", description="Output SfMData file.", value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", - invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py index 184d0aac46..6f6886720e 100644 --- a/meshroom/aliceVision/SfMDistances.py +++ b/meshroom/aliceVision/SfMDistances.py @@ -17,7 +17,6 @@ class SfMDistances(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="objectType", @@ -26,7 +25,6 @@ class SfMDistances(desc.AVCommandLineNode): value="landmarks", values=["landmarks", "cameras"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="landmarksDescriberTypes", @@ -35,7 +33,6 @@ class SfMDistances(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["cctag3"], exclusive=False, - invalidate=True, joinChar=",", ), desc.StringParam( @@ -45,7 +42,6 @@ class SfMDistances(desc.AVCommandLineNode): "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" "It will list all elements if empty.", value="", - invalidate=True, ), desc.StringParam( name="B", @@ -54,7 +50,6 @@ class SfMDistances(desc.AVCommandLineNode): "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" "It will list all elements if empty.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -63,7 +58,6 @@ class SfMDistances(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index 4dc5969a98..d9f0483508 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -46,14 +46,12 @@ class SfMMerge(desc.AVCommandLineNode): label="First SfMData", description="First input SfMData file to merge.", value="", - invalidate=True, ), desc.File( name="secondinput", label="Second SfMData", description="Second input SfMData file to merge.", value="", - invalidate=True, ), desc.ChoiceParam( name="method", @@ -64,7 +62,6 @@ class SfMMerge(desc.AVCommandLineNode): value="simple_copy", values=["simple_copy", 'from_landmarks'], exclusive=True, - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -72,7 +69,6 @@ class SfMMerge(desc.AVCommandLineNode): label="Matches Folder", description="", value="", - invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -85,7 +81,6 @@ class SfMMerge(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -95,7 +90,6 @@ class SfMMerge(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -105,6 +99,5 @@ class SfMMerge(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM file (in SfMData format).", value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index 03a5c756d2..a74aaabf9e 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -21,7 +21,6 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): label="Input SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -30,7 +29,6 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -40,13 +38,11 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): label="Reconstructed SfMData File", description="SfMData file containing the reconstructed cameras.", value=desc.Node.internalFolder + "sfmReconstructed.abc", - invalidate=False, ), desc.File( name="notReconstructedOutput", label="Not Reconstructed SfMData File", description="SfMData file containing the non-reconstructed cameras.", value=desc.Node.internalFolder + "sfmNonReconstructed.abc", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py index 51453404b5..c2c475ed72 100644 --- a/meshroom/aliceVision/SfMToRig.py +++ b/meshroom/aliceVision/SfMToRig.py @@ -20,7 +20,6 @@ class SfMToRig(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -29,7 +28,6 @@ class SfMToRig(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -39,6 +37,5 @@ class SfMToRig(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM file (in SfMData format).", value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 3951a12648..e77b14de5f 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -21,14 +21,12 @@ class SfMTransfer(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="reference", label="Reference", description="Path to the scene used as the reference to retrieve resolved poses and intrinsics.", value="", - invalidate=True, ), desc.ChoiceParam( name="method", @@ -41,7 +39,6 @@ class SfMTransfer(desc.AVCommandLineNode): value="from_viewid", values=["from_viewid", "from_filepath", "from_metadata", "from_intrinsicid"], exclusive=True, - invalidate=True, ), desc.StringParam( name="fileMatchingPattern", @@ -56,7 +53,6 @@ class SfMTransfer(desc.AVCommandLineNode): " - Match the filename prefix before \"_\": " r'".*\/(.*?)_.*\.\w{3}"', value=r'.*\/(.*?)\.\w{3}', - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -64,7 +60,6 @@ class SfMTransfer(desc.AVCommandLineNode): label="Metadata", description="Metadata that should match to create correspondences.", value="", - invalidate=True, ), name="metadataMatchingList", label="Metadata Matching List", @@ -77,21 +72,18 @@ class SfMTransfer(desc.AVCommandLineNode): label="Poses", description="Transfer poses.", value=True, - invalidate=True, ), desc.BoolParam( name="transferIntrinsics", label="Intrinsics", description="Transfer cameras intrinsics.", value=True, - invalidate=True, ), desc.BoolParam( name="transferLandmarks", label="Landmarks", description="Transfer landmarks.", value=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -100,7 +92,6 @@ class SfMTransfer(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -110,13 +101,11 @@ class SfMTransfer(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM point cloud file (in SfMData format).", value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", - invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 19f9d39e8c..b364afb617 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -31,7 +31,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Input", description="SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="method", @@ -52,14 +51,12 @@ class SfMTransform(desc.AVCommandLineNode): value="auto", values=["transformation", "manual", "auto", "auto_from_cameras", "auto_from_cameras_x_axis", "auto_from_landmarks", "from_single_camera", "from_center_camera", "from_markers", "from_gps", "from_lineup", "align_ground"], exclusive=True, - invalidate=True, ), desc.File( name="lineUp", label="Line Up File", description="LineUp Json file.", value="", - invalidate=True, enabled=lambda node: node.method.value == "from_lineup" ), desc.File( @@ -67,7 +64,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Tracks File", description="Tracks file for lineup.", value="", - invalidate=True, enabled=lambda node: node.method.value == "from_lineup" ), desc.File( @@ -75,7 +71,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Mesh File", description="Mesh file for lineup.", value="", - invalidate=True, enabled=lambda node: node.method.value == "from_lineup" ), desc.StringParam( @@ -85,7 +80,6 @@ class SfMTransform(desc.AVCommandLineNode): " - transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" " - from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg').", value="", - invalidate=True, enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera" or node.method.value == "auto_from_cameras_x_axis", ), desc.GroupAttribute( @@ -103,7 +97,6 @@ class SfMTransform(desc.AVCommandLineNode): label="x", description="X offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( @@ -111,7 +104,6 @@ class SfMTransform(desc.AVCommandLineNode): label="y", description="Y offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), desc.FloatParam( @@ -119,7 +111,6 @@ class SfMTransform(desc.AVCommandLineNode): label="z", description="Z offset.", value=0.0, - invalidate=True, range=(-20.0, 20.0, 0.01), ), ], @@ -135,7 +126,6 @@ class SfMTransform(desc.AVCommandLineNode): label="x", description="Euler X rotation.", value=0.0, - invalidate=True, range=(-90.0, 90.0, 1.0), ), desc.FloatParam( @@ -143,7 +133,6 @@ class SfMTransform(desc.AVCommandLineNode): label="y", description="Euler Y rotation.", value=0.0, - invalidate=True, range=(-180.0, 180.0, 1.0), ), desc.FloatParam( @@ -151,7 +140,6 @@ class SfMTransform(desc.AVCommandLineNode): label="z", description="Euler Z rotation.", value=0.0, - invalidate=True, range=(-180.0, 180.0, 1.0), ), ], @@ -162,7 +150,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Scale", description="Uniform scale.", value=1.0, - invalidate=True, range=(0.0, 20.0, 0.01), ), ], @@ -176,7 +163,6 @@ class SfMTransform(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["sift", "dspsift", "akaze"], exclusive=False, - invalidate=True, joinChar=",", ), desc.FloatParam( @@ -185,7 +171,6 @@ class SfMTransform(desc.AVCommandLineNode): description="Additional scale to apply.", value=1.0, range=(0.0, 100.0, 0.1), - invalidate=True, ), desc.ListAttribute( name="markers", @@ -200,7 +185,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Marker", description="Marker ID.", value=0, - invalidate=True, range=(0, 32, 1), ), desc.GroupAttribute( @@ -214,7 +198,6 @@ class SfMTransform(desc.AVCommandLineNode): label="x", description="X coordinates for the marker.", value=0.0, - invalidate=True, range=(-2.0, 2.0, 1.0), ), desc.FloatParam( @@ -222,7 +205,6 @@ class SfMTransform(desc.AVCommandLineNode): label="y", description="Y coordinates for the marker.", value=0.0, - invalidate=True, range=(-2.0, 2.0, 1.0), ), desc.FloatParam( @@ -230,7 +212,6 @@ class SfMTransform(desc.AVCommandLineNode): label="z", description="Z coordinates for the marker.", value=0.0, - invalidate=True, range=(-2.0, 2.0, 1.0), ), ], @@ -245,7 +226,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Scale", description="Apply scale transformation.", value=True, - invalidate=True, enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( @@ -253,7 +233,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Rotation", description="Apply rotation transformation.", value=True, - invalidate=True, enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( @@ -261,7 +240,6 @@ class SfMTransform(desc.AVCommandLineNode): label="Translation", description="Apply translation transformation.", value=True, - invalidate=True, enabled=lambda node: node.method.value != "manual", ), desc.ChoiceParam( @@ -271,7 +249,6 @@ class SfMTransform(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -281,13 +258,11 @@ class SfMTransform(desc.AVCommandLineNode): label="SfMData File", description="Aligned SfMData file.", value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", - invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index 2453452e19..e7a87ae540 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -20,7 +20,6 @@ class SfMTriangulation(desc.AVCommandLineNode): label="SfMData", description="SfMData file. Must contain the camera calibration.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -28,7 +27,6 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -40,7 +38,6 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Matches Folder", description="Folder in which some computed matches are stored.", value="", - invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -53,7 +50,6 @@ class SfMTriangulation(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.IntParam( @@ -64,7 +60,6 @@ class SfMTriangulation(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - invalidate=True, ), desc.IntParam( name="minNumberOfMatches", @@ -74,7 +69,6 @@ class SfMTriangulation(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - invalidate=True, ), desc.IntParam( name="minNumberOfObservationsForTriangulation", @@ -85,7 +79,6 @@ class SfMTriangulation(desc.AVCommandLineNode): "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -94,7 +87,6 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -103,7 +95,6 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -111,7 +102,6 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Use Rig Constraint", description="Enable/Disable rig constraint.", value=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -120,7 +110,6 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -128,7 +117,6 @@ class SfMTriangulation(desc.AVCommandLineNode): label="Compute Structure Color", description="Enable/Disable color computation of each 3D point.", value=True, - invalidate=True, ), desc.ChoiceParam( name="interFileExtension", @@ -147,7 +135,6 @@ class SfMTriangulation(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -157,13 +144,11 @@ class SfMTriangulation(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.abc", - invalidate=False, ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index 9e08e978d8..dc716ba2ff 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -18,21 +18,18 @@ class SfMBootStraping(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Tracks file.", value="", - invalidate=True, ), desc.File( name="pairs", label="Pairs File", description="Information on pairs.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -41,7 +38,6 @@ class SfMBootStraping(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -51,6 +47,5 @@ class SfMBootStraping(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.json", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index 17fa723e5e..db50eb3d42 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -18,32 +18,19 @@ class SfMExpanding(desc.AVCommandLineNode): label="SfMData", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="tracksFilename", label="Tracks File", description="Tracks file.", value="", - invalidate=True, ), - desc.ChoiceParam( - name="verboseLevel", - label="Verbose Level", - description="Verbosity level (fatal, error, warning, info, debug, trace).", - values=VERBOSE_LEVEL, - value="info", - exclusive=True, - invalidate=False, - ), - desc.IntParam( name="localizerEstimatorMaxIterations", label="Localizer Max Ransac Iterations", description="Maximum number of iterations allowed in the Ransac step.", value=50000, range=(1, 100000, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -54,7 +41,6 @@ class SfMExpanding(desc.AVCommandLineNode): "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 100.0, 0.1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -63,7 +49,6 @@ class SfMExpanding(desc.AVCommandLineNode): description="Lock previously reconstructed poses and intrinsics.\n" "This option is useful for SfM augmentation.", value=False, - invalidate=True, ), desc.BoolParam( name="useLocalBA", @@ -71,7 +56,6 @@ class SfMExpanding(desc.AVCommandLineNode): description="It reduces the reconstruction time, especially for large datasets (500+ images),\n" "by avoiding computation of the Bundle Adjustment on areas that are not changing.", value=True, - invalidate=True, ), desc.IntParam( name="localBAGraphDistance", @@ -79,7 +63,6 @@ class SfMExpanding(desc.AVCommandLineNode): description="Graph-distance limit to define the active region in the Local Bundle Adjustment strategy.", value=1, range=(2, 10, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -90,7 +73,6 @@ class SfMExpanding(desc.AVCommandLineNode): "Past this number, the bundle adjustment will only be performed once for N added cameras.", value=30, range=(0, 100, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -100,7 +82,6 @@ class SfMExpanding(desc.AVCommandLineNode): "This prevents adding too much data at once without performing the bundle adjustment.", value=30, range=(0, 100, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -110,7 +91,6 @@ class SfMExpanding(desc.AVCommandLineNode): "Using a negative value for this threshold will disable BA iterations.", value=50, range=(-1, 1000, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -122,7 +102,6 @@ class SfMExpanding(desc.AVCommandLineNode): "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -131,7 +110,6 @@ class SfMExpanding(desc.AVCommandLineNode): description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -140,7 +118,6 @@ class SfMExpanding(desc.AVCommandLineNode): description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -149,7 +126,6 @@ class SfMExpanding(desc.AVCommandLineNode): description="Maximum reprojection error.", value=4.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -159,7 +135,6 @@ class SfMExpanding(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - invalidate=True, ), desc.IntParam( name="minNbCamerasToRefinePrincipalPoint", @@ -170,9 +145,16 @@ class SfMExpanding(desc.AVCommandLineNode): "If minNbCamerasToRefinePrincipalPoint is set to 1, the principal point is always refined.", value=3, range=(0, 20, 1), - invalidate=True, advanced=True, ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + exclusive=True, + ), ] outputs = [ @@ -181,6 +163,5 @@ class SfMExpanding(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfm.json", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 79592fd9fc..77288a8683 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -66,7 +66,6 @@ class SketchfabUpload(desc.Node): label="Input", description="", value="", - invalidate=True, ), name="inputFiles", label="Input Files", @@ -78,21 +77,18 @@ class SketchfabUpload(desc.Node): label="API Token", description="Get your token from https://sketchfab.com/settings/password.", value="", - invalidate=True, ), desc.StringParam( name="title", label="Title", description="Title cannot be longer than 48 characters.", value="", - invalidate=True, ), desc.StringParam( name="description", label="Description", description="Description cannot be longer than 1024 characters.", value="", - invalidate=True, ), desc.ChoiceParam( name="license", @@ -106,7 +102,6 @@ class SketchfabUpload(desc.Node): "CC Attribution-NonCommercial-ShareAlike", "CC Attribution-NonCommercial-NoDerivs"], exclusive=True, - invalidate=True, ), desc.ListAttribute( elementDesc=desc.StringParam( @@ -114,7 +109,6 @@ class SketchfabUpload(desc.Node): label="Tag", description="Tag cannot be longer than 48 characters.", value="", - invalidate=True, ), name="tags", label="Tags", @@ -146,35 +140,30 @@ class SketchfabUpload(desc.Node): "sports-fitness", "weapons-military"], exclusive=True, - invalidate=True, ), desc.BoolParam( name="isPublished", label="Publish", description="If the model is not published, it will be saved as a draft.", value=False, - invalidate=True, ), desc.BoolParam( name="isInspectable", label="Inspectable", description="Allow 2D view in model inspector.", value=True, - invalidate=True, ), desc.BoolParam( name="isPrivate", label="Private", description="Requires a pro account.", value=False, - invalidate=True, ), desc.StringParam( name="password", label="Password", description="Requires a pro account.", value="", - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -183,7 +172,6 @@ class SketchfabUpload(desc.Node): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index b6dcb45c12..776024e44f 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -18,21 +18,18 @@ class SphereDetection(desc.CommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.File( name="modelPath", label="Detection Network", description="Deep learning network for automatic calibration sphere detection.", value="${ALICEVISION_SPHERE_DETECTION_MODEL}", - invalidate=True, ), desc.BoolParam( name="autoDetect", label="Automatic Sphere Detection", description="Automatic detection of calibration spheres.", value=False, - invalidate=True, ), desc.FloatParam( name="minScore", @@ -41,7 +38,6 @@ class SphereDetection(desc.CommandLineNode): value=0.0, range=(0.0, 50.0, 0.01), advanced=True, - invalidate=True, ), desc.GroupAttribute( name="sphereCenter", @@ -53,7 +49,6 @@ class SphereDetection(desc.CommandLineNode): label="x", description="X offset in pixels.", value=0.0, - invalidate=True, range=(-1000.0, 10000.0, 1.0), ), desc.FloatParam( @@ -61,7 +56,6 @@ class SphereDetection(desc.CommandLineNode): label="y", description="Y offset in pixels.", value=0.0, - invalidate=True, range=(-1000.0, 10000.0, 1.0), ), ], @@ -75,7 +69,6 @@ class SphereDetection(desc.CommandLineNode): value=500.0, range=(0.0, 10000.0, 0.1), enabled=lambda node: not node.autoDetect.value, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -84,7 +77,6 @@ class SphereDetection(desc.CommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -94,6 +86,5 @@ class SphereDetection(desc.CommandLineNode): label="Output Path", description="Sphere detection information will be written here.", value=desc.Node.internalFolder + "/detection.json", - invalidate=False, ) ] diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 3eb1068d78..daadeb9a4b 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -33,7 +33,6 @@ class Split360Images(desc.AVCommandLineNode): label="Input", description="Single image, image folder or SfMData file.", value="", - invalidate=True, ), desc.ChoiceParam( name="splitMode", @@ -42,7 +41,6 @@ class Split360Images(desc.AVCommandLineNode): value="equirectangular", values=["equirectangular", "dualfisheye"], exclusive=True, - invalidate=True, ), desc.GroupAttribute( name="dualFisheyeGroup", @@ -58,7 +56,6 @@ class Split360Images(desc.AVCommandLineNode): value="center", values=["center", "left", "right"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="dualFisheyeOffsetPresetY", @@ -67,7 +64,6 @@ class Split360Images(desc.AVCommandLineNode): value="center", values=["center", "top", "bottom"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="dualFisheyeCameraModel", @@ -76,7 +72,6 @@ class Split360Images(desc.AVCommandLineNode): value="fisheye4", values=["fisheye4", "equidistant_r3"], exclusive=True, - invalidate=True, ), ], ), @@ -93,7 +88,6 @@ class Split360Images(desc.AVCommandLineNode): description="Equirectangular number of splits.", value=2, range=(1, 100, 1), - invalidate=True, ), desc.IntParam( name="equirectangularSplitResolution", @@ -101,14 +95,12 @@ class Split360Images(desc.AVCommandLineNode): description="Equirectangular split resolution.", value=1200, range=(100, 10000, 1), - invalidate=True, ), desc.BoolParam( name="equirectangularPreviewMode", label="Preview Mode", description="Export a SVG file that simulates the split.", value=False, - invalidate=True, ), desc.FloatParam( name="fov", @@ -116,7 +108,6 @@ class Split360Images(desc.AVCommandLineNode): description="Field of View to extract (in degrees).", value=110.0, range=(0.0, 180.0, 1.0), - invalidate=True, ), ], ), @@ -127,7 +118,6 @@ class Split360Images(desc.AVCommandLineNode): value="", values=["", "exr", "jpg", "tiff", "png"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -136,7 +126,6 @@ class Split360Images(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -146,13 +135,11 @@ class Split360Images(desc.AVCommandLineNode): label="Folder", description="Output folder for extracted frames.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outSfMData", label="SfMData File", description="Output SfMData file.", value=desc.Node.internalFolder + "rig.sfm", - invalidate=False, ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index b64904db6f..d9b20585db 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -71,7 +71,6 @@ class StructureFromMotion(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -79,7 +78,6 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Features Folder", description="", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -91,7 +89,6 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Matches Folder", description="", value="", - invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -104,7 +101,6 @@ class StructureFromMotion(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.ChoiceParam( @@ -114,7 +110,6 @@ class StructureFromMotion(desc.AVCommandLineNode): value="acransac", values=["acransac", "ransac", "lsmeds", "loransac", "maxconsensus"], exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -126,7 +121,6 @@ class StructureFromMotion(desc.AVCommandLineNode): value="Scale", values=["Basic", "Scale"], exclusive=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -135,7 +129,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Maximum number of iterations allowed in the Ransac step.", value=50000, range=(1, 100000, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -146,7 +139,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 100.0, 0.1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -155,7 +147,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Lock previously reconstructed poses and intrinsics.\n" "This option is useful for SfM augmentation.", value=False, - invalidate=True, ), desc.BoolParam( name="useLocalBA", @@ -163,7 +154,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="It reduces the reconstruction time, especially for large datasets (500+ images),\n" "by avoiding computation of the Bundle Adjustment on areas that are not changing.", value=True, - invalidate=True, ), desc.IntParam( name="localBAGraphDistance", @@ -171,7 +161,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Graph-distance limit to define the active region in the Local Bundle Adjustment strategy.", value=1, range=(2, 10, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -182,7 +171,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "Past this number, the bundle adjustment will only be performed once for N added cameras.", value=30, range=(0, 100, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -192,7 +180,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "This prevents adding too much data at once without performing the bundle adjustment.", value=30, range=(0, 100, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -202,7 +189,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "Using a negative value for this threshold will disable BA iterations.", value=50, range=(-1, 1000, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -213,7 +199,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - invalidate=True, ), desc.IntParam( name="minNumberOfMatches", @@ -223,7 +208,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "0 means no limit.", value=0, range=(0, 50000, 1), - invalidate=True, ), desc.IntParam( name="minInputTrackLength", @@ -231,7 +215,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum track length in input of SfM.", value=2, range=(2, 10, 1), - invalidate=True, ), desc.IntParam( name="minNumberOfObservationsForTriangulation", @@ -242,7 +225,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -251,7 +233,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -260,7 +241,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -269,7 +249,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Maximum reprojection error.", value=4.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -278,7 +257,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum angle for the initial pair.", value=5.0, range=(0.1, 10.0, 0.1), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -287,7 +265,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Maximum angle for the initial pair.", value=40.0, range=(0.1, 60.0, 0.1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -304,7 +281,6 @@ class StructureFromMotion(desc.AVCommandLineNode): label="Use Rig Constraint", description="Enable/Disable rig constraint.", value=True, - invalidate=True, advanced=True, ), desc.IntParam( @@ -313,7 +289,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -323,7 +298,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "principal point, distortion if any) constant during the reconstruction.\n" "This may be helpful if the input cameras are already fully calibrated.", value=False, - invalidate=True, ), desc.IntParam( name="minNbCamerasToRefinePrincipalPoint", @@ -334,7 +308,6 @@ class StructureFromMotion(desc.AVCommandLineNode): "If minNbCamerasToRefinePrincipalPoint is set to 1, the principal point is always refined.", value=3, range=(0, 20, 1), - invalidate=True, advanced=True, ), desc.BoolParam( @@ -343,14 +316,12 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n" "lead to multiple features in the same image for a single track.", value=False, - invalidate=True, ), desc.BoolParam( name="computeStructureColor", label="Compute Structure Color", description="Enable/Disable color computation of every 3D point.", value=True, - invalidate=True, ), desc.BoolParam( name="useAutoTransform", @@ -360,21 +331,18 @@ class StructureFromMotion(desc.AVCommandLineNode): "determines north and scale from GPS information if available,\n" "and defines ground level from the point cloud.", value=True, - invalidate=True, ), desc.File( name="initialPairA", label="Initial Pair A", description="View ID or filename of the first image (either with or without the full path).", value="", - invalidate=True, ), desc.File( name="initialPairB", label="Initial Pair B", description="View ID or filename of the second image (either with or without the full path).", value="", - invalidate=True, ), desc.ChoiceParam( name="interFileExtension", @@ -401,7 +369,6 @@ class StructureFromMotion(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -411,20 +378,17 @@ class StructureFromMotion(desc.AVCommandLineNode): label="SfMData", description="Path to the output SfM point cloud file (in SfMData format).", value=desc.Node.internalFolder + "sfm.abc", - invalidate=False, ), desc.File( name="outputViewsAndPoses", label="Views And Poses", description="Path to the output SfMData file with cameras (views and poses).", value=desc.Node.internalFolder + "cameras.sfm", - invalidate=False, ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, - invalidate=False, ), ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index e530157e5a..6fab4ba645 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -31,7 +31,6 @@ class Texturing(desc.AVCommandLineNode): label="Dense SfMData", description="SfMData file.", value="", - invalidate=True, ), desc.File( name="imagesFolder", @@ -39,21 +38,18 @@ class Texturing(desc.AVCommandLineNode): description="Use images from a specific folder instead of those specified in the SfMData file.\n" "Filename should be the image UID.", value="", - invalidate=True, ), desc.File( name="normalsFolder", label="Normals Folder", description="Use normal maps from a specific folder to texture the mesh.\nFilename should be : uid_normalMap.", value="", - invalidate=True, ), desc.File( name="inputMesh", label="Mesh", description="Optional input mesh to texture. By default, it will texture the result of the reconstruction.", value="", - invalidate=True, ), desc.File( name="inputRefMesh", @@ -61,7 +57,6 @@ class Texturing(desc.AVCommandLineNode): description="Optional input mesh to compute height maps and normal maps.\n" "If not provided, no additional map with geometric information will be generated.", value="", - invalidate=True, ), desc.ChoiceParam( name="textureSide", @@ -70,7 +65,6 @@ class Texturing(desc.AVCommandLineNode): value=8192, values=[1024, 2048, 4096, 8192, 16384], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="downscale", @@ -79,7 +73,6 @@ class Texturing(desc.AVCommandLineNode): value=2, values=[1, 2, 4, 8], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -88,7 +81,6 @@ class Texturing(desc.AVCommandLineNode): value="obj", values=["obj", "gltf", "fbx", "stl"], exclusive=True, - invalidate=True, ), desc.GroupAttribute( name="colorMapping", @@ -112,7 +104,6 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr", "png", "tiff", "jpg"], exclusive=True, - invalidate=True, enabled=lambda node: node.colorMapping.enable.value, ), ], @@ -139,7 +130,6 @@ class Texturing(desc.AVCommandLineNode): value="Normal", values=["Height", "Normal"], exclusive=True, - invalidate=True, enabled=lambda node: node.bumpMapping.enable.value, ), desc.ChoiceParam( @@ -149,7 +139,6 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr", "png", "tiff", "jpg"], exclusive=True, - invalidate=True, enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal", ), desc.ChoiceParam( @@ -159,7 +148,6 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr",], exclusive=True, - invalidate=True, enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height", ), ], @@ -186,7 +174,6 @@ class Texturing(desc.AVCommandLineNode): value="exr", values=["exr"], exclusive=True, - invalidate=True, enabled=lambda node: node.displacementMapping.enable.value, ), ], @@ -201,21 +188,18 @@ class Texturing(desc.AVCommandLineNode): value="Basic", values=["Basic", "LSCM", "ABF"], exclusive=True, - invalidate=True, ), desc.BoolParam( name="useUDIM", label="Use UDIM", description="Use UDIM UV mapping.", value=True, - invalidate=True, ), desc.BoolParam( name="fillHoles", label="Fill Holes", description="Fill texture holes with plausible values.", value=False, - invalidate=True, ), desc.IntParam( name="padding", @@ -223,7 +207,6 @@ class Texturing(desc.AVCommandLineNode): description="Texture edge padding size in pixels.", value=5, range=(0, 20, 1), - invalidate=True, advanced=True, ), desc.IntParam( @@ -232,7 +215,6 @@ class Texturing(desc.AVCommandLineNode): description="Width of frequency bands for multiband blending.", value=4, range=(0, 8, 2), - invalidate=True, advanced=True, ), desc.GroupAttribute( @@ -244,7 +226,6 @@ class Texturing(desc.AVCommandLineNode): label="High Freq", description="High frequency band.", value=1, - invalidate=True, range=None, ), desc.IntParam( @@ -252,7 +233,6 @@ class Texturing(desc.AVCommandLineNode): label="Mid-High Freq", description="Mid-high frequency band.", value=5, - invalidate=True, range=None, ), desc.IntParam( @@ -260,7 +240,6 @@ class Texturing(desc.AVCommandLineNode): label="Mid-Low Freq", description="Mid-low frequency band.", value=10, - invalidate=True, range=None, ), desc.IntParam( @@ -268,7 +247,6 @@ class Texturing(desc.AVCommandLineNode): label="Low Freq", description="Low frequency band", value=0, - invalidate=True, range=None, ), ], @@ -280,7 +258,6 @@ class Texturing(desc.AVCommandLineNode): label="Use Score", description="Use triangles scores (ie. reprojection area) for multi-band blending.", value=True, - invalidate=True, advanced=True, ), desc.FloatParam( @@ -289,7 +266,6 @@ class Texturing(desc.AVCommandLineNode): description="Setting this parameter to 0.0 disables filtering based on threshold to relative best score.", value=0.1, range=(0.0, 1.0, 0.01), - invalidate=True, advanced=True, ), desc.FloatParam( @@ -298,7 +274,6 @@ class Texturing(desc.AVCommandLineNode): description="Setting this parameter to 0.0 disables angle hard threshold filtering.", value=90.0, range=(0.0, 180.0, 0.01), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -308,7 +283,6 @@ class Texturing(desc.AVCommandLineNode): values=COLORSPACES, value="sRGB", exclusive=True, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -318,21 +292,18 @@ class Texturing(desc.AVCommandLineNode): values=COLORSPACES, value="AUTO", exclusive=True, - invalidate=True, ), desc.BoolParam( name="correctEV", label="Correct Exposure", description="Uniformize images exposure values.", value=True, - invalidate=True, ), desc.BoolParam( name="forceVisibleByAllVertices", label="Force Visible By All Vertices", description="Triangle visibility is based on the union of vertices visibility.", value=False, - invalidate=True, advanced=True, ), desc.BoolParam( @@ -341,7 +312,6 @@ class Texturing(desc.AVCommandLineNode): description="Option to flip face normals.\n" "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", value=False, - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -351,7 +321,6 @@ class Texturing(desc.AVCommandLineNode): value="PullPush", values=["Pull", "Push", "PullPush", "MeshItself"], exclusive=True, - invalidate=True, advanced=True, ), desc.FloatParam( @@ -363,7 +332,6 @@ class Texturing(desc.AVCommandLineNode): " - 1: full density of the reconstruction).", value=0.8, range=(0.0, 1.0, 0.001), - invalidate=True, advanced=True, ), desc.ChoiceParam( @@ -373,7 +341,6 @@ class Texturing(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -383,14 +350,12 @@ class Texturing(desc.AVCommandLineNode): label="Folder", description="Folder for output mesh: OBJ, material and texture files.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="outputMesh", label="Mesh", description="Output mesh file.", value=desc.Node.internalFolder + "texturedMesh.{outputMeshFileTypeValue}", - invalidate=False, group="", ), desc.File( @@ -399,7 +364,6 @@ class Texturing(desc.AVCommandLineNode): label="Material", description="Output material file.", value=desc.Node.internalFolder + "texturedMesh.mtl", - invalidate=False, group="", ), desc.File( @@ -407,7 +371,6 @@ class Texturing(desc.AVCommandLineNode): label="Textures", description="Output texture files.", value=lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", - invalidate=False, group="", ), ] diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index a9397c13f2..870c6339d4 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -19,7 +19,6 @@ class TracksBuilding(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", - invalidate=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -27,7 +26,6 @@ class TracksBuilding(desc.AVCommandLineNode): label="Features Folder", description="Folder containing some extracted features and descriptors.", value="", - invalidate=True, ), name="featuresFolders", label="Features Folders", @@ -39,7 +37,6 @@ class TracksBuilding(desc.AVCommandLineNode): label="Matches Folder", description="Folder containing some matches.", value="", - invalidate=True, ), name="matchesFolders", label="Matches Folders", @@ -52,7 +49,6 @@ class TracksBuilding(desc.AVCommandLineNode): values=DESCRIBER_TYPES, value=["dspsift"], exclusive=False, - invalidate=True, joinChar=",", ), desc.IntParam( @@ -61,7 +57,6 @@ class TracksBuilding(desc.AVCommandLineNode): description="Minimum track length.", value=2, range=(2, 10, 1), - invalidate=True, ), desc.BoolParam( name="useOnlyMatchesFromInputFolder", @@ -78,7 +73,6 @@ class TracksBuilding(desc.AVCommandLineNode): description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches\n" "lead to multiple features in the same image for a single track.", value=False, - invalidate=True, ), desc.ChoiceParam( name="verboseLevel", @@ -87,7 +81,6 @@ class TracksBuilding(desc.AVCommandLineNode): values=VERBOSE_LEVEL, value="info", exclusive=True, - invalidate=False, ), ] @@ -97,6 +90,5 @@ class TracksBuilding(desc.AVCommandLineNode): label="Tracks", description="Path to the output tracks file.", value=desc.Node.internalFolder + "tracksFile.json", - invalidate=False, ), ] diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 9900ec4fcc..76a0fe4c29 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -42,28 +42,24 @@ class ScenePreview(desc.CommandLineNode): label="Cameras", description="SfMData with the views, poses and intrinsics to use (in JSON format).", value="", - invalidate=True, ), desc.File( name="model", label="Model", description="Point cloud (.abc) or mesh (.obj) to render.", value="", - invalidate=True, ), desc.BoolParam( name="useBackground", label="Display Background", description="Use the undistorted images as background.", value=True, - invalidate=True, ), desc.File( name="undistortedImages", label="Undistorted Images", description="Folder containing the undistorted images.", value="", - invalidate=True, enabled=lambda node: node.useBackground.value, ), desc.BoolParam( @@ -71,14 +67,12 @@ class ScenePreview(desc.CommandLineNode): label="Apply Masks", description="Apply mask to the rendered geometry.", value=True, - invalidate=True, ), desc.File( name="masks", label="Masks", description="Folder containing the masks.", value="", - invalidate=True, enabled=lambda node: node.useMasks.value, ), desc.GroupAttribute( @@ -94,7 +88,6 @@ class ScenePreview(desc.CommandLineNode): description="Scale of particles used for the point cloud.", value=0.01, range=(0.01, 1.0, 0.01), - invalidate=True, ), desc.ChoiceParam( name="particleColor", @@ -103,7 +96,6 @@ class ScenePreview(desc.CommandLineNode): value="Red", values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, - invalidate=True, ), ], ), @@ -121,7 +113,6 @@ class ScenePreview(desc.CommandLineNode): value="wireframe", values=["wireframe", "line_art"], exclusive=True, - invalidate=True, ), desc.ChoiceParam( name="edgeColor", @@ -130,7 +121,6 @@ class ScenePreview(desc.CommandLineNode): value="Red", values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, - invalidate=True, ), ], ), @@ -142,7 +132,6 @@ class ScenePreview(desc.CommandLineNode): label="Output", description="Output folder.", value=desc.Node.internalFolder, - invalidate=False, ), desc.File( name="frames", @@ -150,7 +139,6 @@ class ScenePreview(desc.CommandLineNode): description="Frames rendered in Blender.", semantic="image", value=desc.Node.internalFolder + "<FILESTEM>_preview.jpg", - invalidate=False, group="", ), ] From c895d78eb43d0e5565dfa96c30c701a9f6cbf0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 6 Sep 2024 19:14:03 +0200 Subject: [PATCH 1024/1093] [nodes] Linting: Clean-up files --- meshroom/aliceVision/ApplyCalibration.py | 11 ++- meshroom/aliceVision/CameraInit.py | 69 +++++++++------- meshroom/aliceVision/CameraLocalization.py | 1 - meshroom/aliceVision/CameraRigCalibration.py | 1 - meshroom/aliceVision/CameraRigLocalization.py | 1 - .../aliceVision/ColorCheckerCorrection.py | 3 +- meshroom/aliceVision/ColorCheckerDetection.py | 11 ++- meshroom/aliceVision/DepthMap.py | 78 ++++++++++++------- meshroom/aliceVision/ExportAnimatedCamera.py | 2 +- meshroom/aliceVision/ExportDistortion.py | 9 ++- meshroom/aliceVision/ExportMaya.py | 2 +- meshroom/aliceVision/GlobalSfM.py | 12 ++- meshroom/aliceVision/ImageMatching.py | 1 - meshroom/aliceVision/ImageMatchingMultiSfM.py | 19 +++-- meshroom/aliceVision/ImageProcessing.py | 5 +- meshroom/aliceVision/ImportKnownPoses.py | 1 - meshroom/aliceVision/KeyframeSelection.py | 1 - 17 files changed, 126 insertions(+), 101 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index c95d45851f..315dff5088 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -3,14 +3,13 @@ from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL + class ApplyCalibration(desc.AVCommandLineNode): - commandLine = 'aliceVision_applyCalibration {allParams}' - size = desc.DynamicNodeSize('input') + commandLine = "aliceVision_applyCalibration {allParams}" + size = desc.DynamicNodeSize("input") - category = 'Utils' - documentation = ''' -Overwrite intrinsics with a calibrated intrinsic. -''' + category = "Utils" + documentation = """ Overwrite intrinsics with a calibrated intrinsic. """ inputs = [ desc.File( diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index ae5883ecb0..f338e41e6a 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -59,10 +59,10 @@ description="The configuration of the Viewpoints is based on the images' metadata.\n" "The important ones are:\n" " - Focal Length: the focal length in mm.\n" - " - Make and Model: this information allows to convert the focal in mm into a focal length in pixels using " - "an embedded sensor database.\n" - " - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be " - "differentiated and their internal parameters are optimized separately.", + " - Make and Model: this information allows to convert the focal in mm into a focal length in " + "pixels using an embedded sensor database.\n" + " - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, " + "Model can be differentiated and their internal parameters are optimized separately.", value="", invalidate=False, advanced=True, @@ -129,8 +129,9 @@ name="type", label="Camera Type", description="Mathematical model used to represent a camera:\n" - " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" - " - equidistant: Non-projective camera model suited for full-fisheye optics.\n", + " - pinhole: Simplest projective camera model without optical distortion " + "(focal and optical center).\n" + " - equidistant: Non-projective camera model suited for full-fisheye optics.\n", value="pinhole", values=["pinhole", "equidistant"], exclusive=True, @@ -139,12 +140,13 @@ name="distortionType", label="Distortion Type", description="Mathematical model used to represent the distortion:\n" - " - radialk1: radial distortion with one parameter.\n" - " - radialk3: radial distortion with three parameters (Best for pinhole cameras).\n" - " - radialk3pt: radial distortion with three parameters and normalized with the sum of parameters (Best for equidistant cameras).\n" - " - brown: distortion with 3 radial and 2 tangential parameters.\n" - " - fisheye1: distortion with 1 parameter suited for fisheye optics (like 120deg FoV).\n" - " - fisheye4: distortion with 4 parameters suited for fisheye optics (like 120deg FoV).\n", + " - radialk1: radial distortion with one parameter.\n" + " - radialk3: radial distortion with three parameters (Best for pinhole cameras).\n" + " - radialk3pt: radial distortion with three parameters and normalized with the sum of parameters " + "(Best for equidistant cameras).\n" + " - brown: distortion with 3 radial and 2 tangential parameters.\n" + " - fisheye1: distortion with 1 parameter suited for fisheye optics (like 120deg FoV).\n" + " - fisheye4: distortion with 4 parameters suited for fisheye optics (like 120deg FoV).\n", value="radialk3", values=["none", "radialk1", "radialk3", "radialk3pt", "brown", "fisheye4", "fisheye1"], exclusive=True, @@ -276,11 +278,13 @@ desc.BoolParam( name="locked", label="Locked", - description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.", + description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. " + "It should improve robustness and speed-up the reconstruction.", value=False, ), ] + def readSfMData(sfmFile): """ Read views and intrinsics from a .sfm file @@ -326,14 +330,14 @@ def readSfMData(sfmFile): class CameraInit(desc.AVCommandLineNode, desc.InitNode): - commandLine = 'aliceVision_cameraInit {allParams} --allowSingleView 1' # don't throw an error if there is only one image + commandLine = "aliceVision_cameraInit {allParams} --allowSingleView 1" # don't throw an error if there is only one image - size = desc.DynamicNodeSize('viewpoints') + size = desc.DynamicNodeSize("viewpoints") - category = 'Sparse Reconstruction' - documentation = ''' -This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length -and which images are sharing the same internal camera parameters, as well as potential camera rigs. + category = "Sparse Reconstruction" + documentation = """ +This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial +focal length and which images are sharing the same internal camera parameters, as well as potential camera rigs. When you import new images into Meshroom, this node is automatically configured from the analysis of the images' metadata. The software can support images without any metadata but it is recommended to have them for robustness. @@ -342,9 +346,11 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): Metadata allow images to be grouped together and provide an initialization of the focal length (in pixel unit). The needed metadata are: * **Focal Length**: the focal length in mm. - * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixels using an embedded sensor database. - * **Serial Number**: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately (in the photogrammetry case). -''' + * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixels using an + embedded sensor database. + * **Serial Number**: allows to uniquely identify a device so multiple devices with the same Make, Model can be + differentiated and their internal parameters are optimized separately (in the photogrammetry case). +""" inputs = [ desc.ListAttribute( @@ -395,7 +401,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): desc.FloatParam( name="defaultFieldOfView", label="Default Field Of View", - description="Default value for the field of view (in degrees) used as an initialization value when there is no focal or field of view in the image metadata.", + description="Default value for the field of view (in degrees) used as an initialization value when there is " + "no focal or field of view in the image metadata.", value=45.0, range=(0.0, 180.0, 1.0), invalidate=False, @@ -439,7 +446,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): name="errorOnMissingColorProfile", label="Error On Missing DCP Color Profile", description="When enabled, if no color profile is found for at least one image, then an error is thrown.\n" - "When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.", + "When disabled, if no color profile is found for some images, it will fallback to " + "libRawWhiteBalancing for those images.", value=True, enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), ), @@ -459,7 +467,8 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): name="viewIdRegex", label="ViewId Regex", description="Regex used to catch number used as viewId in filename." - "You should capture specific parts of the filename with parentheses to define matching elements. (only numbers will work)\n" + "You should capture specific parts of the filename with parentheses to define matching elements." + " (only numbers will work)\n" "Some examples of patterns:\n" " - Match the longest number at the end of the filename (default value): " r'".*?(\d+)"' + "\n" + @@ -533,7 +542,7 @@ def upgradeTypes(self, intrinsic, itype): intrinsic['type'] = "pinhole" intrinsic['distortionType'] = "radialk3" intrinsic['undistortionType'] = "none" - + elif itype == "brown": intrinsic['type'] = "pinhole" intrinsic['distortionType'] = "brown" @@ -548,12 +557,12 @@ def upgradeTypes(self, intrinsic, itype): intrinsic['type'] = "pinhole" intrinsic['distortionType'] = "fisheye1" intrinsic['undistortionType'] = "none" - + elif itype == "equidistant": intrinsic['type'] = "equidistant" intrinsic['distortionType'] = "none" intrinsic['undistortionType'] = "none" - + elif itype == "equidistant_r3": intrinsic['type'] = "equidistant" intrinsic['distortionType'] = "radialk3pt" @@ -589,12 +598,12 @@ def upgradeAttributeValues(self, attrValues, fromVersion): intrinsic['pixelRatio'] = 1.0 intrinsic['pixelRatioLocked'] = False - #Upgrade types + # Upgrade types if fromVersion < Version(10, 0): for intrinsic in attrValues['intrinsics']: itype = intrinsic['type'] self.upgradeTypes(intrinsic, itype) - + return attrValues def readSfMData(self, sfmFile): diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 16c15475b1..d7c45cb812 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -1,6 +1,5 @@ __version__ = "1.0" -import os from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 621edda743..17be89dcdf 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -1,6 +1,5 @@ __version__ = "1.0" -import os from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 54f456ccdd..500633019b 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -1,6 +1,5 @@ __version__ = "1.0" -import os from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index 830b530d53..ad43aefa9b 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -33,7 +33,8 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): name="input", label="Input", description="Input SfMData file, image filenames or regex(es) on the image file path.\n" - "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", + "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and " + "'*' zero or more.", value="", ), desc.ChoiceParam( diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index 901a3ba48e..edf0d01f77 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -3,8 +3,6 @@ from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL -import os.path - class ColorCheckerDetection(desc.AVCommandLineNode): commandLine = 'aliceVision_colorCheckerDetection {allParams}' @@ -18,10 +16,10 @@ class ColorCheckerDetection(desc.AVCommandLineNode): Outputs: - the detected color charts position and colors -- the associated transform matrix from "theoric" to "measured" -assuming that the "theoric" Macbeth chart corners coordinates are: +- the associated transform matrix from "theoric" to "measured" +assuming that the "theoric" Macbeth chart corners coordinates are: (0, 0), (1675, 0), (1675, 1125), (0, 1125) - + Dev notes: - Fisheye/pinhole is not handled - ColorCheckerViewer is unstable with multiple color chart within a same image @@ -32,7 +30,8 @@ class ColorCheckerDetection(desc.AVCommandLineNode): name="input", label="Input", description="SfMData file input, image filenames or regex(es) on the image file path.\n" - "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", + "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character " + "and '*' zero or more.", value="", ), desc.IntParam( diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 00cbac5e60..cfde95cadd 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -5,22 +5,24 @@ class DepthMap(desc.AVCommandLineNode): - commandLine = 'aliceVision_depthMapEstimation {allParams}' + commandLine = "aliceVision_depthMapEstimation {allParams}" gpu = desc.Level.INTENSIVE - size = desc.DynamicNodeSize('input') + size = desc.DynamicNodeSize("input") parallelization = desc.Parallelization(blockSize=12) - commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + commandLineRange = "--rangeStart {rangeStart} --rangeSize {rangeBlockSize}" - category = 'Dense Reconstruction' - documentation = ''' -Estimate a depth map for each calibrated camera using Plane Sweeping, a multi-view stereo algorithm notable for its efficiency on modern graphics hardware (GPU). + category = "Dense Reconstruction" + documentation = """ +Estimate a depth map for each calibrated camera using Plane Sweeping, a multi-view stereo algorithm notable for its +efficiency on modern graphics hardware (GPU). Adjust the downscale factor to compute depth maps at a higher/lower resolution. -Use a downscale factor of one (full-resolution) only if the quality of the input images is really high (camera on a tripod with high-quality optics). +Use a downscale factor of one (full-resolution) only if the quality of the input images is really high +(camera on a tripod with high-quality optics). ## Online [https://alicevision.org/#photogrammetry/depth_maps_estimation](https://alicevision.org/#photogrammetry/depth_maps_estimation) -''' +""" inputs = [ desc.File( @@ -42,7 +44,8 @@ class DepthMap(desc.AVCommandLineNode): description="Downscale the input images to compute the depth map.\n" "Full resolution (downscale = 1) gives the best result,\n" "but using a larger downscale will reduce computation time at the expense of quality.\n" - "If the images are noisy, blurry or if the surfaces are challenging (weakly-textured or with specularities), a larger downscale may improve.", + "If the images are noisy, blurry or if the surfaces are challenging (weakly-textured or with " + "specularities), a larger downscale may improve.", value=2, values=[1, 2, 4, 8, 16], exclusive=True, @@ -50,7 +53,8 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name="minViewAngle", label="Min View Angle", - description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", + description="Minimum angle between two views (select the neighbouring cameras, select depth planes from " + "epipolar segment point).", value=2.0, range=(0.0, 10.0, 0.1), advanced=True, @@ -58,7 +62,8 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name="maxViewAngle", label="Max View Angle", - description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", + description="Maximum angle between two views (select the neighbouring cameras, select depth planes from " + "epipolar segment point).", value=70.0, range=(10.0, 120.0, 1.0), advanced=True, @@ -117,28 +122,33 @@ class DepthMap(desc.AVCommandLineNode): desc.GroupAttribute( name="sgm", label="SGM", - description="The Semi-Global Matching (SGM) step computes a similarity volume and extracts the initial low-resolution depth map.\n" - "This method is highly robust but has limited depth precision (banding artifacts due to a limited list of depth planes).", + description="The Semi-Global Matching (SGM) step computes a similarity volume and extracts the initial " + "low-resolution depth map.\n" + "This method is highly robust but has limited depth precision (banding artifacts due to a " + "limited list of depth planes).", group=None, groupDesc=[ desc.IntParam( name="sgmScale", label="Downscale Factor", - description="Downscale factor applied on source images for the SGM step (in addition to the global downscale).", + description="Downscale factor applied on source images for the SGM step (in addition to the global " + "downscale).", value=2, range=(-1, 10, 1), ), desc.IntParam( name="sgmStepXY", label="Step XY", - description="The step is used to compute the similarity volume for one pixel over N (in the XY image plane).", + description="The step is used to compute the similarity volume for one pixel over N " + "(in the XY image plane).", value=2, range=(-1, 10, 1), ), desc.IntParam( name="sgmStepZ", label="Step Z", - description="Initial step used to compute the similarity volume on Z axis (every N pixels on the epilolar line).\n" + description="Initial step used to compute the similarity volume on Z axis (every N pixels on the " + "epilolar line).\n" "-1 means automatic estimation.\n" "This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).", value=-1, @@ -185,7 +195,8 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name="sgmMaxSimilarity", label="Max Similarity", - description="Maximum similarity threshold (between 0 and 1) used to filter out poorly supported depth values.", + description="Maximum similarity threshold (between 0 and 1) used to filter out poorly supported " + "depth values.", value=1.0, range=(0.0, 1.0, 0.01), advanced=True, @@ -255,7 +266,8 @@ class DepthMap(desc.AVCommandLineNode): desc.GroupAttribute( name="refine", label="Refine", - description="The refine step computes a similarity volume in higher resolution but with a small depth range around the SGM depth map.\n" + description="The refine step computes a similarity volume in higher resolution but with a small depth " + "range around the SGM depth map.\n" "This allows to compute a depth map with sub-pixel accuracy.", group=None, groupDesc=[ @@ -268,7 +280,8 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name="refineScale", label="Downscale Factor", - description="Downscale factor applied on source images for the Refine step (in addition to the global downscale).", + description="Downscale factor applied on source images for the Refine step (in addition to the " + "global downscale).", value=1, range=(-1, 10, 1), enabled=lambda node: node.refine.refineEnabled.value, @@ -292,7 +305,8 @@ class DepthMap(desc.AVCommandLineNode): desc.IntParam( name="refineSubsampling", label="Number Of Subsamples", - description="The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).", + description="The number of subsamples used to extract the best depth from the refine volume " + "(sliding gaussian window precision).", value=10, range=(1, 30, 1), advanced=True, @@ -321,7 +335,8 @@ class DepthMap(desc.AVCommandLineNode): desc.FloatParam( name="refineSigma", label="Sigma", - description="Sigma (2*sigma^2) of the Gaussian filter used to extract the best depth from the refine volume.", + description="Sigma (2*sigma^2) of the Gaussian filter used to extract the best depth from " + "the refine volume.", value=15.0, range=(0.0, 30.0, 0.5), advanced=True, @@ -410,7 +425,8 @@ class DepthMap(desc.AVCommandLineNode): label="Subparts", description="User custom patch pattern subparts for similarity volume computation.", advanced=True, - enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or + node.customPatchPattern.refineUseCustomPatchPattern.value), elementDesc=desc.GroupAttribute( name="customPatchPatternSubpart", label="Patch Pattern Subpart", @@ -463,7 +479,8 @@ class DepthMap(desc.AVCommandLineNode): description="Group all subparts with the same image level.", value=False, advanced=True, - enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + enabled=lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or + node.customPatchPattern.refineUseCustomPatchPattern.value), ), ], ), @@ -520,7 +537,8 @@ class DepthMap(desc.AVCommandLineNode): desc.BoolParam( name="exportTilePattern", label="Export Tile Pattern", - description="Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.", + description="Export the bounding boxes of tiles volumes as meshes. " + "This allows to visualize the depth map search areas.", value=False, advanced=True, ), @@ -561,7 +579,7 @@ class DepthMap(desc.AVCommandLineNode): description="Generated depth maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", - group="", # do not export on the command line + group="", # do not export on the command line ), desc.File( name="sim", @@ -569,14 +587,14 @@ class DepthMap(desc.AVCommandLineNode): description="Generated sim maps.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", - group="", # do not export on the command line + group="", # do not export on the command line ), desc.File( name="tilePattern", label="Tile Pattern", description="Debug: Tile pattern.", value=desc.Node.internalFolder + "<VIEW_ID>_tilePattern.obj", - group="", # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportTilePattern.value, ), desc.File( @@ -585,7 +603,7 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps SGM", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgm.exr", - group="", # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( @@ -594,7 +612,7 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps SGM upscaled.", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgmUpscaled.exr", - group="", # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( @@ -603,7 +621,7 @@ class DepthMap(desc.AVCommandLineNode): description="Debug: Depth maps after refinement", semantic="image", value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_refinedFused.exr", - group="", # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index bae602c27c..a60e4e3854 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -48,7 +48,7 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Export undistorted images.", value=False, ), - desc.ChoiceParam( + desc.ChoiceParam( name="undistortedImageType", label="Undistort Image Format", description="Image file format to use for undistorted images ('jpg', 'png', 'tif', 'exr (half)').", diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index f05ac5000b..8a73c903ad 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -3,14 +3,15 @@ from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL + class ExportDistortion(desc.AVCommandLineNode): - commandLine = 'aliceVision_exportDistortion {allParams}' + commandLine = "aliceVision_exportDistortion {allParams}" - category = 'Export' - documentation = ''' + category = "Export" + documentation = """ Export the lens distortion model as Nuke node and STMaps. It also allows to export an undistorted image of the lens grids for validation. -''' +""" inputs = [ desc.File( diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 09c5ed2c54..3b98dfba36 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -31,7 +31,7 @@ class ExportMaya(desc.AVCommandLineNode): exclusive=True, ), ] - + outputs = [ desc.File( name="output", diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 8c720ade2a..52df4e3017 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -1,21 +1,19 @@ __version__ = "1.0" -import json -import os from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL class GlobalSfM(desc.AVCommandLineNode): - commandLine = 'aliceVision_globalSfM {allParams}' - size = desc.DynamicNodeSize('input') + commandLine = "aliceVision_globalSfM {allParams}" + size = desc.DynamicNodeSize("input") - category = 'Sparse Reconstruction' - documentation = ''' + category = "Sparse Reconstruction" + documentation = """ Performs the Structure-From-Motion with a global approach. It is known to be faster but less robust to challenging datasets than the Incremental approach. -''' +""" inputs = [ desc.File( diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index d895905395..c87e7be20e 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -1,6 +1,5 @@ __version__ = "2.0" -import os from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 6bba21b649..8040dce19a 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -1,6 +1,5 @@ __version__ = "1.0" -import os from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL @@ -47,13 +46,19 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): name="method", label="Method", description="Method used to select the image pairs to match:\n" - " - VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n" - "feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n" - "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal Number of Images', all image pairs will be selected.\n" - " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n" + " - VocabularyTree: It uses image retrieval techniques to find images that share some content " + "without the cost of resolving all \n" + "feature matches in details. Each image is represented in a compact image descriptor which " + "allows to compute the distance between all \n" + "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal " + "Number of Images', all image pairs will be selected.\n" + " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable " + "connections between keyframes at different times.\n" " - Exhaustive: Export all image pairs.\n" - " - Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n" - " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection. Otherwise, use VocabularyTree.\n", + " - Frustum: If images have known poses, computes the intersection between cameras frustums " + "to create the list of image pairs.\n" + " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection. Otherwise, " + "use VocabularyTree.\n", value="SequentialAndVocabularyTree", values=["VocabularyTree", "SequentialAndVocabularyTree", "Exhaustive", "Frustum"], exclusive=True, diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index fb8515faf8..453ad653c9 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -5,11 +5,12 @@ import os.path + def outputImagesValueFunct(attr): basename = os.path.basename(attr.node.input.value) fileStem = os.path.splitext(basename)[0] inputExt = os.path.splitext(basename)[1] - outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None + outputExt = ('.' + attr.node.extension.value) if attr.node.extension.value else None if inputExt in ['.abc', '.sfm']: fileStem = '<FILESTEM>' if attr.node.keepImageFilename.value else '<VIEW_ID>' @@ -17,7 +18,7 @@ def outputImagesValueFunct(attr): return desc.Node.internalFolder + fileStem + (outputExt or '.*') if inputExt: - # if we have one or multiple files in input + # If we have one or multiple files in input return desc.Node.internalFolder + fileStem + (outputExt or inputExt) if '*' in fileStem: diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index f26928eff9..b6d47f994a 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -43,4 +43,3 @@ class ImportKnownPoses(desc.AVCommandLineNode): value=desc.Node.internalFolder + "/sfmData.abc", ), ] - diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 89554bf9f0..81cb932af8 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -1,6 +1,5 @@ __version__ = "5.0" -import os from meshroom.core import desc from meshroom.core.utils import EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL From 8f96c1ba4800fe59322fd8d8cf877f776648dac7 Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE <aurore.lafaurie.pro@gmail.com> Date: Thu, 12 Sep 2024 14:19:04 +0200 Subject: [PATCH 1025/1093] [nodes] Exposed all attributes that are connected in default pipelines --- meshroom/aliceVision/ConvertSfMFormat.py | 1 + meshroom/aliceVision/FeatureExtraction.py | 1 + meshroom/aliceVision/FeatureMatching.py | 2 ++ meshroom/aliceVision/ImageMatching.py | 1 + meshroom/aliceVision/ImageMatchingMultiSfM.py | 1 + meshroom/aliceVision/LdrToHdrCalibration.py | 5 +++++ meshroom/aliceVision/LdrToHdrMerge.py | 4 ++++ meshroom/aliceVision/LdrToHdrSampling.py | 5 +++++ meshroom/aliceVision/PanoramaCompositing.py | 1 + meshroom/aliceVision/PanoramaEstimation.py | 2 ++ meshroom/aliceVision/PanoramaMerging.py | 1 + meshroom/aliceVision/SfMTriangulation.py | 2 ++ meshroom/aliceVision/StructureFromMotion.py | 3 +++ meshroom/aliceVision/TracksBuilding.py | 1 + 14 files changed, 30 insertions(+) diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index de64850574..09822aacdf 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -38,6 +38,7 @@ class ConvertSfMFormat(desc.AVCommandLineNode): value=["dspsift"], exclusive=False, joinChar=",", + exposed=True, ), desc.ListAttribute( elementDesc=desc.File( diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 29e7afd483..037a02631e 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -66,6 +66,7 @@ class FeatureExtraction(desc.AVCommandLineNode): value=["dspsift"], exclusive=False, joinChar=",", + exposed=True, ), desc.ChoiceParam( name="describerPreset", diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 10aba6f0e0..fcff21d7a1 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -50,6 +50,7 @@ class FeatureMatching(desc.AVCommandLineNode): name="featuresFolders", label="Features Folders", description="Folder(s) containing the extracted features and descriptors.", + exposed=True, ), desc.File( name="imagePairsList", @@ -65,6 +66,7 @@ class FeatureMatching(desc.AVCommandLineNode): value=["dspsift"], exclusive=False, joinChar=",", + exposed=True, ), desc.ChoiceParam( name="photometricMatchingMethod", diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index c87e7be20e..e5aa0b728a 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -50,6 +50,7 @@ class ImageMatching(desc.AVCommandLineNode): name="featuresFolders", label="Features Folders", description="Folder(s) containing the extracted features and descriptors.", + exposed=True, ), desc.ChoiceParam( name="method", diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 8040dce19a..ce90f20554 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -41,6 +41,7 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): name="featuresFolders", label="Features Folders", description="Folder(s) containing the extracted features and descriptors.", + exposed=True, ), desc.ChoiceParam( name="method", diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 1270e6e743..a461db992d 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -61,6 +61,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" "Errors will occur during the computation.", + exposed=True, ), desc.IntParam( name="nbBrackets", @@ -78,6 +79,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, enabled=lambda node: node.nbBrackets.value != 1, + exposed=True, ), desc.ChoiceParam( name="calibrationMethod", @@ -92,6 +94,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): value="auto", exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.ChoiceParam( name="calibrationWeight", @@ -114,6 +117,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): range=(8, 14, 1), advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -126,6 +130,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): invalidate=False, group="user", # not used directly on the command line enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.IntParam( name="maxTotalPoints", diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 624e32ccb4..929de5063e 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -60,6 +60,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" "Errors will occur during the computation.", + exposed=True, ), desc.IntParam( name="nbBrackets", @@ -124,6 +125,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, enabled=lambda node: node.nbBrackets.value != 1, + exposed=True, ), desc.BoolParam( name="keepSourceImageName", @@ -151,6 +153,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): range=(8, 14, 1), advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -161,6 +164,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode): value="AUTO", exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.BoolParam( name="enableHighlight", diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 19a359fef6..061e994629 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -76,6 +76,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): group="user", # not used directly on the command line errorMessage="The set number of brackets is not a multiple of the number of input images.\n" "Errors will occur during the computation.", + exposed=True, ), desc.IntParam( name="nbBrackets", @@ -93,6 +94,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, enabled=lambda node: node.nbBrackets.value != 1, + exposed=True, ), desc.ChoiceParam( name="calibrationMethod", @@ -107,6 +109,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): value="auto", exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.IntParam( name="channelQuantizationPower", @@ -116,6 +119,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): range=(8, 14, 1), advanced=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -126,6 +130,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): value="AUTO", exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, + exposed=True, ), desc.IntParam( name="blockSize", diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 983f53387c..811a0ddce7 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -75,6 +75,7 @@ class PanoramaCompositing(desc.AVCommandLineNode): label="Use Tiling", description="Enable tiling mode for parallelization.", value=True, + exposed=True, ), desc.ChoiceParam( name="storageDataType", diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index e1361c0688..80034348c5 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -33,6 +33,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): name="featuresFolders", label="Features Folders", description="Folder(s) containing the extracted features.", + exposed=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -53,6 +54,7 @@ class PanoramaEstimation(desc.AVCommandLineNode): value=["sift"], exclusive=False, joinChar=",", + exposed=True, ), desc.FloatParam( name="offsetLongitude", diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 4e5d792478..b684bd592d 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -45,6 +45,7 @@ class PanoramaMerging(desc.AVCommandLineNode): label="Use Tiling", description="Enable tiling mode for parallelization.", value=True, + exposed=True, ), desc.ChoiceParam( name="storageDataType", diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index e7a87ae540..025dbf47cf 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -31,6 +31,7 @@ class SfMTriangulation(desc.AVCommandLineNode): name="featuresFolders", label="Features Folders", description="Folder(s) containing the extracted features and descriptors.", + exposed=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -42,6 +43,7 @@ class SfMTriangulation(desc.AVCommandLineNode): name="matchesFolders", label="Matches Folders", description="Folder(s) in which computed matches are stored.", + exposed=True, ), desc.ChoiceParam( name="describerTypes", diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index d9b20585db..f16c92f129 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -82,6 +82,7 @@ class StructureFromMotion(desc.AVCommandLineNode): name="featuresFolders", label="Features Folders", description="Folder(s) containing the extracted features and descriptors.", + exposed=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -93,6 +94,7 @@ class StructureFromMotion(desc.AVCommandLineNode): name="matchesFolders", label="Matches Folders", description="Folder(s) in which the computed matches are stored.", + exposed=True, ), desc.ChoiceParam( name="describerTypes", @@ -102,6 +104,7 @@ class StructureFromMotion(desc.AVCommandLineNode): value=["dspsift"], exclusive=False, joinChar=",", + exposed=True, ), desc.ChoiceParam( name="localizerEstimator", diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index 870c6339d4..c6cb841ea2 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -30,6 +30,7 @@ class TracksBuilding(desc.AVCommandLineNode): name="featuresFolders", label="Features Folders", description="Folder(s) containing the extracted features and descriptors.", + exposed=True, ), desc.ListAttribute( elementDesc=desc.File( From 214b4d68ff687e8088947459a3298bf73bacbf3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 16 Sep 2024 17:50:54 +0200 Subject: [PATCH 1026/1093] [nodes] Remove useless `exclusive=True` in descriptions --- meshroom/aliceVision/ApplyCalibration.py | 1 - meshroom/aliceVision/CameraCalibration.py | 2 -- meshroom/aliceVision/CameraInit.py | 8 -------- meshroom/aliceVision/CameraLocalization.py | 5 ----- meshroom/aliceVision/CameraRigCalibration.py | 5 ----- meshroom/aliceVision/CameraRigLocalization.py | 5 ----- meshroom/aliceVision/CheckerboardCalibration.py | 1 - meshroom/aliceVision/CheckerboardDetection.py | 1 - meshroom/aliceVision/ColorCheckerCorrection.py | 3 --- meshroom/aliceVision/ColorCheckerDetection.py | 1 - meshroom/aliceVision/ConvertDistortion.py | 3 --- meshroom/aliceVision/ConvertMesh.py | 2 -- meshroom/aliceVision/ConvertSfMFormat.py | 2 -- meshroom/aliceVision/DepthMap.py | 3 --- meshroom/aliceVision/DepthMapFilter.py | 1 - meshroom/aliceVision/DistortionCalibration.py | 2 -- meshroom/aliceVision/ExportAnimatedCamera.py | 2 -- meshroom/aliceVision/ExportColoredPointCloud.py | 1 - meshroom/aliceVision/ExportDistortion.py | 1 - meshroom/aliceVision/ExportMatches.py | 1 - meshroom/aliceVision/ExportMaya.py | 1 - meshroom/aliceVision/FeatureExtraction.py | 6 ------ meshroom/aliceVision/FeatureMatching.py | 4 ---- meshroom/aliceVision/FeatureRepeatability.py | 4 ---- meshroom/aliceVision/GlobalSfM.py | 3 --- meshroom/aliceVision/ImageMasking.py | 2 -- meshroom/aliceVision/ImageMatching.py | 2 -- meshroom/aliceVision/ImageMatchingMultiSfM.py | 3 --- meshroom/aliceVision/ImageProcessing.py | 12 ------------ meshroom/aliceVision/ImageSegmentation.py | 1 - meshroom/aliceVision/ImportE57.py | 1 - meshroom/aliceVision/ImportKnownPoses.py | 1 - meshroom/aliceVision/KeyframeSelection.py | 3 --- meshroom/aliceVision/LdrToHdrCalibration.py | 4 ---- meshroom/aliceVision/LdrToHdrMerge.py | 4 ---- meshroom/aliceVision/LdrToHdrSampling.py | 3 --- meshroom/aliceVision/LidarDecimating.py | 1 - meshroom/aliceVision/LidarMerging.py | 1 - meshroom/aliceVision/LidarMeshing.py | 1 - meshroom/aliceVision/LightingCalibration.py | 2 -- meshroom/aliceVision/LightingEstimation.py | 4 ---- meshroom/aliceVision/MergeMeshes.py | 2 -- meshroom/aliceVision/MeshDecimate.py | 1 - meshroom/aliceVision/MeshDenoising.py | 2 -- meshroom/aliceVision/MeshFiltering.py | 4 ---- meshroom/aliceVision/MeshMasking.py | 3 --- meshroom/aliceVision/MeshRemoveUnseenFaces.py | 2 -- meshroom/aliceVision/MeshResampling.py | 1 - meshroom/aliceVision/Meshing.py | 4 ---- meshroom/aliceVision/NodalSfM.py | 1 - meshroom/aliceVision/NormalIntegration.py | 1 - meshroom/aliceVision/PanoramaCompositing.py | 4 ---- meshroom/aliceVision/PanoramaEstimation.py | 3 --- meshroom/aliceVision/PanoramaInit.py | 3 --- meshroom/aliceVision/PanoramaMerging.py | 3 --- meshroom/aliceVision/PanoramaPostProcessing.py | 3 --- meshroom/aliceVision/PanoramaPrepareImages.py | 1 - meshroom/aliceVision/PanoramaSeams.py | 1 - meshroom/aliceVision/PanoramaWarping.py | 3 --- meshroom/aliceVision/PhotometricStereo.py | 2 -- meshroom/aliceVision/PrepareDenseScene.py | 3 --- meshroom/aliceVision/Publish.py | 1 - meshroom/aliceVision/RelativePoseEstimating.py | 1 - meshroom/aliceVision/SelectConnectedViews.py | 1 - meshroom/aliceVision/SfMAlignment.py | 2 -- meshroom/aliceVision/SfMDistances.py | 2 -- meshroom/aliceVision/SfMMerge.py | 2 -- meshroom/aliceVision/SfMSplitReconstructed.py | 1 - meshroom/aliceVision/SfMToRig.py | 1 - meshroom/aliceVision/SfMTransfer.py | 2 -- meshroom/aliceVision/SfMTransform.py | 2 -- meshroom/aliceVision/SfMTriangulation.py | 2 -- meshroom/aliceVision/SfmBootstraping.py | 1 - meshroom/aliceVision/SfmExpanding.py | 1 - meshroom/aliceVision/SketchfabUpload.py | 3 --- meshroom/aliceVision/SphereDetection.py | 1 - meshroom/aliceVision/Split360Images.py | 6 ------ meshroom/aliceVision/StructureFromMotion.py | 4 ---- meshroom/aliceVision/Texturing.py | 13 ------------- meshroom/aliceVision/TracksBuilding.py | 1 - meshroom/blender/ScenePreview.py | 3 --- 81 files changed, 210 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 315dff5088..34862871e1 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -36,7 +36,6 @@ class ApplyCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 68afb405a6..01293a0408 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -27,7 +27,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).", value="CHESSBOARD", values=["CHESSBOARD", "CIRCLES", "ASYMMETRIC_CIRCLES", "ASYMMETRIC_CCTAG"], - exclusive=True, ), desc.GroupAttribute( name="size", @@ -117,7 +116,6 @@ class CameraCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index f338e41e6a..8a48f491fd 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -134,7 +134,6 @@ " - equidistant: Non-projective camera model suited for full-fisheye optics.\n", value="pinhole", values=["pinhole", "equidistant"], - exclusive=True, ), desc.ChoiceParam( name="distortionType", @@ -149,7 +148,6 @@ " - fisheye4: distortion with 4 parameters suited for fisheye optics (like 120deg FoV).\n", value="radialk3", values=["none", "radialk1", "radialk3", "radialk3pt", "brown", "fisheye4", "fisheye1"], - exclusive=True, ), desc.IntParam( name="width", @@ -216,7 +214,6 @@ " - none: not set.", values=["calibrated", "estimated", "unknown", "none"], value="none", - exclusive=True, ), desc.ChoiceParam( name="distortionInitializationMode", @@ -228,7 +225,6 @@ " - none: not set.", values=["calibrated", "estimated", "unknown", "none"], value="none", - exclusive=True, ), desc.ListAttribute( name="distortionParams", @@ -418,7 +414,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): " - image: never group images from comparable devices.", values=["global", "folder", "image"], value="folder", - exclusive=True, invalidate=False, ), desc.ChoiceParam( @@ -432,7 +427,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): " - DCPMetadata: Same as None with DCP info added in metadata.", values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", - exclusive=True, ), desc.File( name="colorProfileDatabase", @@ -459,7 +453,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): " - filename : Generate viewId from filename using regex.", value="metadata", values=["metadata", "filename"], - exclusive=True, invalidate=False, advanced=True, ), @@ -485,7 +478,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index d7c45cb812..8f00e7c318 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -51,7 +51,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", value="normal", values=["low", "medium", "normal", "high", "ultra"], - exclusive=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -59,7 +58,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="The type of *sac framework to use for resection (acransac, loransac).", value="acransac", values=["acransac", "loransac"], - exclusive=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -67,7 +65,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="The type of *sac framework to use for matching (acransac, loransac).", value="acransac", values=["acransac", "loransac"], - exclusive=True, ), desc.File( name="calibration", @@ -127,7 +124,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="[voctree] Algorithm type: FirstBest, AllResults.", value="AllResults", values=["FirstBest", "AllResults"], - exclusive=True, ), desc.FloatParam( name="matchingError", @@ -187,7 +183,6 @@ class CameraLocalization(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index 17be89dcdf..ba6a791e26 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -58,7 +58,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", value="normal", values=["low", "medium", "normal", "high", "ultra"], - exclusive=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -66,7 +65,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="The type of *sac framework to use for resection (acransac, loransac).", value="acransac", values=["acransac", "loransac"], - exclusive=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -74,7 +72,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="The type of *sac framework to use for matching (acransac, loransac).", value="acransac", values=["acransac", "loransac"], - exclusive=True, ), desc.StringParam( name="refineIntrinsics", @@ -115,7 +112,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="[voctree] Algorithm type: {FirstBest, AllResults}.", value="AllResults", values=["FirstBest", "AllResults"], - exclusive=True, ), desc.IntParam( name="nbImageMatch", @@ -152,7 +148,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index 500633019b..c1fed08e30 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -57,7 +57,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", value="normal", values=["low", "medium", "normal", "high", "ultra"], - exclusive=True, ), desc.ChoiceParam( name="resectionEstimator", @@ -65,7 +64,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="The type of *sac framework to use for resection (acransac, loransac).", value="acransac", values=["acransac", "loransac"], - exclusive=True, ), desc.ChoiceParam( name="matchingEstimator", @@ -73,7 +71,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="The type of *sac framework to use for matching (acransac, loransac).", value="acransac", values=["acransac", "loransac"], - exclusive=True, ), desc.StringParam( name="refineIntrinsics", @@ -120,7 +117,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="[voctree] Algorithm type: {FirstBest, AllResults}.", value="AllResults", values=["FirstBest", "AllResults"], - exclusive=True, ), desc.IntParam( name="nbImageMatch", @@ -158,7 +154,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/CheckerboardCalibration.py b/meshroom/aliceVision/CheckerboardCalibration.py index 65b7b357d8..f07f9ec8ee 100644 --- a/meshroom/aliceVision/CheckerboardCalibration.py +++ b/meshroom/aliceVision/CheckerboardCalibration.py @@ -39,7 +39,6 @@ class CheckerboardCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index c302a4eca7..baa6b0a3c9 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/aliceVision/CheckerboardDetection.py @@ -53,7 +53,6 @@ class CheckerboardDetection(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index ad43aefa9b..a301298210 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -43,7 +43,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): description="Output image file extension.", value="exr", values=["exr", ""], - exclusive=True, ), desc.ChoiceParam( name="storageDataType", @@ -55,7 +54,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): " - auto: Use half float if all values can fit, else use full float.", values=EXR_STORAGE_DATA_TYPE, value="float", - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -63,7 +61,6 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index edf0d01f77..c92b64443e 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -54,7 +54,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ConvertDistortion.py b/meshroom/aliceVision/ConvertDistortion.py index 38dd85f32c..d196d246a5 100644 --- a/meshroom/aliceVision/ConvertDistortion.py +++ b/meshroom/aliceVision/ConvertDistortion.py @@ -26,7 +26,6 @@ class ConvertDistortion(desc.AVCommandLineNode): description="Distortion model to convert from.", value="distortion", values=["distortion", "undistortion"], - exclusive=True, ), desc.ChoiceParam( name="to", @@ -34,7 +33,6 @@ class ConvertDistortion(desc.AVCommandLineNode): description="Distortion model to convert to.", value="undistortion", values=["distortion", "undistortion"], - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -42,7 +40,6 @@ class ConvertDistortion(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 28392136d2..035bfa2867 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -23,7 +23,6 @@ class ConvertMesh(desc.AVCommandLineNode): description="Output mesh format (*.obj, *.gltf, *.fbx, *.stl).", value="obj", values=["gltf", "obj", "fbx", "stl"], - exclusive=True, group="", ), desc.ChoiceParam( @@ -32,7 +31,6 @@ class ConvertMesh(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 09822aacdf..b98235235e 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -27,7 +27,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): description="Output SfM file format.", value="abc", values=["abc", "sfm", "json", "ply", "baf"], - exclusive=True, group="", # exclude from command line ), desc.ChoiceParam( @@ -87,7 +86,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index cfde95cadd..469f90c867 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -48,7 +48,6 @@ class DepthMap(desc.AVCommandLineNode): "specularities), a larger downscale may improve.", value=2, values=[1, 2, 4, 8, 16], - exclusive=True, ), desc.FloatParam( name="minViewAngle", @@ -440,7 +439,6 @@ class DepthMap(desc.AVCommandLineNode): description="Patch pattern subpart type.", value="full", values=["full", "circle"], - exclusive=True, ), desc.FloatParam( name="customPatchPatternSubpartRadius", @@ -559,7 +557,6 @@ class DepthMap(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index 90c7710841..a760b089e1 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -105,7 +105,6 @@ class DepthMapFilter(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index 5e9fe72ff0..ce3632f2ab 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -32,7 +32,6 @@ class DistortionCalibration(desc.AVCommandLineNode): description="model used to estimate undistortion.", value="3deanamorphic4", values=["3deanamorphic4", "3declassicld", "3deradial4"], - exclusive=True, ), desc.BoolParam( name="handleSqueeze", @@ -52,7 +51,6 @@ class DistortionCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index a60e4e3854..8dcc995e6d 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -54,7 +54,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Image file format to use for undistorted images ('jpg', 'png', 'tif', 'exr (half)').", value="exr", values=["jpg", "png", "tif", "exr"], - exclusive=True, enabled=lambda node: node.exportUndistortedImages.value, ), desc.BoolParam( @@ -76,7 +75,6 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index f283209810..0e4a6c1e3b 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -24,7 +24,6 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 8a73c903ad..799b457464 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -45,7 +45,6 @@ class ExportDistortion(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 3b61fe65b5..7e1b7d93d6 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -56,7 +56,6 @@ class ExportMatches(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 3b98dfba36..d87b6da02f 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -28,7 +28,6 @@ class ExportMaya(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 037a02631e..961a2b9e32 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -50,7 +50,6 @@ class FeatureExtraction(desc.AVCommandLineNode): description="File extension for masks.", value="png", values=["png", "exr", "jpg"], - exclusive=True, ), desc.BoolParam( name="maskInvert", @@ -75,7 +74,6 @@ class FeatureExtraction(desc.AVCommandLineNode): "Warning: Use ULTRA only on small datasets.", value="normal", values=["low", "medium", "normal", "high", "ultra", "custom"], - exclusive=True, group=lambda node: 'allParams' if node.describerPreset.value != 'custom' else None, ), desc.IntParam( @@ -93,7 +91,6 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Control the ImageDescriber quality (low, medium, normal, high, ultra).", value="normal", values=["low", "medium", "normal", "high", "ultra"], - exclusive=True, ), desc.ChoiceParam( name="contrastFiltering", @@ -108,7 +105,6 @@ class FeatureExtraction(desc.AVCommandLineNode): " - NonExtremaFiltering: Filter non-extrema peakValues.\n", value="GridSort", values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], - exclusive=True, advanced=True, ), desc.FloatParam( @@ -133,7 +129,6 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Allows you to choose the color space in which the data are processed.", values=COLORSPACES, value="sRGB", - exclusive=True, ), desc.BoolParam( name="forceCpuExtraction", @@ -157,7 +152,6 @@ class FeatureExtraction(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index fcff21d7a1..4d209e314b 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -80,7 +80,6 @@ class FeatureMatching(desc.AVCommandLineNode): " - BRUTE_FORCE_HAMMING: BruteForce Hamming matching", value="ANN_L2", values=["BRUTE_FORCE_L2", "ANN_L2", "CASCADE_HASHING_L2", "FAST_CASCADE_HASHING_L2", "BRUTE_FORCE_HAMMING"], - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -91,7 +90,6 @@ class FeatureMatching(desc.AVCommandLineNode): " - loransac: LO-Ransac (only available for 'fundamental_matrix' model).", value="acransac", values=["acransac", "loransac"], - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -106,7 +104,6 @@ class FeatureMatching(desc.AVCommandLineNode): " - no_filtering", value="fundamental_matrix", values=["fundamental_matrix", "fundamental_with_distortion", "essential_matrix", "homography_matrix", "homography_growing", "no_filtering"], - exclusive=True, advanced=True, ), desc.FloatParam( @@ -201,7 +198,6 @@ class FeatureMatching(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] outputs = [ diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index 5a16b104c3..21778d55b8 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -38,7 +38,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): "Warning: Use ULTRA only on small datasets.", value="normal", values=["low", "medium", "normal", "high", "ultra"], - exclusive=True, ), desc.ChoiceParam( name="describerQuality", @@ -46,7 +45,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): description="Control the ImageDescriber quality (low, medium, normal, high, ultra).", value="normal", values=["low", "medium", "normal", "high", "ultra"], - exclusive=True, ), desc.ChoiceParam( name="contrastFiltering", @@ -61,7 +59,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): " - NonExtremaFiltering: Filter non-extrema peakValues.", value="Static", values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], - exclusive=True, advanced=True, ), desc.FloatParam( @@ -110,7 +107,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 52df4e3017..8cb319f860 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -61,7 +61,6 @@ class GlobalSfM(desc.AVCommandLineNode): " - L2 minimization", values=["L1_minimization", "L2_minimization"], value="L2_minimization", - exclusive=True, ), desc.ChoiceParam( name="translationAveraging", @@ -72,7 +71,6 @@ class GlobalSfM(desc.AVCommandLineNode): " - L1 soft minimization", values=["L1_minimization", "L2_minimization", "L1_soft_minimization"], value="L1_soft_minimization", - exclusive=True, ), desc.BoolParam( name="lockAllIntrinsics", @@ -88,7 +86,6 @@ class GlobalSfM(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 064cecee22..60576f7303 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -26,7 +26,6 @@ class ImageMasking(desc.AVCommandLineNode): description="", value="HSV", values=["HSV", "AutoGrayscaleThreshold"], - exclusive=True, ), desc.GroupAttribute( name="hsv", @@ -124,7 +123,6 @@ class ImageMasking(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index e5aa0b728a..2cc71c6bd0 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -66,7 +66,6 @@ class ImageMatching(desc.AVCommandLineNode): " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n", value="SequentialAndVocabularyTree", values=["VocabularyTree", "Sequential", "SequentialAndVocabularyTree", "Exhaustive", "Frustum", "FrustumOrVocabularyTree"], - exclusive=True, ), desc.File( name="tree", @@ -128,7 +127,6 @@ class ImageMatching(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index ce90f20554..211efff1c9 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -62,7 +62,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): "use VocabularyTree.\n", value="SequentialAndVocabularyTree", values=["VocabularyTree", "SequentialAndVocabularyTree", "Exhaustive", "Frustum"], - exclusive=True, ), desc.File( name="tree", @@ -90,7 +89,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): "- 'a/b' for A with B.", value="a/a+a/b", values=["a/a+a/b","a/ab", "a/b"], - exclusive=True, ), desc.IntParam( name="minNbImages", @@ -135,7 +133,6 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index 453ad653c9..be8e6fecb5 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -83,7 +83,6 @@ class ImageProcessing(desc.AVCommandLineNode): "If unset, the output file extension will match the input's if possible.", value="", values=["", "exr", "jpg", "tiff", "png"], - exclusive=True, ), desc.BoolParam( name="reconstructedViewsOnly", @@ -334,7 +333,6 @@ class ImageProcessing(desc.AVCommandLineNode): " - salt: changes to value A a portion of pixels given by B.\n", value="uniform", values=["uniform", "gaussian", "salt"], - exclusive=True, enabled=lambda node: node.noiseFilter.noiseEnabled.value, ), desc.FloatParam( @@ -449,7 +447,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Allows you to choose the format of the output image.", value="rgba", values=["rgba", "rgb", "grayscale"], - exclusive=True, ), desc.ChoiceParam( name="inputColorSpace", @@ -457,7 +454,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Allows you to force the color space of the input image.", values=COLORSPACES, value="AUTO", - exclusive=True, ), desc.ChoiceParam( name="outputColorSpace", @@ -465,7 +461,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Allows you to choose the color space of the output image.", values=COLORSPACES, value="AUTO", - exclusive=True, ), desc.ChoiceParam( name="workingColorSpace", @@ -473,7 +468,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Allows you to choose the color space in which the data are processed.", values=COLORSPACES, value="Linear", - exclusive=True, enabled=lambda node: not node.applyDcpMetadata.value, ), desc.ChoiceParam( @@ -482,7 +476,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Allows you to choose how RAW data are color processed.", values=RAW_COLOR_INTERPRETATION, value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", - exclusive=True, ), desc.BoolParam( name="applyDcpMetadata", @@ -525,7 +518,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="LibRaw demosaicing algorithm to use.", value="AHD", values=["linear", "VNG", "PPG", "AHD", "DCB", "AHD-Mod", "AFD", "VCD", "Mixed", "LMMSE", "AMaZE", "DHT", "AAHD", "none"], - exclusive=True, ), desc.ChoiceParam( name="highlightMode", @@ -537,7 +529,6 @@ class ImageProcessing(desc.AVCommandLineNode): " - 3-9: Rebuild", value=0, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - exclusive=True, ), desc.FloatParam( name="correlatedColorTemperature", @@ -571,7 +562,6 @@ class ImageProcessing(desc.AVCommandLineNode): " - auto: Use half float if all values can fit, else use full float.", values=EXR_STORAGE_DATA_TYPE, value="float", - exclusive=True, ), desc.ChoiceParam( name="exrCompressionMethod", @@ -579,7 +569,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Compression method for EXR output images.", value="auto", values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], - exclusive=True, ), desc.IntParam( name="exrCompressionLevel", @@ -611,7 +600,6 @@ class ImageProcessing(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 46b538cb5c..1f2df77b19 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -73,7 +73,6 @@ class ImageSegmentation(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index ee6588b4d9..db621f769a 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -52,7 +52,6 @@ class ImportE57(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index b6d47f994a..90237527dc 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -31,7 +31,6 @@ class ImportKnownPoses(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index 81cb932af8..ff52217847 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -283,7 +283,6 @@ class KeyframeSelection(desc.AVCommandLineNode): "For input videos, 'none' should not be used since the written keyframes are used to generate the output SfMData file.", value="none", values=["none", "exr", "jpg", "png"], - exclusive=True, validValue=lambda node: not (any(ext in input.value.lower() for ext in videoExts for input in node.inputPaths.value) and node.outputExtension.value == "none"), errorMessage="A video input has been provided. The output extension should be different from 'none'.", ), @@ -297,7 +296,6 @@ class KeyframeSelection(desc.AVCommandLineNode): " - auto: Use half float if all values can fit, else use full float.", values=EXR_STORAGE_DATA_TYPE, value="float", - exclusive=True, enabled=lambda node: node.outputExtension.value == "exr", advanced=True, ), @@ -384,7 +382,6 @@ class KeyframeSelection(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index a461db992d..516fed769b 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -92,7 +92,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): " - Laguerre: Simple but robust method estimating the minimal number of parameters.", values=["auto", "linear", "debevec", "grossberg", "laguerre"], value="auto", - exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, exposed=True, ), @@ -106,7 +105,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): " - plateau", value="default", values=["default", "gaussian", "triangle", "plateau"], - exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -126,7 +124,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", values=COLORSPACES, value="AUTO", - exclusive=True, invalidate=False, group="user", # not used directly on the command line enabled=lambda node: node.byPass.enabled and not node.byPass.value, @@ -149,7 +146,6 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 929de5063e..acc080342a 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -142,7 +142,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): " - plateau", value="gaussian", values=["gaussian", "triangle", "plateau"], - exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( @@ -162,7 +161,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", values=COLORSPACES, value="AUTO", - exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, exposed=True, ), @@ -218,7 +216,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): " - auto: Use half float if all values can fit, else use full float.", values=EXR_STORAGE_DATA_TYPE, value="float", - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -226,7 +223,6 @@ class LdrToHdrMerge(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 061e994629..64dd7ee37e 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -107,7 +107,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): " - Laguerre: Simple but robust method estimating the minimal number of parameters.", values=["auto", "linear", "debevec", "grossberg", "laguerre"], value="auto", - exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, exposed=True, ), @@ -128,7 +127,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): "If 'auto' is selected, the working color space will be 'Linear' if RAW images are detected; otherwise, it will be set to 'sRGB'.", values=COLORSPACES, value="AUTO", - exclusive=True, enabled=lambda node: node.byPass.enabled and not node.byPass.value, exposed=True, ), @@ -173,7 +171,6 @@ class LdrToHdrSampling(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LidarDecimating.py b/meshroom/aliceVision/LidarDecimating.py index 0f90bec547..d41ca9853d 100644 --- a/meshroom/aliceVision/LidarDecimating.py +++ b/meshroom/aliceVision/LidarDecimating.py @@ -38,7 +38,6 @@ class LidarDecimating(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LidarMerging.py b/meshroom/aliceVision/LidarMerging.py index 08b98831d3..4fd610888d 100644 --- a/meshroom/aliceVision/LidarMerging.py +++ b/meshroom/aliceVision/LidarMerging.py @@ -27,7 +27,6 @@ class LidarMerging(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LidarMeshing.py b/meshroom/aliceVision/LidarMeshing.py index 9eb7fddef8..da9aaab638 100644 --- a/meshroom/aliceVision/LidarMeshing.py +++ b/meshroom/aliceVision/LidarMeshing.py @@ -118,7 +118,6 @@ class LidarMeshing(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 6c88fead9c..4cb25d8eb7 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -45,7 +45,6 @@ class LightingCalibration(desc.CommandLineNode): "Spherical Harmonic lighting can be estimated using 'SH' method.", values=["brightestPoint", "whiteSphere", "SH"], value="brightestPoint", - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -53,7 +52,6 @@ class LightingCalibration(desc.CommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index c9269e4cbc..e07d2e3516 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -37,7 +37,6 @@ class LightingEstimation(desc.AVCommandLineNode): description="Lighting estimation mode.", value="global", values=["global", "per_image"], - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -46,7 +45,6 @@ class LightingEstimation(desc.AVCommandLineNode): description="Lighting color mode.", value="RGB", values=["RGB", "Luminance"], - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -55,7 +53,6 @@ class LightingEstimation(desc.AVCommandLineNode): description="Albedo estimation method used for light estimation.", value="constant", values=["constant", "picture", "median_filter", "blur_filter"], - exclusive=True, advanced=True, ), desc.IntParam( @@ -72,7 +69,6 @@ class LightingEstimation(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 38f0820b30..572865b119 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -37,7 +37,6 @@ class MergeMeshes(desc.AVCommandLineNode): description="Operation types used to merge two meshes.", value="boolean_union", values=["boolean_union", "boolean_intersection", "boolean_difference"], - exclusive=True, ), desc.BoolParam( name="preProcess", @@ -57,7 +56,6 @@ class MergeMeshes(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 69f2e1c706..0322aff619 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -64,7 +64,6 @@ class MeshDecimate(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index 0f4ad826f0..c159a87093 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -72,7 +72,6 @@ class MeshDenoising(desc.AVCommandLineNode): " - POISSON_UPDATE: Poisson-based update from [Wang et al. 2015] 'Rolling guidance normal filter for geometric processing'.", value=0, values=[0, 1], - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -80,7 +79,6 @@ class MeshDenoising(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index aec51331a4..e9787dabf7 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -25,7 +25,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="File type for the output mesh.", value="obj", values=["gltf", "obj", "fbx", "stl"], - exclusive=True, group="", ), desc.BoolParam( @@ -40,7 +39,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="Subset for smoothing (all, surface_boundaries, surface_inner_part).", value="all", values=["all", "surface_boundaries", "surface_inner_part"], - exclusive=True, advanced=True, ), desc.IntParam( @@ -72,7 +70,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="Subset for filtering (all, surface_boundaries, surface_inner_part).", value="all", values=["all", "surface_boundaries", "surface_inner_part"], - exclusive=True, advanced=True, ), desc.IntParam( @@ -107,7 +104,6 @@ class MeshFiltering(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index 615ebcdb89..a467b1c159 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -30,7 +30,6 @@ class MeshMasking(desc.AVCommandLineNode): description="File type of the output mesh.", value="obj", values=["obj", "gltf", "fbx", "stl"], - exclusive=True, group="", ), desc.ListAttribute( @@ -50,7 +49,6 @@ class MeshMasking(desc.AVCommandLineNode): description="File extension for the masks to use.", value="png", values=["exr", "jpg", "png"], - exclusive=True, ), desc.IntParam( name="threshold", @@ -92,7 +90,6 @@ class MeshMasking(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/MeshRemoveUnseenFaces.py b/meshroom/aliceVision/MeshRemoveUnseenFaces.py index add4ac5270..aa67076923 100644 --- a/meshroom/aliceVision/MeshRemoveUnseenFaces.py +++ b/meshroom/aliceVision/MeshRemoveUnseenFaces.py @@ -34,7 +34,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): description="File type for the output mesh.", value="obj", values=["gltf", "obj", "fbx", "stl"], - exclusive=True, group="", ), desc.IntParam( @@ -57,7 +56,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index c659e65e0b..67488e4d15 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -69,7 +69,6 @@ class MeshResampling(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index 71dc15dc5f..b448925be2 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -41,7 +41,6 @@ class Meshing(desc.AVCommandLineNode): description="File type for the output mesh.", value="obj", values=["gltf", "obj", "fbx", "stl"], - exclusive=True, group="", ), desc.BoolParam( @@ -193,7 +192,6 @@ class Meshing(desc.AVCommandLineNode): description="Single block or auto partitioning.", value="singleBlock", values=["singleBlock", "auto"], - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -202,7 +200,6 @@ class Meshing(desc.AVCommandLineNode): description="Multi-resolution or regular grid-based repartition.", value="multiResolution", values=["multiResolution", "regularGrid"], - exclusive=True, advanced=True, ), desc.FloatParam( @@ -467,7 +464,6 @@ class Meshing(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index 5cb0b075dc..5d4094bdd4 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -38,7 +38,6 @@ class NodalSfM(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index fc12f158fe..89b42107e5 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -37,7 +37,6 @@ class NormalIntegration(desc.CommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index 811a0ddce7..b1a8e1d1a5 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -51,7 +51,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): " - alpha: debug option with linear transitions.", value="multiband", values=["replace", "alpha", "multiband"], - exclusive=True, ), desc.IntParam( name="forceMinPyramidLevels", @@ -87,7 +86,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): " - auto: Use half float if all values can fit, else use full float.", values=EXR_STORAGE_DATA_TYPE, value="float", - exclusive=True, ), desc.ChoiceParam( name="overlayType", @@ -99,7 +97,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): " - all: display borders and seams.", value="none", values=["none", "borders", "seams", "all"], - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -108,7 +105,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index 80034348c5..bca57ff20e 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -78,7 +78,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): " - L2 minimization", values=["L1_minimization", "L2_minimization"], value="L2_minimization", - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -90,7 +89,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): " - from rotation matrix", values=["essential_matrix", "homography_matrix", "rotation_matrix"], value="rotation_matrix", - exclusive=True, advanced=True, ), desc.BoolParam( @@ -164,7 +162,6 @@ class PanoramaEstimation(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 396f24e51f..a334752b34 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -34,7 +34,6 @@ class PanoramaInit(desc.AVCommandLineNode): description="Initialize cameras.", value="No", values=["No", "File", "Horizontal", "Horizontal+Zenith", "Zenith+Horizontal", "Spherical"], - exclusive=True, ), desc.File( name="config", @@ -124,7 +123,6 @@ class PanoramaInit(desc.AVCommandLineNode): description="Add a rotation to the input XML given poses (CCW).", value="None", values=["None", "rotate90", "rotate180", "rotate270"], - exclusive=True, ), desc.BoolParam( name="debugFisheyeCircleEstimation", @@ -140,7 +138,6 @@ class PanoramaInit(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index b684bd592d..9e1a60a0f3 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -37,7 +37,6 @@ class PanoramaMerging(desc.AVCommandLineNode): description="Output file type for the merged panorama.", value="exr", values=["jpg", "png", "tif", "exr"], - exclusive=True, group="", # not part of allParams, as this is not a parameter for the command line ), desc.BoolParam( @@ -57,7 +56,6 @@ class PanoramaMerging(desc.AVCommandLineNode): " - auto: Use half float if all values can fit, else use full float.\n", values=EXR_STORAGE_DATA_TYPE, value="float", - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -65,7 +63,6 @@ class PanoramaMerging(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 739d5740c7..ea859024a8 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -56,7 +56,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="The color space of the output image.", values=COLORSPACES, value="Linear", - exclusive=True, ), desc.ChoiceParam( name="compressionMethod", @@ -64,7 +63,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Compression method for output EXR image.", value="auto", values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], - exclusive=True, ), desc.IntParam( name="compressionLevel", @@ -100,7 +98,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index 3d3d66a8a8..d23d84299e 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -28,7 +28,6 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 90fc55888a..0798c2a1ed 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -50,7 +50,6 @@ class PanoramaSeams(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index b6f17b7d81..c86158c59e 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -67,7 +67,6 @@ class PanoramaWarping(desc.AVCommandLineNode): description="Colorspace in which the panorama warping will be performed.", values=COLORSPACES, value="Linear", - exclusive=True, ), desc.ChoiceParam( name="storageDataType", @@ -79,7 +78,6 @@ class PanoramaWarping(desc.AVCommandLineNode): " - auto: Use half float if all values can fit, else use full float.", values=EXR_STORAGE_DATA_TYPE, value="float", - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -87,7 +85,6 @@ class PanoramaWarping(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 2cdb939f93..7caefa40ec 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -40,7 +40,6 @@ class PhotometricStereo(desc.CommandLineNode): " - 2: second order spherical harmonics.", values=["0", "1", "2"], value="0", - exclusive=True, advanced=True, ), desc.BoolParam( @@ -71,7 +70,6 @@ class PhotometricStereo(desc.CommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index 8df1218619..e992d31057 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -50,7 +50,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="File extension for the masks to use.", value="png", values=["exr", "jpg", "png"], - exclusive=True, ), desc.ChoiceParam( name="outputFileType", @@ -58,7 +57,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="Output file type for the undistorted images.", value="exr", values=["jpg", "png", "tif", "exr"], - exclusive=True, advanced=True, ), desc.BoolParam( @@ -88,7 +86,6 @@ class PrepareDenseScene(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 0cff844e92..05024aa94b 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -42,7 +42,6 @@ class Publish(desc.Node): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 0e7ef127ad..94254ffaf6 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -40,7 +40,6 @@ class RelativePoseEstimating(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SelectConnectedViews.py b/meshroom/aliceVision/SelectConnectedViews.py index 5da953eec4..1f82b8166c 100644 --- a/meshroom/aliceVision/SelectConnectedViews.py +++ b/meshroom/aliceVision/SelectConnectedViews.py @@ -51,7 +51,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index 046a5e09a2..e8b6fbb9b2 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -48,7 +48,6 @@ class SfMAlignment(desc.AVCommandLineNode): " - from_landmarks: Align from matched features.\n", value="from_cameras_viewid", values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers", 'from_landmarks'], - exclusive=True, ), desc.StringParam( name="fileMatchingPattern", @@ -100,7 +99,6 @@ class SfMAlignment(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMDistances.py b/meshroom/aliceVision/SfMDistances.py index 6f6886720e..794a3a817b 100644 --- a/meshroom/aliceVision/SfMDistances.py +++ b/meshroom/aliceVision/SfMDistances.py @@ -24,7 +24,6 @@ class SfMDistances(desc.AVCommandLineNode): description="", value="landmarks", values=["landmarks", "cameras"], - exclusive=True, ), desc.ChoiceParam( name="landmarksDescriberTypes", @@ -57,7 +56,6 @@ class SfMDistances(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index d9f0483508..9c21243c7e 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -61,7 +61,6 @@ class SfMMerge(desc.AVCommandLineNode): " - from_landmarks: Align from matched features, try to fuse.\n", value="simple_copy", values=["simple_copy", 'from_landmarks'], - exclusive=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -89,7 +88,6 @@ class SfMMerge(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index a74aaabf9e..39da9da79f 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -28,7 +28,6 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py index c2c475ed72..74260205f4 100644 --- a/meshroom/aliceVision/SfMToRig.py +++ b/meshroom/aliceVision/SfMToRig.py @@ -27,7 +27,6 @@ class SfMToRig(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index e77b14de5f..53f4bdb15e 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -38,7 +38,6 @@ class SfMTransfer(desc.AVCommandLineNode): " - from_intrinsicid: Copy intrinsics parameters.\n", value="from_viewid", values=["from_viewid", "from_filepath", "from_metadata", "from_intrinsicid"], - exclusive=True, ), desc.StringParam( name="fileMatchingPattern", @@ -91,7 +90,6 @@ class SfMTransfer(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index b364afb617..0a8d868807 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -50,7 +50,6 @@ class SfMTransform(desc.AVCommandLineNode): " - align_ground: Defines ground level from the point cloud density. It assumes that the scene is oriented.", value="auto", values=["transformation", "manual", "auto", "auto_from_cameras", "auto_from_cameras_x_axis", "auto_from_landmarks", "from_single_camera", "from_center_camera", "from_markers", "from_gps", "from_lineup", "align_ground"], - exclusive=True, ), desc.File( name="lineUp", @@ -248,7 +247,6 @@ class SfMTransform(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index 025dbf47cf..59e2c9cad3 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -126,7 +126,6 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Extension of the intermediate file export.", value=".abc", values=[".abc", ".ply"], - exclusive=True, invalidate=False, advanced=True, ), @@ -136,7 +135,6 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index dc716ba2ff..c6f17fc86c 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -37,7 +37,6 @@ class SfMBootStraping(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index db50eb3d42..73409d7b1a 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -153,7 +153,6 @@ class SfMExpanding(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SketchfabUpload.py b/meshroom/aliceVision/SketchfabUpload.py index 77288a8683..cb940b85c6 100644 --- a/meshroom/aliceVision/SketchfabUpload.py +++ b/meshroom/aliceVision/SketchfabUpload.py @@ -101,7 +101,6 @@ class SketchfabUpload(desc.Node): "CC Attribution-NonCommercial", "CC Attribution-NonCommercial-ShareAlike", "CC Attribution-NonCommercial-NoDerivs"], - exclusive=True, ), desc.ListAttribute( elementDesc=desc.StringParam( @@ -139,7 +138,6 @@ class SketchfabUpload(desc.Node): "science-technology", "sports-fitness", "weapons-military"], - exclusive=True, ), desc.BoolParam( name="isPublished", @@ -171,7 +169,6 @@ class SketchfabUpload(desc.Node): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index 776024e44f..cea9120d5a 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -76,7 +76,6 @@ class SphereDetection(desc.CommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index daadeb9a4b..733333fad2 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -40,7 +40,6 @@ class Split360Images(desc.AVCommandLineNode): description="Split mode (equirectangular, dualfisheye).", value="equirectangular", values=["equirectangular", "dualfisheye"], - exclusive=True, ), desc.GroupAttribute( name="dualFisheyeGroup", @@ -55,7 +54,6 @@ class Split360Images(desc.AVCommandLineNode): description="Dual-Fisheye X offset preset.", value="center", values=["center", "left", "right"], - exclusive=True, ), desc.ChoiceParam( name="dualFisheyeOffsetPresetY", @@ -63,7 +61,6 @@ class Split360Images(desc.AVCommandLineNode): description="Dual-Fisheye Y offset preset.", value="center", values=["center", "top", "bottom"], - exclusive=True, ), desc.ChoiceParam( name="dualFisheyeCameraModel", @@ -71,7 +68,6 @@ class Split360Images(desc.AVCommandLineNode): description="Dual-Fisheye camera model.", value="fisheye4", values=["fisheye4", "equidistant_r3"], - exclusive=True, ), ], ), @@ -117,7 +113,6 @@ class Split360Images(desc.AVCommandLineNode): description="Output image file extension.", value="", values=["", "exr", "jpg", "tiff", "png"], - exclusive=True, ), desc.ChoiceParam( name="verboseLevel", @@ -125,7 +120,6 @@ class Split360Images(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index f16c92f129..9c754e7e52 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -112,7 +112,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).", value="acransac", values=["acransac", "ransac", "lsmeds", "loransac", "maxconsensus"], - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -123,7 +122,6 @@ class StructureFromMotion(desc.AVCommandLineNode): " - Scale: Use reprojection error in pixel coordinates but relative to the feature scale.", value="Scale", values=["Basic", "Scale"], - exclusive=True, advanced=True, ), desc.IntParam( @@ -353,7 +351,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Extension of the intermediate file export.", value=".abc", values=[".abc", ".ply"], - exclusive=True, invalidate=False, advanced=True, ), @@ -371,7 +368,6 @@ class StructureFromMotion(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 6fab4ba645..057d3e7d0c 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -64,7 +64,6 @@ class Texturing(desc.AVCommandLineNode): description="Output texture size.", value=8192, values=[1024, 2048, 4096, 8192, 16384], - exclusive=True, ), desc.ChoiceParam( name="downscale", @@ -72,7 +71,6 @@ class Texturing(desc.AVCommandLineNode): description="Texture downscale factor.", value=2, values=[1, 2, 4, 8], - exclusive=True, ), desc.ChoiceParam( name="outputMeshFileType", @@ -80,7 +78,6 @@ class Texturing(desc.AVCommandLineNode): description="File type for the mesh output.", value="obj", values=["obj", "gltf", "fbx", "stl"], - exclusive=True, ), desc.GroupAttribute( name="colorMapping", @@ -103,7 +100,6 @@ class Texturing(desc.AVCommandLineNode): description="Texture file type.", value="exr", values=["exr", "png", "tiff", "jpg"], - exclusive=True, enabled=lambda node: node.colorMapping.enable.value, ), ], @@ -129,7 +125,6 @@ class Texturing(desc.AVCommandLineNode): description="Export normal map or height map.", value="Normal", values=["Height", "Normal"], - exclusive=True, enabled=lambda node: node.bumpMapping.enable.value, ), desc.ChoiceParam( @@ -138,7 +133,6 @@ class Texturing(desc.AVCommandLineNode): description="File type for the normal map texture.", value="exr", values=["exr", "png", "tiff", "jpg"], - exclusive=True, enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal", ), desc.ChoiceParam( @@ -147,7 +141,6 @@ class Texturing(desc.AVCommandLineNode): description="File type for the height map texture.", value="exr", values=["exr",], - exclusive=True, enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height", ), ], @@ -173,7 +166,6 @@ class Texturing(desc.AVCommandLineNode): description="File type for the height map texture.", value="exr", values=["exr"], - exclusive=True, enabled=lambda node: node.displacementMapping.enable.value, ), ], @@ -187,7 +179,6 @@ class Texturing(desc.AVCommandLineNode): " - ABF (<= 300k faces): optimize space and stretch. Generates one atlas.", value="Basic", values=["Basic", "LSCM", "ABF"], - exclusive=True, ), desc.BoolParam( name="useUDIM", @@ -282,7 +273,6 @@ class Texturing(desc.AVCommandLineNode): description="Color space for the texturing internal computation (does not impact the output file color space).", values=COLORSPACES, value="sRGB", - exclusive=True, advanced=True, ), desc.ChoiceParam( @@ -291,7 +281,6 @@ class Texturing(desc.AVCommandLineNode): description="Color space for the output texture files.", values=COLORSPACES, value="AUTO", - exclusive=True, ), desc.BoolParam( name="correctEV", @@ -320,7 +309,6 @@ class Texturing(desc.AVCommandLineNode): description="Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).", value="PullPush", values=["Pull", "Push", "PullPush", "MeshItself"], - exclusive=True, advanced=True, ), desc.FloatParam( @@ -340,7 +328,6 @@ class Texturing(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index c6cb841ea2..a3e06ccb7c 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -81,7 +81,6 @@ class TracksBuilding(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - exclusive=True, ), ] diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 76a0fe4c29..7853f9b1f0 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -95,7 +95,6 @@ class ScenePreview(desc.CommandLineNode): description="Color of particles used for the point cloud.", value="Red", values=["Grey", "White", "Red", "Green", "Magenta"], - exclusive=True, ), ], ), @@ -112,7 +111,6 @@ class ScenePreview(desc.CommandLineNode): description="Shading method for visualizing the mesh.", value="wireframe", values=["wireframe", "line_art"], - exclusive=True, ), desc.ChoiceParam( name="edgeColor", @@ -120,7 +118,6 @@ class ScenePreview(desc.CommandLineNode): description="Color of the mesh edges.", value="Red", values=["Grey", "White", "Red", "Green", "Magenta"], - exclusive=True, ), ], ), From 7b19eb07ee149dd27a065ebf48517b6173ba4872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 19 Sep 2024 11:27:05 +0200 Subject: [PATCH 1027/1093] [pipelines] Add distortion export for templates without calibration --- meshroom/cameraTrackingWithoutCalibration.mg | 16 +++++++++++++++- .../nodalCameraTrackingWithoutCalibration.mg | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index a7afc920ad..63f05ff608 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -10,6 +10,7 @@ "DepthMap": "5.0", "DepthMapFilter": "4.0", "ExportAnimatedCamera": "2.0", + "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", @@ -113,6 +114,19 @@ "color": "#80766f" } }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 1800, + 200 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}" + }, + "internalInputs": { + "color": "#80766f" + } + }, "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ @@ -341,7 +355,7 @@ "{ExportAnimatedCamera_1.output}", "{Texturing_1.output}", "{ScenePreview_1.output}", - "" + "{ExportDistortion_1.output}" ] } }, diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index dbe89928d9..56acfbb0d0 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -7,6 +7,7 @@ "CameraInit": "11.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", + "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", @@ -60,6 +61,19 @@ "color": "#80766f" } }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 1600, + 0 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}" + }, + "internalInputs": { + "color": "#80766f" + } + }, "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ @@ -145,7 +159,8 @@ "inputs": { "inputFiles": [ "{ExportAnimatedCamera_1.output}", - "{ScenePreview_1.output}" + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}" ] } }, From 5571a3d0e92afbe694f6d2c330ba5f332efba6e6 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 25 Sep 2024 13:54:17 +0200 Subject: [PATCH 1028/1093] use export distortion and new segmentation --- meshroom/cameraTracking.mg | 14 ++++---- meshroom/cameraTrackingWithoutCalibration.mg | 32 +++++++++++++------ meshroom/nodalCameraTracking.mg | 10 +++--- .../nodalCameraTrackingWithoutCalibration.mg | 32 +++++++++++++------ meshroom/photogrammetryAndCameraTracking.mg | 12 +++---- 5 files changed, 64 insertions(+), 36 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 924299fdeb..8c324dcc62 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -17,7 +17,7 @@ "FeatureMatching": "2.0", "ImageMatching": "2.0", "ImageMatchingMultiSfM": "1.0", - "ImageSegmentation": "1.2", + "ImageSegmentationPrompt": "0.1", "KeyframeSelection": "5.0", "MeshDecimate": "1.0", "MeshFiltering": "3.0", @@ -179,7 +179,7 @@ ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentation_1.output}", + "masksFolder": "{ImageSegmentationPrompt_1.output}", "maskExtension": "exr" }, "internalInputs": { @@ -292,8 +292,8 @@ "color": "#80766f" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", + "ImageSegmentationPrompt_1": { + "nodeType": "ImageSegmentationPrompt", "position": [ 0, 200 @@ -318,7 +318,7 @@ "{ApplyCalibration_1.output}" ], "maskPaths": [ - "{ImageSegmentation_1.output}" + "{ImageSegmentationPrompt_1.output}" ] }, "internalInputs": { @@ -380,7 +380,7 @@ "inputs": { "input": "{SfMTriangulation_1.output}", "masksFolders": [ - "{ImageSegmentation_1.output}" + "{ImageSegmentationPrompt_1.output}" ], "maskExtension": "exr" }, @@ -413,7 +413,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}" + "masks": "{ImageSegmentationPrompt_1.output}" }, "internalInputs": { "color": "#4c594c" diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 63f05ff608..c376616e13 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -6,6 +6,7 @@ "nodesVersions": { "ApplyCalibration": "1.0", "CameraInit": "11.0", + "ConvertDistortion": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", "DepthMapFilter": "4.0", @@ -15,7 +16,7 @@ "FeatureMatching": "2.0", "ImageMatching": "2.0", "ImageMatchingMultiSfM": "1.0", - "ImageSegmentation": "1.2", + "ImageSegmentationPrompt": "0.1", "KeyframeSelection": "5.0", "MeshDecimate": "1.0", "MeshFiltering": "3.0", @@ -54,6 +55,19 @@ "color": "#575963" } }, + "ConvertDistortion_1": { + "nodeType": "ConvertDistortion", + "position": [ + 1600, + 360 + ], + "inputs": { + "input": "{StructureFromMotion_1.output}" + }, + "internalInputs": { + "color": "#80766f" + } + }, "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ @@ -118,10 +132,10 @@ "nodeType": "ExportDistortion", "position": [ 1800, - 200 + 360 ], "inputs": { - "input": "{ExportAnimatedCamera_1.input}" + "input": "{ConvertDistortion_1.output}" }, "internalInputs": { "color": "#80766f" @@ -135,7 +149,7 @@ ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentation_1.output}", + "masksFolder": "{ImageSegmentationPrompt_1.output}", "maskExtension": "exr" }, "internalInputs": { @@ -248,8 +262,8 @@ "color": "#80766f" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", + "ImageSegmentationPrompt_1": { + "nodeType": "ImageSegmentationPrompt", "position": [ 0, 200 @@ -274,7 +288,7 @@ "{ApplyCalibration_1.output}" ], "maskPaths": [ - "{ImageSegmentation_1.output}" + "{ImageSegmentationPrompt_1.output}" ] }, "internalInputs": { @@ -336,7 +350,7 @@ "inputs": { "input": "{SfMTriangulation_1.output}", "masksFolders": [ - "{ImageSegmentation_1.output}" + "{ImageSegmentationPrompt_1.output}" ], "maskExtension": "exr" }, @@ -369,7 +383,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}" + "masks": "{ImageSegmentationPrompt_1.output}" }, "internalInputs": { "color": "#4c594c" diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 372509a234..49006d4ae5 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -14,7 +14,7 @@ "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", - "ImageSegmentation": "1.2", + "ImageSegmentationPrompt": "0.1", "NodalSfM": "2.0", "Publish": "1.3", "RelativePoseEstimating": "2.0", @@ -140,7 +140,7 @@ ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentation_1.output}" + "masksFolder": "{ImageSegmentationPrompt_1.output}" }, "internalInputs": { "color": "#80766f" @@ -178,8 +178,8 @@ "color": "#80766f" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", + "ImageSegmentationPrompt_1": { + "nodeType": "ImageSegmentationPrompt", "position": [ 0, 200 @@ -247,7 +247,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{NodalSfM_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}", + "masks": "{ImageSegmentationPrompt_1.output}", "pointCloudParams": { "particleSize": 0.001, "particleColor": "Red" diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 56acfbb0d0..8f6e300043 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -5,13 +5,14 @@ "template": true, "nodesVersions": { "CameraInit": "11.0", + "ConvertDistortion": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", - "ImageSegmentation": "1.2", + "ImageSegmentationPrompt": "0.1", "NodalSfM": "2.0", "Publish": "1.3", "RelativePoseEstimating": "2.0", @@ -31,6 +32,19 @@ "color": "#80766f" } }, + "ConvertDistortion_1": { + "nodeType": "ConvertDistortion", + "position": [ + 1600, + 0 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}" + }, + "internalInputs": { + "color": "#80766f" + } + }, "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ @@ -64,11 +78,11 @@ "ExportDistortion_1": { "nodeType": "ExportDistortion", "position": [ - 1600, + 1800, 0 ], "inputs": { - "input": "{ExportAnimatedCamera_1.input}" + "input": "{ConvertDistortion_1.output}" }, "internalInputs": { "color": "#80766f" @@ -81,8 +95,8 @@ 0 ], "inputs": { - "input": "{ImageSegmentation_1.input}", - "masksFolder": "{ImageSegmentation_1.output}" + "input": "{ImageSegmentationPrompt_1.input}", + "masksFolder": "{ImageSegmentationPrompt_1.output}" }, "internalInputs": { "color": "#80766f" @@ -120,8 +134,8 @@ "color": "#80766f" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", + "ImageSegmentationPrompt_1": { + "nodeType": "ImageSegmentationPrompt", "position": [ 0, 0 @@ -153,7 +167,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 1800, + 2000, 0 ], "inputs": { @@ -189,7 +203,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{NodalSfM_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}", + "masks": "{ImageSegmentationPrompt_1.output}", "pointCloudParams": { "particleSize": 0.001, "particleColor": "Red" diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 6ad033207a..ccd0f53c65 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -17,7 +17,7 @@ "FeatureMatching": "2.0", "ImageMatching": "2.0", "ImageMatchingMultiSfM": "1.0", - "ImageSegmentation": "1.2", + "ImageSegmentationPrompt": "0.1", "KeyframeSelection": "5.0", "MeshDecimate": "1.0", "MeshFiltering": "3.0", @@ -190,7 +190,7 @@ ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentation_1.output}", + "masksFolder": "{ImageSegmentationPrompt_1.output}", "maskExtension": "exr" }, "internalInputs": { @@ -383,8 +383,8 @@ "color": "#384a55" } }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", + "ImageSegmentationPrompt_1": { + "nodeType": "ImageSegmentationPrompt", "position": [ 0, 200 @@ -409,7 +409,7 @@ "{ApplyCalibration_1.output}" ], "maskPaths": [ - "{ImageSegmentation_1.output}" + "{ImageSegmentationPrompt_1.output}" ] }, "internalInputs": { @@ -495,7 +495,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentation_1.output}" + "masks": "{ImageSegmentationPrompt_1.output}" }, "internalInputs": { "color": "#4c594c" From 50b0a003661c159f4e6418550e395df9ac510b11 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 26 Sep 2024 08:39:30 +0200 Subject: [PATCH 1029/1093] remove export of lens grids --- meshroom/cameraTrackingWithoutCalibration.mg | 3 ++- meshroom/nodalCameraTrackingWithoutCalibration.mg | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index c376616e13..21dea17160 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -135,7 +135,8 @@ 360 ], "inputs": { - "input": "{ConvertDistortion_1.output}" + "input": "{ConvertDistortion_1.output}", + "exportLensGridsUndistorted": false }, "internalInputs": { "color": "#80766f" diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 8f6e300043..30d8c6c293 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -82,7 +82,8 @@ 0 ], "inputs": { - "input": "{ConvertDistortion_1.output}" + "input": "{ConvertDistortion_1.output}", + "exportLensGridsUndistorted": false }, "internalInputs": { "color": "#80766f" From 6075d6345db1bb3dc384eecbc625c8a40cd0a2da Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 30 Sep 2024 14:18:18 +0200 Subject: [PATCH 1030/1093] Use bindings for hdr brackets estimation --- meshroom/aliceVision/LdrToHdrCalibration.py | 100 +++---------------- meshroom/aliceVision/LdrToHdrMerge.py | 100 +++---------------- meshroom/aliceVision/LdrToHdrSampling.py | 104 ++++---------------- 3 files changed, 45 insertions(+), 259 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 516fed769b..54f7cb88d9 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -5,6 +5,9 @@ import os from collections import Counter +from pyalicevision import sfmData as avsfmdata +from pyalicevision import hdr as avhdr + from meshroom.core import desc from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL @@ -205,7 +208,7 @@ def update(cls, node): node.nbBrackets.value = 0 return - inputs = [] + inputs = avhdr.vectorli() for viewpoint in viewpoints: jsonMetadata = viewpoint.metadata.value if not jsonMetadata: @@ -232,97 +235,22 @@ def update(cls, node): # We assume that there is no multi-bracketing, so nothing to do. node.nbBrackets.value = 1 return - inputs.append((viewpoint.path.value, (float(fnumber), float(shutterSpeed), float(iso)))) - inputs.sort() - - exposureGroups = [] - exposures = [] - prevFnumber = 0.0 - prevShutterSpeed = 0.0 - prevIso = 0.0 - prevPath = None # Stores the dirname of the previous parsed image - prevExposure = None - newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) - for path, exp in inputs: - # If the dirname of the previous image and the dirname of the current image do not match, this means that the - # dataset that is being parsed has changed. A new group needs to be created but will fail to be detected in the - # next "if" statement if the new dataset's exposure levels are different. Setting "newGroup" to True prevents this - # from happening. - if prevPath is not None and prevPath != os.path.dirname(path): - newGroup = True - - currentExposure = LdrToHdrCalibration.getExposure(exp) - # Create a new group if the current image's exposure level is smaller than the previous image's, or - # if a new dataset has been detected (with a change in the path of the images). - if prevExposure and currentExposure < prevExposure or newGroup: - exposureGroups.append(exposures) - exposures = [exp] - else: - exposures.append(exp) + exposure = LdrToHdrCalibration.getExposure((float(fnumber), float(shutterSpeed), float(iso))) - prevPath = os.path.dirname(path) - prevExposure = currentExposure - newGroup = False + obj = avhdr.LuminanceInfo(viewpoint.viewId.value,viewpoint.path.value, exposure) + inputs.append(obj) - exposureGroups.append(exposures) + obj = avhdr.estimateGroups(inputs) - exposures = None - bracketSizes = Counter() - if len(exposureGroups) == 1: - if len(set(exposureGroups[0])) == 1: - # Single exposure and multiple views - node.nbBrackets.value = 1 - else: - # Single view and multiple exposures - node.nbBrackets.value = len(exposureGroups[0]) - else: - for expGroup in exposureGroups: - bracketSizes[len(expGroup)] += 1 - - if len(bracketSizes) == 0: - node.nbBrackets.value = 0 - else: - bestTuple = None - for tuple in bracketSizes.most_common(): - if bestTuple is None or tuple[1] > bestTuple[1]: - bestTuple = tuple - elif tuple[1] == bestTuple[1]: - bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple + if len(obj) == 0: + node.nbBrackets.value = 0 + return - bestBracketSize = bestTuple[0] - node.nbBrackets.value = bestBracketSize + node.nbBrackets.value = len(obj[0]) @staticmethod def getExposure(exp, refIso = 100.0, refFnumber = 1.0): fnumber, shutterSpeed, iso = exp - - validShutterSpeed = shutterSpeed > 0.0 and math.isfinite(shutterSpeed) - validFnumber = fnumber > 0.0 and math.isfinite(fnumber) - - if not validShutterSpeed and not validFnumber: - return -1.0 - - validRefFnumber = refFnumber > 0.0 and math.isfinite(refFnumber) - - if not validShutterSpeed: - shutterSpeed = 1.0 / 200.0 - - if not validFnumber: - if validRefFnumber: - fnumber = refFnumber - else: - fnumber = 2.0 - - lRefFnumber = refFnumber - if not validRefFnumber: - lRefFnumber = fnumber - - isoToAperture = 1.0 - if iso > 1e-6 and refIso > 1e-6: - isoToAperture = math.sqrt(iso / refIso) - - newFnumber = fnumber * isoToAperture - expIncrease = (lRefFnumber / newFnumber) * (lRefFnumber / newFnumber) - - return shutterSpeed * expIncrease + obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso) + return obj.getExposure() diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index acc080342a..d30b6d6d66 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -5,6 +5,9 @@ import math from collections import Counter +from pyalicevision import sfmData as avsfmdata +from pyalicevision import hdr as avhdr + from meshroom.core import desc from meshroom.core.utils import COLORSPACES, EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL @@ -278,7 +281,7 @@ def update(cls, node): node.nbBrackets.value = 0 return - inputs = [] + inputs = avhdr.vectorli() for viewpoint in viewpoints: jsonMetadata = viewpoint.metadata.value if not jsonMetadata: @@ -305,100 +308,25 @@ def update(cls, node): # We assume that there is no multi-bracketing, so nothing to do. node.nbBrackets.value = 1 return - inputs.append((viewpoint.path.value, (float(fnumber), float(shutterSpeed), float(iso)))) - inputs.sort() - - exposureGroups = [] - exposures = [] - prevFnumber = 0.0 - prevShutterSpeed = 0.0 - prevIso = 0.0 - prevPath = None # Stores the dirname of the previous parsed image - prevExposure = None - newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) - for path, exp in inputs: - # If the dirname of the previous image and the dirname of the current image do not match, this means that the - # dataset that is being parsed has changed. A new group needs to be created but will fail to be detected in the - # next "if" statement if the new dataset's exposure levels are different. Setting "newGroup" to True prevents this - # from happening. - if prevPath is not None and prevPath != os.path.dirname(path): - newGroup = True - - currentExposure = LdrToHdrMerge.getExposure(exp) - # Create a new group if the current image's exposure level is smaller than the previous image's, or - # if a new dataset has been detected (with a change in the path of the images). - if prevExposure and currentExposure < prevExposure or newGroup: - exposureGroups.append(exposures) - exposures = [exp] - else: - exposures.append(exp) + exposure = LdrToHdrMerge.getExposure((float(fnumber), float(shutterSpeed), float(iso))) - prevPath = os.path.dirname(path) - prevExposure = currentExposure - newGroup = False + obj = avhdr.LuminanceInfo(viewpoint.viewId.value,viewpoint.path.value, exposure) + inputs.append(obj) - exposureGroups.append(exposures) + obj = avhdr.estimateGroups(inputs) - exposures = None - bracketSizes = Counter() - if len(exposureGroups) == 1: - if len(set(exposureGroups[0])) == 1: - # Single exposure and multiple views - node.nbBrackets.value = 1 - else: - # Single view and multiple exposures - node.nbBrackets.value = len(exposureGroups[0]) - else: - for expGroup in exposureGroups: - bracketSizes[len(expGroup)] += 1 - - if len(bracketSizes) == 0: - node.nbBrackets.value = 0 - else: - bestTuple = None - for tuple in bracketSizes.most_common(): - if bestTuple is None or tuple[1] > bestTuple[1]: - bestTuple = tuple - elif tuple[1] == bestTuple[1]: - bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple + if len(obj) == 0: + node.nbBrackets.value = 0 + return - bestBracketSize = bestTuple[0] - node.nbBrackets.value = bestBracketSize + node.nbBrackets.value = len(obj[0]) @staticmethod def getExposure(exp, refIso = 100.0, refFnumber = 1.0): fnumber, shutterSpeed, iso = exp - - validShutterSpeed = shutterSpeed > 0.0 and math.isfinite(shutterSpeed) - validFnumber = fnumber > 0.0 and math.isfinite(fnumber) - - if not validShutterSpeed and not validFnumber: - return -1.0 - - validRefFnumber = refFnumber > 0.0 and math.isfinite(refFnumber) - - if not validShutterSpeed: - shutterSpeed = 1.0 / 200.0 - - if not validFnumber: - if validRefFnumber: - fnumber = refFnumber - else: - fnumber = 2.0 - - lRefFnumber = refFnumber - if not validRefFnumber: - lRefFnumber = fnumber - - isoToAperture = 1.0 - if iso > 1e-6 and refIso > 1e-6: - isoToAperture = math.sqrt(iso / refIso) - - newFnumber = fnumber * isoToAperture - expIncrease = (lRefFnumber / newFnumber) * (lRefFnumber / newFnumber) - - return shutterSpeed * expIncrease + obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso) + return obj.getExposure() def processChunk(self, chunk): # Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic. diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 64dd7ee37e..3646c892cf 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -5,6 +5,9 @@ import os from collections import Counter +from pyalicevision import sfmData as avsfmdata +from pyalicevision import hdr as avhdr + from meshroom.core import desc from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL @@ -231,7 +234,7 @@ def update(cls, node): node.nbBrackets.value = 0 return - inputs = [] + inputs = avhdr.vectorli() for viewpoint in viewpoints: jsonMetadata = viewpoint.metadata.value if not jsonMetadata: @@ -258,99 +261,26 @@ def update(cls, node): # We assume that there is no multi-bracketing, so nothing to do. node.nbBrackets.value = 1 return - inputs.append((viewpoint.path.value, (float(fnumber), float(shutterSpeed), float(iso)))) - inputs.sort() - - exposureGroups = [] - exposures = [] - prevFnumber = 0.0 - prevShutterSpeed = 0.0 - prevIso = 0.0 - prevPath = None # Stores the dirname of the previous parsed image - prevExposure = None - newGroup = False # True if a new exposure group needs to be created (useful when there are several datasets) - for path, exp in inputs: - # If the dirname of the previous image and the dirname of the current image do not match, this means that the - # dataset that is being parsed has changed. A new group needs to be created but will fail to be detected in the - # next "if" statement if the new dataset's exposure levels are different. Setting "newGroup" to True prevents this - # from happening. - if prevPath is not None and prevPath != os.path.dirname(path): - newGroup = True - - currentExposure = LdrToHdrSampling.getExposure(exp) - # Create a new group if the current image's exposure level is smaller than the previous image's, or - # if a new dataset has been detected (with a change in the path of the images). - if prevExposure and currentExposure < prevExposure or newGroup: - exposureGroups.append(exposures) - exposures = [exp] - else: - exposures.append(exp) + exposure = LdrToHdrSampling.getExposure((float(fnumber), float(shutterSpeed), float(iso))) - prevPath = os.path.dirname(path) - prevExposure = currentExposure - newGroup = False + obj = avhdr.LuminanceInfo(viewpoint.viewId.value,viewpoint.path.value, exposure) + inputs.append(obj) - exposureGroups.append(exposures) + obj = avhdr.estimateGroups(inputs) - exposures = None - bracketSizes = Counter() - if len(exposureGroups) == 1: - if len(set(exposureGroups[0])) == 1: - # Single exposure and multiple views - node.nbBrackets.value = 1 - else: - # Single view and multiple exposures - node.nbBrackets.value = len(exposureGroups[0]) - else: - for expGroup in exposureGroups: - bracketSizes[len(expGroup)] += 1 + if len(obj) == 0: + node.nbBrackets.value = 0 + return - if len(bracketSizes) == 0: - node.nbBrackets.value = 0 - else: - bestTuple = None - for tuple in bracketSizes.most_common(): - if bestTuple is None or tuple[1] > bestTuple[1]: - bestTuple = tuple - elif tuple[1] == bestTuple[1]: - bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple + bracketSize = len(obj[0]) + bracketCount = len(obj) - bestBracketSize = bestTuple[0] - bestCount = bestTuple[1] - node.outliersNb = len(inputs) - (bestBracketSize * bestCount) # Compute number of outliers - node.nbBrackets.value = bestBracketSize + node.nbBrackets.value = bracketSize + node.outliersNb = len(inputs) - (bracketSize * bracketCount) @staticmethod def getExposure(exp, refIso = 100.0, refFnumber = 1.0): fnumber, shutterSpeed, iso = exp - - validShutterSpeed = shutterSpeed > 0.0 and math.isfinite(shutterSpeed) - validFnumber = fnumber > 0.0 and math.isfinite(fnumber) - - if not validShutterSpeed and not validFnumber: - return -1.0 - - validRefFnumber = refFnumber > 0.0 and math.isfinite(refFnumber) - - if not validShutterSpeed: - shutterSpeed = 1.0 / 200.0 - - if not validFnumber: - if validRefFnumber: - fnumber = refFnumber - else: - fnumber = 2.0 - - lRefFnumber = refFnumber - if not validRefFnumber: - lRefFnumber = fnumber - - isoToAperture = 1.0 - if iso > 1e-6 and refIso > 1e-6: - isoToAperture = math.sqrt(iso / refIso) - - newFnumber = fnumber * isoToAperture - expIncrease = (lRefFnumber / newFnumber) * (lRefFnumber / newFnumber) - - return shutterSpeed * expIncrease + obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso) + return obj.getExposure() From 0db7ea652a46f3e3026069d914f4e331bf192d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 11 Oct 2024 19:12:23 +0200 Subject: [PATCH 1031/1093] [nodes] `LightingCalibration`: Exclude visualization output from command line --- meshroom/aliceVision/LightingCalibration.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index 4cb25d8eb7..d4a1eee72d 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -68,5 +68,6 @@ class LightingCalibration(desc.CommandLineNode): description="Estimated Lighting Visualization.", semantic="image", value=desc.Node.internalFolder + "/<FILESTEM>_{methodValue}.png", + group=None, ), ] From f1f2f409460f34d2b2abd7efcb1019375abee9c1 Mon Sep 17 00:00:00 2001 From: "Fabien Servant @ TCS" <100348063+servantftechnicolor@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:41:19 +0200 Subject: [PATCH 1032/1093] Change sfmData version --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 8a48f491fd..799a931b66 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -664,7 +664,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 10], + "version": [1, 2, 11], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From d9c6ec876c18d1a81c989923d96798b0dd885a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 15 Oct 2024 10:15:51 +0200 Subject: [PATCH 1033/1093] [nodes] LdrToHdr: Move import of `pyalicevision` within functions Since `pyalicevision`, which is provided outside of Meshroom's repository, is now needed for all the LdrToHdr nodes, importing `pyalicevision` at the function level rather than at the file level allows the CI to pass even if `pyalicevision` is not available. --- meshroom/aliceVision/LdrToHdrCalibration.py | 7 ++++--- meshroom/aliceVision/LdrToHdrMerge.py | 7 ++++--- meshroom/aliceVision/LdrToHdrSampling.py | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index 54f7cb88d9..f307841dcc 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -5,9 +5,6 @@ import os from collections import Counter -from pyalicevision import sfmData as avsfmdata -from pyalicevision import hdr as avhdr - from meshroom.core import desc from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL @@ -174,6 +171,8 @@ def processChunk(self, chunk): @classmethod def update(cls, node): + from pyalicevision import hdr as avhdr + if not isinstance(node.nodeDesc, cls): raise ValueError("Node {} is not an instance of type {}".format(node, cls)) # TODO: use Node version for this test @@ -251,6 +250,8 @@ def update(cls, node): @staticmethod def getExposure(exp, refIso = 100.0, refFnumber = 1.0): + from pyalicevision import sfmData as avsfmdata + fnumber, shutterSpeed, iso = exp obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso) return obj.getExposure() diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index d30b6d6d66..9f22fb605b 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -5,9 +5,6 @@ import math from collections import Counter -from pyalicevision import sfmData as avsfmdata -from pyalicevision import hdr as avhdr - from meshroom.core import desc from meshroom.core.utils import COLORSPACES, EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL @@ -247,6 +244,8 @@ class LdrToHdrMerge(desc.AVCommandLineNode): @classmethod def update(cls, node): + from pyalicevision import hdr as avhdr + if not isinstance(node.nodeDesc, cls): raise ValueError("Node {} is not an instance of type {}".format(node, cls)) # TODO: use Node version for this test @@ -324,6 +323,8 @@ def update(cls, node): @staticmethod def getExposure(exp, refIso = 100.0, refFnumber = 1.0): + from pyalicevision import sfmData as avsfmdata + fnumber, shutterSpeed, iso = exp obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso) return obj.getExposure() diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 3646c892cf..731d413e12 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -5,9 +5,6 @@ import os from collections import Counter -from pyalicevision import sfmData as avsfmdata -from pyalicevision import hdr as avhdr - from meshroom.core import desc from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL @@ -199,6 +196,8 @@ def processChunk(self, chunk): @classmethod def update(cls, node): + from pyalicevision import hdr as avhdr + if not isinstance(node.nodeDesc, cls): raise ValueError("Node {} is not an instance of type {}".format(node, cls)) # TODO: use Node version for this test @@ -281,6 +280,8 @@ def update(cls, node): @staticmethod def getExposure(exp, refIso = 100.0, refFnumber = 1.0): + from pyalicevision import sfmData as avsfmdata + fnumber, shutterSpeed, iso = exp obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso) return obj.getExposure() From 2591cbc03d6602e87a590a2d49d5df6fda421c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 15 Oct 2024 12:53:38 +0200 Subject: [PATCH 1034/1093] [nodes] LdrToHdr: Remove unused Python imports --- meshroom/aliceVision/LdrToHdrCalibration.py | 3 --- meshroom/aliceVision/LdrToHdrMerge.py | 3 --- meshroom/aliceVision/LdrToHdrSampling.py | 3 --- 3 files changed, 9 deletions(-) diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index f307841dcc..e600656ccb 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -1,9 +1,6 @@ __version__ = "3.1" import json -import math -import os -from collections import Counter from meshroom.core import desc from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index 9f22fb605b..e4c31de0f6 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -1,9 +1,6 @@ __version__ = "4.1" import json -import os -import math -from collections import Counter from meshroom.core import desc from meshroom.core.utils import COLORSPACES, EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 731d413e12..3a091a39be 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -1,9 +1,6 @@ __version__ = "4.0" import json -import math -import os -from collections import Counter from meshroom.core import desc from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL From 3694967028d01da71586161d2bf3fd1e3f5d53d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 3 Oct 2024 17:50:41 +0200 Subject: [PATCH 1035/1093] [nodes] `Publish`: Exposed the input list of files --- meshroom/aliceVision/Publish.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meshroom/aliceVision/Publish.py b/meshroom/aliceVision/Publish.py index 05024aa94b..2d41ef1336 100644 --- a/meshroom/aliceVision/Publish.py +++ b/meshroom/aliceVision/Publish.py @@ -28,6 +28,7 @@ class Publish(desc.Node): name="inputFiles", label="Input Files", description="Input files or folders' content to publish.", + exposed=True, group="", ), desc.File( From 8f044fd30c1d635e908ebf76d2ba324e2991e3c5 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 17 Oct 2024 10:47:21 +0200 Subject: [PATCH 1036/1093] adapt scene preview to pixelratio --- meshroom/blender/scripts/preview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/blender/scripts/preview.py b/meshroom/blender/scripts/preview.py index 2d6e1a9e8f..ba4d431860 100644 --- a/meshroom/blender/scripts/preview.py +++ b/meshroom/blender/scripts/preview.py @@ -102,7 +102,7 @@ def setupCamera(intrinsic, pose): bpy.context.scene.render.pixel_aspect_x = float(intrinsic['pixelRatio']) camData.sensor_width = float(intrinsic['sensorWidth']) - camData.lens = float(intrinsic['focalLength']) + camData.lens = float(intrinsic['focalLength']) / float(intrinsic['pixelRatio']) #shift is normalized with the largest resolution fwidth = float(intrinsic['width']) From 35bde852d5d51db47d5d33cd51eb0181ea305d77 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 3 Oct 2024 09:36:45 +0200 Subject: [PATCH 1037/1093] Depth/normal map rendering nodes --- meshroom/aliceVision/DepthMapRendering.py | 60 ++++++++++++++++++++++ meshroom/aliceVision/NormalMapRendering.py | 52 +++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 meshroom/aliceVision/DepthMapRendering.py create mode 100644 meshroom/aliceVision/NormalMapRendering.py diff --git a/meshroom/aliceVision/DepthMapRendering.py b/meshroom/aliceVision/DepthMapRendering.py new file mode 100644 index 0000000000..508550b739 --- /dev/null +++ b/meshroom/aliceVision/DepthMapRendering.py @@ -0,0 +1,60 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class DepthMapRendering(desc.AVCommandLineNode): + commandLine = "aliceVision_depthMapRendering {allParams}" + + category = "Utils" + documentation = """ + Using camera parameters and mesh, render depthmaps for each view + """ + + inputs = [ + desc.File( + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", + ), + desc.File( + name="mesh", + label="Input Mesh", + description="Input mesh file.", + value="", + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Folder", + description="Output folder.", + value=desc.Node.internalFolder, + ), + desc.File( + name="depth", + label="Depth Maps", + description="Rendered depth maps.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", + group="", # do not export on the command line + ), + desc.File( + name="mask", + label="Masks", + description="Masks.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_mask.exr", + group="", # do not export on the command line + ), + ] diff --git a/meshroom/aliceVision/NormalMapRendering.py b/meshroom/aliceVision/NormalMapRendering.py new file mode 100644 index 0000000000..7ccbff9809 --- /dev/null +++ b/meshroom/aliceVision/NormalMapRendering.py @@ -0,0 +1,52 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class NormalMapRendering(desc.AVCommandLineNode): + commandLine = "aliceVision_normalMapRendering {allParams}" + + category = "Utils" + documentation = """ + Using camera parameters and mesh, render normalmaps for each view + """ + + inputs = [ + desc.File( + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", + ), + desc.File( + name="mesh", + label="Input Mesh", + description="Input mesh file.", + value="", + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Folder", + description="Output folder.", + value=desc.Node.internalFolder, + ), + desc.File( + name="normal", + label="Normal Maps", + description="Rendered normal maps.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr", + group="", # do not export on the command line + ), + ] From 9b7d4eb01cba2c96778d172634aed8d24d99b8a8 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 18 Oct 2024 10:11:15 +0200 Subject: [PATCH 1038/1093] Enable display of contact sheets --- meshroom/aliceVision/PanoramaInit.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index a334752b34..1e59afb2a3 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -142,6 +142,15 @@ class PanoramaInit(desc.AVCommandLineNode): ] outputs = [ + desc.File( + name="contactSheet", + label="Contact sheet", + semantic="image", + description="Contact sheet path.", + value=desc.Node.internalFolder + "contactSheetImage.jpg", + group="", # do not export on the command line + enabled=lambda node: node.buildContactSheet.enabled + ), desc.File( name="outSfMData", label="SfMData File", From d61960c91befe50fa9c8616047d9ad8dc3542648 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 18 Oct 2024 10:11:47 +0200 Subject: [PATCH 1039/1093] Display panorama preview instead of full resolution --- meshroom/aliceVision/PanoramaPostProcessing.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index ea859024a8..54d60552a1 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -102,13 +102,6 @@ class PanoramaPostProcessing(desc.CommandLineNode): ] outputs = [ - desc.File( - name="outputPanorama", - label="Output Panorama", - description="Generated panorama in EXR format.", - semantic="image", - value=lambda attr: desc.Node.internalFolder + attr.node.panoramaName.value, - ), desc.File( name="outputPanoramaPreview", label="Output Panorama Preview", @@ -116,6 +109,13 @@ class PanoramaPostProcessing(desc.CommandLineNode): semantic="image", value=lambda attr: desc.Node.internalFolder + attr.node.previewName.value, ), + desc.File( + name="outputPanorama", + label="Output Panorama", + description="Generated panorama in EXR format.", + semantic="image", + value=lambda attr: desc.Node.internalFolder + attr.node.panoramaName.value, + ), desc.File( name="downscaledPanoramaLevels", label="Downscaled Panorama Levels", From bbe619056fa4be21509998e0df96f0a048cd93dd Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 23 Oct 2024 15:17:47 +0200 Subject: [PATCH 1040/1093] Add animated distortion option --- meshroom/aliceVision/ExportDistortion.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 799b457464..9e2e53cab1 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -27,6 +27,12 @@ class ExportDistortion(desc.AVCommandLineNode): "Only supports 3DEqualizer lens models.", value=True, ), + desc.BoolParam( + name="exportAnimatedNukeNode", + label="Export Animated Nuke Node", + description="Export animated distortion for this sequence as nuke file.", + value=False, + ), desc.BoolParam( name="exportLensGridsUndistorted", label="Export Lens Grids Undistorted", From 1c49c1ccef0973e988d8aed0e096614e9e41b076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 28 Oct 2024 15:15:46 +0000 Subject: [PATCH 1041/1093] [pipelines] Updates tracking pipelines with new segmentation nodes The segmentation process is now split into two nodes: `ImageDetectionPrompt` and `ImageSegmentationBox`, which replace the `ImageSegmentationPrompt` in the camera tracking templates. All the nodes in the templates are also correctly realigned. --- meshroom/cameraTracking.mg | 41 ++++--- meshroom/cameraTrackingWithoutCalibration.mg | 41 ++++--- meshroom/nodalCameraTracking.mg | 49 ++++++--- .../nodalCameraTrackingWithoutCalibration.mg | 35 ++++-- meshroom/photogrammetryAndCameraTracking.mg | 102 ++++++++++-------- 5 files changed, 163 insertions(+), 105 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 8c324dcc62..dbf74029d0 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -15,9 +15,10 @@ "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", "ImageMatching": "2.0", "ImageMatchingMultiSfM": "1.0", - "ImageSegmentationPrompt": "0.1", + "ImageSegmentationBox": "0.1", "KeyframeSelection": "5.0", "MeshDecimate": "1.0", "MeshFiltering": "3.0", @@ -174,12 +175,12 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 200, + 400, 200 ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentationPrompt_1.output}", + "masksFolder": "{ImageSegmentationBox_1.output}", "maskExtension": "exr" }, "internalInputs": { @@ -236,6 +237,19 @@ "color": "#80766f" } }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ @@ -292,14 +306,15 @@ "color": "#80766f" } }, - "ImageSegmentationPrompt_1": { - "nodeType": "ImageSegmentationPrompt", + "ImageSegmentationBox_1": { + "nodeType": "ImageSegmentationBox", "position": [ - 0, + 200, 200 ], "inputs": { - "input": "{CameraInit_1.output}", + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}", "maskInvert": true, "keepFilename": true }, @@ -316,9 +331,6 @@ "inputs": { "inputPaths": [ "{ApplyCalibration_1.output}" - ], - "maskPaths": [ - "{ImageSegmentationPrompt_1.output}" ] }, "internalInputs": { @@ -379,9 +391,6 @@ ], "inputs": { "input": "{SfMTriangulation_1.output}", - "masksFolders": [ - "{ImageSegmentationPrompt_1.output}" - ], "maskExtension": "exr" }, "internalInputs": { @@ -391,8 +400,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3574, - 166 + 3600, + 100 ], "inputs": { "inputFiles": [ @@ -413,7 +422,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentationPrompt_1.output}" + "masks": "{ImageSegmentationBox_1.output}" }, "internalInputs": { "color": "#4c594c" diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 21dea17160..98a4886b9f 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -14,9 +14,10 @@ "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", "ImageMatching": "2.0", "ImageMatchingMultiSfM": "1.0", - "ImageSegmentationPrompt": "0.1", + "ImageSegmentationBox": "0.1", "KeyframeSelection": "5.0", "MeshDecimate": "1.0", "MeshFiltering": "3.0", @@ -145,12 +146,12 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 200, + 400, 200 ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentationPrompt_1.output}", + "masksFolder": "{ImageSegmentationBox_1.output}", "maskExtension": "exr" }, "internalInputs": { @@ -207,6 +208,19 @@ "color": "#80766f" } }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ @@ -263,14 +277,15 @@ "color": "#80766f" } }, - "ImageSegmentationPrompt_1": { - "nodeType": "ImageSegmentationPrompt", + "ImageSegmentationBox_1": { + "nodeType": "ImageSegmentationBox", "position": [ - 0, + 200, 200 ], "inputs": { - "input": "{CameraInit_1.output}", + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}", "maskInvert": true, "keepFilename": true }, @@ -287,9 +302,6 @@ "inputs": { "inputPaths": [ "{ApplyCalibration_1.output}" - ], - "maskPaths": [ - "{ImageSegmentationPrompt_1.output}" ] }, "internalInputs": { @@ -350,9 +362,6 @@ ], "inputs": { "input": "{SfMTriangulation_1.output}", - "masksFolders": [ - "{ImageSegmentationPrompt_1.output}" - ], "maskExtension": "exr" }, "internalInputs": { @@ -362,8 +371,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3574, - 166 + 3600, + 100 ], "inputs": { "inputFiles": [ @@ -384,7 +393,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentationPrompt_1.output}" + "masks": "{ImageSegmentationBox_1.output}" }, "internalInputs": { "color": "#4c594c" diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 49006d4ae5..2e7b6c6b7f 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -13,8 +13,9 @@ "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", "ImageMatching": "2.0", - "ImageSegmentationPrompt": "0.1", + "ImageSegmentationBox": "0.1", "NodalSfM": "2.0", "Publish": "1.3", "RelativePoseEstimating": "2.0", @@ -78,7 +79,7 @@ "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ - 1400, + 1600, 200 ], "inputs": { @@ -108,7 +109,7 @@ "ExportAnimatedCamera_1": { "nodeType": "ExportAnimatedCamera", "position": [ - 1400, + 1600, 0 ], "inputs": { @@ -135,12 +136,12 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 200, + 400, 0 ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentationPrompt_1.output}" + "masksFolder": "{ImageSegmentationBox_1.output}" }, "internalInputs": { "color": "#80766f" @@ -149,7 +150,7 @@ "FeatureMatching_1": { "nodeType": "FeatureMatching", "position": [ - 600, + 800, 0 ], "inputs": { @@ -162,10 +163,23 @@ "color": "#80766f" } }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#80766f" + } + }, "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ - 400, + 600, 0 ], "inputs": { @@ -178,14 +192,15 @@ "color": "#80766f" } }, - "ImageSegmentationPrompt_1": { - "nodeType": "ImageSegmentationPrompt", + "ImageSegmentationBox_1": { + "nodeType": "ImageSegmentationBox", "position": [ - 0, + 200, 200 ], "inputs": { - "input": "{CameraInit_1.output}", + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}", "maskInvert": true, "keepFilename": true }, @@ -196,7 +211,7 @@ "NodalSfM_1": { "nodeType": "NodalSfM", "position": [ - 1200, + 1400, 0 ], "inputs": { @@ -211,7 +226,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 1800, + 2000, 0 ], "inputs": { @@ -225,7 +240,7 @@ "RelativePoseEstimating_1": { "nodeType": "RelativePoseEstimating", "position": [ - 1000, + 1200, 0 ], "inputs": { @@ -240,14 +255,14 @@ "ScenePreview_1": { "nodeType": "ScenePreview", "position": [ - 1600, + 1800, 200 ], "inputs": { "cameras": "{ConvertSfMFormat_1.output}", "model": "{NodalSfM_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentationPrompt_1.output}", + "masks": "{ImageSegmentationBox_1.output}", "pointCloudParams": { "particleSize": 0.001, "particleColor": "Red" @@ -260,7 +275,7 @@ "TracksBuilding_1": { "nodeType": "TracksBuilding", "position": [ - 800, + 1000, 0 ], "inputs": { diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 30d8c6c293..b67064aba8 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -11,8 +11,9 @@ "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", "ImageMatching": "2.0", - "ImageSegmentationPrompt": "0.1", + "ImageSegmentationBox": "0.1", "NodalSfM": "2.0", "Publish": "1.3", "RelativePoseEstimating": "2.0", @@ -24,7 +25,7 @@ "CameraInit_1": { "nodeType": "CameraInit", "position": [ - -200, + -400, 0 ], "inputs": {}, @@ -96,8 +97,8 @@ 0 ], "inputs": { - "input": "{ImageSegmentationPrompt_1.input}", - "masksFolder": "{ImageSegmentationPrompt_1.output}" + "input": "{ImageSegmentationBox_1.input}", + "masksFolder": "{ImageSegmentationBox_1.output}" }, "internalInputs": { "color": "#80766f" @@ -119,6 +120,19 @@ "color": "#80766f" } }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + -200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#80766f" + } + }, "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ @@ -135,14 +149,15 @@ "color": "#80766f" } }, - "ImageSegmentationPrompt_1": { - "nodeType": "ImageSegmentationPrompt", + "ImageSegmentationBox_1": { + "nodeType": "ImageSegmentationBox", "position": [ 0, 0 ], "inputs": { - "input": "{CameraInit_1.output}", + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}", "maskInvert": true, "keepFilename": true }, @@ -168,8 +183,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 2000, - 0 + 2100, + 100 ], "inputs": { "inputFiles": [ @@ -204,7 +219,7 @@ "cameras": "{ConvertSfMFormat_1.output}", "model": "{NodalSfM_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentationPrompt_1.output}", + "masks": "{ImageSegmentationBox_1.output}", "pointCloudParams": { "particleSize": 0.001, "particleColor": "Red" diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index ccd0f53c65..4f79b5749b 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -15,9 +15,10 @@ "ExportDistortion": "1.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", "ImageMatching": "2.0", "ImageMatchingMultiSfM": "1.0", - "ImageSegmentationPrompt": "0.1", + "ImageSegmentationBox": "0.1", "KeyframeSelection": "5.0", "MeshDecimate": "1.0", "MeshFiltering": "3.0", @@ -71,8 +72,8 @@ "CameraInit_3": { "nodeType": "CameraInit", "position": [ - -594, - -584 + -600, + -500 ], "inputs": {}, "internalInputs": { @@ -98,8 +99,8 @@ "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ - 1948, - 211 + 2000, + 200 ], "inputs": { "input": "{ExportAnimatedCamera_1.input}", @@ -115,8 +116,8 @@ "DepthMapFilter_2": { "nodeType": "DepthMapFilter", "position": [ - 806, - -584 + 800, + -500 ], "inputs": { "input": "{DepthMap_2.input}", @@ -129,8 +130,8 @@ "DepthMap_2": { "nodeType": "DepthMap", "position": [ - 606, - -584 + 600, + -500 ], "inputs": { "input": "{PrepareDenseScene_2.input}", @@ -185,12 +186,12 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 200, + 400, 200 ], "inputs": { "input": "{ApplyCalibration_1.output}", - "masksFolder": "{ImageSegmentationPrompt_1.output}", + "masksFolder": "{ImageSegmentationBox_2.output}", "maskExtension": "exr" }, "internalInputs": { @@ -200,8 +201,8 @@ "FeatureExtraction_2": { "nodeType": "FeatureExtraction", "position": [ - -394, - -584 + -400, + -500 ], "inputs": { "input": "{CameraInit_3.output}" @@ -263,8 +264,8 @@ "FeatureMatching_4": { "nodeType": "FeatureMatching", "position": [ - 6, - -584 + 0, + -500 ], "inputs": { "input": "{ImageMatching_3.input}", @@ -279,7 +280,7 @@ "FeatureMatching_5": { "nodeType": "FeatureMatching", "position": [ - 607, + 600, -300 ], "inputs": { @@ -292,6 +293,19 @@ "color": "#575963" } }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ @@ -315,8 +329,8 @@ "ImageMatchingMultiSfM_2": { "nodeType": "ImageMatchingMultiSfM", "position": [ - 401, - -299 + 400, + -300 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", @@ -370,8 +384,8 @@ "ImageMatching_3": { "nodeType": "ImageMatching", "position": [ - -194, - -584 + -200, + -500 ], "inputs": { "input": "{FeatureExtraction_2.input}", @@ -383,16 +397,15 @@ "color": "#384a55" } }, - "ImageSegmentationPrompt_1": { - "nodeType": "ImageSegmentationPrompt", + "ImageSegmentationBox_2": { + "nodeType": "ImageSegmentationBox", "position": [ - 0, + 200, 200 ], "inputs": { - "input": "{CameraInit_1.output}", - "maskInvert": true, - "keepFilename": true + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}" }, "internalInputs": { "color": "#575963" @@ -407,9 +420,6 @@ "inputs": { "inputPaths": [ "{ApplyCalibration_1.output}" - ], - "maskPaths": [ - "{ImageSegmentationPrompt_1.output}" ] }, "internalInputs": { @@ -419,8 +429,8 @@ "MeshDecimate_1": { "nodeType": "MeshDecimate", "position": [ - 1947, - 123 + 2000, + 100 ], "inputs": { "input": "{MeshFiltering_2.outputMesh}", @@ -433,8 +443,8 @@ "MeshFiltering_2": { "nodeType": "MeshFiltering", "position": [ - 1206, - -584 + 1200, + -500 ], "inputs": { "inputMesh": "{Meshing_2.outputMesh}" @@ -446,8 +456,8 @@ "Meshing_2": { "nodeType": "Meshing", "position": [ - 1006, - -584 + 1000, + -500 ], "inputs": { "input": "{DepthMapFilter_2.input}", @@ -460,8 +470,8 @@ "PrepareDenseScene_2": { "nodeType": "PrepareDenseScene", "position": [ - 406, - -584 + 400, + -500 ], "inputs": { "input": "{StructureFromMotion_3.output}" @@ -473,8 +483,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 2362, - -139 + 2400, + -100 ], "inputs": { "inputFiles": [ @@ -488,14 +498,14 @@ "ScenePreview_1": { "nodeType": "ScenePreview", "position": [ - 2148, - 211 + 2200, + 200 ], "inputs": { "cameras": "{ConvertSfMFormat_1.output}", "model": "{MeshDecimate_1.output}", "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", - "masks": "{ImageSegmentationPrompt_1.output}" + "masks": "{ImageSegmentationBox_2.output}" }, "internalInputs": { "color": "#4c594c" @@ -559,8 +569,8 @@ "StructureFromMotion_3": { "nodeType": "StructureFromMotion", "position": [ - 206, - -584 + 200, + -500 ], "inputs": { "input": "{FeatureMatching_4.input}", @@ -577,8 +587,8 @@ "Texturing_2": { "nodeType": "Texturing", "position": [ - 1406, - -584 + 1400, + -500 ], "inputs": { "input": "{Meshing_2.output}", From 5ca60f1e10ed5c081563b3cf920a3c494381b587 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 29 Oct 2024 08:42:02 +0100 Subject: [PATCH 1042/1093] Creation of the sfm Checking node --- meshroom/aliceVision/SfmChecking.py | 82 +++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 meshroom/aliceVision/SfmChecking.py diff --git a/meshroom/aliceVision/SfmChecking.py b/meshroom/aliceVision/SfmChecking.py new file mode 100644 index 0000000000..2be6789f98 --- /dev/null +++ b/meshroom/aliceVision/SfmChecking.py @@ -0,0 +1,82 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL +import os.path + + + +class SfmChecking(desc.Node): + + category = 'Utils' + documentation = ''' + Check an input Sfm for validity. + Throw an error if the sfm does not satisfy constraints + ''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file.", + value="", + ), + desc.FloatParam( + name="posecompletion", + label="Completion percentage", + description="Minimal percent of the views reconstructed.", + value=80.0, + range=(0.0, 100.0, 1.0), + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ) + ] + + outputs = [ + desc.File( + name="output", + label="SfM File", + description="Path to the output SfM file.", + value=desc.Node.internalFolder + "sfmData.abc", + ) + ] + + def processChunk(self, chunk): + from pyalicevision import sfmData as avsfmdata + from pyalicevision import sfmDataIO as avsfmdataio + + error = False + + chunk.logManager.start(chunk.node.verboseLevel.value) + chunk.logger.error("open input") + data = avsfmdata.SfMData() + ret = avsfmdataio.load(data, chunk.node.input.value, avsfmdataio.ALL) + if not ret: + chunk.logger.error("Cannot open input") + chunk.logManager.end() + raise RuntimeError() + + total = len(data.getViews()) + valid = len(data.getValidViews()) + ratio = (100.0 * float(valid))/float(total) + + chunk.logger.info(f"Total views : {total}") + chunk.logger.info(f"Reconstructed views : {valid}") + chunk.logger.info(f"Percentage : {ratio}") + + if ratio < chunk.node.posecompletion.value: + chunk.logger.error("Percentage of reconstructed views is insufficient") + error = True + + avsfmdataio.save(data, chunk.node.output.value, avsfmdataio.ALL) + + chunk.logManager.end() + + if error: + raise RuntimeError() + From f7ddbff447a63616a6ef1bd17c810a7fed22178d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 31 Oct 2024 17:04:32 +0100 Subject: [PATCH 1043/1093] [nodes] `SfMChecking`: Rename node and minor process improvements --- .../{SfmChecking.py => SfMChecking.py} | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) rename meshroom/aliceVision/{SfmChecking.py => SfMChecking.py} (69%) diff --git a/meshroom/aliceVision/SfmChecking.py b/meshroom/aliceVision/SfMChecking.py similarity index 69% rename from meshroom/aliceVision/SfmChecking.py rename to meshroom/aliceVision/SfMChecking.py index 2be6789f98..de191e1ae9 100644 --- a/meshroom/aliceVision/SfmChecking.py +++ b/meshroom/aliceVision/SfMChecking.py @@ -2,17 +2,15 @@ from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL -import os.path +class SfMChecking(desc.Node): -class SfmChecking(desc.Node): - - category = 'Utils' - documentation = ''' - Check an input Sfm for validity. - Throw an error if the sfm does not satisfy constraints - ''' + category = "Utils" + documentation = """ + Check an input SfM for validity. + Throw an error if the SfM does not satisfy constraints. + """ inputs = [ desc.File( @@ -22,8 +20,8 @@ class SfmChecking(desc.Node): value="", ), desc.FloatParam( - name="posecompletion", - label="Completion percentage", + name="poseCompletion", + label="Completion Percentage", description="Minimal percent of the views reconstructed.", value=80.0, range=(0.0, 100.0, 1.0), @@ -50,10 +48,9 @@ def processChunk(self, chunk): from pyalicevision import sfmData as avsfmdata from pyalicevision import sfmDataIO as avsfmdataio - error = False - chunk.logManager.start(chunk.node.verboseLevel.value) - chunk.logger.error("open input") + chunk.logger.info("Open input file") + data = avsfmdata.SfMData() ret = avsfmdataio.load(data, chunk.node.input.value, avsfmdataio.ALL) if not ret: @@ -63,20 +60,18 @@ def processChunk(self, chunk): total = len(data.getViews()) valid = len(data.getValidViews()) - ratio = (100.0 * float(valid))/float(total) + ratio = (100.0 * float(valid)) / float(total) - chunk.logger.info(f"Total views : {total}") - chunk.logger.info(f"Reconstructed views : {valid}") - chunk.logger.info(f"Percentage : {ratio}") + chunk.logger.info(f"Total views: {total}") + chunk.logger.info(f"Reconstructed views: {valid}") + chunk.logger.info(f"Percentage of reconstructed views: {ratio}") - if ratio < chunk.node.posecompletion.value: - chunk.logger.error("Percentage of reconstructed views is insufficient") - error = True + if ratio < chunk.node.poseCompletion.value: + chunk.logger.error("Percentage of reconstructed views is insufficient.") + chunk.logger.error(f"Expected {chunk.node.poseCompletion.value}, got {ratio}.") + chunk.logManager.end() + raise RuntimeError() avsfmdataio.save(data, chunk.node.output.value, avsfmdataio.ALL) - - chunk.logManager.end() - - if error: - raise RuntimeError() + chunk.logManager.end() From 7375b1153064d1b23167f27ef8ab35f25957c115 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 13 Nov 2024 13:57:40 +0100 Subject: [PATCH 1044/1093] Pose Injecting node --- meshroom/aliceVision/SfMPoseInjecting.py | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 meshroom/aliceVision/SfMPoseInjecting.py diff --git a/meshroom/aliceVision/SfMPoseInjecting.py b/meshroom/aliceVision/SfMPoseInjecting.py new file mode 100644 index 0000000000..23a8387183 --- /dev/null +++ b/meshroom/aliceVision/SfMPoseInjecting.py @@ -0,0 +1,55 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +import json + +class SfMPoseInjecting(desc.AVCommandLineNode): + + commandLine = 'aliceVision_sfmPoseInjecting {allParams}' + size = desc.DynamicNodeSize('input') + + category = "Utils" + documentation = """ + Use a json file to inject poses inside sfmData + """ + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file.", + value="", + ), + desc.File( + name="posesFilename", + label="Json file", + description="Input poses file.", + value="", + ), + desc.ChoiceParam( + name="rotationFormat", + label="Rotation format", + description="Defines the rotation format for the input poses" + " - EulerZXY : Euler rotation in degrees (Y*X*Z)", + values=["EulerZXY"], + value="EulerZXY", + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ) + ] + + outputs = [ + desc.File( + name="output", + label="SfM File", + description="Path to the output SfM file.", + value=desc.Node.internalFolder + "sfmData.sfm", + ) + ] From a8bd4793ff5d2b9de6da99b48de65e714e1be553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 14 Nov 2024 12:51:15 +0100 Subject: [PATCH 1045/1093] [nodes] SfMPoseInjecting: Update doc, labels and descriptions --- meshroom/aliceVision/SfMPoseInjecting.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/meshroom/aliceVision/SfMPoseInjecting.py b/meshroom/aliceVision/SfMPoseInjecting.py index 23a8387183..5334a3c153 100644 --- a/meshroom/aliceVision/SfMPoseInjecting.py +++ b/meshroom/aliceVision/SfMPoseInjecting.py @@ -7,13 +7,13 @@ class SfMPoseInjecting(desc.AVCommandLineNode): - commandLine = 'aliceVision_sfmPoseInjecting {allParams}' - size = desc.DynamicNodeSize('input') + commandLine = "aliceVision_sfmPoseInjecting {allParams}" + size = desc.DynamicNodeSize("input") category = "Utils" documentation = """ - Use a json file to inject poses inside sfmData - """ +Use a JSON file to inject poses inside the SfMData. +""" inputs = [ desc.File( @@ -24,15 +24,15 @@ class SfMPoseInjecting(desc.AVCommandLineNode): ), desc.File( name="posesFilename", - label="Json file", - description="Input poses file.", + label="Poses", + description="Input JSON file containing the poses.", value="", ), desc.ChoiceParam( name="rotationFormat", - label="Rotation format", - description="Defines the rotation format for the input poses" - " - EulerZXY : Euler rotation in degrees (Y*X*Z)", + label="Rotation Format", + description="Defines the rotation format for the input poses:\n" + " - EulerZXY: Euler rotation in degrees (Y*X*Z)", values=["EulerZXY"], value="EulerZXY", ), @@ -42,14 +42,14 @@ class SfMPoseInjecting(desc.AVCommandLineNode): description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - ) + ), ] outputs = [ desc.File( name="output", - label="SfM File", + label="SfMData", description="Path to the output SfM file.", value=desc.Node.internalFolder + "sfmData.sfm", - ) + ), ] From 85353a9d9759f63ca419992eddc82ac63023fdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 22 Nov 2024 10:52:11 +0100 Subject: [PATCH 1046/1093] [pipelines] PhotogCamTrack: Invert masks for segmentation --- meshroom/photogrammetryAndCameraTracking.mg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 4f79b5749b..3d324ddc32 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -405,7 +405,9 @@ ], "inputs": { "input": "{ImageDetectionPrompt_1.input}", - "bboxFolder": "{ImageDetectionPrompt_1.output}" + "bboxFolder": "{ImageDetectionPrompt_1.output}", + "maskInvert": true, + "keepFilename": true }, "internalInputs": { "color": "#575963" From e345c910d9cefa922c3d140cc327f9b4d90e5e59 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 25 Nov 2024 16:32:08 +0100 Subject: [PATCH 1047/1093] Add parameters to sfmBootstraping --- meshroom/aliceVision/SfmBootstraping.py | 28 +++++++++++++++++++++++++ meshroom/aliceVision/TracksBuilding.py | 3 +++ 2 files changed, 31 insertions(+) diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index c6f17fc86c..c2eeaefb83 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -31,6 +31,34 @@ class SfMBootStraping(desc.AVCommandLineNode): description="Information on pairs.", value="", ), + desc.FloatParam( + name="minAngleInitialPair", + label="Min Angle Initial Pair", + description="Minimum angle for the initial pair.", + value=5.0, + range=(0.1, 10.0, 0.1), + advanced=True, + ), + desc.FloatParam( + name="maxAngleInitialPair", + label="Max Angle Initial Pair", + description="Maximum angle for the initial pair.", + value=40.0, + range=(0.1, 60.0, 0.1), + advanced=True, + ), + desc.File( + name="initialPairA", + label="Initial Pair A", + description="View ID of the first image.", + value="", + ), + desc.File( + name="initialPairB", + label="Initial Pair B", + description="View ID of the second image.", + value="", + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index a3e06ccb7c..769069cdea 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -19,6 +19,7 @@ class TracksBuilding(desc.AVCommandLineNode): label="SfMData", description="Input SfMData file.", value="", + exposed=True, ), desc.ListAttribute( elementDesc=desc.File( @@ -42,6 +43,7 @@ class TracksBuilding(desc.AVCommandLineNode): name="matchesFolders", label="Matches Folders", description="Folder(s) in which computed matches are stored.", + exposed=True, ), desc.ChoiceParam( name="describerTypes", @@ -51,6 +53,7 @@ class TracksBuilding(desc.AVCommandLineNode): value=["dspsift"], exclusive=False, joinChar=",", + exposed=True, ), desc.IntParam( name="minInputTrackLength", From 8ea94e1f31a98f048a9dc791419434d36414db9c Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 26 Nov 2024 08:45:37 +0100 Subject: [PATCH 1048/1093] Change cpu and ram requirements --- meshroom/aliceVision/SfmExpanding.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index 73409d7b1a..f96cefed69 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -8,6 +8,9 @@ class SfMExpanding(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmExpanding {allParams}' size = desc.DynamicNodeSize('input') + cpu = desc.Level.INTENSIVE + ram = desc.Level.INTENSIVE + category = 'Sparse Reconstruction' documentation = ''' ''' From b9f5d354c55ef6c24c98916b192ee8f29c4765b4 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 27 Nov 2024 15:58:53 +0100 Subject: [PATCH 1049/1093] Colorizing node --- meshroom/aliceVision/SfMColorizing.py | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 meshroom/aliceVision/SfMColorizing.py diff --git a/meshroom/aliceVision/SfMColorizing.py b/meshroom/aliceVision/SfMColorizing.py new file mode 100644 index 0000000000..70af8797a6 --- /dev/null +++ b/meshroom/aliceVision/SfMColorizing.py @@ -0,0 +1,41 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +import json + +class SfMColorizing(desc.AVCommandLineNode): + + commandLine = "aliceVision_sfmColorizing {allParams}" + size = desc.DynamicNodeSize("input") + + category = "Utils" + documentation = """ + Colorize the pointcloud of a sfmData + """ + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file.", + value="", + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="SfMData", + description="Path to the output SfM file.", + value=desc.Node.internalFolder + "sfmData.abc", + ), + ] From 4d30de3925bd261969f3e946486bdede5ff3da3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 29 Nov 2024 11:53:24 +0100 Subject: [PATCH 1050/1093] [nodes] Add Global Rotation Estimating node --- .../aliceVision/GlobalRotationEstimating.py | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 meshroom/aliceVision/GlobalRotationEstimating.py diff --git a/meshroom/aliceVision/GlobalRotationEstimating.py b/meshroom/aliceVision/GlobalRotationEstimating.py new file mode 100644 index 0000000000..165ac1279c --- /dev/null +++ b/meshroom/aliceVision/GlobalRotationEstimating.py @@ -0,0 +1,66 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class GlobalRotationEstimating(desc.AVCommandLineNode): + commandLine = "aliceVision_globalRotationEstimating {allParams}" + + category = "Sparse Reconstruction" + documentation = ''' +Estimate the global rotation given tracks. +''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="SfMData file.", + value="", + ), + desc.File( + name="tracksFilename", + label="Tracks File", + description="Tracks file.", + value="", + ), + desc.File( + name="pairs", + label="Pairs File", + description="Information on pairs.", + value="", + ), + desc.ChoiceParam( + name="rotationAveragingMethod", + label="Rotation Averaging Method", + description="Method for rotation averaging:\n" + " - L1 minimization\n" + " - L2 minimization", + values=["L1_minimization", "L2_minimization"], + value="L2_minimization", + ), + desc.FloatParam( + name="angularTolerance", + label="Angular Tolerance", + description="Angular (in degrees) tolerance for a given triplet.", + value=5.0, + range=(0.0, 180.0, 1.0), + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", + ), + ] From c5d0d1de50911d8beefc7f29c4ec3b6f22233601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 29 Nov 2024 11:53:39 +0100 Subject: [PATCH 1051/1093] [nodes] CameraInit: Update SfMData version --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 799a931b66..43915693c6 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -664,7 +664,7 @@ def createViewpointsFile(self, node, additionalViews=()): view['metadata'] = json.loads(view['metadata']) sfmData = { - "version": [1, 2, 11], + "version": [1, 2, 12], "views": views + newViews, "intrinsics": intrinsics, "featureFolder": "", From 62c677d6b99031a5381d5dffd55ae7bff0fb25af Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Fri, 25 Oct 2024 15:18:08 +0200 Subject: [PATCH 1052/1093] [node] Add SfMFilter node Select views using regex --- meshroom/aliceVision/SfMFilter.py | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 meshroom/aliceVision/SfMFilter.py diff --git a/meshroom/aliceVision/SfMFilter.py b/meshroom/aliceVision/SfMFilter.py new file mode 100644 index 0000000000..9ccd4c0655 --- /dev/null +++ b/meshroom/aliceVision/SfMFilter.py @@ -0,0 +1,54 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class SfMFilter(desc.CommandLineNode): + commandLine = 'aliceVision_sfmFilter {allParams}' + category = 'Utils' + documentation = ''' +This node allows select views from sfmData file using a regular expresion. +''' + + inputs = [ + desc.File( + name="inputFile", + label="inputFile", + description="SfMData file.", + value="", + uid=[], + ), + desc.StringParam( + name="fileMatchingPattern", + label="File Matching Pattern", + description="Matching regular expression.\n" + "You should capture specific parts of the filepath with parentheses to define matching elements.\n" + "Some examples of patterns:\n" + " - Match the filename without extension (default value): " + r'".*\/(.*?)\.\w{3}"' + "\n" + " - Match the filename suffix after \"_\": " + r'".*\/.*(_.*?\.\w{3})"' + "\n" + " - Match the filename prefix before \"_\": " + r'".*\/(.*?)_.*\.\w{3}"', + value=r'.*\/(.*?)\.\w{3}', + uid=[], + ), + ] + + outputs = [ + desc.File( + name="outputSfMData_selected", + label="SfMData_selected", + description="Output SfMData file containing selected views.", + value=desc.Node.internalFolder + "/selectedSfmData.sfm", + uid=[], + ), + desc.File( + name="outputSfMData_unselected", + label="SfMData_unselected", + description="Output SfMData file containing remaining views.", + value=desc.Node.internalFolder + "/unselectedSfmData.sfm", + uid=[], + ), + ] From ff544f8d4d30ecd6321bef3a05067cc159b9c960 Mon Sep 17 00:00:00 2001 From: jmelou <jean.melou@gmail.com> Date: Fri, 25 Oct 2024 15:19:12 +0200 Subject: [PATCH 1053/1093] [pipeline] Simplify MV-PS pipeline Pose transfert in SfMTransfert --- meshroom/MultiView Photometric Stereo.mg | 1158 ++++++++++++++++++++++ meshroom/aliceVision/SfMTransfer.py | 11 +- 2 files changed, 1164 insertions(+), 5 deletions(-) create mode 100644 meshroom/MultiView Photometric Stereo.mg diff --git a/meshroom/MultiView Photometric Stereo.mg b/meshroom/MultiView Photometric Stereo.mg new file mode 100644 index 0000000000..d90ccea878 --- /dev/null +++ b/meshroom/MultiView Photometric Stereo.mg @@ -0,0 +1,1158 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2024.1.0-develop", + "fileVersion": "1.1", + "template": false, + "nodesVersions": { + "CameraInit": "11.0", + "DepthMap": "5.0", + "DepthMapFilter": "4.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "LightingCalibration": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PhotometricStereo": "1.0", + "PrepareDenseScene": "3.1", + "SfMFilter": "1.0", + "SfMTransfer": "2.1", + "SphereDetection": "1.0", + "StructureFromMotion": "3.3", + "Texturing": "6.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -417, + 203 + ], + "parallelization": { + "blockSize": 0, + "size": 0, + "split": 1 + }, + "uids": { + "0": "961e54591174ec5a2457c66da8eadc0cb03d89ba" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "viewpoints": [], + "intrinsics": [], + "sensorDatabase": "${ALICEVISION_SENSOR_DB}", + "lensCorrectionProfileInfo": "${ALICEVISION_LENS_PROFILE_INFO}", + "lensCorrectionProfileSearchIgnoreCameraModel": true, + "defaultFieldOfView": 45.0, + "groupCameraFallback": "folder", + "rawColorInterpretation": "LibRawWhiteBalancing", + "colorProfileDatabase": "${ALICEVISION_COLOR_PROFILE_DB}", + "errorOnMissingColorProfile": true, + "viewIdMethod": "metadata", + "viewIdRegex": ".*?(\\d+)", + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" + } + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 1179, + 0 + ], + "parallelization": { + "blockSize": 24, + "size": 1, + "split": 1 + }, + "uids": { + "0": "7fcbffdde40134e957f90861ad3e179b8b26dbf6" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}", + "minViewAngle": 2.0, + "maxViewAngle": 70.0, + "nNearestCams": 10, + "minNumOfConsistentCams": 3, + "minNumOfConsistentCamsWithLowSimilarity": 4, + "pixToleranceFactor": 2.0, + "pixSizeBall": 0, + "pixSizeBallWithLowSimilarity": 0, + "computeNormalMaps": false, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", + "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr", + "normal": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_normalMap.exr" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 979, + 0 + ], + "parallelization": { + "blockSize": 12, + "size": 1, + "split": 1 + }, + "uids": { + "0": "1384130f6ded87cf983ebf688188bdf8d6f003bd" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "downscale": 2, + "minViewAngle": 2.0, + "maxViewAngle": 70.0, + "tiling": { + "tileBufferWidth": 1024, + "tileBufferHeight": 1024, + "tilePadding": 64, + "autoAdjustSmallImage": true + }, + "chooseTCamsPerTile": true, + "maxTCams": 10, + "sgm": { + "sgmScale": 2, + "sgmStepXY": 2, + "sgmStepZ": -1, + "sgmMaxTCamsPerTile": 4, + "sgmWSH": 4, + "sgmUseSfmSeeds": true, + "sgmSeedsRangeInflate": 0.2, + "sgmDepthThicknessInflate": 0.0, + "sgmMaxSimilarity": 1.0, + "sgmGammaC": 5.5, + "sgmGammaP": 8.0, + "sgmP1": 10.0, + "sgmP2Weighting": 100.0, + "sgmMaxDepths": 1500, + "sgmFilteringAxes": "YX", + "sgmDepthListPerTile": true, + "sgmUseConsistentScale": false + }, + "refine": { + "refineEnabled": true, + "refineScale": 1, + "refineStepXY": 1, + "refineMaxTCamsPerTile": 4, + "refineSubsampling": 10, + "refineHalfNbDepths": 15, + "refineWSH": 3, + "refineSigma": 15.0, + "refineGammaC": 15.5, + "refineGammaP": 8.0, + "refineInterpolateMiddleDepth": false, + "refineUseConsistentScale": false + }, + "colorOptimization": { + "colorOptimizationEnabled": true, + "colorOptimizationNbIterations": 100 + }, + "customPatchPattern": { + "sgmUseCustomPatchPattern": false, + "refineUseCustomPatchPattern": false, + "customPatchPatternSubparts": [], + "customPatchPatternGroupSubpartsPerLevel": false + }, + "intermediateResults": { + "exportIntermediateDepthSimMaps": false, + "exportIntermediateNormalMaps": false, + "exportIntermediateVolumes": false, + "exportIntermediateCrossVolumes": false, + "exportIntermediateTopographicCutVolumes": false, + "exportIntermediateVolume9pCsv": false, + "exportTilePattern": false + }, + "nbGPUs": 0, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", + "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr", + "tilePattern": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_tilePattern.obj", + "depthSgm": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap_sgm.exr", + "depthSgmUpscaled": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap_sgmUpscaled.exr", + "depthRefined": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap_refinedFused.exr" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + -21, + 0 + ], + "parallelization": { + "blockSize": 40, + "size": 1, + "split": 1 + }, + "uids": { + "0": "bf5baa6a716fff20b794233c50bcf0511a891d3c" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{SfMFilter_1.outputSfMData_selected}", + "masksFolder": "", + "maskExtension": "png", + "maskInvert": false, + "describerTypes": [ + "dspsift" + ], + "describerPreset": "normal", + "maxNbFeatures": 0, + "describerQuality": "normal", + "contrastFiltering": "GridSort", + "relativePeakThreshold": 0.01, + "gridFiltering": true, + "workingColorSpace": "sRGB", + "forceCpuExtraction": true, + "maxThreads": 0, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 379, + 0 + ], + "parallelization": { + "blockSize": 20, + "size": 1, + "split": 1 + }, + "uids": { + "0": "64714e89ac89c4e62e820b7018d029e2e44168be" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "photometricMatchingMethod": "ANN_L2", + "geometricEstimator": "acransac", + "geometricFilterType": "fundamental_matrix", + "distanceRatio": 0.8, + "maxIteration": 2048, + "geometricError": 0.0, + "knownPosesGeometricErrorMax": 5.0, + "minRequired2DMotion": -1.0, + "maxMatches": 0, + "savePutativeMatches": false, + "crossMatching": false, + "guidedMatching": false, + "matchFromKnownCameraPoses": false, + "exportDebugFiles": false, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 179, + 0 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "318dd583377e8b02891a5272cb77ab8c8a03dd0c" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "SequentialAndVocabularyTree", + "tree": "${ALICEVISION_VOCTREE}", + "weights": "", + "minNbImages": 200, + "maxDescriptors": 500, + "nbMatches": 40, + "nbNeighbors": 5, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" + } + }, + "LightingCalibration_1": { + "nodeType": "LightingCalibration", + "position": [ + 1288, + 253 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "d6a02cd279f71d7cfa71b7dfb370eee2818e7ad9" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "inputPath": "{SphereDetection_1.input}", + "inputDetection": "{SphereDetection_1.output}", + "saveAsModel": false, + "ellipticEstimation": false, + "method": "brightestPoint", + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "outputFile": "{cache}/{nodeType}/{uid0}//lights.json" + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 1579, + 0 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "66c8793afd4e065cd120db2b97d193fdd0c4d62b" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "inputMesh": "{Meshing_1.outputMesh}", + "outputMeshFileType": "obj", + "keepLargestMeshOnly": false, + "smoothingSubset": "all", + "smoothingBoundariesNeighbours": 0, + "smoothingIterations": 5, + "smoothingLambda": 1.0, + "filteringSubset": "all", + "filteringIterations": 1, + "filterLargeTrianglesFactor": 60.0, + "filterTrianglesRatio": 0.0, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" + } + }, + "Meshing_1": { + "nodeType": "Meshing", + "position": [ + 1379, + 0 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "15f7bc52058eb51a68bd22a427b18bf50bd8cec5" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "outputMeshFileType": "obj", + "useBoundingBox": false, + "boundingBox": { + "bboxTranslation": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "bboxRotation": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "bboxScale": { + "x": 1.0, + "y": 1.0, + "z": 1.0 + } + }, + "estimateSpaceFromSfM": true, + "estimateSpaceMinObservations": 3, + "estimateSpaceMinObservationAngle": 10.0, + "maxInputPoints": 50000000, + "maxPoints": 5000000, + "maxPointsPerVoxel": 1000000, + "minStep": 2, + "partitioning": "singleBlock", + "repartition": "multiResolution", + "angleFactor": 15.0, + "simFactor": 15.0, + "minVis": 2, + "pixSizeMarginInitCoef": 2.0, + "pixSizeMarginFinalCoef": 4.0, + "voteMarginFactor": 4.0, + "contributeMarginFactor": 2.0, + "simGaussianSizeInit": 10.0, + "simGaussianSize": 10.0, + "minAngleThreshold": 1.0, + "refineFuse": true, + "helperPointsGridSize": 10, + "densify": false, + "densifyNbFront": 1, + "densifyNbBack": 1, + "densifyScale": 20.0, + "nPixelSizeBehind": 4.0, + "fullWeight": 1.0, + "voteFilteringForWeaklySupportedSurfaces": true, + "addLandmarksToTheDensePointCloud": false, + "invertTetrahedronBasedOnNeighborsNbIterations": 10, + "minSolidAngleRatio": 0.2, + "nbSolidAngleFilteringIterations": 2, + "colorizeOutput": false, + "addMaskHelperPoints": false, + "maskHelperPointsWeight": 1.0, + "maskBorderSize": 4, + "maxNbConnectedHelperPoints": 50, + "saveRawDensePointCloud": false, + "exportDebugTetrahedralization": false, + "seed": 0, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}", + "output": "{cache}/{nodeType}/{uid0}/densePointCloud.abc" + } + }, + "PhotometricStereo_1": { + "nodeType": "PhotometricStereo", + "position": [ + 1491, + 250 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "02ade34b229d605d1289993b64378e52ab3b5b0e" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "inputPath": "{LightingCalibration_1.inputPath}", + "pathToJSONLightFile": "{LightingCalibration_1.outputFile}", + "maskPath": "", + "SHOrder": "0", + "removeAmbient": false, + "isRobust": false, + "downscale": 1, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "outputPath": "{cache}/{nodeType}/{uid0}/", + "outputSfmDataAlbedo": "{cache}/{nodeType}/{uid0}//albedoMaps.sfm", + "outputSfmDataNormal": "{cache}/{nodeType}/{uid0}//normalMaps.sfm", + "outputSfmDataNormalPNG": "{cache}/{nodeType}/{uid0}//normalMapsPNG.sfm", + "normals": "{cache}/{nodeType}/{uid0}/<POSE_ID>_normals.exr", + "normalsPNG": "{cache}/{nodeType}/{uid0}/<POSE_ID>_normals.png", + "normalsWorld": "{cache}/{nodeType}/{uid0}/<POSE_ID>_normals_w.exr", + "albedo": "{cache}/{nodeType}/{uid0}/<POSE_ID>_albedo.png" + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 779, + 0 + ], + "parallelization": { + "blockSize": 40, + "size": 1, + "split": 1 + }, + "uids": { + "0": "3463d763b471ca150ef3807279b85089938a7ff3" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{StructureFromMotion_1.output}", + "imagesFolders": [], + "masksFolders": [], + "maskExtension": "png", + "outputFileType": "exr", + "saveMetadata": true, + "saveMatricesTxtFiles": false, + "evCorrection": false, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" + } + }, + "PrepareDenseScene_2": { + "nodeType": "PrepareDenseScene", + "position": [ + 2147, + 282 + ], + "parallelization": { + "blockSize": 40, + "size": 1, + "split": 1 + }, + "uids": { + "0": "cb941f1053ccb7f6c2cb42eb238d06500ab5259f" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{PhotometricStereo_1.outputSfmDataAlbedo}", + "imagesFolders": [], + "masksFolders": [], + "maskExtension": "png", + "outputFileType": "exr", + "saveMetadata": true, + "saveMatricesTxtFiles": false, + "evCorrection": false, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" + } + }, + "PrepareDenseScene_3": { + "nodeType": "PrepareDenseScene", + "position": [ + 2145, + 412 + ], + "parallelization": { + "blockSize": 40, + "size": 1, + "split": 1 + }, + "uids": { + "0": "bd837101d892068c3f97d192f3fee74d427bd0e4" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{PhotometricStereo_1.outputSfmDataNormal}", + "imagesFolders": [], + "masksFolders": [], + "maskExtension": "png", + "outputFileType": "exr", + "saveMetadata": true, + "saveMatricesTxtFiles": false, + "evCorrection": false, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" + } + }, + "PrepareDenseScene_4": { + "nodeType": "PrepareDenseScene", + "position": [ + 2147, + 538 + ], + "parallelization": { + "blockSize": 40, + "size": 1, + "split": 1 + }, + "uids": { + "0": "4bc441f4e0b8ee779d1f2b5c14b1fec412e4acca" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{PhotometricStereo_1.outputSfmDataNormalPNG}", + "imagesFolders": [], + "masksFolders": [], + "maskExtension": "png", + "outputFileType": "exr", + "saveMetadata": true, + "saveMatricesTxtFiles": false, + "evCorrection": false, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" + } + }, + "SfMFilter_1": { + "nodeType": "SfMFilter", + "position": [ + -227, + 204 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "9e0e6b69f2f386737ebee8a8e042b9d0dcdf67c1" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "inputFile": "{CameraInit_1.output}", + "fileMatchingPattern": ".*/.*ambiant.*" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "outputSfMData_selected": "{cache}/{nodeType}/{uid0}//selectedSfmData.sfm", + "outputSfMData_unselected": "{cache}/{nodeType}/{uid0}//unselectedSfmData.sfm" + } + }, + "SfMTransfer_1": { + "nodeType": "SfMTransfer", + "position": [ + 794, + 208 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "b56ad497dd172de96af8cb703b1ccfbc211826a1" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{SfMFilter_1.outputSfMData_unselected}", + "reference": "{StructureFromMotion_1.output}", + "method": "from_poseid", + "fileMatchingPattern": ".*\\/(.*?)\\.\\w{3}", + "metadataMatchingList": [], + "transferPoses": true, + "transferIntrinsics": true, + "transferLandmarks": true, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/unselectedSfmData.abc", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" + } + }, + "SphereDetection_1": { + "nodeType": "SphereDetection", + "position": [ + 1100, + 255 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "13f91bad9e2a3386df185b9cbc622608f991b844" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{SfMTransfer_1.output}", + "modelPath": "${ALICEVISION_SPHERE_DETECTION_MODEL}", + "autoDetect": false, + "minScore": 0.0, + "sphereCenter": { + "x": 0.0, + "y": 0.0 + }, + "sphereRadius": 500.0, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}//detection.json" + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", + "position": [ + 579, + 0 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "543bcfc99c4c7d374db4ac0f42677bbc7e372a79" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}", + "localizerEstimator": "acransac", + "observationConstraint": "Scale", + "localizerEstimatorMaxIterations": 4096, + "localizerEstimatorError": 0.0, + "lockScenePreviouslyReconstructed": false, + "useLocalBA": true, + "localBAGraphDistance": 1, + "nbFirstUnstableCameras": 30, + "maxImagesPerGroup": 30, + "bundleAdjustmentMaxOutliers": 50, + "maxNumberOfMatches": 0, + "minNumberOfMatches": 0, + "minInputTrackLength": 2, + "minNumberOfObservationsForTriangulation": 2, + "minAngleForTriangulation": 3.0, + "minAngleForLandmark": 2.0, + "maxReprojectionError": 4.0, + "minAngleInitialPair": 5.0, + "maxAngleInitialPair": 40.0, + "useOnlyMatchesFromInputFolder": false, + "useRigConstraint": true, + "rigMinNbCamerasForCalibration": 20, + "lockAllIntrinsics": false, + "minNbCamerasToRefinePrincipalPoint": 3, + "filterTrackForks": false, + "computeStructureColor": true, + "useAutoTransform": true, + "initialPairA": "", + "initialPairB": "", + "interFileExtension": ".abc", + "logIntermediateSteps": false, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/sfm.abc", + "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm", + "extraInfoFolder": "{cache}/{nodeType}/{uid0}/" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 1779, + 0 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "b74e59c14e9d0116f95e4c342d273193f18b74dc" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{DepthMap_1.imagesFolder}", + "normalsFolder": "", + "inputMesh": "{MeshFiltering_1.outputMesh}", + "inputRefMesh": "", + "textureSide": 8192, + "downscale": 2, + "outputMeshFileType": "obj", + "colorMapping": { + "enable": true, + "colorMappingFileType": "exr" + }, + "bumpMapping": { + "enable": true, + "bumpType": "Normal", + "normalFileType": "exr", + "heightFileType": "exr" + }, + "displacementMapping": { + "enable": true, + "displacementMappingFileType": "exr" + }, + "unwrapMethod": "Basic", + "useUDIM": true, + "fillHoles": false, + "padding": 5, + "multiBandDownscale": 4, + "multiBandNbContrib": { + "high": 1, + "midHigh": 5, + "midLow": 10, + "low": 0 + }, + "useScore": true, + "bestScoreThreshold": 0.1, + "angleHardThreshold": 90.0, + "workingColorSpace": "sRGB", + "outputColorSpace": "AUTO", + "correctEV": true, + "forceVisibleByAllVertices": false, + "flipNormals": false, + "visibilityRemappingMethod": "PullPush", + "subdivisionTargetRatio": 0.8, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", + "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", + "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" + } + }, + "Texturing_2": { + "nodeType": "Texturing", + "position": [ + 2448, + 240 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "2290fe547144a7ae68c7907ba6cb65dc496f2549" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_2.output}", + "normalsFolder": "", + "inputMesh": "{MeshFiltering_1.outputMesh}", + "inputRefMesh": "", + "textureSide": 8192, + "downscale": 2, + "outputMeshFileType": "obj", + "colorMapping": { + "enable": true, + "colorMappingFileType": "exr" + }, + "bumpMapping": { + "enable": true, + "bumpType": "Normal", + "normalFileType": "exr", + "heightFileType": "exr" + }, + "displacementMapping": { + "enable": true, + "displacementMappingFileType": "exr" + }, + "unwrapMethod": "Basic", + "useUDIM": true, + "fillHoles": false, + "padding": 5, + "multiBandDownscale": 4, + "multiBandNbContrib": { + "high": 1, + "midHigh": 5, + "midLow": 10, + "low": 0 + }, + "useScore": true, + "bestScoreThreshold": 0.1, + "angleHardThreshold": 90.0, + "workingColorSpace": "sRGB", + "outputColorSpace": "AUTO", + "correctEV": true, + "forceVisibleByAllVertices": false, + "flipNormals": false, + "visibilityRemappingMethod": "PullPush", + "subdivisionTargetRatio": 0.8, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", + "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", + "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" + } + }, + "Texturing_3": { + "nodeType": "Texturing", + "position": [ + 2445, + 432 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "b1f98e8db0a8bbae0509b7b42ef60d688b9af1f2" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_3.output}", + "normalsFolder": "", + "inputMesh": "{MeshFiltering_1.outputMesh}", + "inputRefMesh": "", + "textureSide": 8192, + "downscale": 2, + "outputMeshFileType": "obj", + "colorMapping": { + "enable": true, + "colorMappingFileType": "exr" + }, + "bumpMapping": { + "enable": true, + "bumpType": "Normal", + "normalFileType": "exr", + "heightFileType": "exr" + }, + "displacementMapping": { + "enable": true, + "displacementMappingFileType": "exr" + }, + "unwrapMethod": "Basic", + "useUDIM": true, + "fillHoles": false, + "padding": 5, + "multiBandDownscale": 4, + "multiBandNbContrib": { + "high": 1, + "midHigh": 5, + "midLow": 10, + "low": 0 + }, + "useScore": true, + "bestScoreThreshold": 0.1, + "angleHardThreshold": 90.0, + "workingColorSpace": "sRGB", + "outputColorSpace": "AUTO", + "correctEV": true, + "forceVisibleByAllVertices": false, + "flipNormals": false, + "visibilityRemappingMethod": "PullPush", + "subdivisionTargetRatio": 0.8, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", + "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", + "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" + } + }, + "Texturing_4": { + "nodeType": "Texturing", + "position": [ + 2449, + 630 + ], + "parallelization": { + "blockSize": 0, + "size": 1, + "split": 1 + }, + "uids": { + "0": "8116978adf911c883f0b3740eb0876e60d31386c" + }, + "internalFolder": "{cache}/{nodeType}/{uid0}/", + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_4.output}", + "normalsFolder": "", + "inputMesh": "{MeshFiltering_1.outputMesh}", + "inputRefMesh": "", + "textureSide": 8192, + "downscale": 2, + "outputMeshFileType": "obj", + "colorMapping": { + "enable": true, + "colorMappingFileType": "exr" + }, + "bumpMapping": { + "enable": true, + "bumpType": "Normal", + "normalFileType": "exr", + "heightFileType": "exr" + }, + "displacementMapping": { + "enable": true, + "displacementMappingFileType": "exr" + }, + "unwrapMethod": "Basic", + "useUDIM": true, + "fillHoles": false, + "padding": 5, + "multiBandDownscale": 4, + "multiBandNbContrib": { + "high": 1, + "midHigh": 5, + "midLow": 10, + "low": 0 + }, + "useScore": true, + "bestScoreThreshold": 0.1, + "angleHardThreshold": 90.0, + "workingColorSpace": "sRGB", + "outputColorSpace": "AUTO", + "correctEV": true, + "forceVisibleByAllVertices": false, + "flipNormals": false, + "visibilityRemappingMethod": "PullPush", + "subdivisionTargetRatio": 0.8, + "verboseLevel": "info" + }, + "internalInputs": { + "invalidation": "", + "comment": "", + "label": "", + "color": "" + }, + "outputs": { + "output": "{cache}/{nodeType}/{uid0}/", + "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", + "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", + "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" + } + } + } +} \ No newline at end of file diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 53f4bdb15e..3eef69f8d9 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -32,12 +32,13 @@ class SfMTransfer(desc.AVCommandLineNode): name="method", label="Matching Method", description="Matching Method:\n" - " - from_viewid: Align cameras with same view ID.\n" - " - from_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'.\n" - " - from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'.\n" - " - from_intrinsicid: Copy intrinsics parameters.\n", + " - from_viewid: Match cameras based on viewId.\n" + " - from_filepath: Match cameras with a filepath matching, using 'fileMatchingPattern'.\n" + " - from_metadata: Match cameras with matching metadata, using 'metadataMatchingList'.\n" + " - from_poseid: Match cameras based on poseId.\n" + " - from_intrinsicid: Match cameras based on intrinsicId.\n", value="from_viewid", - values=["from_viewid", "from_filepath", "from_metadata", "from_intrinsicid"], + values=["from_viewid", "from_filepath", "from_metadata", "from_poseid", "from_intrinsicid"], ), desc.StringParam( name="fileMatchingPattern", From fb4585f3925c3000ab8bb39f82b939ab7cd3dfe4 Mon Sep 17 00:00:00 2001 From: Fabien Castan <fabcastan@gmail.com> Date: Mon, 28 Oct 2024 16:20:49 +0100 Subject: [PATCH 1054/1093] [nodes] SfMFilter: Adapt to node api changes (no more uid) --- meshroom/aliceVision/SfMFilter.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/meshroom/aliceVision/SfMFilter.py b/meshroom/aliceVision/SfMFilter.py index 9ccd4c0655..2cbe1174c5 100644 --- a/meshroom/aliceVision/SfMFilter.py +++ b/meshroom/aliceVision/SfMFilter.py @@ -17,7 +17,6 @@ class SfMFilter(desc.CommandLineNode): label="inputFile", description="SfMData file.", value="", - uid=[], ), desc.StringParam( name="fileMatchingPattern", @@ -32,7 +31,6 @@ class SfMFilter(desc.CommandLineNode): " - Match the filename prefix before \"_\": " r'".*\/(.*?)_.*\.\w{3}"', value=r'.*\/(.*?)\.\w{3}', - uid=[], ), ] @@ -42,13 +40,11 @@ class SfMFilter(desc.CommandLineNode): label="SfMData_selected", description="Output SfMData file containing selected views.", value=desc.Node.internalFolder + "/selectedSfmData.sfm", - uid=[], ), desc.File( name="outputSfMData_unselected", label="SfMData_unselected", description="Output SfMData file containing remaining views.", value=desc.Node.internalFolder + "/unselectedSfmData.sfm", - uid=[], ), ] From 439adbb6ca4cda06325b5c87e771d007d510152c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 29 Oct 2024 14:40:28 +0100 Subject: [PATCH 1055/1093] [nodes] SfMFilter: Add verbose level attribute --- meshroom/aliceVision/SfMFilter.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/aliceVision/SfMFilter.py b/meshroom/aliceVision/SfMFilter.py index 2cbe1174c5..78978fd374 100644 --- a/meshroom/aliceVision/SfMFilter.py +++ b/meshroom/aliceVision/SfMFilter.py @@ -32,6 +32,13 @@ class SfMFilter(desc.CommandLineNode): r'".*\/(.*?)_.*\.\w{3}"', value=r'.*\/(.*?)\.\w{3}', ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), ] outputs = [ From 662e74af3dbb3c7dc6ac4c08cb9ad70de4f48341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 29 Oct 2024 14:54:38 +0100 Subject: [PATCH 1056/1093] [pipelines] Fix multi-view photometric stereo template The template has been renamed to fit the automatic name parsing of template files, it has been effectively converted to an actual template and all the nodes have been aligned coherently. --- meshroom/MultiView Photometric Stereo.mg | 1158 ---------------------- meshroom/multi-viewPhotometricStereo.mg | 277 ++++++ 2 files changed, 277 insertions(+), 1158 deletions(-) delete mode 100644 meshroom/MultiView Photometric Stereo.mg create mode 100644 meshroom/multi-viewPhotometricStereo.mg diff --git a/meshroom/MultiView Photometric Stereo.mg b/meshroom/MultiView Photometric Stereo.mg deleted file mode 100644 index d90ccea878..0000000000 --- a/meshroom/MultiView Photometric Stereo.mg +++ /dev/null @@ -1,1158 +0,0 @@ -{ - "header": { - "pipelineVersion": "2.2", - "releaseVersion": "2024.1.0-develop", - "fileVersion": "1.1", - "template": false, - "nodesVersions": { - "CameraInit": "11.0", - "DepthMap": "5.0", - "DepthMapFilter": "4.0", - "FeatureExtraction": "1.3", - "FeatureMatching": "2.0", - "ImageMatching": "2.0", - "LightingCalibration": "1.0", - "MeshFiltering": "3.0", - "Meshing": "7.0", - "PhotometricStereo": "1.0", - "PrepareDenseScene": "3.1", - "SfMFilter": "1.0", - "SfMTransfer": "2.1", - "SphereDetection": "1.0", - "StructureFromMotion": "3.3", - "Texturing": "6.0" - } - }, - "graph": { - "CameraInit_1": { - "nodeType": "CameraInit", - "position": [ - -417, - 203 - ], - "parallelization": { - "blockSize": 0, - "size": 0, - "split": 1 - }, - "uids": { - "0": "961e54591174ec5a2457c66da8eadc0cb03d89ba" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "viewpoints": [], - "intrinsics": [], - "sensorDatabase": "${ALICEVISION_SENSOR_DB}", - "lensCorrectionProfileInfo": "${ALICEVISION_LENS_PROFILE_INFO}", - "lensCorrectionProfileSearchIgnoreCameraModel": true, - "defaultFieldOfView": 45.0, - "groupCameraFallback": "folder", - "rawColorInterpretation": "LibRawWhiteBalancing", - "colorProfileDatabase": "${ALICEVISION_COLOR_PROFILE_DB}", - "errorOnMissingColorProfile": true, - "viewIdMethod": "metadata", - "viewIdRegex": ".*?(\\d+)", - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/cameraInit.sfm" - } - }, - "DepthMapFilter_1": { - "nodeType": "DepthMapFilter", - "position": [ - 1179, - 0 - ], - "parallelization": { - "blockSize": 24, - "size": 1, - "split": 1 - }, - "uids": { - "0": "7fcbffdde40134e957f90861ad3e179b8b26dbf6" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{DepthMap_1.input}", - "depthMapsFolder": "{DepthMap_1.output}", - "minViewAngle": 2.0, - "maxViewAngle": 70.0, - "nNearestCams": 10, - "minNumOfConsistentCams": 3, - "minNumOfConsistentCamsWithLowSimilarity": 4, - "pixToleranceFactor": 2.0, - "pixSizeBall": 0, - "pixSizeBallWithLowSimilarity": 0, - "computeNormalMaps": false, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", - "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr", - "normal": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_normalMap.exr" - } - }, - "DepthMap_1": { - "nodeType": "DepthMap", - "position": [ - 979, - 0 - ], - "parallelization": { - "blockSize": 12, - "size": 1, - "split": 1 - }, - "uids": { - "0": "1384130f6ded87cf983ebf688188bdf8d6f003bd" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{PrepareDenseScene_1.input}", - "imagesFolder": "{PrepareDenseScene_1.output}", - "downscale": 2, - "minViewAngle": 2.0, - "maxViewAngle": 70.0, - "tiling": { - "tileBufferWidth": 1024, - "tileBufferHeight": 1024, - "tilePadding": 64, - "autoAdjustSmallImage": true - }, - "chooseTCamsPerTile": true, - "maxTCams": 10, - "sgm": { - "sgmScale": 2, - "sgmStepXY": 2, - "sgmStepZ": -1, - "sgmMaxTCamsPerTile": 4, - "sgmWSH": 4, - "sgmUseSfmSeeds": true, - "sgmSeedsRangeInflate": 0.2, - "sgmDepthThicknessInflate": 0.0, - "sgmMaxSimilarity": 1.0, - "sgmGammaC": 5.5, - "sgmGammaP": 8.0, - "sgmP1": 10.0, - "sgmP2Weighting": 100.0, - "sgmMaxDepths": 1500, - "sgmFilteringAxes": "YX", - "sgmDepthListPerTile": true, - "sgmUseConsistentScale": false - }, - "refine": { - "refineEnabled": true, - "refineScale": 1, - "refineStepXY": 1, - "refineMaxTCamsPerTile": 4, - "refineSubsampling": 10, - "refineHalfNbDepths": 15, - "refineWSH": 3, - "refineSigma": 15.0, - "refineGammaC": 15.5, - "refineGammaP": 8.0, - "refineInterpolateMiddleDepth": false, - "refineUseConsistentScale": false - }, - "colorOptimization": { - "colorOptimizationEnabled": true, - "colorOptimizationNbIterations": 100 - }, - "customPatchPattern": { - "sgmUseCustomPatchPattern": false, - "refineUseCustomPatchPattern": false, - "customPatchPatternSubparts": [], - "customPatchPatternGroupSubpartsPerLevel": false - }, - "intermediateResults": { - "exportIntermediateDepthSimMaps": false, - "exportIntermediateNormalMaps": false, - "exportIntermediateVolumes": false, - "exportIntermediateCrossVolumes": false, - "exportIntermediateTopographicCutVolumes": false, - "exportIntermediateVolume9pCsv": false, - "exportTilePattern": false - }, - "nbGPUs": 0, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "depth": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap.exr", - "sim": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_simMap.exr", - "tilePattern": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_tilePattern.obj", - "depthSgm": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap_sgm.exr", - "depthSgmUpscaled": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap_sgmUpscaled.exr", - "depthRefined": "{cache}/{nodeType}/{uid0}/<VIEW_ID>_depthMap_refinedFused.exr" - } - }, - "FeatureExtraction_1": { - "nodeType": "FeatureExtraction", - "position": [ - -21, - 0 - ], - "parallelization": { - "blockSize": 40, - "size": 1, - "split": 1 - }, - "uids": { - "0": "bf5baa6a716fff20b794233c50bcf0511a891d3c" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{SfMFilter_1.outputSfMData_selected}", - "masksFolder": "", - "maskExtension": "png", - "maskInvert": false, - "describerTypes": [ - "dspsift" - ], - "describerPreset": "normal", - "maxNbFeatures": 0, - "describerQuality": "normal", - "contrastFiltering": "GridSort", - "relativePeakThreshold": 0.01, - "gridFiltering": true, - "workingColorSpace": "sRGB", - "forceCpuExtraction": true, - "maxThreads": 0, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - } - }, - "FeatureMatching_1": { - "nodeType": "FeatureMatching", - "position": [ - 379, - 0 - ], - "parallelization": { - "blockSize": 20, - "size": 1, - "split": 1 - }, - "uids": { - "0": "64714e89ac89c4e62e820b7018d029e2e44168be" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{ImageMatching_1.input}", - "featuresFolders": "{ImageMatching_1.featuresFolders}", - "imagePairsList": "{ImageMatching_1.output}", - "describerTypes": "{FeatureExtraction_1.describerTypes}", - "photometricMatchingMethod": "ANN_L2", - "geometricEstimator": "acransac", - "geometricFilterType": "fundamental_matrix", - "distanceRatio": 0.8, - "maxIteration": 2048, - "geometricError": 0.0, - "knownPosesGeometricErrorMax": 5.0, - "minRequired2DMotion": -1.0, - "maxMatches": 0, - "savePutativeMatches": false, - "crossMatching": false, - "guidedMatching": false, - "matchFromKnownCameraPoses": false, - "exportDebugFiles": false, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/" - } - }, - "ImageMatching_1": { - "nodeType": "ImageMatching", - "position": [ - 179, - 0 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "318dd583377e8b02891a5272cb77ab8c8a03dd0c" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{FeatureExtraction_1.input}", - "featuresFolders": [ - "{FeatureExtraction_1.output}" - ], - "method": "SequentialAndVocabularyTree", - "tree": "${ALICEVISION_VOCTREE}", - "weights": "", - "minNbImages": 200, - "maxDescriptors": 500, - "nbMatches": 40, - "nbNeighbors": 5, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/imageMatches.txt" - } - }, - "LightingCalibration_1": { - "nodeType": "LightingCalibration", - "position": [ - 1288, - 253 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "d6a02cd279f71d7cfa71b7dfb370eee2818e7ad9" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "inputPath": "{SphereDetection_1.input}", - "inputDetection": "{SphereDetection_1.output}", - "saveAsModel": false, - "ellipticEstimation": false, - "method": "brightestPoint", - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "outputFile": "{cache}/{nodeType}/{uid0}//lights.json" - } - }, - "MeshFiltering_1": { - "nodeType": "MeshFiltering", - "position": [ - 1579, - 0 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "66c8793afd4e065cd120db2b97d193fdd0c4d62b" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "inputMesh": "{Meshing_1.outputMesh}", - "outputMeshFileType": "obj", - "keepLargestMeshOnly": false, - "smoothingSubset": "all", - "smoothingBoundariesNeighbours": 0, - "smoothingIterations": 5, - "smoothingLambda": 1.0, - "filteringSubset": "all", - "filteringIterations": 1, - "filterLargeTrianglesFactor": 60.0, - "filterTrianglesRatio": 0.0, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}" - } - }, - "Meshing_1": { - "nodeType": "Meshing", - "position": [ - 1379, - 0 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "15f7bc52058eb51a68bd22a427b18bf50bd8cec5" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{DepthMapFilter_1.input}", - "depthMapsFolder": "{DepthMapFilter_1.output}", - "outputMeshFileType": "obj", - "useBoundingBox": false, - "boundingBox": { - "bboxTranslation": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "bboxRotation": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "bboxScale": { - "x": 1.0, - "y": 1.0, - "z": 1.0 - } - }, - "estimateSpaceFromSfM": true, - "estimateSpaceMinObservations": 3, - "estimateSpaceMinObservationAngle": 10.0, - "maxInputPoints": 50000000, - "maxPoints": 5000000, - "maxPointsPerVoxel": 1000000, - "minStep": 2, - "partitioning": "singleBlock", - "repartition": "multiResolution", - "angleFactor": 15.0, - "simFactor": 15.0, - "minVis": 2, - "pixSizeMarginInitCoef": 2.0, - "pixSizeMarginFinalCoef": 4.0, - "voteMarginFactor": 4.0, - "contributeMarginFactor": 2.0, - "simGaussianSizeInit": 10.0, - "simGaussianSize": 10.0, - "minAngleThreshold": 1.0, - "refineFuse": true, - "helperPointsGridSize": 10, - "densify": false, - "densifyNbFront": 1, - "densifyNbBack": 1, - "densifyScale": 20.0, - "nPixelSizeBehind": 4.0, - "fullWeight": 1.0, - "voteFilteringForWeaklySupportedSurfaces": true, - "addLandmarksToTheDensePointCloud": false, - "invertTetrahedronBasedOnNeighborsNbIterations": 10, - "minSolidAngleRatio": 0.2, - "nbSolidAngleFilteringIterations": 2, - "colorizeOutput": false, - "addMaskHelperPoints": false, - "maskHelperPointsWeight": 1.0, - "maskBorderSize": 4, - "maxNbConnectedHelperPoints": 50, - "saveRawDensePointCloud": false, - "exportDebugTetrahedralization": false, - "seed": 0, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "outputMesh": "{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}", - "output": "{cache}/{nodeType}/{uid0}/densePointCloud.abc" - } - }, - "PhotometricStereo_1": { - "nodeType": "PhotometricStereo", - "position": [ - 1491, - 250 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "02ade34b229d605d1289993b64378e52ab3b5b0e" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "inputPath": "{LightingCalibration_1.inputPath}", - "pathToJSONLightFile": "{LightingCalibration_1.outputFile}", - "maskPath": "", - "SHOrder": "0", - "removeAmbient": false, - "isRobust": false, - "downscale": 1, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "outputPath": "{cache}/{nodeType}/{uid0}/", - "outputSfmDataAlbedo": "{cache}/{nodeType}/{uid0}//albedoMaps.sfm", - "outputSfmDataNormal": "{cache}/{nodeType}/{uid0}//normalMaps.sfm", - "outputSfmDataNormalPNG": "{cache}/{nodeType}/{uid0}//normalMapsPNG.sfm", - "normals": "{cache}/{nodeType}/{uid0}/<POSE_ID>_normals.exr", - "normalsPNG": "{cache}/{nodeType}/{uid0}/<POSE_ID>_normals.png", - "normalsWorld": "{cache}/{nodeType}/{uid0}/<POSE_ID>_normals_w.exr", - "albedo": "{cache}/{nodeType}/{uid0}/<POSE_ID>_albedo.png" - } - }, - "PrepareDenseScene_1": { - "nodeType": "PrepareDenseScene", - "position": [ - 779, - 0 - ], - "parallelization": { - "blockSize": 40, - "size": 1, - "split": 1 - }, - "uids": { - "0": "3463d763b471ca150ef3807279b85089938a7ff3" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{StructureFromMotion_1.output}", - "imagesFolders": [], - "masksFolders": [], - "maskExtension": "png", - "outputFileType": "exr", - "saveMetadata": true, - "saveMatricesTxtFiles": false, - "evCorrection": false, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" - } - }, - "PrepareDenseScene_2": { - "nodeType": "PrepareDenseScene", - "position": [ - 2147, - 282 - ], - "parallelization": { - "blockSize": 40, - "size": 1, - "split": 1 - }, - "uids": { - "0": "cb941f1053ccb7f6c2cb42eb238d06500ab5259f" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{PhotometricStereo_1.outputSfmDataAlbedo}", - "imagesFolders": [], - "masksFolders": [], - "maskExtension": "png", - "outputFileType": "exr", - "saveMetadata": true, - "saveMatricesTxtFiles": false, - "evCorrection": false, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" - } - }, - "PrepareDenseScene_3": { - "nodeType": "PrepareDenseScene", - "position": [ - 2145, - 412 - ], - "parallelization": { - "blockSize": 40, - "size": 1, - "split": 1 - }, - "uids": { - "0": "bd837101d892068c3f97d192f3fee74d427bd0e4" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{PhotometricStereo_1.outputSfmDataNormal}", - "imagesFolders": [], - "masksFolders": [], - "maskExtension": "png", - "outputFileType": "exr", - "saveMetadata": true, - "saveMatricesTxtFiles": false, - "evCorrection": false, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" - } - }, - "PrepareDenseScene_4": { - "nodeType": "PrepareDenseScene", - "position": [ - 2147, - 538 - ], - "parallelization": { - "blockSize": 40, - "size": 1, - "split": 1 - }, - "uids": { - "0": "4bc441f4e0b8ee779d1f2b5c14b1fec412e4acca" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{PhotometricStereo_1.outputSfmDataNormalPNG}", - "imagesFolders": [], - "masksFolders": [], - "maskExtension": "png", - "outputFileType": "exr", - "saveMetadata": true, - "saveMatricesTxtFiles": false, - "evCorrection": false, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "undistorted": "{cache}/{nodeType}/{uid0}/<VIEW_ID>.{outputFileTypeValue}" - } - }, - "SfMFilter_1": { - "nodeType": "SfMFilter", - "position": [ - -227, - 204 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "9e0e6b69f2f386737ebee8a8e042b9d0dcdf67c1" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "inputFile": "{CameraInit_1.output}", - "fileMatchingPattern": ".*/.*ambiant.*" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "outputSfMData_selected": "{cache}/{nodeType}/{uid0}//selectedSfmData.sfm", - "outputSfMData_unselected": "{cache}/{nodeType}/{uid0}//unselectedSfmData.sfm" - } - }, - "SfMTransfer_1": { - "nodeType": "SfMTransfer", - "position": [ - 794, - 208 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "b56ad497dd172de96af8cb703b1ccfbc211826a1" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{SfMFilter_1.outputSfMData_unselected}", - "reference": "{StructureFromMotion_1.output}", - "method": "from_poseid", - "fileMatchingPattern": ".*\\/(.*?)\\.\\w{3}", - "metadataMatchingList": [], - "transferPoses": true, - "transferIntrinsics": true, - "transferLandmarks": true, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/unselectedSfmData.abc", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm" - } - }, - "SphereDetection_1": { - "nodeType": "SphereDetection", - "position": [ - 1100, - 255 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "13f91bad9e2a3386df185b9cbc622608f991b844" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{SfMTransfer_1.output}", - "modelPath": "${ALICEVISION_SPHERE_DETECTION_MODEL}", - "autoDetect": false, - "minScore": 0.0, - "sphereCenter": { - "x": 0.0, - "y": 0.0 - }, - "sphereRadius": 500.0, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}//detection.json" - } - }, - "StructureFromMotion_1": { - "nodeType": "StructureFromMotion", - "position": [ - 579, - 0 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "543bcfc99c4c7d374db4ac0f42677bbc7e372a79" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{FeatureMatching_1.input}", - "featuresFolders": "{FeatureMatching_1.featuresFolders}", - "matchesFolders": [ - "{FeatureMatching_1.output}" - ], - "describerTypes": "{FeatureMatching_1.describerTypes}", - "localizerEstimator": "acransac", - "observationConstraint": "Scale", - "localizerEstimatorMaxIterations": 4096, - "localizerEstimatorError": 0.0, - "lockScenePreviouslyReconstructed": false, - "useLocalBA": true, - "localBAGraphDistance": 1, - "nbFirstUnstableCameras": 30, - "maxImagesPerGroup": 30, - "bundleAdjustmentMaxOutliers": 50, - "maxNumberOfMatches": 0, - "minNumberOfMatches": 0, - "minInputTrackLength": 2, - "minNumberOfObservationsForTriangulation": 2, - "minAngleForTriangulation": 3.0, - "minAngleForLandmark": 2.0, - "maxReprojectionError": 4.0, - "minAngleInitialPair": 5.0, - "maxAngleInitialPair": 40.0, - "useOnlyMatchesFromInputFolder": false, - "useRigConstraint": true, - "rigMinNbCamerasForCalibration": 20, - "lockAllIntrinsics": false, - "minNbCamerasToRefinePrincipalPoint": 3, - "filterTrackForks": false, - "computeStructureColor": true, - "useAutoTransform": true, - "initialPairA": "", - "initialPairB": "", - "interFileExtension": ".abc", - "logIntermediateSteps": false, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/sfm.abc", - "outputViewsAndPoses": "{cache}/{nodeType}/{uid0}/cameras.sfm", - "extraInfoFolder": "{cache}/{nodeType}/{uid0}/" - } - }, - "Texturing_1": { - "nodeType": "Texturing", - "position": [ - 1779, - 0 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "b74e59c14e9d0116f95e4c342d273193f18b74dc" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{DepthMap_1.imagesFolder}", - "normalsFolder": "", - "inputMesh": "{MeshFiltering_1.outputMesh}", - "inputRefMesh": "", - "textureSide": 8192, - "downscale": 2, - "outputMeshFileType": "obj", - "colorMapping": { - "enable": true, - "colorMappingFileType": "exr" - }, - "bumpMapping": { - "enable": true, - "bumpType": "Normal", - "normalFileType": "exr", - "heightFileType": "exr" - }, - "displacementMapping": { - "enable": true, - "displacementMappingFileType": "exr" - }, - "unwrapMethod": "Basic", - "useUDIM": true, - "fillHoles": false, - "padding": 5, - "multiBandDownscale": 4, - "multiBandNbContrib": { - "high": 1, - "midHigh": 5, - "midLow": 10, - "low": 0 - }, - "useScore": true, - "bestScoreThreshold": 0.1, - "angleHardThreshold": 90.0, - "workingColorSpace": "sRGB", - "outputColorSpace": "AUTO", - "correctEV": true, - "forceVisibleByAllVertices": false, - "flipNormals": false, - "visibilityRemappingMethod": "PullPush", - "subdivisionTargetRatio": 0.8, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", - "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", - "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" - } - }, - "Texturing_2": { - "nodeType": "Texturing", - "position": [ - 2448, - 240 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "2290fe547144a7ae68c7907ba6cb65dc496f2549" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{PrepareDenseScene_2.output}", - "normalsFolder": "", - "inputMesh": "{MeshFiltering_1.outputMesh}", - "inputRefMesh": "", - "textureSide": 8192, - "downscale": 2, - "outputMeshFileType": "obj", - "colorMapping": { - "enable": true, - "colorMappingFileType": "exr" - }, - "bumpMapping": { - "enable": true, - "bumpType": "Normal", - "normalFileType": "exr", - "heightFileType": "exr" - }, - "displacementMapping": { - "enable": true, - "displacementMappingFileType": "exr" - }, - "unwrapMethod": "Basic", - "useUDIM": true, - "fillHoles": false, - "padding": 5, - "multiBandDownscale": 4, - "multiBandNbContrib": { - "high": 1, - "midHigh": 5, - "midLow": 10, - "low": 0 - }, - "useScore": true, - "bestScoreThreshold": 0.1, - "angleHardThreshold": 90.0, - "workingColorSpace": "sRGB", - "outputColorSpace": "AUTO", - "correctEV": true, - "forceVisibleByAllVertices": false, - "flipNormals": false, - "visibilityRemappingMethod": "PullPush", - "subdivisionTargetRatio": 0.8, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", - "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", - "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" - } - }, - "Texturing_3": { - "nodeType": "Texturing", - "position": [ - 2445, - 432 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "b1f98e8db0a8bbae0509b7b42ef60d688b9af1f2" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{PrepareDenseScene_3.output}", - "normalsFolder": "", - "inputMesh": "{MeshFiltering_1.outputMesh}", - "inputRefMesh": "", - "textureSide": 8192, - "downscale": 2, - "outputMeshFileType": "obj", - "colorMapping": { - "enable": true, - "colorMappingFileType": "exr" - }, - "bumpMapping": { - "enable": true, - "bumpType": "Normal", - "normalFileType": "exr", - "heightFileType": "exr" - }, - "displacementMapping": { - "enable": true, - "displacementMappingFileType": "exr" - }, - "unwrapMethod": "Basic", - "useUDIM": true, - "fillHoles": false, - "padding": 5, - "multiBandDownscale": 4, - "multiBandNbContrib": { - "high": 1, - "midHigh": 5, - "midLow": 10, - "low": 0 - }, - "useScore": true, - "bestScoreThreshold": 0.1, - "angleHardThreshold": 90.0, - "workingColorSpace": "sRGB", - "outputColorSpace": "AUTO", - "correctEV": true, - "forceVisibleByAllVertices": false, - "flipNormals": false, - "visibilityRemappingMethod": "PullPush", - "subdivisionTargetRatio": 0.8, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", - "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", - "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" - } - }, - "Texturing_4": { - "nodeType": "Texturing", - "position": [ - 2449, - 630 - ], - "parallelization": { - "blockSize": 0, - "size": 1, - "split": 1 - }, - "uids": { - "0": "8116978adf911c883f0b3740eb0876e60d31386c" - }, - "internalFolder": "{cache}/{nodeType}/{uid0}/", - "inputs": { - "input": "{Meshing_1.output}", - "imagesFolder": "{PrepareDenseScene_4.output}", - "normalsFolder": "", - "inputMesh": "{MeshFiltering_1.outputMesh}", - "inputRefMesh": "", - "textureSide": 8192, - "downscale": 2, - "outputMeshFileType": "obj", - "colorMapping": { - "enable": true, - "colorMappingFileType": "exr" - }, - "bumpMapping": { - "enable": true, - "bumpType": "Normal", - "normalFileType": "exr", - "heightFileType": "exr" - }, - "displacementMapping": { - "enable": true, - "displacementMappingFileType": "exr" - }, - "unwrapMethod": "Basic", - "useUDIM": true, - "fillHoles": false, - "padding": 5, - "multiBandDownscale": 4, - "multiBandNbContrib": { - "high": 1, - "midHigh": 5, - "midLow": 10, - "low": 0 - }, - "useScore": true, - "bestScoreThreshold": 0.1, - "angleHardThreshold": 90.0, - "workingColorSpace": "sRGB", - "outputColorSpace": "AUTO", - "correctEV": true, - "forceVisibleByAllVertices": false, - "flipNormals": false, - "visibilityRemappingMethod": "PullPush", - "subdivisionTargetRatio": 0.8, - "verboseLevel": "info" - }, - "internalInputs": { - "invalidation": "", - "comment": "", - "label": "", - "color": "" - }, - "outputs": { - "output": "{cache}/{nodeType}/{uid0}/", - "outputMesh": "{cache}/{nodeType}/{uid0}/texturedMesh.{outputMeshFileTypeValue}", - "outputMaterial": "{cache}/{nodeType}/{uid0}/texturedMesh.mtl", - "outputTextures": "{cache}/{nodeType}/{uid0}/texture_*.exr" - } - } - } -} \ No newline at end of file diff --git a/meshroom/multi-viewPhotometricStereo.mg b/meshroom/multi-viewPhotometricStereo.mg new file mode 100644 index 0000000000..5553994bbd --- /dev/null +++ b/meshroom/multi-viewPhotometricStereo.mg @@ -0,0 +1,277 @@ +{ + "header": { + "pipelineVersion": "2.2", + "releaseVersion": "2024.1.0-develop", + "fileVersion": "2.0", + "template": true, + "nodesVersions": { + "CameraInit": "11.0", + "DepthMap": "5.0", + "DepthMapFilter": "4.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "LightingCalibration": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PhotometricStereo": "1.0", + "PrepareDenseScene": "3.1", + "SfMFilter": "1.0", + "SfMTransfer": "2.1", + "SphereDetection": "1.0", + "StructureFromMotion": "3.3", + "Texturing": "6.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -400, + 200 + ], + "inputs": { + "rawColorInterpretation": "LibRawWhiteBalancing" + } + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 1200, + 0 + ], + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 1000, + 0 + ], + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{SfMFilter_1.outputSfMData_selected}" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}", + "maxIteration": 2048 + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + } + }, + "LightingCalibration_1": { + "nodeType": "LightingCalibration", + "position": [ + 1200, + 200 + ], + "inputs": { + "inputPath": "{SphereDetection_1.input}", + "inputDetection": "{SphereDetection_1.output}" + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 1600, + 0 + ], + "inputs": { + "inputMesh": "{Meshing_1.outputMesh}" + } + }, + "Meshing_1": { + "nodeType": "Meshing", + "position": [ + 1400, + 0 + ], + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}" + } + }, + "PhotometricStereo_1": { + "nodeType": "PhotometricStereo", + "position": [ + 1400, + 200 + ], + "inputs": { + "inputPath": "{LightingCalibration_1.inputPath}", + "pathToJSONLightFile": "{LightingCalibration_1.outputFile}" + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 800, + 0 + ], + "inputs": { + "input": "{StructureFromMotion_1.output}" + } + }, + "PrepareDenseScene_2": { + "nodeType": "PrepareDenseScene", + "position": [ + 2200, + 200 + ], + "inputs": { + "input": "{PhotometricStereo_1.outputSfmDataAlbedo}" + } + }, + "PrepareDenseScene_3": { + "nodeType": "PrepareDenseScene", + "position": [ + 2200, + 400 + ], + "inputs": { + "input": "{PhotometricStereo_1.outputSfmDataNormal}" + } + }, + "PrepareDenseScene_4": { + "nodeType": "PrepareDenseScene", + "position": [ + 2200, + 600 + ], + "inputs": { + "input": "{PhotometricStereo_1.outputSfmDataNormalPNG}" + } + }, + "SfMFilter_1": { + "nodeType": "SfMFilter", + "position": [ + -200, + 200 + ], + "inputs": { + "inputFile": "{CameraInit_1.output}", + "fileMatchingPattern": ".*/.*ambiant.*" + } + }, + "SfMTransfer_1": { + "nodeType": "SfMTransfer", + "position": [ + 800, + 200 + ], + "inputs": { + "input": "{SfMFilter_1.outputSfMData_unselected}", + "reference": "{StructureFromMotion_1.output}", + "method": "from_poseid" + } + }, + "SphereDetection_1": { + "nodeType": "SphereDetection", + "position": [ + 1000, + 200 + ], + "inputs": { + "input": "{SfMTransfer_1.output}" + } + }, + "StructureFromMotion_1": { + "nodeType": "StructureFromMotion", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}", + "localizerEstimatorMaxIterations": 4096 + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 1800, + 0 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{DepthMap_1.imagesFolder}", + "inputMesh": "{MeshFiltering_1.outputMesh}" + } + }, + "Texturing_2": { + "nodeType": "Texturing", + "position": [ + 2400, + 200 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_2.output}", + "inputMesh": "{MeshFiltering_1.outputMesh}" + } + }, + "Texturing_3": { + "nodeType": "Texturing", + "position": [ + 2400, + 400 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_3.output}", + "inputMesh": "{MeshFiltering_1.outputMesh}" + } + }, + "Texturing_4": { + "nodeType": "Texturing", + "position": [ + 2400, + 600 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_4.output}", + "inputMesh": "{MeshFiltering_1.outputMesh}" + } + } + } +} \ No newline at end of file From 7bd38350d94b49fa7af17b843cbf0a9e1d31803d Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 17 Dec 2024 10:45:40 +0100 Subject: [PATCH 1057/1093] Export Maya --- meshroom/aliceVision/ExportMaya.py | 150 ++++++++++++++++++++++++++--- 1 file changed, 139 insertions(+), 11 deletions(-) diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index d87b6da02f..08cb7d5f07 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -3,17 +3,13 @@ from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL - -class ExportMaya(desc.AVCommandLineNode): - commandLine = 'aliceVision_exportMeshroomMaya {allParams}' +class ExportMaya(desc.Node): category = 'Export' documentation = ''' -Export a scene for Autodesk Maya, with an Alembic file describing the SfM: cameras and 3D points. -It will export half-size undistorted images to use as image planes for cameras and also export thumbnails. -Use the MeshroomMaya plugin, to load the ABC file. It will recognize the file structure and will setup the scene. -MeshroomMaya contains a user interface to browse all cameras. -''' + Export a Maya script. + This script executed inside Maya, will gather the Meshroom computed elements. + ''' inputs = [ desc.File( @@ -22,6 +18,24 @@ class ExportMaya(desc.AVCommandLineNode): description="Input SfMData file.", value="", ), + desc.File( + name="alembic", + label="Alembic file", + description="Input alembic file.", + value="", + ), + desc.File( + name="mesh", + label="Input Mesh", + description="Input Mesh file.", + value="", + ), + desc.File( + name="images", + label="Undistorted Images", + description="Undistorted images template.", + value="", + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", @@ -34,8 +48,122 @@ class ExportMaya(desc.AVCommandLineNode): outputs = [ desc.File( name="output", - label="Folder", - description="Folder for MeshroomMaya outputs: undistorted images and thumbnails.", - value=desc.Node.internalFolder, + label="Mel script", + description="Generated mel script", + value=desc.Node.internalFolder + "import.mel", ), ] + + def processChunk(self, chunk): + + import pyalicevision + import pathlib + + chunk.logManager.start(chunk.node.verboseLevel.value) + + chunk.logger.info("Open input file") + data = pyalicevision.sfmData.SfMData() + ret = pyalicevision.sfmDataIO.load(data, chunk.node.input.value, pyalicevision.sfmDataIO.ALL) + if not ret: + chunk.logger.error("Cannot open input") + chunk.logManager.end() + raise RuntimeError() + + #Check that we have Only one intrinsic + intrinsics = data.getIntrinsics() + if len(intrinsics) > 1: + chunk.logger.error("Only project with a single intrinsic are supported") + chunk.logManager.end() + raise RuntimeError() + + intrinsicId = next(iter(intrinsics)) + intrinsic = intrinsics[intrinsicId] + w = intrinsic.w() + h = intrinsic.h() + + cam = pyalicevision.camera.Pinhole.cast(intrinsic) + if cam == None: + chunk.logger.error("Intrinsic is not a required pinhole model") + chunk.logManager.end() + raise RuntimeError() + + offset = cam.getOffset() + pix2inches = cam.sensorWidth() / (25.4 * max(w, h)); + ox = -pyalicevision.numeric.getX(offset) * pix2inches + oy = pyalicevision.numeric.getY(offset) * pix2inches + + scale = cam.getScale() + fx = pyalicevision.numeric.getX(scale) + fy = pyalicevision.numeric.getY(scale) + + + #Retrieve the first frame + + minIntrinsicId = 0 + minFrameId = 0 + minFrameName = '' + first = True + views = data.getViews() + + for viewId in views: + + view = views[viewId] + frameId = view.getFrameId() + intrinsicId = view.getIntrinsicId() + frameName = pathlib.Path(view.getImageInfo().getImagePath()).stem + + if first or frameId < minFrameId: + minFrameId = frameId + minIntrinsicId = intrinsicId + minFrameName = frameName + first = False + + + #Generate the script itself + + alembic = chunk.node.alembic.value + abcString = f'AbcImport -mode open -fitTimeRange "{alembic}";' + + mesh = chunk.node.mesh.value + objString = f'file -import -type "OBJ" -ignoreVersion -ra true -mbl true -mergeNamespacesOnClash false -namespace "mesh" -options "mo=1" -pr -importTimeRange "combine" "{mesh}";' + + framePath = chunk.node.images.value.replace('<INTRINSIC_ID>', str(minIntrinsicId)).replace('<FILESTEM>', minFrameName) + + camString = f''' + select -r mvgCameras ; + string $camName[] = `listRelatives`; + + currentTime {minFrameId}; + + imagePlane -c $camName[0] -fileName "{framePath}"; + + setAttr "imagePlaneShape1.useFrameExtension" 1; + setAttr "imagePlaneShape1.offsetX" {ox}; + setAttr "imagePlaneShape1.offsetY" {oy}; + ''' + + ipa = fx / fy + advCamString = '' + + if abs(ipa - 1.0) < 1e-6: + advCamString = f''' + setAttr "imagePlaneShape1.fit" 1; + ''' + else: + advCamString = f''' + setAttr "imagePlaneShape1.fit" 4; + setAttr "imagePlaneShape1.squeezeCorrection" {ipa}; + + select -r $camName[0]; + float $vaperture = `getAttr ".verticalFilmAperture"`; + float $scaledvaperture = $vaperture * {ipa}; + setAttr "imagePlaneShape1.sizeY" $scaledvaperture; + ''' + + with open(chunk.node.output.value, "w") as f: + f.write(abcString + '\n') + f.write(objString + '\n') + f.write(camString + '\n') + f.write(advCamString + '\n') + + chunk.logManager.end() From 5357f873bd09b09ce8203a0607e9513bead8fbcf Mon Sep 17 00:00:00 2001 From: "Fabien Servant @ TCS" <100348063+servantftechnicolor@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:03:48 +0100 Subject: [PATCH 1058/1093] Update ExportDistortion version number --- meshroom/aliceVision/ExportDistortion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index 9e2e53cab1..e350e759df 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL From 0c8a692db62e6d651b565678cc5a8592f068ed9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 23 Dec 2024 18:24:56 +0100 Subject: [PATCH 1059/1093] [pipelines] Update `ExportDistortion` version for all nodes --- meshroom/cameraTracking.mg | 2 +- meshroom/cameraTrackingWithoutCalibration.mg | 2 +- meshroom/distortionCalibration.mg | 2 +- meshroom/nodalCameraTracking.mg | 2 +- meshroom/nodalCameraTrackingWithoutCalibration.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index 8c324dcc62..69f7fa800f 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -12,7 +12,7 @@ "DepthMapFilter": "4.0", "DistortionCalibration": "5.0", "ExportAnimatedCamera": "2.0", - "ExportDistortion": "1.0", + "ExportDistortion": "2.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 21dea17160..88a79741b8 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -11,7 +11,7 @@ "DepthMap": "5.0", "DepthMapFilter": "4.0", "ExportAnimatedCamera": "2.0", - "ExportDistortion": "1.0", + "ExportDistortion": "2.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index f30ab461c6..6c13ae5d12 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -7,7 +7,7 @@ "CameraInit": "11.0", "CheckerboardDetection": "1.0", "DistortionCalibration": "5.0", - "ExportDistortion": "1.0", + "ExportDistortion": "2.0", "Publish": "1.3" } }, diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 49006d4ae5..fc4bb334d5 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -10,7 +10,7 @@ "ConvertSfMFormat": "2.0", "DistortionCalibration": "5.0", "ExportAnimatedCamera": "2.0", - "ExportDistortion": "1.0", + "ExportDistortion": "2.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 30d8c6c293..a37b039c92 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -8,7 +8,7 @@ "ConvertDistortion": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", - "ExportDistortion": "1.0", + "ExportDistortion": "2.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index ccd0f53c65..39d5dbf721 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -12,7 +12,7 @@ "DepthMapFilter": "4.0", "DistortionCalibration": "5.0", "ExportAnimatedCamera": "2.0", - "ExportDistortion": "1.0", + "ExportDistortion": "2.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", From 533b3f323e94c3b9451a31ad44e62f2ce35e6bb7 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 27 Dec 2024 12:36:40 +0100 Subject: [PATCH 1060/1093] add camera init type --- meshroom/aliceVision/CameraInit.py | 7 ++++--- meshroom/cameraTracking.mg | 2 +- meshroom/cameraTrackingWithoutCalibration.mg | 2 +- meshroom/distortionCalibration.mg | 2 +- meshroom/hdrFusion.mg | 2 +- meshroom/multi-viewPhotometricStereo.mg | 2 +- meshroom/nodalCameraTracking.mg | 2 +- meshroom/nodalCameraTrackingWithoutCalibration.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 2 +- meshroom/photogrammetryDraft.mg | 2 +- meshroom/photometricStereo.mg | 2 +- 14 files changed, 17 insertions(+), 16 deletions(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index 43915693c6..bc7246ba6a 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -1,4 +1,4 @@ -__version__ = "11.0" +__version__ = "12.0" import os import json @@ -131,9 +131,10 @@ description="Mathematical model used to represent a camera:\n" " - pinhole: Simplest projective camera model without optical distortion " "(focal and optical center).\n" - " - equidistant: Non-projective camera model suited for full-fisheye optics.\n", + " - equidistant: Non-projective camera model suited for full-fisheye optics.\n" + " - equirectangular: Projection model used in panoramas.\n", value="pinhole", - values=["pinhole", "equidistant"], + values=["pinhole", "equidistant", "equirectangular"], ), desc.ChoiceParam( name="distortionType", diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index dbf74029d0..5291e7b548 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -5,7 +5,7 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "11.0", + "CameraInit": "12.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index 98a4886b9f..4a27fe4ecc 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -5,7 +5,7 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "11.0", + "CameraInit": "12.0", "ConvertDistortion": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index f30ab461c6..cf5a8d13b6 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -4,7 +4,7 @@ "fileVersion": "2.0", "template": true, "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "CheckerboardDetection": "1.0", "DistortionCalibration": "5.0", "ExportDistortion": "1.0", diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 78e518a830..b43017f68b 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "LdrToHdrCalibration": "3.1", "LdrToHdrMerge": "4.1", "LdrToHdrSampling": "4.0", diff --git a/meshroom/multi-viewPhotometricStereo.mg b/meshroom/multi-viewPhotometricStereo.mg index 5553994bbd..d1e7a52947 100644 --- a/meshroom/multi-viewPhotometricStereo.mg +++ b/meshroom/multi-viewPhotometricStereo.mg @@ -5,7 +5,7 @@ "fileVersion": "2.0", "template": true, "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "DepthMap": "5.0", "DepthMapFilter": "4.0", "FeatureExtraction": "1.3", diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 2e7b6c6b7f..2d90f10ddd 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -5,7 +5,7 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "11.0", + "CameraInit": "12.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "DistortionCalibration": "5.0", diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index b67064aba8..0e1a055fc4 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -4,7 +4,7 @@ "fileVersion": "2.0", "template": true, "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "ConvertDistortion": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 764b204aba..41a85e830e 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 4d67f0f3fe..7c42a28283 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index cc6181fd40..3908fe5477 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -4,7 +4,7 @@ "fileVersion": "2.0", "template": true, "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "DepthMap": "5.0", "DepthMapFilter": "4.0", "FeatureExtraction": "1.3", diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index 3d324ddc32..a9de0ad917 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -5,7 +5,7 @@ "template": true, "nodesVersions": { "ApplyCalibration": "1.0", - "CameraInit": "11.0", + "CameraInit": "12.0", "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "DepthMap": "5.0", diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 6e41617d24..28766ad561 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -1,7 +1,7 @@ { "header": { "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "FeatureExtraction": "1.3", "FeatureMatching": "2.0", "ImageMatching": "2.0", diff --git a/meshroom/photometricStereo.mg b/meshroom/photometricStereo.mg index 9a76d73794..4fbc39abbd 100644 --- a/meshroom/photometricStereo.mg +++ b/meshroom/photometricStereo.mg @@ -4,7 +4,7 @@ "fileVersion": "2.0", "template": true, "nodesVersions": { - "CameraInit": "11.0", + "CameraInit": "12.0", "LightingCalibration": "1.0", "PhotometricStereo": "1.0", "Publish": "1.3", From 02737b677a1eaa66646cc8da016b42c5819f7475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 6 Jan 2025 16:06:40 +0100 Subject: [PATCH 1061/1093] [pipelines] Update release version to "2025.1.0" for all templates --- meshroom/cameraTracking.mg | 2 +- meshroom/cameraTrackingWithoutCalibration.mg | 2 +- meshroom/distortionCalibration.mg | 2 +- meshroom/hdrFusion.mg | 2 +- meshroom/multi-viewPhotometricStereo.mg | 2 +- meshroom/nodalCameraTracking.mg | 2 +- meshroom/nodalCameraTrackingWithoutCalibration.mg | 2 +- meshroom/panoramaFisheyeHdr.mg | 2 +- meshroom/panoramaHdr.mg | 2 +- meshroom/photogrammetry.mg | 2 +- meshroom/photogrammetryAndCameraTracking.mg | 2 +- meshroom/photogrammetryDraft.mg | 2 +- meshroom/photometricStereo.mg | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/meshroom/cameraTracking.mg b/meshroom/cameraTracking.mg index c8f636a4f4..81c7668b4b 100644 --- a/meshroom/cameraTracking.mg +++ b/meshroom/cameraTracking.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/cameraTrackingWithoutCalibration.mg b/meshroom/cameraTrackingWithoutCalibration.mg index d7cecb7eac..42fd43c549 100644 --- a/meshroom/cameraTrackingWithoutCalibration.mg +++ b/meshroom/cameraTrackingWithoutCalibration.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/distortionCalibration.mg b/meshroom/distortionCalibration.mg index 6c13ae5d12..f3589277fb 100644 --- a/meshroom/distortionCalibration.mg +++ b/meshroom/distortionCalibration.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/hdrFusion.mg b/meshroom/hdrFusion.mg index 78e518a830..fb38ea2b73 100644 --- a/meshroom/hdrFusion.mg +++ b/meshroom/hdrFusion.mg @@ -7,7 +7,7 @@ "LdrToHdrSampling": "4.0", "Publish": "1.3" }, - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true }, diff --git a/meshroom/multi-viewPhotometricStereo.mg b/meshroom/multi-viewPhotometricStereo.mg index 5553994bbd..5a87ee7016 100644 --- a/meshroom/multi-viewPhotometricStereo.mg +++ b/meshroom/multi-viewPhotometricStereo.mg @@ -1,7 +1,7 @@ { "header": { "pipelineVersion": "2.2", - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index a183d2d660..740492618f 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index 16b7d7dc4d..ab99676f02 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/panoramaFisheyeHdr.mg b/meshroom/panoramaFisheyeHdr.mg index 764b204aba..d796195728 100644 --- a/meshroom/panoramaFisheyeHdr.mg +++ b/meshroom/panoramaFisheyeHdr.mg @@ -19,7 +19,7 @@ "Publish": "1.3", "SfMTransform": "3.1" }, - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true }, diff --git a/meshroom/panoramaHdr.mg b/meshroom/panoramaHdr.mg index 4d67f0f3fe..f3184cf19f 100644 --- a/meshroom/panoramaHdr.mg +++ b/meshroom/panoramaHdr.mg @@ -19,7 +19,7 @@ "Publish": "1.3", "SfMTransform": "3.1" }, - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true }, diff --git a/meshroom/photogrammetry.mg b/meshroom/photogrammetry.mg index cc6181fd40..54e615fb0a 100644 --- a/meshroom/photogrammetry.mg +++ b/meshroom/photogrammetry.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/photogrammetryAndCameraTracking.mg b/meshroom/photogrammetryAndCameraTracking.mg index c8969b20bf..c52aa0b637 100644 --- a/meshroom/photogrammetryAndCameraTracking.mg +++ b/meshroom/photogrammetryAndCameraTracking.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { diff --git a/meshroom/photogrammetryDraft.mg b/meshroom/photogrammetryDraft.mg index 6e41617d24..50a494c018 100644 --- a/meshroom/photogrammetryDraft.mg +++ b/meshroom/photogrammetryDraft.mg @@ -12,7 +12,7 @@ "StructureFromMotion": "3.3", "Texturing": "6.0" }, - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true }, diff --git a/meshroom/photometricStereo.mg b/meshroom/photometricStereo.mg index 9a76d73794..6bf2faa8e0 100644 --- a/meshroom/photometricStereo.mg +++ b/meshroom/photometricStereo.mg @@ -1,6 +1,6 @@ { "header": { - "releaseVersion": "2024.1.0-develop", + "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", "template": true, "nodesVersions": { From 171c23876f327b4979152a798500cce9d824b88d Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Fri, 10 Jan 2025 16:09:47 +0100 Subject: [PATCH 1062/1093] Update sfm pipeline to accept meshes --- meshroom/aliceVision/RelativePoseEstimating.py | 10 +++++++++- meshroom/aliceVision/SfmBootstraping.py | 6 ++++++ meshroom/aliceVision/SfmExpanding.py | 6 ++++++ meshroom/nodalCameraTracking.mg | 2 +- meshroom/nodalCameraTrackingWithoutCalibration.mg | 2 +- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 94254ffaf6..cf231fe538 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -1,4 +1,4 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL @@ -34,6 +34,14 @@ class RelativePoseEstimating(desc.AVCommandLineNode): description="Enforce pure rotation as a model", value=False, ), + desc.IntParam( + name="countIterations", + label="Ransac max iterations", + description="Maximal number of iterations.", + value=1024, + range=(1024, 500000, 1), + advanced=True, + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index c2eeaefb83..4279ac16a5 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -25,6 +25,12 @@ class SfMBootStraping(desc.AVCommandLineNode): description="Tracks file.", value="", ), + desc.File( + name="meshFilename", + label="Mesh File", + description="Mesh file (*.obj).", + value="", + ), desc.File( name="pairs", label="Pairs File", diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index f96cefed69..d58d1a3008 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -28,6 +28,12 @@ class SfMExpanding(desc.AVCommandLineNode): description="Tracks file.", value="", ), + desc.File( + name="meshFilename", + label="Mesh File", + description="Mesh file (*.obj).", + value="", + ), desc.IntParam( name="localizerEstimatorMaxIterations", label="Localizer Max Ransac Iterations", diff --git a/meshroom/nodalCameraTracking.mg b/meshroom/nodalCameraTracking.mg index 2e7b6c6b7f..6468654788 100644 --- a/meshroom/nodalCameraTracking.mg +++ b/meshroom/nodalCameraTracking.mg @@ -18,7 +18,7 @@ "ImageSegmentationBox": "0.1", "NodalSfM": "2.0", "Publish": "1.3", - "RelativePoseEstimating": "2.0", + "RelativePoseEstimating": "3.0", "ScenePreview": "2.0", "TracksBuilding": "1.0" } diff --git a/meshroom/nodalCameraTrackingWithoutCalibration.mg b/meshroom/nodalCameraTrackingWithoutCalibration.mg index b67064aba8..ba9afc9d30 100644 --- a/meshroom/nodalCameraTrackingWithoutCalibration.mg +++ b/meshroom/nodalCameraTrackingWithoutCalibration.mg @@ -16,7 +16,7 @@ "ImageSegmentationBox": "0.1", "NodalSfM": "2.0", "Publish": "1.3", - "RelativePoseEstimating": "2.0", + "RelativePoseEstimating": "3.0", "ScenePreview": "2.0", "TracksBuilding": "1.0" } From 338e60546421519b7b0a78db166eec545d3c6962 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 14 Jan 2025 10:48:35 +0100 Subject: [PATCH 1063/1093] add minInliers parameter (optional) --- meshroom/aliceVision/RelativePoseEstimating.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index cf231fe538..2ec076c07b 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -42,6 +42,14 @@ class RelativePoseEstimating(desc.AVCommandLineNode): range=(1024, 500000, 1), advanced=True, ), + desc.IntParam( + name="minInliers", + label="Ransac min inliers", + description="Minimal allowed inliers in two view relationship.", + value=35, + range=(1, 1000, 1), + advanced=True, + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From c3c2e75865d2718601156e928a05af4975ceae30 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 14 Jan 2025 11:18:14 +0100 Subject: [PATCH 1064/1093] Filters for exportMatches --- meshroom/aliceVision/ExportMatches.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 7e1b7d93d6..5692a18c77 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -50,6 +50,18 @@ class ExportMatches(desc.AVCommandLineNode): label="Matches Folders", description="Folder(s) in which computed matches are stored.", ), + desc.File( + name="filterA", + label="filter A", + description="One item of the pair must match this.", + value="", + ), + desc.File( + name="filterB", + label="filter B", + description="One item of the pair must match this.", + value="", + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From 1ad699e2dcdcf47d0d17b3f541a31e50f7e255c7 Mon Sep 17 00:00:00 2001 From: Vincent Demoulin <vincent.demoulin@gmail.com> Date: Tue, 14 Jan 2025 16:41:58 +0100 Subject: [PATCH 1065/1093] [Nodes] ExtractMetadata initial version --- meshroom/aliceVision/ExtractMetadata.py | 124 ++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 meshroom/aliceVision/ExtractMetadata.py diff --git a/meshroom/aliceVision/ExtractMetadata.py b/meshroom/aliceVision/ExtractMetadata.py new file mode 100644 index 0000000000..0900f9d705 --- /dev/null +++ b/meshroom/aliceVision/ExtractMetadata.py @@ -0,0 +1,124 @@ +__version__ = "0.1" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +import distutils.dir_util as du +import shutil +import glob +import os + + +class ExtractMetadata(desc.Node): + size = desc.DynamicNodeSize("input") + + category = 'Utils' + documentation = ''' +Using exifTool, this node extracts metadata of all images referenced in a sfmData and store them in appropriate files. +''' + + inputs = [ + desc.File( + name="input", + label="Input", + description="SfMData file input.", + value="", + ), + desc.BoolParam( + name="keepFilename", + label="Keep Filename", + description="Keep the filename of the inputs for the outputs.", + value=False, + ), + desc.ChoiceParam( + name="extension", + label="Output File Extension", + description="Metadata file extension.", + value="txt", + values=["txt", "xml", "xmp"], + exclusive=True, + ), + desc.StringParam( + name="arguments", + label="Arguments", + description="ExifTool command arguments", + value="", + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Result Folder", + description="Output path for the resulting images.", + value=desc.Node.internalFolder, + ), + ] + + def resolvedPaths(self, inputSfm, outDir, keepFilename, extension): + import pyalicevision as av + from pathlib import Path + + paths = {} + dataAV = av.sfmData.SfMData() + if av.sfmDataIO.load(dataAV, inputSfm, av.sfmDataIO.ALL) and os.path.isdir(outDir): + views = dataAV.getViews() + for id, v in views.items(): + inputFile = v.getImage().getImagePath() + if keepFilename: + outputMetadata = os.path.join(outDir, Path(inputFile).stem + "." + extension) + else: + outputMetadata = os.path.join(outDir, str(id) + "." + extension) + paths[inputFile] = outputMetadata + + return paths + + def processChunk(self, chunk): + try: + chunk.logManager.start(chunk.node.verboseLevel.value) + + if not chunk.node.input: + chunk.logger.warning('No image file to process') + return + + outFiles = self.resolvedPaths(chunk.node.input.value, chunk.node.output.value, chunk.node.keepFilename.value, chunk.node.extension.value) + + if not outFiles: + error = 'ExtractMetadata: input files listed, but no metadata to extract' + chunk.logger.error(error) + chunk.logger.info('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) + raise RuntimeError(error) + + if not os.path.exists(chunk.node.output.value): + os.mkdir(chunk.node.output.value) + + for iFile, oFile in outFiles.items(): + if chunk.node.extension.value == 'txt': + cmd = 'exiftool ' + chunk.node.arguments.value.strip() + ' ' + iFile + ' > ' + oFile + elif chunk.node.extension.value == 'xml': + cmd = 'exiftool -X ' + chunk.node.arguments.value.strip() + ' ' + iFile + ' > ' + oFile + else: #xmp + cmd = 'exiftool -tagsfromfile ' + iFile + ' ' + chunk.node.arguments.value.strip() + ' ' + oFile + chunk.logger.debug(cmd) + os.system(cmd) + if not os.path.exists(oFile): + info = 'No metadata extracted for file ' + iFile + chunk.logger.info(info) + else: + f = open(oFile) + if f.readline().find('command not found') != -1: + error = 'Metadata cannot be extracted, exiftool command not found' + chunk.logger.error(error) + raise RuntimeError(error) + f.close() + chunk.logger.info('Metadata extraction end') + + finally: + chunk.logManager.end() From 79aba3fcb148ff4989054966f339412c98f9c152 Mon Sep 17 00:00:00 2001 From: Akshat Singh <85480331+Sh1r0Yaksha@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:03:20 +0530 Subject: [PATCH 1066/1093] Fixed spelling mistake in FeatureExtraction.py --- meshroom/aliceVision/FeatureExtraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 961a2b9e32..46b4421573 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -20,7 +20,7 @@ class FeatureExtraction(desc.AVCommandLineNode): The most standard method. This is the default and recommended value for all use cases. * **AKAZE** AKAZE can be interesting solution to extract features in challenging condition. It could be able to match wider angle than SIFT but has drawbacks. -It may extract to many features, the repartition is not always good. +It may extract too many features, the repartition is not always good. It is known to be good on challenging surfaces such as skin. * **CCTAG** CCTag is a marker type with 3 or 4 crowns. You can put markers in the scene during the shooting session to automatically re-orient and re-scale the scene to a known size. From 744a44a992a2631c1e7f14fb7eddff136adb00ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Fri, 17 Jan 2025 17:09:09 +0100 Subject: [PATCH 1067/1093] [nodes] Update labels and versions for nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the versions for all the nodes that have been updated to support meshes as inputs and fix the case for some labels. Co-authored-by: Candice Bentéjac <candice.bentejac@gmail.com> --- meshroom/aliceVision/ExportMatches.py | 6 +++--- meshroom/aliceVision/RelativePoseEstimating.py | 4 ++-- meshroom/aliceVision/SfmBootstraping.py | 4 ++-- meshroom/aliceVision/SfmExpanding.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 5692a18c77..05e40cd138 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -1,4 +1,4 @@ -__version__ = "1.1" +__version__ = "2.0" from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL @@ -52,13 +52,13 @@ class ExportMatches(desc.AVCommandLineNode): ), desc.File( name="filterA", - label="filter A", + label="Filter A", description="One item of the pair must match this.", value="", ), desc.File( name="filterB", - label="filter B", + label="Filter B", description="One item of the pair must match this.", value="", ), diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 2ec076c07b..08fd3c7f00 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -36,7 +36,7 @@ class RelativePoseEstimating(desc.AVCommandLineNode): ), desc.IntParam( name="countIterations", - label="Ransac max iterations", + label="Ransac Max Iterations", description="Maximal number of iterations.", value=1024, range=(1024, 500000, 1), @@ -44,7 +44,7 @@ class RelativePoseEstimating(desc.AVCommandLineNode): ), desc.IntParam( name="minInliers", - label="Ransac min inliers", + label="Ransac Min Inliers", description="Minimal allowed inliers in two view relationship.", value=35, range=(1, 1000, 1), diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index 4279ac16a5..a2f790ecc4 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -1,7 +1,7 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc -from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL +from meshroom.core.utils import VERBOSE_LEVEL class SfMBootStraping(desc.AVCommandLineNode): diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index d58d1a3008..03b652e229 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -1,7 +1,7 @@ -__version__ = "1.0" +__version__ = "2.0" from meshroom.core import desc -from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL +from meshroom.core.utils import VERBOSE_LEVEL class SfMExpanding(desc.AVCommandLineNode): From 4b2431293d5be1bf449d18c5e57e4ec1d1244990 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 23 Jan 2025 16:09:35 +0100 Subject: [PATCH 1068/1093] Enable merge of multiple sfmDatas --- meshroom/aliceVision/SfMMerge.py | 66 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index 9c21243c7e..4e4da5c821 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -1,39 +1,33 @@ -__version__ = "2.0" +__version__ = "3.0" from meshroom.core import desc from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL import os.path - -class MergeNodeSize(object): +class MergeNodeSize(desc.DynamicNodeSize): """ - MergeNodeSize expresses a dependency to two input attributess to define + MergeNodeSize expresses a dependency to multiple input attributess to define the size of a Node in terms of individual tasks for parallelization. """ - def __init__(self, param1, param2): - self._param1 = param1 - self._param2 = param2 + def __init__(self, param): + self._params = param def computeSize(self, node): - size1 = 0 - size2 = 0 - - param1 = node.attribute(self._param1) - if param1.isLink: - size1 = param1.getLinkParam().node.size + size = 0 - param2 = node.attribute(self._param2) - if param2.isLink: - size2 = param2.getLinkParam().node.size + for input in node.attribute(self._params).value: + paramName = input.getFullName() + param = node.attribute(paramName) + size = size + param.getLinkParam().node.size - return size1 + size2 + return size class SfMMerge(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmMerge {allParams}' - size = MergeNodeSize('firstinput', 'secondinput') + size = MergeNodeSize("inputs") category = 'Utils' documentation = ''' @@ -41,17 +35,17 @@ class SfMMerge(desc.AVCommandLineNode): ''' inputs = [ - desc.File( - name="firstinput", - label="First SfMData", - description="First input SfMData file to merge.", - value="", - ), - desc.File( - name="secondinput", - label="Second SfMData", - description="Second input SfMData file to merge.", - value="", + desc.ListAttribute( + elementDesc=desc.File( + name="input", + label="Input SfmData", + description="A SfmData file.", + value="", + ), + name="inputs", + label="Inputs", + description="Set of SfmData (at least 1 is required).", + exposed=True, ), desc.ChoiceParam( name="method", @@ -82,13 +76,21 @@ class SfMMerge(desc.AVCommandLineNode): exclusive=False, joinChar=",", ), + desc.ChoiceParam( + name="fileExt", + label="SfM File Format", + description="Output SfM file format.", + value="abc", + values=["abc", "sfm", "json"], + group="", # exclude from command line + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", description="Verbosity level (fatal, error, warning, info, debug, trace).", values=VERBOSE_LEVEL, value="info", - ), + ) ] outputs = [ @@ -96,6 +98,6 @@ class SfMMerge(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfM file (in SfMData format).", - value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", - ), + value=lambda attr: desc.Node.internalFolder + "sfmData.{fileExtValue}", + ) ] From 980879b8f6be9b2f80a9e30c82696b9784bca90b Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Thu, 30 Jan 2025 09:09:18 +0100 Subject: [PATCH 1069/1093] Mask processing node --- meshroom/aliceVision/MaskProcessing.py | 85 ++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 meshroom/aliceVision/MaskProcessing.py diff --git a/meshroom/aliceVision/MaskProcessing.py b/meshroom/aliceVision/MaskProcessing.py new file mode 100644 index 0000000000..7beb7ef64c --- /dev/null +++ b/meshroom/aliceVision/MaskProcessing.py @@ -0,0 +1,85 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL + +import os.path + +class MaskProcessingNodeSize(desc.DynamicNodeSize): + """ + MaskProcessingNodeSize expresses a dependency to multiple input attributess to define + the size of a Node in terms of individual tasks for parallelization. + """ + def __init__(self, param): + self._params = param + + def computeSize(self, node): + + size = 0 + + for input in node.attribute(self._params).value: + paramName = input.getFullName() + param = node.attribute(paramName) + if param.isLink: + size = max(size, param.getLinkParam().node.size) + + return size + + +class MaskProcessing(desc.AVCommandLineNode): + commandLine = 'aliceVision_maskProcessing {allParams}' + size = MaskProcessingNodeSize("inputs") + + category = 'Utils' + documentation = ''' + Perform operations on a list of masks with the same names + ''' + + inputs = [ + desc.ListAttribute( + elementDesc=desc.File( + name="input", + label="Input Directory", + description="A directory with a set of mask.", + value="", + ), + name="inputs", + label="Input directories", + description="A set of directories containing masks with the same names.", + exposed=True, + ), + desc.ChoiceParam( + name="operator", + label="Operator", + description="Operator: Binary operator\n" + "OR : applies binary OR between all the masks\n" + "AND : applies binary AND between all the masks\n" + "NOT : applies binary NOT to the first mask in the list\n", + value="and", + values=["or", "and", "not"], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ) + ] + + outputs = [ + desc.File( + name="output", + label="Output", + description="Path to the output directory.", + value=desc.Node.internalFolder, + ), + desc.File( + name="masks", + label="Masks", + description="Processed segmentation masks.", + semantic="imageList", + value= desc.Node.internalFolder + "*.exr", + group="", + ), + ] From 04fed2510c6a30b204babcb4a9b24a794aac9abc Mon Sep 17 00:00:00 2001 From: Vincent Demoulin <vincent.demoulin@gmail.com> Date: Thu, 30 Jan 2025 17:17:06 +0100 Subject: [PATCH 1070/1093] [node] extractMetadata: Add explicit error messages --- meshroom/aliceVision/ExtractMetadata.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/meshroom/aliceVision/ExtractMetadata.py b/meshroom/aliceVision/ExtractMetadata.py index 0900f9d705..e4972a9539 100644 --- a/meshroom/aliceVision/ExtractMetadata.py +++ b/meshroom/aliceVision/ExtractMetadata.py @@ -91,9 +91,8 @@ def processChunk(self, chunk): outFiles = self.resolvedPaths(chunk.node.input.value, chunk.node.output.value, chunk.node.keepFilename.value, chunk.node.extension.value) if not outFiles: - error = 'ExtractMetadata: input files listed, but no metadata to extract' + error = 'ExtractMetadata: No input files! Check that a sfmData is connected as input.' chunk.logger.error(error) - chunk.logger.info('Listed input files: {}'.format([i.value for i in chunk.node.inputFiles.value])) raise RuntimeError(error) if not os.path.exists(chunk.node.output.value): @@ -107,17 +106,14 @@ def processChunk(self, chunk): else: #xmp cmd = 'exiftool -tagsfromfile ' + iFile + ' ' + chunk.node.arguments.value.strip() + ' ' + oFile chunk.logger.debug(cmd) - os.system(cmd) + try: + os.system(cmd) + except: + chunk.logger.error("exifTool command failed ! Check that exifTool can be accessed on your system.") + raise RuntimeError(error) if not os.path.exists(oFile): info = 'No metadata extracted for file ' + iFile chunk.logger.info(info) - else: - f = open(oFile) - if f.readline().find('command not found') != -1: - error = 'Metadata cannot be extracted, exiftool command not found' - chunk.logger.error(error) - raise RuntimeError(error) - f.close() chunk.logger.info('Metadata extraction end') finally: From eddb8258ae61fe7f4c92f3f11393e3f01981b0a0 Mon Sep 17 00:00:00 2001 From: Vincent Demoulin <vincent.demoulin@gmail.com> Date: Fri, 31 Jan 2025 11:29:29 +0100 Subject: [PATCH 1071/1093] [Node] ExtractMetadata: Replace os.system with subprocess.Popen --- meshroom/aliceVision/ExtractMetadata.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ExtractMetadata.py b/meshroom/aliceVision/ExtractMetadata.py index e4972a9539..8b35cc572f 100644 --- a/meshroom/aliceVision/ExtractMetadata.py +++ b/meshroom/aliceVision/ExtractMetadata.py @@ -7,6 +7,7 @@ import shutil import glob import os +import subprocess class ExtractMetadata(desc.Node): @@ -106,10 +107,10 @@ def processChunk(self, chunk): else: #xmp cmd = 'exiftool -tagsfromfile ' + iFile + ' ' + chunk.node.arguments.value.strip() + ' ' + oFile chunk.logger.debug(cmd) - try: - os.system(cmd) - except: - chunk.logger.error("exifTool command failed ! Check that exifTool can be accessed on your system.") + error = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stderr.read().decode() + chunk.logger.debug(error) + if error != "": + chunk.logger.error(error) raise RuntimeError(error) if not os.path.exists(oFile): info = 'No metadata extracted for file ' + iFile From 650f28b26dc6372ff5d7873a401aa4506aa814a0 Mon Sep 17 00:00:00 2001 From: Vincent Demoulin <vincent.demoulin@gmail.com> Date: Fri, 31 Jan 2025 15:56:13 +0100 Subject: [PATCH 1072/1093] [Node] ExtractMetadata: Add option to update sfmData --- meshroom/aliceVision/ExtractMetadata.py | 95 +++++++++++++------------ 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/meshroom/aliceVision/ExtractMetadata.py b/meshroom/aliceVision/ExtractMetadata.py index 8b35cc572f..18cc4e9cb8 100644 --- a/meshroom/aliceVision/ExtractMetadata.py +++ b/meshroom/aliceVision/ExtractMetadata.py @@ -2,6 +2,9 @@ from meshroom.core import desc from meshroom.core.utils import VERBOSE_LEVEL +from pathlib import Path + +import pyalicevision as av import distutils.dir_util as du import shutil @@ -45,6 +48,12 @@ class ExtractMetadata(desc.Node): description="ExifTool command arguments", value="", ), + desc.BoolParam( + name="insertInSfm", + label="Update sfmData", + description="Insert the extracted metadata in the sfmData file.", + value=False, + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", @@ -58,64 +67,62 @@ class ExtractMetadata(desc.Node): desc.File( name="output", label="Result Folder", - description="Output path for the resulting images.", + description="Output path for the resulting metadata files.", value=desc.Node.internalFolder, ), ] - def resolvedPaths(self, inputSfm, outDir, keepFilename, extension): - import pyalicevision as av - from pathlib import Path - - paths = {} - dataAV = av.sfmData.SfMData() - if av.sfmDataIO.load(dataAV, inputSfm, av.sfmDataIO.ALL) and os.path.isdir(outDir): - views = dataAV.getViews() - for id, v in views.items(): - inputFile = v.getImage().getImagePath() - if keepFilename: - outputMetadata = os.path.join(outDir, Path(inputFile).stem + "." + extension) - else: - outputMetadata = os.path.join(outDir, str(id) + "." + extension) - paths[inputFile] = outputMetadata - - return paths - def processChunk(self, chunk): try: chunk.logManager.start(chunk.node.verboseLevel.value) - if not chunk.node.input: - chunk.logger.warning('No image file to process') - return - - outFiles = self.resolvedPaths(chunk.node.input.value, chunk.node.output.value, chunk.node.keepFilename.value, chunk.node.extension.value) - - if not outFiles: - error = 'ExtractMetadata: No input files! Check that a sfmData is connected as input.' + if chunk.node.input.value == "" or chunk.node.input.value[-4:].lower() != '.sfm': + error = 'This node need to have a sfmData connected as input.' chunk.logger.error(error) raise RuntimeError(error) if not os.path.exists(chunk.node.output.value): os.mkdir(chunk.node.output.value) - for iFile, oFile in outFiles.items(): - if chunk.node.extension.value == 'txt': - cmd = 'exiftool ' + chunk.node.arguments.value.strip() + ' ' + iFile + ' > ' + oFile - elif chunk.node.extension.value == 'xml': - cmd = 'exiftool -X ' + chunk.node.arguments.value.strip() + ' ' + iFile + ' > ' + oFile - else: #xmp - cmd = 'exiftool -tagsfromfile ' + iFile + ' ' + chunk.node.arguments.value.strip() + ' ' + oFile - chunk.logger.debug(cmd) - error = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stderr.read().decode() - chunk.logger.debug(error) - if error != "": - chunk.logger.error(error) - raise RuntimeError(error) - if not os.path.exists(oFile): - info = 'No metadata extracted for file ' + iFile - chunk.logger.info(info) - chunk.logger.info('Metadata extraction end') + dataAV = av.sfmData.SfMData() + if av.sfmDataIO.load(dataAV, chunk.node.input.value, av.sfmDataIO.ALL): + views = dataAV.getViews() + for id, v in views.items(): + inputFile = v.getImage().getImagePath() + if chunk.node.keepFilename.value: + outputMetadataFilename = os.path.join(chunk.node.output.value, Path(inputFile).stem + "." + chunk.node.extension.value) + else: + outputMetadataFilename = os.path.join(chunk.node.output.value, str(id) + "." + chunk.node.extension.value) + + if chunk.node.extension.value == 'txt': + cmd = 'exiftool ' + chunk.node.arguments.value.strip() + ' ' + inputFile + ' > ' + outputMetadataFilename + elif chunk.node.extension.value == 'xml': + cmd = 'exiftool -X ' + chunk.node.arguments.value.strip() + ' ' + inputFile + ' > ' + outputMetadataFilename + else: #xmp + cmd = 'exiftool -tagsfromfile ' + inputFile + ' ' + chunk.node.arguments.value.strip() + ' ' + outputMetadataFilename + chunk.logger.debug(cmd) + error = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stderr.read().decode() + chunk.logger.debug(error) + if error != "": + chunk.logger.error(error) + raise RuntimeError(error) + if not os.path.exists(outputMetadataFilename): + info = 'No metadata extracted for file ' + inputFile + chunk.logger.info(info) + elif chunk.node.insertInSfm.value: + cmd = 'exiftool ' + chunk.node.arguments.value.strip() + ' ' + inputFile + metadata = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.read().decode() + chunk.logger.debug(metadata) + lmeta = metadata.split('\n') + for i in range(1, len(lmeta)-1): + l = lmeta[i].split(':', 1) + v.getImageInfo().addMetadata('ExifTool:'+l[0].strip(), l[1].strip()) + + if chunk.node.insertInSfm.value: + outputSfm = os.path.join(chunk.node.output.value, Path(chunk.node.input.value).stem + ".sfm") + av.sfmDataIO.save(dataAV, outputSfm, av.sfmDataIO.ALL) + + chunk.logger.info('Metadata extraction end') finally: chunk.logManager.end() From 6c27b49284582ffa6f0136aca16af613f2388e57 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 3 Feb 2025 09:03:45 +0100 Subject: [PATCH 1073/1093] New tracking experimental pipelines --- meshroom/cameraTrackingExperimental.mg | 572 ++++++++++++++++++ ...aTrackingWithoutCalibrationExperimental.mg | 543 +++++++++++++++++ 2 files changed, 1115 insertions(+) create mode 100644 meshroom/cameraTrackingExperimental.mg create mode 100644 meshroom/cameraTrackingWithoutCalibrationExperimental.mg diff --git a/meshroom/cameraTrackingExperimental.mg b/meshroom/cameraTrackingExperimental.mg new file mode 100644 index 0000000000..09cf8e1e8c --- /dev/null +++ b/meshroom/cameraTrackingExperimental.mg @@ -0,0 +1,572 @@ +{ + "header": { + "releaseVersion": "2025.1.0-develop", + "fileVersion": "2.0", + "template": true, + "nodesVersions": { + "ApplyCalibration": "1.0", + "CameraInit": "12.0", + "CheckerboardDetection": "1.0", + "ConvertSfMFormat": "2.0", + "DepthMap": "5.0", + "DepthMapFilter": "4.0", + "DistortionCalibration": "5.0", + "ExportAnimatedCamera": "2.0", + "ExportDistortion": "2.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", + "ImageMatching": "2.0", + "ImageMatchingMultiSfM": "1.0", + "ImageSegmentationBox": "0.1", + "KeyframeSelection": "5.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "RelativePoseEstimating": "3.0", + "ScenePreview": "2.0", + "SfMBootStraping": "3.0", + "SfMExpanding": "2.0", + "SfMTransfer": "2.1", + "SfMTriangulation": "1.0", + "Texturing": "6.0", + "TracksBuilding": "1.0" + } + }, + "graph": { + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -200, + 0 + ], + "inputs": {}, + "internalInputs": { + "color": "#575963" + } + }, + "CameraInit_2": { + "nodeType": "CameraInit", + "position": [ + -600, + -160 + ], + "inputs": {}, + "internalInputs": { + "label": "CameraInitLensGrid", + "color": "#302e2e" + } + }, + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + -400, + -160 + ], + "inputs": { + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 4140, + 58 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "json", + "describerTypes": "{TracksBuilding_2.describerTypes}", + "structure": false, + "observations": false + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 3536, + -181 + ], + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 3336, + -181 + ], + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "downscale": 1 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", + "position": [ + -200, + -160 + ], + "inputs": { + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 2748, + 22 + ], + "inputs": { + "input": "{SfMExpanding_2.output}", + "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 0, + -160 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 400, + 200 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentationBox_1.output}", + "maskExtension": "exr" + }, + "internalInputs": { + "color": "#575963" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingKeyframes", + "color": "#575963" + } + }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 1987, + 186 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames", + "color": "#80766f" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1987, + 26 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" + } + }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 1787, + 26 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{SfMExpanding_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive" + }, + "internalInputs": { + "label": "ImageMatchingKeyframes", + "color": "#575963" + } + }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 1787, + 186 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageSegmentationBox_1": { + "nodeType": "ImageSegmentationBox", + "position": [ + 200, + 200 + ], + "inputs": { + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}", + "maskInvert": true, + "keepFilename": true + }, + "internalInputs": { + "color": "#575963" + } + }, + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", + "position": [ + 200, + 0 + ], + "inputs": { + "inputPaths": [ + "{ApplyCalibration_1.output}" + ] + }, + "internalInputs": { + "color": "#575963" + } + }, + "MeshDecimate_1": { + "nodeType": "MeshDecimate", + "position": [ + 4136, + -181 + ], + "inputs": { + "input": "{MeshFiltering_1.outputMesh}", + "simplificationFactor": 0.05 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 3936, + -181 + ], + "inputs": { + "inputMesh": "{Meshing_1.outputMesh}", + "filterLargeTrianglesFactor": 10.0 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Meshing_1": { + "nodeType": "Meshing", + "position": [ + 3736, + -181 + ], + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "estimateSpaceFromSfM": false, + "minStep": 1, + "fullWeight": 10.0, + "saveRawDensePointCloud": true + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 3136, + -181 + ], + "inputs": { + "input": "{SfMTriangulation_1.output}", + "maskExtension": "exr" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 4736, + -81 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{Texturing_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}" + ] + } + }, + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", + "position": [ + 1012, + -1 + ], + "inputs": { + "input": "{TracksBuilding_1.input}", + "tracksFilename": "{TracksBuilding_1.output}", + "countIterations": 50000, + "minInliers": 100 + } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 4357, + 8 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentationBox_1.output}" + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "SfMBootStraping_1": { + "nodeType": "SfMBootStraping", + "position": [ + 1215, + -7 + ], + "inputs": { + "input": "{RelativePoseEstimating_1.input}", + "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", + "pairs": "{RelativePoseEstimating_1.output}" + } + }, + "SfMExpanding_1": { + "nodeType": "SfMExpanding", + "position": [ + 1412, + -10 + ], + "inputs": { + "input": "{SfMBootStraping_1.output}", + "tracksFilename": "{SfMBootStraping_1.tracksFilename}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "SfMExpanding_2": { + "nodeType": "SfMExpanding", + "position": [ + 2469, + 52 + ], + "inputs": { + "input": "{TracksBuilding_2.input}", + "tracksFilename": "{TracksBuilding_2.output}", + "nbFirstUnstableCameras": 0, + "maxImagesPerGroup": 0, + "bundleAdjustmentMaxOutliers": 5000000, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "SfMTransfer_1": { + "nodeType": "SfMTransfer", + "position": [ + 2736, + -181 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "reference": "{SfMExpanding_2.output}", + "transferLandmarks": false + }, + "internalInputs": { + "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", + "color": "#3f3138" + } + }, + "SfMTriangulation_1": { + "nodeType": "SfMTriangulation", + "position": [ + 2936, + -181 + ], + "inputs": { + "input": "{SfMTransfer_1.output}", + "featuresFolders": "{TracksBuilding_1.featuresFolders}", + "matchesFolders": "{TracksBuilding_1.matchesFolders}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 4389, + -245 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshDecimate_1.output}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "TracksBuilding_1": { + "nodeType": "TracksBuilding", + "position": [ + 826, + -2 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}", + "filterTrackForks": true + } + }, + "TracksBuilding_2": { + "nodeType": "TracksBuilding", + "position": [ + 2280, + 34 + ], + "inputs": { + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_2.output}", + "{FeatureMatching_3.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "minInputTrackLength": 5, + "filterTrackForks": true + } + } + } +} \ No newline at end of file diff --git a/meshroom/cameraTrackingWithoutCalibrationExperimental.mg b/meshroom/cameraTrackingWithoutCalibrationExperimental.mg new file mode 100644 index 0000000000..8653ac1f66 --- /dev/null +++ b/meshroom/cameraTrackingWithoutCalibrationExperimental.mg @@ -0,0 +1,543 @@ +{ + "header": { + "releaseVersion": "2025.1.0-develop", + "fileVersion": "2.0", + "template": true, + "nodesVersions": { + "ApplyCalibration": "1.0", + "CameraInit": "12.0", + "ConvertDistortion": "1.0", + "ConvertSfMFormat": "2.0", + "DepthMap": "5.0", + "DepthMapFilter": "4.0", + "ExportAnimatedCamera": "2.0", + "ExportDistortion": "2.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", + "ImageMatching": "2.0", + "ImageMatchingMultiSfM": "1.0", + "ImageSegmentationBox": "0.1", + "KeyframeSelection": "5.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "RelativePoseEstimating": "3.0", + "ScenePreview": "2.0", + "SfMBootStraping": "3.0", + "SfMExpanding": "2.0", + "SfMTransfer": "2.1", + "SfMTriangulation": "1.0", + "Texturing": "6.0", + "TracksBuilding": "1.0" + } + }, + "graph": { + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -200, + 0 + ], + "inputs": {}, + "internalInputs": { + "color": "#575963" + } + }, + "ConvertDistortion_1": { + "nodeType": "ConvertDistortion", + "position": [ + 2561, + 222 + ], + "inputs": { + "input": "{SfMExpanding_2.output}" + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 3674, + 23 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "json", + "describerTypes": "{TracksBuilding_2.describerTypes}", + "structure": false, + "observations": false + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 3074, + -177 + ], + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 2874, + -177 + ], + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "downscale": 1 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 2754, + 37 + ], + "inputs": { + "input": "{SfMExpanding_2.output}", + "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 2761, + 222 + ], + "inputs": { + "input": "{ConvertDistortion_1.output}", + "exportLensGridsUndistorted": false + }, + "internalInputs": { + "color": "#80766f" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 400, + 200 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentationBox_1.output}", + "maskExtension": "exr" + }, + "internalInputs": { + "color": "#575963" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingKeyframes", + "color": "#575963" + } + }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 1874, + 183 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames", + "color": "#80766f" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1874, + 23 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" + } + }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 1674, + 23 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{SfMExpanding_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive" + }, + "internalInputs": { + "label": "ImageMatchingKeyframes", + "color": "#575963" + } + }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 1674, + 183 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageSegmentationBox_1": { + "nodeType": "ImageSegmentationBox", + "position": [ + 200, + 200 + ], + "inputs": { + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}", + "maskInvert": true, + "keepFilename": true + }, + "internalInputs": { + "color": "#575963" + } + }, + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", + "position": [ + 200, + 0 + ], + "inputs": { + "inputPaths": [ + "{ApplyCalibration_1.output}" + ] + }, + "internalInputs": { + "color": "#575963" + } + }, + "MeshDecimate_1": { + "nodeType": "MeshDecimate", + "position": [ + 3674, + -177 + ], + "inputs": { + "input": "{MeshFiltering_1.outputMesh}", + "simplificationFactor": 0.05 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 3474, + -177 + ], + "inputs": { + "inputMesh": "{Meshing_1.outputMesh}", + "filterLargeTrianglesFactor": 10.0 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Meshing_1": { + "nodeType": "Meshing", + "position": [ + 3274, + -177 + ], + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}", + "estimateSpaceFromSfM": false, + "minStep": 1, + "fullWeight": 10.0, + "saveRawDensePointCloud": true + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 2674, + -177 + ], + "inputs": { + "input": "{SfMTriangulation_1.output}", + "maskExtension": "exr" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 4274, + -77 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{Texturing_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}" + ] + } + }, + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", + "position": [ + 1013, + 4 + ], + "inputs": { + "input": "{TracksBuilding_1.input}", + "tracksFilename": "{TracksBuilding_1.output}", + "countIterations": 50000, + "minInliers": 100 + } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 3874, + 23 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentationBox_1.output}" + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "SfMBootStraping_1": { + "nodeType": "SfMBootStraping", + "position": [ + 1216, + -2 + ], + "inputs": { + "input": "{RelativePoseEstimating_1.input}", + "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", + "pairs": "{RelativePoseEstimating_1.output}" + } + }, + "SfMExpanding_1": { + "nodeType": "SfMExpanding", + "position": [ + 1413, + -5 + ], + "inputs": { + "input": "{SfMBootStraping_1.output}", + "tracksFilename": "{SfMBootStraping_1.tracksFilename}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "SfMExpanding_2": { + "nodeType": "SfMExpanding", + "position": [ + 2309.5, + 27.0 + ], + "inputs": { + "input": "{TracksBuilding_2.input}", + "tracksFilename": "{TracksBuilding_2.output}", + "nbFirstUnstableCameras": 0, + "maxImagesPerGroup": 0, + "bundleAdjustmentMaxOutliers": 5000000, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "SfMTransfer_1": { + "nodeType": "SfMTransfer", + "position": [ + 2274, + -177 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "reference": "{SfMExpanding_2.output}", + "transferLandmarks": false + }, + "internalInputs": { + "comment": "Transfer pose from final camera tracking into the keyframes-only scene.", + "color": "#3f3138" + } + }, + "SfMTriangulation_1": { + "nodeType": "SfMTriangulation", + "position": [ + 2474, + -177 + ], + "inputs": { + "input": "{SfMTransfer_1.output}", + "featuresFolders": "{TracksBuilding_1.featuresFolders}", + "matchesFolders": "{TracksBuilding_1.matchesFolders}", + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 3874, + -177 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{PrepareDenseScene_1.output}", + "inputMesh": "{MeshDecimate_1.output}" + }, + "internalInputs": { + "color": "#3f3138" + } + }, + "TracksBuilding_1": { + "nodeType": "TracksBuilding", + "position": [ + 827, + 3 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}", + "filterTrackForks": true + } + }, + "TracksBuilding_2": { + "nodeType": "TracksBuilding", + "position": [ + 2103.5, + 24.0 + ], + "inputs": { + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_2.output}", + "{FeatureMatching_3.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "minInputTrackLength": 5, + "filterTrackForks": true + } + } + } +} \ No newline at end of file From ad777a3eb09a73ddf387710ba6cfd7aa7732f8aa Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 3 Feb 2025 09:05:45 +0100 Subject: [PATCH 1074/1093] Output are now alembic files --- meshroom/aliceVision/SfMPoseInjecting.py | 2 +- meshroom/aliceVision/SfmBootstraping.py | 2 +- meshroom/aliceVision/SfmExpanding.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/aliceVision/SfMPoseInjecting.py b/meshroom/aliceVision/SfMPoseInjecting.py index 5334a3c153..109c340772 100644 --- a/meshroom/aliceVision/SfMPoseInjecting.py +++ b/meshroom/aliceVision/SfMPoseInjecting.py @@ -50,6 +50,6 @@ class SfMPoseInjecting(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfM file.", - value=desc.Node.internalFolder + "sfmData.sfm", + value=desc.Node.internalFolder + "sfmData.abc", ), ] diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index a2f790ecc4..a267a2c66c 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -79,6 +79,6 @@ class SfMBootStraping(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.json", + value=desc.Node.internalFolder + "bootstrap.abc", ), ] diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index 03b652e229..c9f0e9cdec 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -170,6 +170,6 @@ class SfMExpanding(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.json", + value=desc.Node.internalFolder + "sfmExpanded.abc", ), ] From e4768d1e064a92361b475ad3107a1684f281615e Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 3 Feb 2025 11:07:00 +0100 Subject: [PATCH 1075/1093] Photogrammetry pipelines experimental --- ...ogrammetryAndCameraTrackingExperimental.mg | 677 ++++++++++++++++++ meshroom/photogrammetryExperimental.mg | 200 ++++++ 2 files changed, 877 insertions(+) create mode 100644 meshroom/photogrammetryAndCameraTrackingExperimental.mg create mode 100644 meshroom/photogrammetryExperimental.mg diff --git a/meshroom/photogrammetryAndCameraTrackingExperimental.mg b/meshroom/photogrammetryAndCameraTrackingExperimental.mg new file mode 100644 index 0000000000..3b2dfd294f --- /dev/null +++ b/meshroom/photogrammetryAndCameraTrackingExperimental.mg @@ -0,0 +1,677 @@ +{ + "header": { + "releaseVersion": "2025.1.0-develop", + "fileVersion": "2.0", + "template": true, + "nodesVersions": { + "ApplyCalibration": "1.0", + "CameraInit": "12.0", + "CheckerboardDetection": "1.0", + "ConvertSfMFormat": "2.0", + "DepthMap": "5.0", + "DepthMapFilter": "4.0", + "DistortionCalibration": "5.0", + "ExportAnimatedCamera": "2.0", + "ExportDistortion": "2.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageDetectionPrompt": "0.1", + "ImageMatching": "2.0", + "ImageMatchingMultiSfM": "1.0", + "ImageSegmentationBox": "0.1", + "KeyframeSelection": "5.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "RelativePoseEstimating": "3.0", + "ScenePreview": "2.0", + "SfMBootStraping": "3.0", + "SfMExpanding": "2.0", + "Texturing": "6.0", + "TracksBuilding": "1.0" + } + }, + "graph": { + "ApplyCalibration_1": { + "nodeType": "ApplyCalibration", + "position": [ + 0, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "calibration": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + -200, + 0 + ], + "inputs": {}, + "internalInputs": { + "label": "InitShot", + "color": "#575963" + } + }, + "CameraInit_2": { + "nodeType": "CameraInit", + "position": [ + -600, + -160 + ], + "inputs": {}, + "internalInputs": { + "label": "InitLensGrid", + "color": "#302e2e" + } + }, + "CameraInit_3": { + "nodeType": "CameraInit", + "position": [ + -600, + -500 + ], + "inputs": {}, + "internalInputs": { + "label": "InitPhotogrammetry", + "color": "#384a55" + } + }, + "CheckerboardDetection_1": { + "nodeType": "CheckerboardDetection", + "position": [ + -400, + -160 + ], + "inputs": { + "input": "{CameraInit_2.output}", + "useNestedGrids": true, + "exportDebugImages": true + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ConvertSfMFormat_1": { + "nodeType": "ConvertSfMFormat", + "position": [ + 2638, + 193 + ], + "inputs": { + "input": "{ExportAnimatedCamera_1.input}", + "fileExt": "sfm", + "describerTypes": "{TracksBuilding_3.describerTypes}", + "structure": false, + "observations": false + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "DepthMapFilter_2": { + "nodeType": "DepthMapFilter", + "position": [ + 1412, + -499 + ], + "inputs": { + "input": "{DepthMap_2.input}", + "depthMapsFolder": "{DepthMap_2.output}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "DepthMap_2": { + "nodeType": "DepthMap", + "position": [ + 1212, + -499 + ], + "inputs": { + "input": "{PrepareDenseScene_2.input}", + "imagesFolder": "{PrepareDenseScene_2.output}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "DistortionCalibration_1": { + "nodeType": "DistortionCalibration", + "position": [ + -200, + -160 + ], + "inputs": { + "input": "{CheckerboardDetection_1.input}", + "checkerboards": "{CheckerboardDetection_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "ExportAnimatedCamera_1": { + "nodeType": "ExportAnimatedCamera", + "position": [ + 2450, + 194 + ], + "inputs": { + "input": "{SfMExpanding_3.output}", + "sfmDataFilter": "{ImageMatchingMultiSfM_2.inputB}", + "exportUndistortedImages": true + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ExportDistortion_1": { + "nodeType": "ExportDistortion", + "position": [ + 0, + -160 + ], + "inputs": { + "input": "{DistortionCalibration_1.output}" + }, + "internalInputs": { + "color": "#302e2e" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 400, + 200 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "masksFolder": "{ImageSegmentationBox_2.output}", + "maskExtension": "exr" + }, + "internalInputs": { + "color": "#575963" + } + }, + "FeatureExtraction_2": { + "nodeType": "FeatureExtraction", + "position": [ + -400, + -500 + ], + "inputs": { + "input": "{CameraInit_3.output}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingKeyframes", + "color": "#575963" + } + }, + "FeatureMatching_2": { + "nodeType": "FeatureMatching", + "position": [ + 1838, + 353 + ], + "inputs": { + "input": "{ImageMatching_2.input}", + "featuresFolders": "{ImageMatching_2.featuresFolders}", + "imagePairsList": "{ImageMatching_2.output}" + }, + "internalInputs": { + "label": "FeatureMatchingAllFrames", + "color": "#80766f" + } + }, + "FeatureMatching_3": { + "nodeType": "FeatureMatching", + "position": [ + 1838, + 193 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_1.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "label": "FeatureMatchingFramesToKeyframes", + "color": "#80766f" + } + }, + "FeatureMatching_4": { + "nodeType": "FeatureMatching", + "position": [ + 0, + -500 + ], + "inputs": { + "input": "{ImageMatching_3.input}", + "featuresFolders": "{ImageMatching_3.featuresFolders}", + "imagePairsList": "{ImageMatching_3.output}", + "describerTypes": "{FeatureExtraction_2.describerTypes}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "FeatureMatching_5": { + "nodeType": "FeatureMatching", + "position": [ + 600, + -300 + ], + "inputs": { + "input": "{ImageMatchingMultiSfM_2.outputCombinedSfM}", + "featuresFolders": "{ImageMatchingMultiSfM_2.featuresFolders}", + "imagePairsList": "{ImageMatchingMultiSfM_2.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "ImageDetectionPrompt_1": { + "nodeType": "ImageDetectionPrompt", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}" + }, + "internalInputs": { + "color": "#575963" + } + }, + "ImageMatchingMultiSfM_1": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 1638, + 193 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataFrames}", + "inputB": "{SfMExpanding_2.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "VocabularyTree", + "matchingMode": "a/b", + "nbMatches": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageMatchingMultiSfM_2": { + "nodeType": "ImageMatchingMultiSfM", + "position": [ + 400, + -300 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "inputB": "{SfMExpanding_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive", + "matchingMode": "a/b" + }, + "internalInputs": { + "color": "#575963" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Exhaustive" + }, + "internalInputs": { + "label": "ImageMatchingKeyframes", + "color": "#575963" + } + }, + "ImageMatching_2": { + "nodeType": "ImageMatching", + "position": [ + 1638, + 353 + ], + "inputs": { + "input": "{ApplyCalibration_1.output}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ], + "method": "Sequential", + "nbNeighbors": 20 + }, + "internalInputs": { + "color": "#80766f" + } + }, + "ImageMatching_3": { + "nodeType": "ImageMatching", + "position": [ + -200, + -500 + ], + "inputs": { + "input": "{FeatureExtraction_2.input}", + "featuresFolders": [ + "{FeatureExtraction_2.output}" + ] + }, + "internalInputs": { + "color": "#384a55" + } + }, + "ImageSegmentationBox_2": { + "nodeType": "ImageSegmentationBox", + "position": [ + 200, + 200 + ], + "inputs": { + "input": "{ImageDetectionPrompt_1.input}", + "bboxFolder": "{ImageDetectionPrompt_1.output}", + "maskInvert": true, + "keepFilename": true + }, + "internalInputs": { + "color": "#575963" + } + }, + "KeyframeSelection_1": { + "nodeType": "KeyframeSelection", + "position": [ + 200, + 0 + ], + "inputs": { + "inputPaths": [ + "{ApplyCalibration_1.output}" + ] + }, + "internalInputs": { + "color": "#575963" + } + }, + "MeshDecimate_1": { + "nodeType": "MeshDecimate", + "position": [ + 2638, + 93 + ], + "inputs": { + "input": "{MeshFiltering_2.outputMesh}", + "simplificationFactor": 0.05 + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "MeshFiltering_2": { + "nodeType": "MeshFiltering", + "position": [ + 1812, + -499 + ], + "inputs": { + "inputMesh": "{Meshing_2.outputMesh}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "Meshing_2": { + "nodeType": "Meshing", + "position": [ + 1612, + -499 + ], + "inputs": { + "input": "{DepthMapFilter_2.input}", + "depthMapsFolder": "{DepthMapFilter_2.output}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "PrepareDenseScene_2": { + "nodeType": "PrepareDenseScene", + "position": [ + 1012, + -499 + ], + "inputs": { + "input": "{SfMExpanding_1.output}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 3130, + -22 + ], + "inputs": { + "inputFiles": [ + "{ExportAnimatedCamera_1.output}", + "{ScenePreview_1.output}", + "{ExportDistortion_1.output}", + "{Texturing_2.output}" + ] + } + }, + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", + "position": [ + 419, + -495 + ], + "inputs": { + "input": "{TracksBuilding_1.input}", + "tracksFilename": "{TracksBuilding_1.output}", + "minInliers": 100 + } + }, + "RelativePoseEstimating_2": { + "nodeType": "RelativePoseEstimating", + "position": [ + 1005, + 1 + ], + "inputs": { + "input": "{TracksBuilding_2.input}", + "tracksFilename": "{TracksBuilding_2.output}", + "countIterations": 50000, + "minInliers": 100 + } + }, + "ScenePreview_1": { + "nodeType": "ScenePreview", + "position": [ + 2838, + 193 + ], + "inputs": { + "cameras": "{ConvertSfMFormat_1.output}", + "model": "{MeshDecimate_1.output}", + "undistortedImages": "{ExportAnimatedCamera_1.outputUndistorted}", + "masks": "{ImageSegmentationBox_2.output}" + }, + "internalInputs": { + "color": "#4c594c" + } + }, + "SfMBootStraping_1": { + "nodeType": "SfMBootStraping", + "position": [ + 616, + -502 + ], + "inputs": { + "input": "{RelativePoseEstimating_1.input}", + "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", + "pairs": "{RelativePoseEstimating_1.output}" + } + }, + "SfMBootStraping_2": { + "nodeType": "SfMBootStraping", + "position": [ + 1208, + -5 + ], + "inputs": { + "input": "{RelativePoseEstimating_2.input}", + "tracksFilename": "{RelativePoseEstimating_2.tracksFilename}", + "pairs": "{RelativePoseEstimating_2.output}" + } + }, + "SfMExpanding_1": { + "nodeType": "SfMExpanding", + "position": [ + 806, + -502 + ], + "inputs": { + "input": "{SfMBootStraping_1.output}", + "tracksFilename": "{SfMBootStraping_1.tracksFilename}", + "meshFilename": "{SfMBootStraping_1.meshFilename}" + } + }, + "SfMExpanding_2": { + "nodeType": "SfMExpanding", + "position": [ + 1405, + -8 + ], + "inputs": { + "input": "{SfMBootStraping_2.output}", + "tracksFilename": "{SfMBootStraping_2.tracksFilename}", + "lockScenePreviouslyReconstructed": true, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "SfMExpanding_3": { + "nodeType": "SfMExpanding", + "position": [ + 2243, + 271 + ], + "inputs": { + "input": "{TracksBuilding_3.input}", + "tracksFilename": "{TracksBuilding_3.output}", + "nbFirstUnstableCameras": 0, + "maxImagesPerGroup": 0, + "bundleAdjustmentMaxOutliers": 5000000, + "minNumberOfObservationsForTriangulation": 3, + "minAngleForTriangulation": 1.0, + "minAngleForLandmark": 0.5 + } + }, + "Texturing_2": { + "nodeType": "Texturing", + "position": [ + 2012, + -499 + ], + "inputs": { + "input": "{Meshing_2.output}", + "imagesFolder": "{DepthMap_2.imagesFolder}", + "inputMesh": "{MeshFiltering_2.outputMesh}" + }, + "internalInputs": { + "color": "#384a55" + } + }, + "TracksBuilding_1": { + "nodeType": "TracksBuilding", + "position": [ + 223, + -495 + ], + "inputs": { + "input": "{FeatureMatching_4.input}", + "featuresFolders": "{FeatureMatching_4.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_4.output}" + ], + "describerTypes": "{FeatureMatching_4.describerTypes}" + } + }, + "TracksBuilding_2": { + "nodeType": "TracksBuilding", + "position": [ + 819, + 0 + ], + "inputs": { + "input": "{FeatureMatching_5.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}", + "{FeatureMatching_5.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}", + "filterTrackForks": true + } + }, + "TracksBuilding_3": { + "nodeType": "TracksBuilding", + "position": [ + 2049, + 263 + ], + "inputs": { + "input": "{FeatureMatching_3.input}", + "featuresFolders": "{FeatureMatching_3.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_3.output}", + "{FeatureMatching_2.output}" + ], + "describerTypes": "{FeatureMatching_3.describerTypes}", + "minInputTrackLength": 5, + "filterTrackForks": true + } + } + } +} \ No newline at end of file diff --git a/meshroom/photogrammetryExperimental.mg b/meshroom/photogrammetryExperimental.mg new file mode 100644 index 0000000000..0c69010db6 --- /dev/null +++ b/meshroom/photogrammetryExperimental.mg @@ -0,0 +1,200 @@ +{ + "header": { + "releaseVersion": "2025.1.0-develop", + "fileVersion": "2.0", + "template": true, + "nodesVersions": { + "CameraInit": "12.0", + "DepthMap": "5.0", + "DepthMapFilter": "4.0", + "FeatureExtraction": "1.3", + "FeatureMatching": "2.0", + "ImageMatching": "2.0", + "MeshFiltering": "3.0", + "Meshing": "7.0", + "PrepareDenseScene": "3.1", + "Publish": "1.3", + "RelativePoseEstimating": "3.0", + "SfMBootStraping": "3.0", + "SfMExpanding": "2.0", + "Texturing": "6.0", + "TracksBuilding": "1.0" + } + }, + "graph": { + "CameraInit_1": { + "nodeType": "CameraInit", + "position": [ + 0, + 0 + ], + "inputs": {} + }, + "DepthMapFilter_1": { + "nodeType": "DepthMapFilter", + "position": [ + 1969, + 0 + ], + "inputs": { + "input": "{DepthMap_1.input}", + "depthMapsFolder": "{DepthMap_1.output}" + } + }, + "DepthMap_1": { + "nodeType": "DepthMap", + "position": [ + 1769, + 0 + ], + "inputs": { + "input": "{PrepareDenseScene_1.input}", + "imagesFolder": "{PrepareDenseScene_1.output}" + } + }, + "FeatureExtraction_1": { + "nodeType": "FeatureExtraction", + "position": [ + 200, + 0 + ], + "inputs": { + "input": "{CameraInit_1.output}" + } + }, + "FeatureMatching_1": { + "nodeType": "FeatureMatching", + "position": [ + 600, + 0 + ], + "inputs": { + "input": "{ImageMatching_1.input}", + "featuresFolders": "{ImageMatching_1.featuresFolders}", + "imagePairsList": "{ImageMatching_1.output}", + "describerTypes": "{FeatureExtraction_1.describerTypes}" + } + }, + "ImageMatching_1": { + "nodeType": "ImageMatching", + "position": [ + 400, + 0 + ], + "inputs": { + "input": "{FeatureExtraction_1.input}", + "featuresFolders": [ + "{FeatureExtraction_1.output}" + ] + } + }, + "MeshFiltering_1": { + "nodeType": "MeshFiltering", + "position": [ + 2369, + 0 + ], + "inputs": { + "inputMesh": "{Meshing_1.outputMesh}" + } + }, + "Meshing_1": { + "nodeType": "Meshing", + "position": [ + 2169, + 0 + ], + "inputs": { + "input": "{DepthMapFilter_1.input}", + "depthMapsFolder": "{DepthMapFilter_1.output}" + } + }, + "PrepareDenseScene_1": { + "nodeType": "PrepareDenseScene", + "position": [ + 1569, + 0 + ], + "inputs": { + "input": "{SfMExpanding_1.output}" + } + }, + "Publish_1": { + "nodeType": "Publish", + "position": [ + 2769, + 0 + ], + "inputs": { + "inputFiles": [ + "{Texturing_1.outputMesh}", + "{Texturing_1.outputMaterial}", + "{Texturing_1.outputTextures}" + ] + } + }, + "RelativePoseEstimating_1": { + "nodeType": "RelativePoseEstimating", + "position": [ + 990, + -1 + ], + "inputs": { + "input": "{TracksBuilding_1.input}", + "tracksFilename": "{TracksBuilding_1.output}", + "minInliers": 100 + } + }, + "SfMBootStraping_1": { + "nodeType": "SfMBootStraping", + "position": [ + 1187, + -8 + ], + "inputs": { + "input": "{RelativePoseEstimating_1.input}", + "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", + "pairs": "{RelativePoseEstimating_1.output}" + } + }, + "SfMExpanding_1": { + "nodeType": "SfMExpanding", + "position": [ + 1377, + -8 + ], + "inputs": { + "input": "{SfMBootStraping_1.output}", + "tracksFilename": "{SfMBootStraping_1.tracksFilename}", + "meshFilename": "{SfMBootStraping_1.meshFilename}" + } + }, + "Texturing_1": { + "nodeType": "Texturing", + "position": [ + 2569, + 0 + ], + "inputs": { + "input": "{Meshing_1.output}", + "imagesFolder": "{DepthMap_1.imagesFolder}", + "inputMesh": "{MeshFiltering_1.outputMesh}" + } + }, + "TracksBuilding_1": { + "nodeType": "TracksBuilding", + "position": [ + 794, + -1 + ], + "inputs": { + "input": "{FeatureMatching_1.input}", + "featuresFolders": "{FeatureMatching_1.featuresFolders}", + "matchesFolders": [ + "{FeatureMatching_1.output}" + ], + "describerTypes": "{FeatureMatching_1.describerTypes}" + } + } + } +} \ No newline at end of file From 76d85dc3e9fa36abd80e5cc07020fae81e79aae5 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 3 Feb 2025 13:29:40 +0100 Subject: [PATCH 1076/1093] Add outputViewsAndPoses to sfmExpanding --- meshroom/aliceVision/SfmExpanding.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index c9f0e9cdec..e2f3251e86 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -172,4 +172,10 @@ class SfMExpanding(desc.AVCommandLineNode): description="Path to the output SfMData file.", value=desc.Node.internalFolder + "sfmExpanded.abc", ), + desc.File( + name="outputViewsAndPoses", + label="Views And Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", + ) ] From f36920bc9853b75592d64c053fa08446736002c1 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 3 Feb 2025 13:45:32 +0100 Subject: [PATCH 1077/1093] Change node names for experimental pipeline --- meshroom/cameraTrackingExperimental.mg | 12 ++++++++++++ ...cameraTrackingWithoutCalibrationExperimental.mg | 12 ++++++++++++ .../photogrammetryAndCameraTrackingExperimental.mg | 14 ++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/meshroom/cameraTrackingExperimental.mg b/meshroom/cameraTrackingExperimental.mg index 09cf8e1e8c..02fdec13ae 100644 --- a/meshroom/cameraTrackingExperimental.mg +++ b/meshroom/cameraTrackingExperimental.mg @@ -465,8 +465,14 @@ "inputs": { "input": "{SfMBootStraping_1.output}", "tracksFilename": "{SfMBootStraping_1.tracksFilename}", + "meshFilename": "{SfMBootStraping_1.meshFilename}", "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the keyframes.", + "label": "SfMExpandingKeys", + "color": "#80766f" } }, "SfMExpanding_2": { @@ -478,12 +484,18 @@ "inputs": { "input": "{TracksBuilding_2.input}", "tracksFilename": "{TracksBuilding_2.output}", + "meshFilename": "{SfMExpanding_1.meshFilename}", "nbFirstUnstableCameras": 0, "maxImagesPerGroup": 0, "bundleAdjustmentMaxOutliers": 5000000, "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the complete camera tracking sequence.", + "label": "SfMExpandingAll", + "color": "#80766f" } }, "SfMTransfer_1": { diff --git a/meshroom/cameraTrackingWithoutCalibrationExperimental.mg b/meshroom/cameraTrackingWithoutCalibrationExperimental.mg index 8653ac1f66..411767d07f 100644 --- a/meshroom/cameraTrackingWithoutCalibrationExperimental.mg +++ b/meshroom/cameraTrackingWithoutCalibrationExperimental.mg @@ -436,8 +436,14 @@ "inputs": { "input": "{SfMBootStraping_1.output}", "tracksFilename": "{SfMBootStraping_1.tracksFilename}", + "meshFilename": "{SfMBootStraping_1.meshFilename}", "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the keyframes.", + "label": "SfMExpandingKeys", + "color": "#80766f" } }, "SfMExpanding_2": { @@ -449,12 +455,18 @@ "inputs": { "input": "{TracksBuilding_2.input}", "tracksFilename": "{TracksBuilding_2.output}", + "meshFilename": "{SfMExpanding_1.meshFilename}", "nbFirstUnstableCameras": 0, "maxImagesPerGroup": 0, "bundleAdjustmentMaxOutliers": 5000000, "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "comment": "Estimate cameras parameters for the complete camera tracking sequence.", + "label": "SfMExpandingAll", + "color": "#80766f" } }, "SfMTransfer_1": { diff --git a/meshroom/photogrammetryAndCameraTrackingExperimental.mg b/meshroom/photogrammetryAndCameraTrackingExperimental.mg index 3b2dfd294f..92377d7b0a 100644 --- a/meshroom/photogrammetryAndCameraTrackingExperimental.mg +++ b/meshroom/photogrammetryAndCameraTrackingExperimental.mg @@ -575,6 +575,10 @@ "input": "{SfMBootStraping_1.output}", "tracksFilename": "{SfMBootStraping_1.tracksFilename}", "meshFilename": "{SfMBootStraping_1.meshFilename}" + }, + "internalInputs": { + "label": "SfMExpandingPhotog", + "color": "#80766f" } }, "SfMExpanding_2": { @@ -589,6 +593,11 @@ "lockScenePreviouslyReconstructed": true, "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "label": "SfMExpandingKeys", + "comment": "Estimate cameras parameters for the keyframes.", + "color": "#80766f" } }, "SfMExpanding_3": { @@ -606,6 +615,11 @@ "minNumberOfObservationsForTriangulation": 3, "minAngleForTriangulation": 1.0, "minAngleForLandmark": 0.5 + }, + "internalInputs": { + "label": "SfMExpandingAll", + "comment": "Estimate cameras parameters for the complete camera tracking sequence.", + "color": "#80766f" } }, "Texturing_2": { From 2a15cfb5181292f89ba6c56006a0822d20c6c977 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 5 Feb 2025 14:17:56 +0100 Subject: [PATCH 1078/1093] Add log --- meshroom/aliceVision/ExtractMetadata.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshroom/aliceVision/ExtractMetadata.py b/meshroom/aliceVision/ExtractMetadata.py index 18cc4e9cb8..deff3a76e3 100644 --- a/meshroom/aliceVision/ExtractMetadata.py +++ b/meshroom/aliceVision/ExtractMetadata.py @@ -89,6 +89,8 @@ def processChunk(self, chunk): views = dataAV.getViews() for id, v in views.items(): inputFile = v.getImage().getImagePath() + chunk.logger.info(f"Processing {inputFile}") + if chunk.node.keepFilename.value: outputMetadataFilename = os.path.join(chunk.node.output.value, Path(inputFile).stem + "." + chunk.node.extension.value) else: @@ -100,9 +102,12 @@ def processChunk(self, chunk): cmd = 'exiftool -X ' + chunk.node.arguments.value.strip() + ' ' + inputFile + ' > ' + outputMetadataFilename else: #xmp cmd = 'exiftool -tagsfromfile ' + inputFile + ' ' + chunk.node.arguments.value.strip() + ' ' + outputMetadataFilename + chunk.logger.debug(cmd) error = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stderr.read().decode() + chunk.logger.debug(error) + if error != "": chunk.logger.error(error) raise RuntimeError(error) From 40312813e12be16b58484ecf519eb4c022c05985 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 10 Feb 2025 08:53:47 +0100 Subject: [PATCH 1079/1093] Export USD node --- meshroom/aliceVision/ExportUSD.py | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 meshroom/aliceVision/ExportUSD.py diff --git a/meshroom/aliceVision/ExportUSD.py b/meshroom/aliceVision/ExportUSD.py new file mode 100644 index 0000000000..0fff147ea1 --- /dev/null +++ b/meshroom/aliceVision/ExportUSD.py @@ -0,0 +1,46 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class ExportUSD(desc.AVCommandLineNode): + commandLine = 'aliceVision_exportUSD {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' + Export a mesh (OBJ file) to USD format. + ''' + + inputs = [ + desc.File( + name="input", + label="Input", + description="Input mesh file.", + value="", + ), + desc.ChoiceParam( + name="fileType", + label="USD File Format", + description="Output USD file format.", + value="usda", + values=["usda", "usdc", "usdz"] + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Output", + description="Path to the output file.", + value=desc.Node.internalFolder + "output.{fileTypeValue}", + ), + ] From 25d82e63a92f718327158b4c18bb2c93532b9227 Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Mon, 17 Feb 2025 16:03:48 +0100 Subject: [PATCH 1080/1093] Add maya scene export --- meshroom/aliceVision/ExportMaya.py | 66 +++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 08cb7d5f07..536c951fa2 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -36,6 +36,12 @@ class ExportMaya(desc.Node): description="Undistorted images template.", value="", ), + desc.BoolParam( + name="generateMaya", + label="generate Maya scene", + description="Do we generate the scene or only export a mel script.", + value=True, + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", @@ -47,17 +53,26 @@ class ExportMaya(desc.Node): outputs = [ desc.File( - name="output", + name="meloutput", label="Mel script", description="Generated mel script", value=desc.Node.internalFolder + "import.mel", ), + desc.File( + name="mayaoutput", + label="Maya scene", + description="Generated Maya scene", + value=desc.Node.internalFolder + "scene.mb", + enabled=lambda node: node.generateMaya.value, + ), ] def processChunk(self, chunk): import pyalicevision import pathlib + import inspect + import subprocess chunk.logManager.start(chunk.node.verboseLevel.value) @@ -120,6 +135,16 @@ def processChunk(self, chunk): #Generate the script itself + mayaFileName = chunk.node.mayaoutput.value + header = f''' + file -f -new; + ''' + + footer = f''' + file -rename "{mayaFileName}"; + file -type "mayaBinary"; + file -save; + ''' alembic = chunk.node.alembic.value abcString = f'AbcImport -mode open -fitTimeRange "{alembic}";' @@ -160,10 +185,39 @@ def processChunk(self, chunk): setAttr "imagePlaneShape1.sizeY" $scaledvaperture; ''' - with open(chunk.node.output.value, "w") as f: - f.write(abcString + '\n') - f.write(objString + '\n') - f.write(camString + '\n') - f.write(advCamString + '\n') + with open(chunk.node.meloutput.value, "w") as f: + if chunk.node.generateMaya.value: + f.write(inspect.cleandoc(header) + '\n') + f.write(inspect.cleandoc(abcString) + '\n') + f.write(inspect.cleandoc(objString) + '\n') + f.write(inspect.cleandoc(camString) + '\n') + f.write(inspect.cleandoc(advCamString) + '\n') + if chunk.node.generateMaya.value: + f.write(inspect.cleandoc(footer) + '\n') + + chunk.logger.info("Mel Script generated") + + #Export to maya + if chunk.node.generateMaya.value: + try: + melPath = chunk.node.meloutput.value + cmd = f'maya_batch -batch -script "{melPath}"' + p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = p.communicate() + + if len(stdout) > 0: + chunk.logger.info(stdout.decode()) + + rc = p.returncode + if rc != 0: + chunk.logger.error(stderr.decode()) + raise Exception(rc) + + except Exception as e: + chunk.logger.error('Failed to run maya batch : "{}".'.format(str(e))) + raise RuntimeError() + + chunk.logger.info("Maya Scene generated") + chunk.logManager.end() From 00cfbbef56af7b68fece1bfe3555a00d7b808872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 18 Feb 2025 15:37:43 +0100 Subject: [PATCH 1081/1093] [pipelines] Experimental: Align nodes and apply correct colors --- meshroom/cameraTrackingExperimental.mg | 110 +++++++------- ...aTrackingWithoutCalibrationExperimental.mg | 118 ++++++++------- ...ogrammetryAndCameraTrackingExperimental.mg | 135 ++++++++++-------- meshroom/photogrammetryExperimental.mg | 30 ++-- 4 files changed, 219 insertions(+), 174 deletions(-) diff --git a/meshroom/cameraTrackingExperimental.mg b/meshroom/cameraTrackingExperimental.mg index 02fdec13ae..25b3e9e630 100644 --- a/meshroom/cameraTrackingExperimental.mg +++ b/meshroom/cameraTrackingExperimental.mg @@ -2,7 +2,6 @@ "header": { "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", - "template": true, "nodesVersions": { "ApplyCalibration": "1.0", "CameraInit": "12.0", @@ -33,7 +32,8 @@ "SfMTriangulation": "1.0", "Texturing": "6.0", "TracksBuilding": "1.0" - } + }, + "template": true }, "graph": { "ApplyCalibration_1": { @@ -91,8 +91,8 @@ "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ - 4140, - 58 + 3800, + 200 ], "inputs": { "input": "{ExportAnimatedCamera_1.input}", @@ -108,8 +108,8 @@ "DepthMapFilter_1": { "nodeType": "DepthMapFilter", "position": [ - 3536, - -181 + 3200, + 0 ], "inputs": { "input": "{DepthMap_1.input}", @@ -122,8 +122,8 @@ "DepthMap_1": { "nodeType": "DepthMap", "position": [ - 3336, - -181 + 3000, + 0 ], "inputs": { "input": "{PrepareDenseScene_1.input}", @@ -151,8 +151,8 @@ "ExportAnimatedCamera_1": { "nodeType": "ExportAnimatedCamera", "position": [ - 2748, - 22 + 2400, + 200 ], "inputs": { "input": "{SfMExpanding_2.output}", @@ -210,8 +210,8 @@ "FeatureMatching_2": { "nodeType": "FeatureMatching", "position": [ - 1987, - 186 + 1800, + 400 ], "inputs": { "input": "{ImageMatching_2.input}", @@ -226,8 +226,8 @@ "FeatureMatching_3": { "nodeType": "FeatureMatching", "position": [ - 1987, - 26 + 1800, + 200 ], "inputs": { "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", @@ -256,8 +256,8 @@ "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ - 1787, - 26 + 1600, + 200 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataFrames}", @@ -294,8 +294,8 @@ "ImageMatching_2": { "nodeType": "ImageMatching", "position": [ - 1787, - 186 + 1600, + 400 ], "inputs": { "input": "{ApplyCalibration_1.output}", @@ -343,8 +343,8 @@ "MeshDecimate_1": { "nodeType": "MeshDecimate", "position": [ - 4136, - -181 + 3800, + 0 ], "inputs": { "input": "{MeshFiltering_1.outputMesh}", @@ -357,8 +357,8 @@ "MeshFiltering_1": { "nodeType": "MeshFiltering", "position": [ - 3936, - -181 + 3600, + 0 ], "inputs": { "inputMesh": "{Meshing_1.outputMesh}", @@ -371,8 +371,8 @@ "Meshing_1": { "nodeType": "Meshing", "position": [ - 3736, - -181 + 3400, + 0 ], "inputs": { "input": "{DepthMapFilter_1.input}", @@ -389,8 +389,8 @@ "PrepareDenseScene_1": { "nodeType": "PrepareDenseScene", "position": [ - 3136, - -181 + 2800, + 0 ], "inputs": { "input": "{SfMTriangulation_1.output}", @@ -403,8 +403,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 4736, - -81 + 4200, + 100 ], "inputs": { "inputFiles": [ @@ -418,21 +418,24 @@ "RelativePoseEstimating_1": { "nodeType": "RelativePoseEstimating", "position": [ - 1012, - -1 + 1000, + 0 ], "inputs": { "input": "{TracksBuilding_1.input}", "tracksFilename": "{TracksBuilding_1.output}", "countIterations": 50000, "minInliers": 100 + }, + "internalInputs": { + "color": "#575963" } }, "ScenePreview_1": { "nodeType": "ScenePreview", "position": [ - 4357, - 8 + 4000, + 200 ], "inputs": { "cameras": "{ConvertSfMFormat_1.output}", @@ -447,20 +450,23 @@ "SfMBootStraping_1": { "nodeType": "SfMBootStraping", "position": [ - 1215, - -7 + 1200, + 0 ], "inputs": { "input": "{RelativePoseEstimating_1.input}", "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", "pairs": "{RelativePoseEstimating_1.output}" + }, + "internalInputs": { + "color": "#575963" } }, "SfMExpanding_1": { "nodeType": "SfMExpanding", "position": [ - 1412, - -10 + 1400, + 0 ], "inputs": { "input": "{SfMBootStraping_1.output}", @@ -472,14 +478,14 @@ "internalInputs": { "comment": "Estimate cameras parameters for the keyframes.", "label": "SfMExpandingKeys", - "color": "#80766f" + "color": "#575963" } }, "SfMExpanding_2": { "nodeType": "SfMExpanding", "position": [ - 2469, - 52 + 2200, + 200 ], "inputs": { "input": "{TracksBuilding_2.input}", @@ -501,8 +507,8 @@ "SfMTransfer_1": { "nodeType": "SfMTransfer", "position": [ - 2736, - -181 + 2400, + 0 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", @@ -517,8 +523,8 @@ "SfMTriangulation_1": { "nodeType": "SfMTriangulation", "position": [ - 2936, - -181 + 2600, + 0 ], "inputs": { "input": "{SfMTransfer_1.output}", @@ -534,8 +540,8 @@ "Texturing_1": { "nodeType": "Texturing", "position": [ - 4389, - -245 + 4000, + 0 ], "inputs": { "input": "{Meshing_1.output}", @@ -549,8 +555,8 @@ "TracksBuilding_1": { "nodeType": "TracksBuilding", "position": [ - 826, - -2 + 800, + 0 ], "inputs": { "input": "{FeatureMatching_1.input}", @@ -560,13 +566,16 @@ ], "describerTypes": "{FeatureMatching_1.describerTypes}", "filterTrackForks": true + }, + "internalInputs": { + "color": "#575963" } }, "TracksBuilding_2": { "nodeType": "TracksBuilding", "position": [ - 2280, - 34 + 2000, + 200 ], "inputs": { "input": "{FeatureMatching_3.input}", @@ -578,6 +587,9 @@ "describerTypes": "{FeatureMatching_3.describerTypes}", "minInputTrackLength": 5, "filterTrackForks": true + }, + "internalInputs": { + "color": "#80766f" } } } diff --git a/meshroom/cameraTrackingWithoutCalibrationExperimental.mg b/meshroom/cameraTrackingWithoutCalibrationExperimental.mg index 411767d07f..5b35d1f90c 100644 --- a/meshroom/cameraTrackingWithoutCalibrationExperimental.mg +++ b/meshroom/cameraTrackingWithoutCalibrationExperimental.mg @@ -2,7 +2,6 @@ "header": { "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", - "template": true, "nodesVersions": { "ApplyCalibration": "1.0", "CameraInit": "12.0", @@ -32,7 +31,8 @@ "SfMTriangulation": "1.0", "Texturing": "6.0", "TracksBuilding": "1.0" - } + }, + "template": true }, "graph": { "ApplyCalibration_1": { @@ -62,8 +62,8 @@ "ConvertDistortion_1": { "nodeType": "ConvertDistortion", "position": [ - 2561, - 222 + 2400, + 360 ], "inputs": { "input": "{SfMExpanding_2.output}" @@ -75,8 +75,8 @@ "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ - 3674, - 23 + 3800, + 200 ], "inputs": { "input": "{ExportAnimatedCamera_1.input}", @@ -92,8 +92,8 @@ "DepthMapFilter_1": { "nodeType": "DepthMapFilter", "position": [ - 3074, - -177 + 3200, + 0 ], "inputs": { "input": "{DepthMap_1.input}", @@ -106,8 +106,8 @@ "DepthMap_1": { "nodeType": "DepthMap", "position": [ - 2874, - -177 + 3000, + 0 ], "inputs": { "input": "{PrepareDenseScene_1.input}", @@ -121,8 +121,8 @@ "ExportAnimatedCamera_1": { "nodeType": "ExportAnimatedCamera", "position": [ - 2754, - 37 + 2600, + 200 ], "inputs": { "input": "{SfMExpanding_2.output}", @@ -135,8 +135,8 @@ "ExportDistortion_1": { "nodeType": "ExportDistortion", "position": [ - 2761, - 222 + 2600, + 360 ], "inputs": { "input": "{ConvertDistortion_1.output}", @@ -181,8 +181,8 @@ "FeatureMatching_2": { "nodeType": "FeatureMatching", "position": [ - 1874, - 183 + 1800, + 360 ], "inputs": { "input": "{ImageMatching_2.input}", @@ -197,8 +197,8 @@ "FeatureMatching_3": { "nodeType": "FeatureMatching", "position": [ - 1874, - 23 + 1800, + 200 ], "inputs": { "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", @@ -227,8 +227,8 @@ "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ - 1674, - 23 + 1600, + 200 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataFrames}", @@ -265,8 +265,8 @@ "ImageMatching_2": { "nodeType": "ImageMatching", "position": [ - 1674, - 183 + 1600, + 360 ], "inputs": { "input": "{ApplyCalibration_1.output}", @@ -314,8 +314,8 @@ "MeshDecimate_1": { "nodeType": "MeshDecimate", "position": [ - 3674, - -177 + 3800, + 0 ], "inputs": { "input": "{MeshFiltering_1.outputMesh}", @@ -328,8 +328,8 @@ "MeshFiltering_1": { "nodeType": "MeshFiltering", "position": [ - 3474, - -177 + 3600, + 0 ], "inputs": { "inputMesh": "{Meshing_1.outputMesh}", @@ -342,8 +342,8 @@ "Meshing_1": { "nodeType": "Meshing", "position": [ - 3274, - -177 + 3400, + 0 ], "inputs": { "input": "{DepthMapFilter_1.input}", @@ -360,8 +360,8 @@ "PrepareDenseScene_1": { "nodeType": "PrepareDenseScene", "position": [ - 2674, - -177 + 2800, + 0 ], "inputs": { "input": "{SfMTriangulation_1.output}", @@ -374,8 +374,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 4274, - -77 + 4400, + 100 ], "inputs": { "inputFiles": [ @@ -389,21 +389,24 @@ "RelativePoseEstimating_1": { "nodeType": "RelativePoseEstimating", "position": [ - 1013, - 4 + 1000, + 0 ], "inputs": { "input": "{TracksBuilding_1.input}", "tracksFilename": "{TracksBuilding_1.output}", "countIterations": 50000, "minInliers": 100 + }, + "internalInputs": { + "color": "#575963" } }, "ScenePreview_1": { "nodeType": "ScenePreview", "position": [ - 3874, - 23 + 4000, + 200 ], "inputs": { "cameras": "{ConvertSfMFormat_1.output}", @@ -418,20 +421,23 @@ "SfMBootStraping_1": { "nodeType": "SfMBootStraping", "position": [ - 1216, - -2 + 1200, + 0 ], "inputs": { "input": "{RelativePoseEstimating_1.input}", "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", "pairs": "{RelativePoseEstimating_1.output}" + }, + "internalInputs": { + "color": "#575963" } }, "SfMExpanding_1": { "nodeType": "SfMExpanding", "position": [ - 1413, - -5 + 1400, + 0 ], "inputs": { "input": "{SfMBootStraping_1.output}", @@ -443,14 +449,14 @@ "internalInputs": { "comment": "Estimate cameras parameters for the keyframes.", "label": "SfMExpandingKeys", - "color": "#80766f" + "color": "#575963" } }, "SfMExpanding_2": { "nodeType": "SfMExpanding", "position": [ - 2309.5, - 27.0 + 2200, + 200 ], "inputs": { "input": "{TracksBuilding_2.input}", @@ -472,8 +478,8 @@ "SfMTransfer_1": { "nodeType": "SfMTransfer", "position": [ - 2274, - -177 + 2400, + 0 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataKeyframes}", @@ -488,8 +494,8 @@ "SfMTriangulation_1": { "nodeType": "SfMTriangulation", "position": [ - 2474, - -177 + 2600, + 0 ], "inputs": { "input": "{SfMTransfer_1.output}", @@ -505,8 +511,8 @@ "Texturing_1": { "nodeType": "Texturing", "position": [ - 3874, - -177 + 4000, + 0 ], "inputs": { "input": "{Meshing_1.output}", @@ -520,8 +526,8 @@ "TracksBuilding_1": { "nodeType": "TracksBuilding", "position": [ - 827, - 3 + 800, + 0 ], "inputs": { "input": "{FeatureMatching_1.input}", @@ -531,13 +537,16 @@ ], "describerTypes": "{FeatureMatching_1.describerTypes}", "filterTrackForks": true + }, + "internalInputs": { + "color": "#575963" } }, "TracksBuilding_2": { "nodeType": "TracksBuilding", "position": [ - 2103.5, - 24.0 + 2000, + 200 ], "inputs": { "input": "{FeatureMatching_3.input}", @@ -549,6 +558,9 @@ "describerTypes": "{FeatureMatching_3.describerTypes}", "minInputTrackLength": 5, "filterTrackForks": true + }, + "internalInputs": { + "color": "#80766f" } } } diff --git a/meshroom/photogrammetryAndCameraTrackingExperimental.mg b/meshroom/photogrammetryAndCameraTrackingExperimental.mg index 92377d7b0a..93cf7215ad 100644 --- a/meshroom/photogrammetryAndCameraTrackingExperimental.mg +++ b/meshroom/photogrammetryAndCameraTrackingExperimental.mg @@ -2,7 +2,6 @@ "header": { "releaseVersion": "2025.1.0-develop", "fileVersion": "2.0", - "template": true, "nodesVersions": { "ApplyCalibration": "1.0", "CameraInit": "12.0", @@ -31,7 +30,8 @@ "SfMExpanding": "2.0", "Texturing": "6.0", "TracksBuilding": "1.0" - } + }, + "template": true }, "graph": { "ApplyCalibration_1": { @@ -102,8 +102,8 @@ "ConvertSfMFormat_1": { "nodeType": "ConvertSfMFormat", "position": [ - 2638, - 193 + 2600, + 200 ], "inputs": { "input": "{ExportAnimatedCamera_1.input}", @@ -119,8 +119,8 @@ "DepthMapFilter_2": { "nodeType": "DepthMapFilter", "position": [ - 1412, - -499 + 1400, + -500 ], "inputs": { "input": "{DepthMap_2.input}", @@ -133,8 +133,8 @@ "DepthMap_2": { "nodeType": "DepthMap", "position": [ - 1212, - -499 + 1200, + -500 ], "inputs": { "input": "{PrepareDenseScene_2.input}", @@ -161,8 +161,8 @@ "ExportAnimatedCamera_1": { "nodeType": "ExportAnimatedCamera", "position": [ - 2450, - 194 + 2400, + 200 ], "inputs": { "input": "{SfMExpanding_3.output}", @@ -234,8 +234,8 @@ "FeatureMatching_2": { "nodeType": "FeatureMatching", "position": [ - 1838, - 353 + 1800, + 400 ], "inputs": { "input": "{ImageMatching_2.input}", @@ -250,8 +250,8 @@ "FeatureMatching_3": { "nodeType": "FeatureMatching", "position": [ - 1838, - 193 + 1800, + 200 ], "inputs": { "input": "{ImageMatchingMultiSfM_1.outputCombinedSfM}", @@ -283,7 +283,7 @@ "FeatureMatching_5": { "nodeType": "FeatureMatching", "position": [ - 600, + 1200, -300 ], "inputs": { @@ -312,8 +312,8 @@ "ImageMatchingMultiSfM_1": { "nodeType": "ImageMatchingMultiSfM", "position": [ - 1638, - 193 + 1600, + 200 ], "inputs": { "input": "{KeyframeSelection_1.outputSfMDataFrames}", @@ -332,7 +332,7 @@ "ImageMatchingMultiSfM_2": { "nodeType": "ImageMatchingMultiSfM", "position": [ - 400, + 1000, -300 ], "inputs": { @@ -369,8 +369,8 @@ "ImageMatching_2": { "nodeType": "ImageMatching", "position": [ - 1638, - 353 + 1600, + 400 ], "inputs": { "input": "{ApplyCalibration_1.output}", @@ -434,8 +434,8 @@ "MeshDecimate_1": { "nodeType": "MeshDecimate", "position": [ - 2638, - 93 + 2600, + 0 ], "inputs": { "input": "{MeshFiltering_2.outputMesh}", @@ -448,8 +448,8 @@ "MeshFiltering_2": { "nodeType": "MeshFiltering", "position": [ - 1812, - -499 + 1800, + -500 ], "inputs": { "inputMesh": "{Meshing_2.outputMesh}" @@ -461,8 +461,8 @@ "Meshing_2": { "nodeType": "Meshing", "position": [ - 1612, - -499 + 1600, + -500 ], "inputs": { "input": "{DepthMapFilter_2.input}", @@ -475,8 +475,8 @@ "PrepareDenseScene_2": { "nodeType": "PrepareDenseScene", "position": [ - 1012, - -499 + 1000, + -500 ], "inputs": { "input": "{SfMExpanding_1.output}" @@ -488,8 +488,8 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3130, - -22 + 3000, + -100 ], "inputs": { "inputFiles": [ @@ -503,33 +503,39 @@ "RelativePoseEstimating_1": { "nodeType": "RelativePoseEstimating", "position": [ - 419, - -495 + 400, + -500 ], "inputs": { "input": "{TracksBuilding_1.input}", "tracksFilename": "{TracksBuilding_1.output}", "minInliers": 100 + }, + "internalInputs": { + "color": "#384a55" } }, "RelativePoseEstimating_2": { "nodeType": "RelativePoseEstimating", "position": [ - 1005, - 1 + 1000, + 0 ], "inputs": { "input": "{TracksBuilding_2.input}", "tracksFilename": "{TracksBuilding_2.output}", "countIterations": 50000, "minInliers": 100 + }, + "internalInputs": { + "color": "#575963" } }, "ScenePreview_1": { "nodeType": "ScenePreview", "position": [ - 2838, - 193 + 2800, + 200 ], "inputs": { "cameras": "{ConvertSfMFormat_1.output}", @@ -544,32 +550,38 @@ "SfMBootStraping_1": { "nodeType": "SfMBootStraping", "position": [ - 616, - -502 + 600, + -500 ], "inputs": { "input": "{RelativePoseEstimating_1.input}", "tracksFilename": "{RelativePoseEstimating_1.tracksFilename}", "pairs": "{RelativePoseEstimating_1.output}" + }, + "internalInputs": { + "color": "#384a55" } }, "SfMBootStraping_2": { "nodeType": "SfMBootStraping", "position": [ - 1208, - -5 + 1200, + 0 ], "inputs": { "input": "{RelativePoseEstimating_2.input}", "tracksFilename": "{RelativePoseEstimating_2.tracksFilename}", "pairs": "{RelativePoseEstimating_2.output}" + }, + "internalInputs": { + "color": "#575963" } }, "SfMExpanding_1": { "nodeType": "SfMExpanding", "position": [ - 806, - -502 + 800, + -500 ], "inputs": { "input": "{SfMBootStraping_1.output}", @@ -578,14 +590,14 @@ }, "internalInputs": { "label": "SfMExpandingPhotog", - "color": "#80766f" + "color": "#384a55" } }, "SfMExpanding_2": { "nodeType": "SfMExpanding", "position": [ - 1405, - -8 + 1400, + 0 ], "inputs": { "input": "{SfMBootStraping_2.output}", @@ -595,16 +607,16 @@ "minAngleForLandmark": 0.5 }, "internalInputs": { - "label": "SfMExpandingKeys", "comment": "Estimate cameras parameters for the keyframes.", - "color": "#80766f" + "label": "SfMExpandingKeys", + "color": "#575963" } }, "SfMExpanding_3": { "nodeType": "SfMExpanding", "position": [ - 2243, - 271 + 2200, + 200 ], "inputs": { "input": "{TracksBuilding_3.input}", @@ -617,16 +629,16 @@ "minAngleForLandmark": 0.5 }, "internalInputs": { - "label": "SfMExpandingAll", "comment": "Estimate cameras parameters for the complete camera tracking sequence.", + "label": "SfMExpandingAll", "color": "#80766f" } }, "Texturing_2": { "nodeType": "Texturing", "position": [ - 2012, - -499 + 2000, + -500 ], "inputs": { "input": "{Meshing_2.output}", @@ -640,8 +652,8 @@ "TracksBuilding_1": { "nodeType": "TracksBuilding", "position": [ - 223, - -495 + 200, + -500 ], "inputs": { "input": "{FeatureMatching_4.input}", @@ -650,12 +662,15 @@ "{FeatureMatching_4.output}" ], "describerTypes": "{FeatureMatching_4.describerTypes}" + }, + "internalInputs": { + "color": "#384a55" } }, "TracksBuilding_2": { "nodeType": "TracksBuilding", "position": [ - 819, + 800, 0 ], "inputs": { @@ -667,13 +682,16 @@ ], "describerTypes": "{FeatureMatching_1.describerTypes}", "filterTrackForks": true + }, + "internalInputs": { + "color": "#575963" } }, "TracksBuilding_3": { "nodeType": "TracksBuilding", "position": [ - 2049, - 263 + 2000, + 200 ], "inputs": { "input": "{FeatureMatching_3.input}", @@ -685,6 +703,9 @@ "describerTypes": "{FeatureMatching_3.describerTypes}", "minInputTrackLength": 5, "filterTrackForks": true + }, + "internalInputs": { + "color": "#80766f" } } } diff --git a/meshroom/photogrammetryExperimental.mg b/meshroom/photogrammetryExperimental.mg index 0c69010db6..01ed019621 100644 --- a/meshroom/photogrammetryExperimental.mg +++ b/meshroom/photogrammetryExperimental.mg @@ -33,7 +33,7 @@ "DepthMapFilter_1": { "nodeType": "DepthMapFilter", "position": [ - 1969, + 2000, 0 ], "inputs": { @@ -44,7 +44,7 @@ "DepthMap_1": { "nodeType": "DepthMap", "position": [ - 1769, + 1800, 0 ], "inputs": { @@ -91,7 +91,7 @@ "MeshFiltering_1": { "nodeType": "MeshFiltering", "position": [ - 2369, + 2400, 0 ], "inputs": { @@ -101,7 +101,7 @@ "Meshing_1": { "nodeType": "Meshing", "position": [ - 2169, + 2200, 0 ], "inputs": { @@ -112,7 +112,7 @@ "PrepareDenseScene_1": { "nodeType": "PrepareDenseScene", "position": [ - 1569, + 1600, 0 ], "inputs": { @@ -122,7 +122,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 2769, + 2800, 0 ], "inputs": { @@ -136,8 +136,8 @@ "RelativePoseEstimating_1": { "nodeType": "RelativePoseEstimating", "position": [ - 990, - -1 + 1000, + 0 ], "inputs": { "input": "{TracksBuilding_1.input}", @@ -148,8 +148,8 @@ "SfMBootStraping_1": { "nodeType": "SfMBootStraping", "position": [ - 1187, - -8 + 1200, + 0 ], "inputs": { "input": "{RelativePoseEstimating_1.input}", @@ -160,8 +160,8 @@ "SfMExpanding_1": { "nodeType": "SfMExpanding", "position": [ - 1377, - -8 + 1400, + 0 ], "inputs": { "input": "{SfMBootStraping_1.output}", @@ -172,7 +172,7 @@ "Texturing_1": { "nodeType": "Texturing", "position": [ - 2569, + 2600, 0 ], "inputs": { @@ -184,8 +184,8 @@ "TracksBuilding_1": { "nodeType": "TracksBuilding", "position": [ - 794, - -1 + 800, + 0 ], "inputs": { "input": "{FeatureMatching_1.input}", From 87f0893b2519bd6fa3718b37cb745cd5cfdf7e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 18 Feb 2025 16:02:48 +0100 Subject: [PATCH 1082/1093] [nodes] Fix labels and descriptions for some nodes --- meshroom/aliceVision/ExportMaya.py | 17 ++++++++--------- meshroom/aliceVision/ExtractMetadata.py | 4 ++-- meshroom/aliceVision/MaskProcessing.py | 8 ++++---- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 536c951fa2..1ccb13b6c7 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -20,14 +20,14 @@ class ExportMaya(desc.Node): ), desc.File( name="alembic", - label="Alembic file", + label="Alembic File", description="Input alembic file.", value="", ), desc.File( name="mesh", label="Input Mesh", - description="Input Mesh file.", + description="Input mesh file.", value="", ), desc.File( @@ -38,8 +38,8 @@ class ExportMaya(desc.Node): ), desc.BoolParam( name="generateMaya", - label="generate Maya scene", - description="Do we generate the scene or only export a mel script.", + label="Generate Maya Scene", + description="Select to generate the Maya scene in addition to the export of the mel script.", value=True, ), desc.ChoiceParam( @@ -54,14 +54,14 @@ class ExportMaya(desc.Node): outputs = [ desc.File( name="meloutput", - label="Mel script", - description="Generated mel script", + label="Mel Script", + description="Generated mel script.", value=desc.Node.internalFolder + "import.mel", ), desc.File( name="mayaoutput", - label="Maya scene", - description="Generated Maya scene", + label="Maya Scene", + description="Generated Maya scene.", value=desc.Node.internalFolder + "scene.mb", enabled=lambda node: node.generateMaya.value, ), @@ -219,5 +219,4 @@ def processChunk(self, chunk): chunk.logger.info("Maya Scene generated") - chunk.logManager.end() diff --git a/meshroom/aliceVision/ExtractMetadata.py b/meshroom/aliceVision/ExtractMetadata.py index deff3a76e3..389abbf513 100644 --- a/meshroom/aliceVision/ExtractMetadata.py +++ b/meshroom/aliceVision/ExtractMetadata.py @@ -25,7 +25,7 @@ class ExtractMetadata(desc.Node): desc.File( name="input", label="Input", - description="SfMData file input.", + description="SfMData input file.", value="", ), desc.BoolParam( @@ -45,7 +45,7 @@ class ExtractMetadata(desc.Node): desc.StringParam( name="arguments", label="Arguments", - description="ExifTool command arguments", + description="ExifTool command arguments.", value="", ), desc.BoolParam( diff --git a/meshroom/aliceVision/MaskProcessing.py b/meshroom/aliceVision/MaskProcessing.py index 7beb7ef64c..86539567bb 100644 --- a/meshroom/aliceVision/MaskProcessing.py +++ b/meshroom/aliceVision/MaskProcessing.py @@ -44,7 +44,7 @@ class MaskProcessing(desc.AVCommandLineNode): value="", ), name="inputs", - label="Input directories", + label="Input Directories", description="A set of directories containing masks with the same names.", exposed=True, ), @@ -52,9 +52,9 @@ class MaskProcessing(desc.AVCommandLineNode): name="operator", label="Operator", description="Operator: Binary operator\n" - "OR : applies binary OR between all the masks\n" - "AND : applies binary AND between all the masks\n" - "NOT : applies binary NOT to the first mask in the list\n", + "OR: applies binary OR between all the masks\n" + "AND: applies binary AND between all the masks\n" + "NOT: applies binary NOT to the first mask in the list\n", value="and", values=["or", "and", "not"], ), From c7984bfb5aa2c6a524afd55ee8b4a488835756e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 8 Jan 2025 18:59:49 +0100 Subject: [PATCH 1083/1093] [nodes] Replace `desc.Node.internalFolder` with `{nodeCacheFolder}` --- meshroom/aliceVision/ApplyCalibration.py | 2 +- meshroom/aliceVision/CameraCalibration.py | 2 +- meshroom/aliceVision/CameraInit.py | 2 +- meshroom/aliceVision/CameraLocalization.py | 4 ++-- meshroom/aliceVision/CameraRigCalibration.py | 2 +- meshroom/aliceVision/CameraRigLocalization.py | 2 +- meshroom/aliceVision/CheckerboardCalibration.py | 2 +- meshroom/aliceVision/CheckerboardDetection.py | 4 ++-- meshroom/aliceVision/ColorCheckerCorrection.py | 4 ++-- meshroom/aliceVision/ColorCheckerDetection.py | 2 +- meshroom/aliceVision/ConvertDistortion.py | 2 +- meshroom/aliceVision/ConvertMesh.py | 2 +- meshroom/aliceVision/ConvertSfMFormat.py | 2 +- meshroom/aliceVision/DepthMap.py | 14 +++++++------- meshroom/aliceVision/DepthMapFilter.py | 8 ++++---- meshroom/aliceVision/DepthMapRendering.py | 6 +++--- meshroom/aliceVision/DistortionCalibration.py | 2 +- meshroom/aliceVision/ExportAnimatedCamera.py | 8 ++++---- meshroom/aliceVision/ExportColoredPointCloud.py | 2 +- meshroom/aliceVision/ExportDistortion.py | 10 +++++----- meshroom/aliceVision/ExportMatches.py | 2 +- meshroom/aliceVision/ExportMaya.py | 4 ++-- meshroom/aliceVision/ExportUSD.py | 2 +- meshroom/aliceVision/ExtractMetadata.py | 2 +- meshroom/aliceVision/FeatureExtraction.py | 2 +- meshroom/aliceVision/FeatureMatching.py | 2 +- meshroom/aliceVision/FeatureRepeatability.py | 2 +- meshroom/aliceVision/GlobalRotationEstimating.py | 2 +- meshroom/aliceVision/GlobalSfM.py | 6 +++--- meshroom/aliceVision/ImageMasking.py | 2 +- meshroom/aliceVision/ImageMatching.py | 2 +- meshroom/aliceVision/ImageMatchingMultiSfM.py | 4 ++-- meshroom/aliceVision/ImageProcessing.py | 12 ++++++------ meshroom/aliceVision/ImageSegmentation.py | 4 ++-- meshroom/aliceVision/ImportE57.py | 2 +- meshroom/aliceVision/ImportKnownPoses.py | 2 +- meshroom/aliceVision/KeyframeSelection.py | 6 +++--- meshroom/aliceVision/LdrToHdrCalibration.py | 4 ++-- meshroom/aliceVision/LdrToHdrMerge.py | 4 ++-- meshroom/aliceVision/LdrToHdrSampling.py | 2 +- meshroom/aliceVision/LidarDecimating.py | 4 ++-- meshroom/aliceVision/LidarMerging.py | 2 +- meshroom/aliceVision/LidarMeshing.py | 4 ++-- meshroom/aliceVision/LightingCalibration.py | 4 ++-- meshroom/aliceVision/LightingEstimation.py | 2 +- meshroom/aliceVision/MaskProcessing.py | 4 ++-- meshroom/aliceVision/MergeMeshes.py | 2 +- meshroom/aliceVision/MeshDecimate.py | 2 +- meshroom/aliceVision/MeshDenoising.py | 2 +- meshroom/aliceVision/MeshFiltering.py | 2 +- meshroom/aliceVision/MeshMasking.py | 2 +- meshroom/aliceVision/MeshRemoveUnseenFaces.py | 2 +- meshroom/aliceVision/MeshResampling.py | 2 +- meshroom/aliceVision/Meshing.py | 4 ++-- meshroom/aliceVision/NodalSfM.py | 2 +- meshroom/aliceVision/NormalIntegration.py | 2 +- meshroom/aliceVision/NormalMapRendering.py | 4 ++-- meshroom/aliceVision/PanoramaCompositing.py | 2 +- meshroom/aliceVision/PanoramaEstimation.py | 4 ++-- meshroom/aliceVision/PanoramaInit.py | 4 ++-- meshroom/aliceVision/PanoramaMerging.py | 2 +- meshroom/aliceVision/PanoramaPostProcessing.py | 6 +++--- meshroom/aliceVision/PanoramaPrepareImages.py | 2 +- meshroom/aliceVision/PanoramaSeams.py | 4 ++-- meshroom/aliceVision/PanoramaWarping.py | 2 +- meshroom/aliceVision/PhotometricStereo.py | 16 ++++++++-------- meshroom/aliceVision/PrepareDenseScene.py | 4 ++-- meshroom/aliceVision/RelativePoseEstimating.py | 2 +- meshroom/aliceVision/SelectConnectedViews.py | 2 +- meshroom/aliceVision/SfMAlignment.py | 4 ++-- meshroom/aliceVision/SfMChecking.py | 2 +- meshroom/aliceVision/SfMColorizing.py | 2 +- meshroom/aliceVision/SfMFilter.py | 4 ++-- meshroom/aliceVision/SfMMerge.py | 4 ++-- meshroom/aliceVision/SfMPoseInjecting.py | 2 +- meshroom/aliceVision/SfMSplitReconstructed.py | 4 ++-- meshroom/aliceVision/SfMToRig.py | 2 +- meshroom/aliceVision/SfMTransfer.py | 4 ++-- meshroom/aliceVision/SfMTransform.py | 4 ++-- meshroom/aliceVision/SfMTriangulation.py | 4 ++-- meshroom/aliceVision/SfmBootstraping.py | 2 +- meshroom/aliceVision/SfmExpanding.py | 4 ++-- meshroom/aliceVision/SphereDetection.py | 2 +- meshroom/aliceVision/Split360Images.py | 4 ++-- meshroom/aliceVision/StructureFromMotion.py | 6 +++--- meshroom/aliceVision/Texturing.py | 14 +++++++------- meshroom/aliceVision/TracksBuilding.py | 2 +- meshroom/blender/ScenePreview.py | 4 ++-- 88 files changed, 160 insertions(+), 160 deletions(-) diff --git a/meshroom/aliceVision/ApplyCalibration.py b/meshroom/aliceVision/ApplyCalibration.py index 34862871e1..a90c98100c 100644 --- a/meshroom/aliceVision/ApplyCalibration.py +++ b/meshroom/aliceVision/ApplyCalibration.py @@ -44,6 +44,6 @@ class ApplyCalibration(desc.AVCommandLineNode): name="output", label="SMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfmData.sfm", + value="{nodeCacheFolder}/sfmData.sfm", ), ] diff --git a/meshroom/aliceVision/CameraCalibration.py b/meshroom/aliceVision/CameraCalibration.py index 01293a0408..3cbb637b43 100644 --- a/meshroom/aliceVision/CameraCalibration.py +++ b/meshroom/aliceVision/CameraCalibration.py @@ -124,6 +124,6 @@ class CameraCalibration(desc.AVCommandLineNode): name="output", label="Output", description="Output filename for intrinsic [and extrinsic] parameters.", - value=desc.Node.internalFolder + "/cameraCalibration.cal", + value="{nodeCacheFolder}/cameraCalibration.cal", ), ] diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index bc7246ba6a..c23c51bc12 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -487,7 +487,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): name="output", label="SfMData", description="Output SfMData.", - value=desc.Node.internalFolder + "cameraInit.sfm", + value="{nodeCacheFolder}/cameraInit.sfm", ), ] diff --git a/meshroom/aliceVision/CameraLocalization.py b/meshroom/aliceVision/CameraLocalization.py index 8f00e7c318..a778fda9c5 100644 --- a/meshroom/aliceVision/CameraLocalization.py +++ b/meshroom/aliceVision/CameraLocalization.py @@ -191,12 +191,12 @@ class CameraLocalization(desc.AVCommandLineNode): name="outputAlembic", label="Alembic", description="Filename for the SfMData export file (where camera poses will be stored).", - value=desc.Node.internalFolder + "trackedCameras.abc", + value="{nodeCacheFolder}/trackedCameras.abc", ), desc.File( name="outputJSON", label="JSON File", description="Filename for the localization results as .json.", - value=desc.Node.internalFolder + "trackedCameras.json", + value="{nodeCacheFolder}/trackedCameras.json", ), ] diff --git a/meshroom/aliceVision/CameraRigCalibration.py b/meshroom/aliceVision/CameraRigCalibration.py index ba6a791e26..f788134280 100644 --- a/meshroom/aliceVision/CameraRigCalibration.py +++ b/meshroom/aliceVision/CameraRigCalibration.py @@ -156,6 +156,6 @@ class CameraRigCalibration(desc.AVCommandLineNode): name="outfile", label="Output File", description="The name of the file to store the calibration data in.", - value=desc.Node.internalFolder + "cameraRigCalibration.rigCal", + value="{nodeCacheFolder}/cameraRigCalibration.rigCal", ), ] diff --git a/meshroom/aliceVision/CameraRigLocalization.py b/meshroom/aliceVision/CameraRigLocalization.py index c1fed08e30..331c171052 100644 --- a/meshroom/aliceVision/CameraRigLocalization.py +++ b/meshroom/aliceVision/CameraRigLocalization.py @@ -162,6 +162,6 @@ class CameraRigLocalization(desc.AVCommandLineNode): name="outputAlembic", label="Alembic", description="Filename for the SfMData export file (where camera poses will be stored).", - value=desc.Node.internalFolder + "trackedcameras.abc", + value="{nodeCacheFolder}/trackedcameras.abc", ), ] diff --git a/meshroom/aliceVision/CheckerboardCalibration.py b/meshroom/aliceVision/CheckerboardCalibration.py index f07f9ec8ee..1cdc8229bd 100644 --- a/meshroom/aliceVision/CheckerboardCalibration.py +++ b/meshroom/aliceVision/CheckerboardCalibration.py @@ -47,6 +47,6 @@ class CheckerboardCalibration(desc.AVCommandLineNode): name="output", label="SfMData File", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfmData.sfm", + value="{nodeCacheFolder}/sfmData.sfm", ) ] diff --git a/meshroom/aliceVision/CheckerboardDetection.py b/meshroom/aliceVision/CheckerboardDetection.py index baa6b0a3c9..6d48ba31a5 100644 --- a/meshroom/aliceVision/CheckerboardDetection.py +++ b/meshroom/aliceVision/CheckerboardDetection.py @@ -61,7 +61,7 @@ class CheckerboardDetection(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="checkerLines", @@ -69,7 +69,7 @@ class CheckerboardDetection(desc.AVCommandLineNode): label="Checker Lines", description="Debug images.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>.png", + value="{nodeCacheFolder}/<VIEW_ID>.png", group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/ColorCheckerCorrection.py b/meshroom/aliceVision/ColorCheckerCorrection.py index a301298210..007ec4bb5c 100644 --- a/meshroom/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/aliceVision/ColorCheckerCorrection.py @@ -69,13 +69,13 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): name="outSfMData", label="SfMData", description="Output SfMData.", - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", + value=lambda attr: ("{nodeCacheFolder}/" + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", group="", # do not export on the command line ), desc.File( name="output", label="Folder", description="Output images folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/ColorCheckerDetection.py b/meshroom/aliceVision/ColorCheckerDetection.py index c92b64443e..ae8286615c 100644 --- a/meshroom/aliceVision/ColorCheckerDetection.py +++ b/meshroom/aliceVision/ColorCheckerDetection.py @@ -62,6 +62,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode): name="outputData", label="Color Checker Data", description="Output position and colorimetric data extracted from detected color checkers in the images.", - value=desc.Node.internalFolder + "/ccheckers.json", + value="{nodeCacheFolder}/ccheckers.json", ), ] diff --git a/meshroom/aliceVision/ConvertDistortion.py b/meshroom/aliceVision/ConvertDistortion.py index d196d246a5..19094c05b8 100644 --- a/meshroom/aliceVision/ConvertDistortion.py +++ b/meshroom/aliceVision/ConvertDistortion.py @@ -48,6 +48,6 @@ class ConvertDistortion(desc.AVCommandLineNode): name="output", label="Output", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.abc", + value="{nodeCacheFolder}/sfm.abc", ), ] diff --git a/meshroom/aliceVision/ConvertMesh.py b/meshroom/aliceVision/ConvertMesh.py index 035bfa2867..27b3d64c1c 100644 --- a/meshroom/aliceVision/ConvertMesh.py +++ b/meshroom/aliceVision/ConvertMesh.py @@ -39,6 +39,6 @@ class ConvertMesh(desc.AVCommandLineNode): name="output", label="Mesh", description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", - value=desc.Node.internalFolder + "mesh." + "{outputMeshFileTypeValue}", + value="{nodeCacheFolder}/mesh.{outputMeshFileTypeValue}", ), ] diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index b98235235e..9f10a327d7 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -94,6 +94,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode): name="output", label="Output", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.{fileExtValue}", + value="{nodeCacheFolder}/sfm.{fileExtValue}", ), ] diff --git a/meshroom/aliceVision/DepthMap.py b/meshroom/aliceVision/DepthMap.py index 469f90c867..bd391af037 100644 --- a/meshroom/aliceVision/DepthMap.py +++ b/meshroom/aliceVision/DepthMap.py @@ -565,7 +565,7 @@ class DepthMap(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder for generated depth maps.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images @@ -575,7 +575,7 @@ class DepthMap(desc.AVCommandLineNode): label="Depth Maps", description="Generated depth maps.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", + value="{nodeCacheFolder}/<VIEW_ID>_depthMap.exr", group="", # do not export on the command line ), desc.File( @@ -583,14 +583,14 @@ class DepthMap(desc.AVCommandLineNode): label="Sim Maps", description="Generated sim maps.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", + value="{nodeCacheFolder}/<VIEW_ID>_simMap.exr", group="", # do not export on the command line ), desc.File( name="tilePattern", label="Tile Pattern", description="Debug: Tile pattern.", - value=desc.Node.internalFolder + "<VIEW_ID>_tilePattern.obj", + value="{nodeCacheFolder}/<VIEW_ID>_tilePattern.obj", group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportTilePattern.value, ), @@ -599,7 +599,7 @@ class DepthMap(desc.AVCommandLineNode): label="Depth Maps SGM", description="Debug: Depth maps SGM", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgm.exr", + value="{nodeCacheFolder}/<VIEW_ID>_depthMap_sgm.exr", group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), @@ -608,7 +608,7 @@ class DepthMap(desc.AVCommandLineNode): label="Depth Maps SGM Upscaled", description="Debug: Depth maps SGM upscaled.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgmUpscaled.exr", + value="{nodeCacheFolder}/<VIEW_ID>_depthMap_sgmUpscaled.exr", group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), @@ -617,7 +617,7 @@ class DepthMap(desc.AVCommandLineNode): label="Depth Maps Refined", description="Debug: Depth maps after refinement", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_refinedFused.exr", + value="{nodeCacheFolder}/<VIEW_ID>_depthMap_refinedFused.exr", group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), diff --git a/meshroom/aliceVision/DepthMapFilter.py b/meshroom/aliceVision/DepthMapFilter.py index a760b089e1..701708cf98 100644 --- a/meshroom/aliceVision/DepthMapFilter.py +++ b/meshroom/aliceVision/DepthMapFilter.py @@ -113,7 +113,7 @@ class DepthMapFilter(desc.AVCommandLineNode): name="output", label="Filtered Depth Maps Folder", description="Output folder for generated depth maps.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}" ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images @@ -123,7 +123,7 @@ class DepthMapFilter(desc.AVCommandLineNode): label="Depth Maps", description="Filtered depth maps.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", + value="{nodeCacheFolder}/<VIEW_ID>_depthMap.exr", group="", # do not export on the command line ), desc.File( @@ -131,7 +131,7 @@ class DepthMapFilter(desc.AVCommandLineNode): label="Sim Maps", description="Filtered sim maps.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr", + value="{nodeCacheFolder}/<VIEW_ID>_simMap.exr", group="", # do not export on the command line ), desc.File( @@ -139,7 +139,7 @@ class DepthMapFilter(desc.AVCommandLineNode): label="Normal Maps", description="Normal maps.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr", + value="{nodeCacheFolder}/<VIEW_ID>_normalMap.exr", enabled=lambda node: node.computeNormalMaps.value, group="", # do not export on the command line ), diff --git a/meshroom/aliceVision/DepthMapRendering.py b/meshroom/aliceVision/DepthMapRendering.py index 508550b739..fa071c0489 100644 --- a/meshroom/aliceVision/DepthMapRendering.py +++ b/meshroom/aliceVision/DepthMapRendering.py @@ -39,14 +39,14 @@ class DepthMapRendering(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="depth", label="Depth Maps", description="Rendered depth maps.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr", + value="{nodeCacheFolder}/<VIEW_ID>_depthMap.exr", group="", # do not export on the command line ), desc.File( @@ -54,7 +54,7 @@ class DepthMapRendering(desc.AVCommandLineNode): label="Masks", description="Masks.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_mask.exr", + value="{nodeCacheFolder}/<VIEW_ID>_mask.exr", group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/DistortionCalibration.py b/meshroom/aliceVision/DistortionCalibration.py index ce3632f2ab..8276ace659 100644 --- a/meshroom/aliceVision/DistortionCalibration.py +++ b/meshroom/aliceVision/DistortionCalibration.py @@ -59,6 +59,6 @@ class DistortionCalibration(desc.AVCommandLineNode): name="output", label="SfMData File", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfmData.sfm", + value="{nodeCacheFolder}/sfmData.sfm", ), ] diff --git a/meshroom/aliceVision/ExportAnimatedCamera.py b/meshroom/aliceVision/ExportAnimatedCamera.py index 8dcc995e6d..50ca8d0996 100644 --- a/meshroom/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/aliceVision/ExportAnimatedCamera.py @@ -83,27 +83,27 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder with animated camera and undistorted images.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outputCamera", label="Camera", description="Output filename for the animated camera in Alembic format.", - value=desc.Node.internalFolder + "camera.abc", + value="{nodeCacheFolder}/camera.abc", group="", # exclude from command line ), desc.File( name="outputUndistorted", label="Undistorted Folder", description="Output undistorted folder.", - value=desc.Node.internalFolder + "undistort/", + value="{nodeCacheFolder}/undistort/", group="", # exclude from command line ), desc.File( name="outputImages", label="Undistorted Images", description="Output undistorted images.", - value=desc.Node.internalFolder + "undistort/" + "<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}", + value="{nodeCacheFolder}/undistort/<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}", semantic="image", group="", # exclude from command line enabled=lambda node: node.exportUndistortedImages.value, diff --git a/meshroom/aliceVision/ExportColoredPointCloud.py b/meshroom/aliceVision/ExportColoredPointCloud.py index 0e4a6c1e3b..9ffa194fbe 100644 --- a/meshroom/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/aliceVision/ExportColoredPointCloud.py @@ -32,6 +32,6 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): name="output", label="Point Cloud Filepath", description="Output point cloud with visibilities as SfMData file.", - value=desc.Node.internalFolder + "pointCloud.abc", + value="{nodeCacheFolder}/pointCloud.abc", ), ] diff --git a/meshroom/aliceVision/ExportDistortion.py b/meshroom/aliceVision/ExportDistortion.py index e350e759df..902b865d01 100644 --- a/meshroom/aliceVision/ExportDistortion.py +++ b/meshroom/aliceVision/ExportDistortion.py @@ -59,13 +59,13 @@ class ExportDistortion(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="distortionNukeNode", label="Distortion Nuke Node", description="Calibrated distortion ST map.", - value=desc.Node.internalFolder + "nukeLensDistortion_<INTRINSIC_ID>.nk", + value="{nodeCacheFolder}/nukeLensDistortion_<INTRINSIC_ID>.nk", group="", # do not export on the command line enabled=lambda node: node.exportNukeNode.value, ), @@ -74,7 +74,7 @@ class ExportDistortion(desc.AVCommandLineNode): label="Undistorted Lens Grids", description="Undistorted lens grids for validation", semantic="image", - value=desc.Node.internalFolder + "lensgrid_<VIEW_ID>_undistort.exr", + value="{nodeCacheFolder}/lensgrid_<VIEW_ID>_undistort.exr", group="", # do not export on the command line enabled=lambda node: node.exportLensGridsUndistorted.value, ), @@ -83,7 +83,7 @@ class ExportDistortion(desc.AVCommandLineNode): label="Distortion ST Map", description="Calibrated distortion ST map.", semantic="image", - value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_distort.exr", + value="{nodeCacheFolder}/stmap_<INTRINSIC_ID>_distort.exr", group="", # do not export on the command line enabled=lambda node: node.exportSTMaps.value, ), @@ -92,7 +92,7 @@ class ExportDistortion(desc.AVCommandLineNode): label="Undistortion ST Map", description="Calibrated undistortion ST map.", semantic="image", - value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_undistort.exr", + value="{nodeCacheFolder}/stmap_<INTRINSIC_ID>_undistort.exr", group="", # do not export on the command line enabled=lambda node: node.exportSTMaps.value, ), diff --git a/meshroom/aliceVision/ExportMatches.py b/meshroom/aliceVision/ExportMatches.py index 05e40cd138..6e10487eea 100644 --- a/meshroom/aliceVision/ExportMatches.py +++ b/meshroom/aliceVision/ExportMatches.py @@ -76,6 +76,6 @@ class ExportMatches(desc.AVCommandLineNode): name="output", label="Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/ExportMaya.py b/meshroom/aliceVision/ExportMaya.py index 1ccb13b6c7..1b46005d42 100644 --- a/meshroom/aliceVision/ExportMaya.py +++ b/meshroom/aliceVision/ExportMaya.py @@ -56,13 +56,13 @@ class ExportMaya(desc.Node): name="meloutput", label="Mel Script", description="Generated mel script.", - value=desc.Node.internalFolder + "import.mel", + value="{nodeCacheFolder}/import.mel", ), desc.File( name="mayaoutput", label="Maya Scene", description="Generated Maya scene.", - value=desc.Node.internalFolder + "scene.mb", + value="{nodeCacheFolder}/scene.mb", enabled=lambda node: node.generateMaya.value, ), ] diff --git a/meshroom/aliceVision/ExportUSD.py b/meshroom/aliceVision/ExportUSD.py index 0fff147ea1..c452fde28d 100644 --- a/meshroom/aliceVision/ExportUSD.py +++ b/meshroom/aliceVision/ExportUSD.py @@ -41,6 +41,6 @@ class ExportUSD(desc.AVCommandLineNode): name="output", label="Output", description="Path to the output file.", - value=desc.Node.internalFolder + "output.{fileTypeValue}", + value="{nodeCacheFolder}/output.{fileTypeValue}", ), ] diff --git a/meshroom/aliceVision/ExtractMetadata.py b/meshroom/aliceVision/ExtractMetadata.py index 389abbf513..0631a65b09 100644 --- a/meshroom/aliceVision/ExtractMetadata.py +++ b/meshroom/aliceVision/ExtractMetadata.py @@ -68,7 +68,7 @@ class ExtractMetadata(desc.Node): name="output", label="Result Folder", description="Output path for the resulting metadata files.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/FeatureExtraction.py b/meshroom/aliceVision/FeatureExtraction.py index 46b4421573..91cba12c86 100644 --- a/meshroom/aliceVision/FeatureExtraction.py +++ b/meshroom/aliceVision/FeatureExtraction.py @@ -160,6 +160,6 @@ class FeatureExtraction(desc.AVCommandLineNode): name="output", label="Features Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/FeatureMatching.py b/meshroom/aliceVision/FeatureMatching.py index 4d209e314b..a8bc0e19a4 100644 --- a/meshroom/aliceVision/FeatureMatching.py +++ b/meshroom/aliceVision/FeatureMatching.py @@ -205,6 +205,6 @@ class FeatureMatching(desc.AVCommandLineNode): name="output", label="Matches Folder", description="Path to a folder in which the computed matches are stored.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/FeatureRepeatability.py b/meshroom/aliceVision/FeatureRepeatability.py index 21778d55b8..a57ac67735 100644 --- a/meshroom/aliceVision/FeatureRepeatability.py +++ b/meshroom/aliceVision/FeatureRepeatability.py @@ -115,6 +115,6 @@ class FeatureRepeatability(desc.AVCommandLineNode): name="output", label="Folder", description="Output path for the features and descriptors files (*.feat, *.desc).", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/GlobalRotationEstimating.py b/meshroom/aliceVision/GlobalRotationEstimating.py index 165ac1279c..2b2235c1b7 100644 --- a/meshroom/aliceVision/GlobalRotationEstimating.py +++ b/meshroom/aliceVision/GlobalRotationEstimating.py @@ -61,6 +61,6 @@ class GlobalRotationEstimating(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.abc", + value="{nodeCacheFolder}/sfm.abc", ), ] diff --git a/meshroom/aliceVision/GlobalSfM.py b/meshroom/aliceVision/GlobalSfM.py index 8cb319f860..94521f2bb8 100644 --- a/meshroom/aliceVision/GlobalSfM.py +++ b/meshroom/aliceVision/GlobalSfM.py @@ -94,18 +94,18 @@ class GlobalSfM(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.abc", + value="{nodeCacheFolder}/sfm.abc", ), desc.File( name="outputViewsAndPoses", label="Output Poses", description="Path to the output SfMData file with cameras (views and poses).", - value=desc.Node.internalFolder + "cameras.sfm", + value="{nodeCacheFolder}/cameras.sfm", ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/ImageMasking.py b/meshroom/aliceVision/ImageMasking.py index 60576f7303..e2e1c10b8e 100644 --- a/meshroom/aliceVision/ImageMasking.py +++ b/meshroom/aliceVision/ImageMasking.py @@ -131,6 +131,6 @@ class ImageMasking(desc.AVCommandLineNode): name="output", label="Output", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/ImageMatching.py b/meshroom/aliceVision/ImageMatching.py index 2cc71c6bd0..4fea8330f3 100644 --- a/meshroom/aliceVision/ImageMatching.py +++ b/meshroom/aliceVision/ImageMatching.py @@ -135,6 +135,6 @@ class ImageMatching(desc.AVCommandLineNode): name="output", label="Image Pairs", description="Filepath to the output file with the list of selected image pairs.", - value=desc.Node.internalFolder + "imageMatches.txt", + value="{nodeCacheFolder}/imageMatches.txt", ), ] diff --git a/meshroom/aliceVision/ImageMatchingMultiSfM.py b/meshroom/aliceVision/ImageMatchingMultiSfM.py index 211efff1c9..097bf8a501 100644 --- a/meshroom/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/aliceVision/ImageMatchingMultiSfM.py @@ -141,12 +141,12 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): name="output", label="List File", description="Filepath to the output file with the list of selected image pairs.", - value=desc.Node.internalFolder + "imageMatches.txt", + value="{nodeCacheFolder}/imageMatches.txt", ), desc.File( name="outputCombinedSfM", label="Combined SfM", description="Path for the combined SfMData file.", - value=desc.Node.internalFolder + "combineSfM.sfm", + value="{nodeCacheFolder}/combineSfM.sfm", ), ] diff --git a/meshroom/aliceVision/ImageProcessing.py b/meshroom/aliceVision/ImageProcessing.py index be8e6fecb5..1aa76d105b 100644 --- a/meshroom/aliceVision/ImageProcessing.py +++ b/meshroom/aliceVision/ImageProcessing.py @@ -15,20 +15,20 @@ def outputImagesValueFunct(attr): if inputExt in ['.abc', '.sfm']: fileStem = '<FILESTEM>' if attr.node.keepImageFilename.value else '<VIEW_ID>' # If we have an SfM in input - return desc.Node.internalFolder + fileStem + (outputExt or '.*') + return "{nodeCacheFolder}/" + fileStem + (outputExt or '.*') if inputExt: # If we have one or multiple files in input - return desc.Node.internalFolder + fileStem + (outputExt or inputExt) + return "{nodeCacheFolder}/" + fileStem + (outputExt or inputExt) if '*' in fileStem: # The fileStem of the input param is a regular expression, # so even if there is no file extension, # we consider that the expression represents files. - return desc.Node.internalFolder + fileStem + (outputExt or '.*') + return "{nodeCacheFolder}/" + fileStem + (outputExt or '.*') # No extension and no expression means that the input param is a folder path - return desc.Node.internalFolder + '*' + (outputExt or '.*') + return "{nodeCacheFolder}/" + '*' + (outputExt or '.*') class ImageProcessing(desc.AVCommandLineNode): @@ -608,14 +608,14 @@ class ImageProcessing(desc.AVCommandLineNode): name="outSfMData", label="SfMData", description="Output SfMData file.", - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", + value=lambda attr: ("{nodeCacheFolder}/" + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", group="", # do not export on the command line ), desc.File( name="output", label="Folder", description="Output images folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outputImages", diff --git a/meshroom/aliceVision/ImageSegmentation.py b/meshroom/aliceVision/ImageSegmentation.py index 1f2df77b19..889d931d8d 100644 --- a/meshroom/aliceVision/ImageSegmentation.py +++ b/meshroom/aliceVision/ImageSegmentation.py @@ -81,14 +81,14 @@ class ImageSegmentation(desc.AVCommandLineNode): name="output", label="Masks Folder", description="Output path for the masks.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="masks", label="Masks", description="Generated segmentation masks.", semantic="image", - value=lambda attr: desc.Node.internalFolder + "<VIEW_ID>.exr" if not attr.node.keepFilename.value else desc.Node.internalFolder + "<FILESTEM>.exr", + value=lambda attr: "{nodeCacheFolder}/<VIEW_ID>.exr" if not attr.node.keepFilename.value else "{nodeCacheFolder}/<FILESTEM>.exr", group="", ), ] diff --git a/meshroom/aliceVision/ImportE57.py b/meshroom/aliceVision/ImportE57.py index db621f769a..ef1ac204ff 100644 --- a/meshroom/aliceVision/ImportE57.py +++ b/meshroom/aliceVision/ImportE57.py @@ -60,6 +60,6 @@ class ImportE57(desc.AVCommandLineNode): name="output", label="Output", description="Path to the output JSON file.", - value=desc.Node.internalFolder + "inputset.json", + value="{nodeCacheFolder}/inputset.json", ), ] diff --git a/meshroom/aliceVision/ImportKnownPoses.py b/meshroom/aliceVision/ImportKnownPoses.py index 90237527dc..0a7e5e9866 100644 --- a/meshroom/aliceVision/ImportKnownPoses.py +++ b/meshroom/aliceVision/ImportKnownPoses.py @@ -39,6 +39,6 @@ class ImportKnownPoses(desc.AVCommandLineNode): name="output", label="Output", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "/sfmData.abc", + value="{nodeCacheFolder}/sfmData.abc", ), ] diff --git a/meshroom/aliceVision/KeyframeSelection.py b/meshroom/aliceVision/KeyframeSelection.py index ff52217847..6fb405774d 100644 --- a/meshroom/aliceVision/KeyframeSelection.py +++ b/meshroom/aliceVision/KeyframeSelection.py @@ -390,20 +390,20 @@ class KeyframeSelection(desc.AVCommandLineNode): name="outputFolder", label="Folder", description="Output keyframes folder for extracted frames.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outputSfMDataKeyframes", label="Keyframes SfMData", description="Output SfMData file containing all the selected keyframes.", - value=desc.Node.internalFolder + "keyframes.sfm", + value="{nodeCacheFolder}/keyframes.sfm", ), desc.File( name="outputSfMDataFrames", label="Frames SfMData", description="Output SfMData file containing all the frames that were not selected as keyframes.\n" "If the input contains videos, this file will not be written since all the frames that were not selected do not actually exist on disk.", - value=desc.Node.internalFolder + "frames.sfm", + value="{nodeCacheFolder}/frames.sfm", ), ] diff --git a/meshroom/aliceVision/LdrToHdrCalibration.py b/meshroom/aliceVision/LdrToHdrCalibration.py index e600656ccb..30002ebe97 100644 --- a/meshroom/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/aliceVision/LdrToHdrCalibration.py @@ -46,7 +46,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): name="samples", label="Samples Folder", description="Samples folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.IntParam( name="userNbBrackets", @@ -151,7 +151,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): name="response", label="Response File", description="Path to the output response file.", - value=desc.Node.internalFolder + "response_<INTRINSIC_ID>.csv", + value="{nodeCacheFolder}/response_<INTRINSIC_ID>.csv", ), ] diff --git a/meshroom/aliceVision/LdrToHdrMerge.py b/meshroom/aliceVision/LdrToHdrMerge.py index e4c31de0f6..ba71e0e21b 100644 --- a/meshroom/aliceVision/LdrToHdrMerge.py +++ b/meshroom/aliceVision/LdrToHdrMerge.py @@ -228,14 +228,14 @@ class LdrToHdrMerge(desc.AVCommandLineNode): name="outputFolder", label="Folder", description="Path to the folder containing the merged HDR images.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", group="", # do not export on the command line ), desc.File( name="outSfMData", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfmData.sfm", + value="{nodeCacheFolder}/sfmData.sfm", ), ] diff --git a/meshroom/aliceVision/LdrToHdrSampling.py b/meshroom/aliceVision/LdrToHdrSampling.py index 3a091a39be..fa88ccd3c8 100644 --- a/meshroom/aliceVision/LdrToHdrSampling.py +++ b/meshroom/aliceVision/LdrToHdrSampling.py @@ -176,7 +176,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode): name="output", label="Folder", description="Output path for the samples.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/LidarDecimating.py b/meshroom/aliceVision/LidarDecimating.py index d41ca9853d..8eaf484fc5 100644 --- a/meshroom/aliceVision/LidarDecimating.py +++ b/meshroom/aliceVision/LidarDecimating.py @@ -46,12 +46,12 @@ class LidarDecimating(desc.AVCommandLineNode): name="output", label="Sub-Meshes Directory", description="Output directory for sub-meshes.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outputJson", label="Scene Description", description="Output scene description.", - value=desc.Node.internalFolder + "scene.json", + value="{nodeCacheFolder}/scene.json", ), ] diff --git a/meshroom/aliceVision/LidarMerging.py b/meshroom/aliceVision/LidarMerging.py index 4fd610888d..e107d7c4a0 100644 --- a/meshroom/aliceVision/LidarMerging.py +++ b/meshroom/aliceVision/LidarMerging.py @@ -35,6 +35,6 @@ class LidarMerging(desc.AVCommandLineNode): name="output", label="Mesh Path Output", description="Output directory for mesh.", - value=desc.Node.internalFolder + "output.obj", + value="{nodeCacheFolder}/output.obj", ), ] diff --git a/meshroom/aliceVision/LidarMeshing.py b/meshroom/aliceVision/LidarMeshing.py index da9aaab638..3ce1a7071f 100644 --- a/meshroom/aliceVision/LidarMeshing.py +++ b/meshroom/aliceVision/LidarMeshing.py @@ -126,12 +126,12 @@ class LidarMeshing(desc.AVCommandLineNode): name="output", label="Sub-Meshes Directory", description="Output directory for sub-meshes", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outputJson", label="Scene Description", description="Output scene description.", - value=desc.Node.internalFolder + "scene.json", + value="{nodeCacheFolder}/scene.json", ), ] diff --git a/meshroom/aliceVision/LightingCalibration.py b/meshroom/aliceVision/LightingCalibration.py index d4a1eee72d..01b1f793b6 100644 --- a/meshroom/aliceVision/LightingCalibration.py +++ b/meshroom/aliceVision/LightingCalibration.py @@ -60,14 +60,14 @@ class LightingCalibration(desc.CommandLineNode): name="outputFile", label="Light File", description="Light information will be written here.", - value=desc.Node.internalFolder + "/lights.json", + value="{nodeCacheFolder}/lights.json", ), desc.File( name="lightingEstimationVisualization", label="Estimated Lighting Visualization", description="Estimated Lighting Visualization.", semantic="image", - value=desc.Node.internalFolder + "/<FILESTEM>_{methodValue}.png", + value="{nodeCacheFolder}/<FILESTEM>_{methodValue}.png", group=None, ), ] diff --git a/meshroom/aliceVision/LightingEstimation.py b/meshroom/aliceVision/LightingEstimation.py index e07d2e3516..3e3193c1fd 100644 --- a/meshroom/aliceVision/LightingEstimation.py +++ b/meshroom/aliceVision/LightingEstimation.py @@ -77,6 +77,6 @@ class LightingEstimation(desc.AVCommandLineNode): name="output", label="Folder", description="Folder for output lighting vector files.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/MaskProcessing.py b/meshroom/aliceVision/MaskProcessing.py index 86539567bb..6d6e56457a 100644 --- a/meshroom/aliceVision/MaskProcessing.py +++ b/meshroom/aliceVision/MaskProcessing.py @@ -72,14 +72,14 @@ class MaskProcessing(desc.AVCommandLineNode): name="output", label="Output", description="Path to the output directory.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="masks", label="Masks", description="Processed segmentation masks.", semantic="imageList", - value= desc.Node.internalFolder + "*.exr", + value= "{nodeCacheFolder}/*.exr", group="", ), ] diff --git a/meshroom/aliceVision/MergeMeshes.py b/meshroom/aliceVision/MergeMeshes.py index 572865b119..311e7f1b48 100644 --- a/meshroom/aliceVision/MergeMeshes.py +++ b/meshroom/aliceVision/MergeMeshes.py @@ -64,6 +64,6 @@ class MergeMeshes(desc.AVCommandLineNode): name="output", label="Mesh", description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", - value=desc.Node.internalFolder + "mesh.stl", + value="{nodeCacheFolder}/mesh.stl", ), ] diff --git a/meshroom/aliceVision/MeshDecimate.py b/meshroom/aliceVision/MeshDecimate.py index 0322aff619..a6b092609b 100644 --- a/meshroom/aliceVision/MeshDecimate.py +++ b/meshroom/aliceVision/MeshDecimate.py @@ -72,6 +72,6 @@ class MeshDecimate(desc.AVCommandLineNode): name="output", label="Mesh", description="Output mesh in the OBJ file format.", - value=desc.Node.internalFolder + "mesh.obj", + value="{nodeCacheFolder}/mesh.obj", ), ] diff --git a/meshroom/aliceVision/MeshDenoising.py b/meshroom/aliceVision/MeshDenoising.py index c159a87093..a7329e45b6 100644 --- a/meshroom/aliceVision/MeshDenoising.py +++ b/meshroom/aliceVision/MeshDenoising.py @@ -87,6 +87,6 @@ class MeshDenoising(desc.AVCommandLineNode): name="output", label="Output", description="Output mesh in the OBJ file format.", - value=desc.Node.internalFolder + "mesh.obj", + value="{nodeCacheFolder}/mesh.obj", ), ] diff --git a/meshroom/aliceVision/MeshFiltering.py b/meshroom/aliceVision/MeshFiltering.py index e9787dabf7..6eb91d1052 100644 --- a/meshroom/aliceVision/MeshFiltering.py +++ b/meshroom/aliceVision/MeshFiltering.py @@ -112,6 +112,6 @@ class MeshFiltering(desc.AVCommandLineNode): name="outputMesh", label="Mesh", description="Output mesh file.", - value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", + value="{nodeCacheFolder}/mesh.{outputMeshFileTypeValue}", ), ] diff --git a/meshroom/aliceVision/MeshMasking.py b/meshroom/aliceVision/MeshMasking.py index a467b1c159..45fa5f329b 100644 --- a/meshroom/aliceVision/MeshMasking.py +++ b/meshroom/aliceVision/MeshMasking.py @@ -98,6 +98,6 @@ class MeshMasking(desc.AVCommandLineNode): name="outputMesh", label="Mesh", description="Output mesh file.", - value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", + value="{nodeCacheFolder}/mesh.{outputMeshFileTypeValue}", ), ] diff --git a/meshroom/aliceVision/MeshRemoveUnseenFaces.py b/meshroom/aliceVision/MeshRemoveUnseenFaces.py index aa67076923..c82e3094bf 100644 --- a/meshroom/aliceVision/MeshRemoveUnseenFaces.py +++ b/meshroom/aliceVision/MeshRemoveUnseenFaces.py @@ -64,6 +64,6 @@ class MeshRemoveUnseenFaces(desc.AVCommandLineNode): name="outputMesh", label="Mesh", description="Output mesh file.", - value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", + value="{nodeCacheFolder}/mesh.{outputMeshFileTypeValue}", ), ] diff --git a/meshroom/aliceVision/MeshResampling.py b/meshroom/aliceVision/MeshResampling.py index 67488e4d15..d96373adfe 100644 --- a/meshroom/aliceVision/MeshResampling.py +++ b/meshroom/aliceVision/MeshResampling.py @@ -77,6 +77,6 @@ class MeshResampling(desc.AVCommandLineNode): name="output", label="Mesh", description="Output mesh in the OBJ file format.", - value=desc.Node.internalFolder + "mesh.obj", + value="{nodeCacheFolder}/mesh.obj", ), ] diff --git a/meshroom/aliceVision/Meshing.py b/meshroom/aliceVision/Meshing.py index b448925be2..b01fe33e85 100644 --- a/meshroom/aliceVision/Meshing.py +++ b/meshroom/aliceVision/Meshing.py @@ -472,12 +472,12 @@ class Meshing(desc.AVCommandLineNode): name="outputMesh", label="Mesh", description="Output mesh.", - value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", + value="{nodeCacheFolder}/mesh.{outputMeshFileTypeValue}", ), desc.File( name="output", label="Dense SfMData", description="Output dense point cloud with visibilities (SfMData file format).", - value=desc.Node.internalFolder + "densePointCloud.abc", + value="{nodeCacheFolder}/densePointCloud.abc", ), ] diff --git a/meshroom/aliceVision/NodalSfM.py b/meshroom/aliceVision/NodalSfM.py index 5d4094bdd4..1dbd902ced 100644 --- a/meshroom/aliceVision/NodalSfM.py +++ b/meshroom/aliceVision/NodalSfM.py @@ -46,6 +46,6 @@ class NodalSfM(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.abc", + value="{nodeCacheFolder}/sfm.abc", ), ] diff --git a/meshroom/aliceVision/NormalIntegration.py b/meshroom/aliceVision/NormalIntegration.py index 89b42107e5..207edd8305 100644 --- a/meshroom/aliceVision/NormalIntegration.py +++ b/meshroom/aliceVision/NormalIntegration.py @@ -46,7 +46,7 @@ class NormalIntegration(desc.CommandLineNode): label="Depth Map Camera", description="Generated depth in the camera coordinate system.", semantic="image", - value=desc.Node.internalFolder + "<POSE_ID>_depthMap.exr", + value="{nodeCacheFolder}/<POSE_ID>_depthMap.exr", group="", # do not export on the command line ) ] diff --git a/meshroom/aliceVision/NormalMapRendering.py b/meshroom/aliceVision/NormalMapRendering.py index 7ccbff9809..7355842f76 100644 --- a/meshroom/aliceVision/NormalMapRendering.py +++ b/meshroom/aliceVision/NormalMapRendering.py @@ -39,14 +39,14 @@ class NormalMapRendering(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="normal", label="Normal Maps", description="Rendered normal maps.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr", + value="{nodeCacheFolder}/<VIEW_ID>_normalMap.exr", group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/PanoramaCompositing.py b/meshroom/aliceVision/PanoramaCompositing.py index b1a8e1d1a5..a5ac007aae 100644 --- a/meshroom/aliceVision/PanoramaCompositing.py +++ b/meshroom/aliceVision/PanoramaCompositing.py @@ -113,6 +113,6 @@ class PanoramaCompositing(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder containing the composited panorama.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/PanoramaEstimation.py b/meshroom/aliceVision/PanoramaEstimation.py index bca57ff20e..d041be7e11 100644 --- a/meshroom/aliceVision/PanoramaEstimation.py +++ b/meshroom/aliceVision/PanoramaEstimation.py @@ -170,12 +170,12 @@ class PanoramaEstimation(desc.AVCommandLineNode): name="output", label="SfM File", description="Path to the output SfM file.", - value=desc.Node.internalFolder + "panorama.abc", + value="{nodeCacheFolder}/panorama.abc", ), desc.File( name="outputViewsAndPoses", label="Views And Poses", description="Path to the output SfMData file with cameras (views and poses).", - value=desc.Node.internalFolder + "cameras.sfm", + value="{nodeCacheFolder}/cameras.sfm", ), ] diff --git a/meshroom/aliceVision/PanoramaInit.py b/meshroom/aliceVision/PanoramaInit.py index 1e59afb2a3..a1bf735882 100644 --- a/meshroom/aliceVision/PanoramaInit.py +++ b/meshroom/aliceVision/PanoramaInit.py @@ -147,7 +147,7 @@ class PanoramaInit(desc.AVCommandLineNode): label="Contact sheet", semantic="image", description="Contact sheet path.", - value=desc.Node.internalFolder + "contactSheetImage.jpg", + value="{nodeCacheFolder}/contactSheetImage.jpg", group="", # do not export on the command line enabled=lambda node: node.buildContactSheet.enabled ), @@ -155,6 +155,6 @@ class PanoramaInit(desc.AVCommandLineNode): name="outSfMData", label="SfMData File", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfmData.sfm", + value="{nodeCacheFolder}/sfmData.sfm", ), ] diff --git a/meshroom/aliceVision/PanoramaMerging.py b/meshroom/aliceVision/PanoramaMerging.py index 9e1a60a0f3..413f1f27d0 100644 --- a/meshroom/aliceVision/PanoramaMerging.py +++ b/meshroom/aliceVision/PanoramaMerging.py @@ -72,6 +72,6 @@ class PanoramaMerging(desc.AVCommandLineNode): label="Panorama", description="Output merged panorama image.", semantic="image", - value=desc.Node.internalFolder + "panorama.{outputFileTypeValue}", + value="{nodeCacheFolder}/panorama.{outputFileTypeValue}", ), ] diff --git a/meshroom/aliceVision/PanoramaPostProcessing.py b/meshroom/aliceVision/PanoramaPostProcessing.py index 54d60552a1..1a0a8a4aba 100644 --- a/meshroom/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/aliceVision/PanoramaPostProcessing.py @@ -107,20 +107,20 @@ class PanoramaPostProcessing(desc.CommandLineNode): label="Output Panorama Preview", description="Preview of the generated panorama in JPG format.", semantic="image", - value=lambda attr: desc.Node.internalFolder + attr.node.previewName.value, + value=lambda attr: "{nodeCacheFolder}/" + attr.node.previewName.value, ), desc.File( name="outputPanorama", label="Output Panorama", description="Generated panorama in EXR format.", semantic="image", - value=lambda attr: desc.Node.internalFolder + attr.node.panoramaName.value, + value=lambda attr: "{nodeCacheFolder}/" + attr.node.panoramaName.value, ), desc.File( name="downscaledPanoramaLevels", label="Downscaled Panorama Levels", description="Downscaled versions of the generated panorama.", - value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.panoramaName.value)[0] + "_level_*.exr", + value=lambda attr: "{nodeCacheFolder}/" + os.path.splitext(attr.node.panoramaName.value)[0] + "_level_*.exr", group="", ), ] diff --git a/meshroom/aliceVision/PanoramaPrepareImages.py b/meshroom/aliceVision/PanoramaPrepareImages.py index d23d84299e..6a4f6137dc 100644 --- a/meshroom/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/aliceVision/PanoramaPrepareImages.py @@ -36,6 +36,6 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): name="output", label="SfMData", description="Output SfMData file.", - value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value), + value=lambda attr: "{nodeCacheFolder}/" + os.path.basename(attr.node.input.value), ), ] diff --git a/meshroom/aliceVision/PanoramaSeams.py b/meshroom/aliceVision/PanoramaSeams.py index 0798c2a1ed..ffadc05843 100644 --- a/meshroom/aliceVision/PanoramaSeams.py +++ b/meshroom/aliceVision/PanoramaSeams.py @@ -59,12 +59,12 @@ class PanoramaSeams(desc.AVCommandLineNode): label="Labels", description="", semantic="image", - value=desc.Node.internalFolder + "labels.exr", + value="{nodeCacheFolder}/labels.exr", ), desc.File( name="outputSfm", label="Output SfMData File", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "panorama.sfm", + value="{nodeCacheFolder}/panorama.sfm", ), ] diff --git a/meshroom/aliceVision/PanoramaWarping.py b/meshroom/aliceVision/PanoramaWarping.py index c86158c59e..2a4a062689 100644 --- a/meshroom/aliceVision/PanoramaWarping.py +++ b/meshroom/aliceVision/PanoramaWarping.py @@ -93,6 +93,6 @@ class PanoramaWarping(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/PhotometricStereo.py b/meshroom/aliceVision/PhotometricStereo.py index 7caefa40ec..6ca877e8e9 100644 --- a/meshroom/aliceVision/PhotometricStereo.py +++ b/meshroom/aliceVision/PhotometricStereo.py @@ -78,27 +78,27 @@ class PhotometricStereo(desc.CommandLineNode): name="outputPath", label="Output Folder", description="Path to the output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outputSfmDataAlbedo", label="SfMData Albedo", description="Output SfMData file containing the albedo information.", - value=desc.Node.internalFolder + "/albedoMaps.sfm", + value="{nodeCacheFolder}/albedoMaps.sfm", group="", # remove from command line ), desc.File( name="outputSfmDataNormal", label="SfMData Normal", description="Output SfMData file containing the normal maps information.", - value=desc.Node.internalFolder + "/normalMaps.sfm", + value="{nodeCacheFolder}/normalMaps.sfm", group="", # remove from command line ), desc.File( name="outputSfmDataNormalPNG", label="SfMData Normal PNG", description="Output SfMData file containing the normal maps information.", - value=desc.Node.internalFolder + "/normalMapsPNG.sfm", + value="{nodeCacheFolder}/normalMapsPNG.sfm", group="", # remove from command line ), # these attributes are only here to describe more accurately the output of the node @@ -109,7 +109,7 @@ class PhotometricStereo(desc.CommandLineNode): label="Normal Maps Camera", description="Generated normal maps in the camera coordinate system.", semantic="image", - value=desc.Node.internalFolder + "<POSE_ID>_normals.exr", + value="{nodeCacheFolder}/<POSE_ID>_normals.exr", group="", # do not export on the command line ), desc.File( @@ -117,7 +117,7 @@ class PhotometricStereo(desc.CommandLineNode): label="Normal Maps Camera (in false colors)", description="Generated normal maps in the camera coordinate system (in false colors).", semantic="image", - value=desc.Node.internalFolder + "<POSE_ID>_normals.png", + value="{nodeCacheFolder}/<POSE_ID>_normals.png", group="", # do not export on the command line ), desc.File( @@ -125,7 +125,7 @@ class PhotometricStereo(desc.CommandLineNode): label="Normal Maps World", description="Generated normal maps in the world coordinate system.", semantic="image", - value=desc.Node.internalFolder + "<POSE_ID>_normals_w.exr", + value="{nodeCacheFolder}/<POSE_ID>_normals_w.exr", group="", # do not export on the command line ), @@ -134,7 +134,7 @@ class PhotometricStereo(desc.CommandLineNode): label="Albedo Maps", description="Generated albedo maps.", semantic="image", - value=desc.Node.internalFolder + "<POSE_ID>_albedo.png", + value="{nodeCacheFolder}/<POSE_ID>_albedo.png", group="", # do not export on the command line ), ] diff --git a/meshroom/aliceVision/PrepareDenseScene.py b/meshroom/aliceVision/PrepareDenseScene.py index e992d31057..87eb78bc20 100644 --- a/meshroom/aliceVision/PrepareDenseScene.py +++ b/meshroom/aliceVision/PrepareDenseScene.py @@ -94,14 +94,14 @@ class PrepareDenseScene(desc.AVCommandLineNode): name="output", label="Images Folder", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="undistorted", label="Undistorted Images", description="List of undistorted images.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>.{outputFileTypeValue}", + value="{nodeCacheFolder}/<VIEW_ID>.{outputFileTypeValue}", group="", advanced=True, ), diff --git a/meshroom/aliceVision/RelativePoseEstimating.py b/meshroom/aliceVision/RelativePoseEstimating.py index 08fd3c7f00..b49eb3ced8 100644 --- a/meshroom/aliceVision/RelativePoseEstimating.py +++ b/meshroom/aliceVision/RelativePoseEstimating.py @@ -64,6 +64,6 @@ class RelativePoseEstimating(desc.AVCommandLineNode): name="output", label="Pairs Info", description="Path to the output Pairs info files directory.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/SelectConnectedViews.py b/meshroom/aliceVision/SelectConnectedViews.py index 1f82b8166c..3db36f8062 100644 --- a/meshroom/aliceVision/SelectConnectedViews.py +++ b/meshroom/aliceVision/SelectConnectedViews.py @@ -59,6 +59,6 @@ class SelectConnectedViews(desc.AVCommandLineNode): name="output", label="Connected Views", description="List of connected views in a text file.", - value=desc.Node.internalFolder + "connectedViews.txt", + value="{nodeCacheFolder}/connectedViews.txt", ), ] diff --git a/meshroom/aliceVision/SfMAlignment.py b/meshroom/aliceVision/SfMAlignment.py index e8b6fbb9b2..436ab2a911 100644 --- a/meshroom/aliceVision/SfMAlignment.py +++ b/meshroom/aliceVision/SfMAlignment.py @@ -107,12 +107,12 @@ class SfMAlignment(desc.AVCommandLineNode): name="output", label="SfMData File", description="Output SfMData file.", - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", + value=lambda attr: "{nodeCacheFolder}/" + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", - value=desc.Node.internalFolder + "cameras.sfm", + value="{nodeCacheFolder}/cameras.sfm", ), ] diff --git a/meshroom/aliceVision/SfMChecking.py b/meshroom/aliceVision/SfMChecking.py index de191e1ae9..2e160bba42 100644 --- a/meshroom/aliceVision/SfMChecking.py +++ b/meshroom/aliceVision/SfMChecking.py @@ -40,7 +40,7 @@ class SfMChecking(desc.Node): name="output", label="SfM File", description="Path to the output SfM file.", - value=desc.Node.internalFolder + "sfmData.abc", + value="{nodeCacheFolder}/sfmData.abc", ) ] diff --git a/meshroom/aliceVision/SfMColorizing.py b/meshroom/aliceVision/SfMColorizing.py index 70af8797a6..bf74217145 100644 --- a/meshroom/aliceVision/SfMColorizing.py +++ b/meshroom/aliceVision/SfMColorizing.py @@ -36,6 +36,6 @@ class SfMColorizing(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfM file.", - value=desc.Node.internalFolder + "sfmData.abc", + value="{nodeCacheFolder}/sfmData.abc", ), ] diff --git a/meshroom/aliceVision/SfMFilter.py b/meshroom/aliceVision/SfMFilter.py index 78978fd374..7193a65ec9 100644 --- a/meshroom/aliceVision/SfMFilter.py +++ b/meshroom/aliceVision/SfMFilter.py @@ -46,12 +46,12 @@ class SfMFilter(desc.CommandLineNode): name="outputSfMData_selected", label="SfMData_selected", description="Output SfMData file containing selected views.", - value=desc.Node.internalFolder + "/selectedSfmData.sfm", + value="{nodeCacheFolder}/selectedSfmData.sfm", ), desc.File( name="outputSfMData_unselected", label="SfMData_unselected", description="Output SfMData file containing remaining views.", - value=desc.Node.internalFolder + "/unselectedSfmData.sfm", + value="{nodeCacheFolder}/unselectedSfmData.sfm", ), ] diff --git a/meshroom/aliceVision/SfMMerge.py b/meshroom/aliceVision/SfMMerge.py index 4e4da5c821..eca1654e08 100644 --- a/meshroom/aliceVision/SfMMerge.py +++ b/meshroom/aliceVision/SfMMerge.py @@ -96,8 +96,8 @@ class SfMMerge(desc.AVCommandLineNode): outputs = [ desc.File( name="output", - label="SfMData", + label="SfMData", description="Path to the output SfM file (in SfMData format).", - value=lambda attr: desc.Node.internalFolder + "sfmData.{fileExtValue}", + value="{nodeCacheFolder}/sfmData.{fileExtValue}", ) ] diff --git a/meshroom/aliceVision/SfMPoseInjecting.py b/meshroom/aliceVision/SfMPoseInjecting.py index 109c340772..f855235c04 100644 --- a/meshroom/aliceVision/SfMPoseInjecting.py +++ b/meshroom/aliceVision/SfMPoseInjecting.py @@ -50,6 +50,6 @@ class SfMPoseInjecting(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfM file.", - value=desc.Node.internalFolder + "sfmData.abc", + value="{nodeCacheFolder}/sfmData.abc", ), ] diff --git a/meshroom/aliceVision/SfMSplitReconstructed.py b/meshroom/aliceVision/SfMSplitReconstructed.py index 39da9da79f..eb237a416d 100644 --- a/meshroom/aliceVision/SfMSplitReconstructed.py +++ b/meshroom/aliceVision/SfMSplitReconstructed.py @@ -36,12 +36,12 @@ class SfMSplitReconstructed(desc.AVCommandLineNode): name="reconstructedOutput", label="Reconstructed SfMData File", description="SfMData file containing the reconstructed cameras.", - value=desc.Node.internalFolder + "sfmReconstructed.abc", + value="{nodeCacheFolder}/sfmReconstructed.abc", ), desc.File( name="notReconstructedOutput", label="Not Reconstructed SfMData File", description="SfMData file containing the non-reconstructed cameras.", - value=desc.Node.internalFolder + "sfmNonReconstructed.abc", + value="{nodeCacheFolder}/sfmNonReconstructed.abc", ), ] diff --git a/meshroom/aliceVision/SfMToRig.py b/meshroom/aliceVision/SfMToRig.py index 74260205f4..468cf6c2ca 100644 --- a/meshroom/aliceVision/SfMToRig.py +++ b/meshroom/aliceVision/SfMToRig.py @@ -35,6 +35,6 @@ class SfMToRig(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfM file (in SfMData format).", - value=lambda attr: desc.Node.internalFolder + "sfmData.sfm", + value="{nodeCacheFolder}/sfmData.sfm", ), ] diff --git a/meshroom/aliceVision/SfMTransfer.py b/meshroom/aliceVision/SfMTransfer.py index 3eef69f8d9..2b144d4abc 100644 --- a/meshroom/aliceVision/SfMTransfer.py +++ b/meshroom/aliceVision/SfMTransfer.py @@ -99,12 +99,12 @@ class SfMTransfer(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfM point cloud file (in SfMData format).", - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", + value=lambda attr: "{nodeCacheFolder}/" + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", - value=desc.Node.internalFolder + "cameras.sfm", + value="{nodeCacheFolder}/cameras.sfm", ), ] diff --git a/meshroom/aliceVision/SfMTransform.py b/meshroom/aliceVision/SfMTransform.py index 0a8d868807..eab001937b 100644 --- a/meshroom/aliceVision/SfMTransform.py +++ b/meshroom/aliceVision/SfMTransform.py @@ -255,12 +255,12 @@ class SfMTransform(desc.AVCommandLineNode): name="output", label="SfMData File", description="Aligned SfMData file.", - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", + value=lambda attr: "{nodeCacheFolder}/" + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", ), desc.File( name="outputViewsAndPoses", label="Poses", description="Path to the output SfMData file with cameras (views and poses).", - value=desc.Node.internalFolder + "cameras.sfm", + value="{nodeCacheFolder}/cameras.sfm", ), ] diff --git a/meshroom/aliceVision/SfMTriangulation.py b/meshroom/aliceVision/SfMTriangulation.py index 59e2c9cad3..06ce61ed00 100644 --- a/meshroom/aliceVision/SfMTriangulation.py +++ b/meshroom/aliceVision/SfMTriangulation.py @@ -143,12 +143,12 @@ class SfMTriangulation(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfm.abc", + value="{nodeCacheFolder}/sfm.abc", ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/SfmBootstraping.py b/meshroom/aliceVision/SfmBootstraping.py index a267a2c66c..d4b293914b 100644 --- a/meshroom/aliceVision/SfmBootstraping.py +++ b/meshroom/aliceVision/SfmBootstraping.py @@ -79,6 +79,6 @@ class SfMBootStraping(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "bootstrap.abc", + value="{nodeCacheFolder}/bootstrap.abc", ), ] diff --git a/meshroom/aliceVision/SfmExpanding.py b/meshroom/aliceVision/SfmExpanding.py index e2f3251e86..4328dbafa8 100644 --- a/meshroom/aliceVision/SfmExpanding.py +++ b/meshroom/aliceVision/SfmExpanding.py @@ -170,12 +170,12 @@ class SfMExpanding(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfMData file.", - value=desc.Node.internalFolder + "sfmExpanded.abc", + value="{nodeCacheFolder}/sfmExpanded.abc", ), desc.File( name="outputViewsAndPoses", label="Views And Poses", description="Path to the output SfMData file with cameras (views and poses).", - value=desc.Node.internalFolder + "cameras.sfm", + value="{nodeCacheFolder}/cameras.sfm", ) ] diff --git a/meshroom/aliceVision/SphereDetection.py b/meshroom/aliceVision/SphereDetection.py index cea9120d5a..a58fcba98c 100644 --- a/meshroom/aliceVision/SphereDetection.py +++ b/meshroom/aliceVision/SphereDetection.py @@ -84,6 +84,6 @@ class SphereDetection(desc.CommandLineNode): name="output", label="Output Path", description="Sphere detection information will be written here.", - value=desc.Node.internalFolder + "/detection.json", + value="{nodeCacheFolder}/detection.json", ) ] diff --git a/meshroom/aliceVision/Split360Images.py b/meshroom/aliceVision/Split360Images.py index 733333fad2..b14db371c9 100644 --- a/meshroom/aliceVision/Split360Images.py +++ b/meshroom/aliceVision/Split360Images.py @@ -128,12 +128,12 @@ class Split360Images(desc.AVCommandLineNode): name="output", label="Folder", description="Output folder for extracted frames.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outSfMData", label="SfMData File", description="Output SfMData file.", - value=desc.Node.internalFolder + "rig.sfm", + value="{nodeCacheFolder}/rig.sfm", ), ] diff --git a/meshroom/aliceVision/StructureFromMotion.py b/meshroom/aliceVision/StructureFromMotion.py index 9c754e7e52..393d3143db 100644 --- a/meshroom/aliceVision/StructureFromMotion.py +++ b/meshroom/aliceVision/StructureFromMotion.py @@ -376,18 +376,18 @@ class StructureFromMotion(desc.AVCommandLineNode): name="output", label="SfMData", description="Path to the output SfM point cloud file (in SfMData format).", - value=desc.Node.internalFolder + "sfm.abc", + value="{nodeCacheFolder}/sfm.abc", ), desc.File( name="outputViewsAndPoses", label="Views And Poses", description="Path to the output SfMData file with cameras (views and poses).", - value=desc.Node.internalFolder + "cameras.sfm", + value="{nodeCacheFolder}/cameras.sfm", ), desc.File( name="extraInfoFolder", label="Folder", description="Folder for intermediate reconstruction files and additional reconstruction information files.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/meshroom/aliceVision/Texturing.py b/meshroom/aliceVision/Texturing.py index 057d3e7d0c..87295bf877 100644 --- a/meshroom/aliceVision/Texturing.py +++ b/meshroom/aliceVision/Texturing.py @@ -336,13 +336,13 @@ class Texturing(desc.AVCommandLineNode): name="output", label="Folder", description="Folder for output mesh: OBJ, material and texture files.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="outputMesh", label="Mesh", description="Output mesh file.", - value=desc.Node.internalFolder + "texturedMesh.{outputMeshFileTypeValue}", + value="{nodeCacheFolder}/texturedMesh.{outputMeshFileTypeValue}", group="", ), desc.File( @@ -350,22 +350,22 @@ class Texturing(desc.AVCommandLineNode): enabled=lambda node: node.outputMeshFileType.value == "obj", label="Material", description="Output material file.", - value=desc.Node.internalFolder + "texturedMesh.mtl", + value="{nodeCacheFolder}/texturedMesh.mtl", group="", ), desc.File( name="outputTextures", label="Textures", description="Output texture files.", - value=lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", + value=lambda attr: "{nodeCacheFolder}/texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", group="", ), ] def upgradeAttributeValues(self, attrValues, fromVersion): if fromVersion < Version(6, 0): - outputTextureFileType = attrValues['outputTextureFileType'] + outputTextureFileType = attrValues["outputTextureFileType"] if isinstance(outputTextureFileType, str): - attrValues['colorMapping'] = {} - attrValues['colorMapping']['colorMappingFileType'] = outputTextureFileType + attrValues["colorMapping"] = {} + attrValues["colorMapping"]["colorMappingFileType"] = outputTextureFileType return attrValues diff --git a/meshroom/aliceVision/TracksBuilding.py b/meshroom/aliceVision/TracksBuilding.py index 769069cdea..1a52185545 100644 --- a/meshroom/aliceVision/TracksBuilding.py +++ b/meshroom/aliceVision/TracksBuilding.py @@ -92,6 +92,6 @@ class TracksBuilding(desc.AVCommandLineNode): name="output", label="Tracks", description="Path to the output tracks file.", - value=desc.Node.internalFolder + "tracksFile.json", + value="{nodeCacheFolder}/tracksFile.json", ), ] diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 7853f9b1f0..4467082936 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -128,14 +128,14 @@ class ScenePreview(desc.CommandLineNode): name="output", label="Output", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="frames", label="Frames", description="Frames rendered in Blender.", semantic="image", - value=desc.Node.internalFolder + "<FILESTEM>_preview.jpg", + value="{nodeCacheFolder}/<FILESTEM>_preview.jpg", group="", ), ] From e15df4dc1c451bce0c8c887def6a69b717e401a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 13 Jan 2025 17:12:23 +0100 Subject: [PATCH 1084/1093] [nodes] CameraInit: Use node's internal folder instead of the description's --- meshroom/aliceVision/CameraInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/aliceVision/CameraInit.py b/meshroom/aliceVision/CameraInit.py index c23c51bc12..0ea928d9ec 100644 --- a/meshroom/aliceVision/CameraInit.py +++ b/meshroom/aliceVision/CameraInit.py @@ -671,7 +671,7 @@ def createViewpointsFile(self, node, additionalViews=()): "featureFolder": "", "matchingFolder": "", } - node.viewpointsFile = os.path.join(node.nodeDesc.internalFolder, 'viewpoints.sfm').format(**node._cmdVars) + node.viewpointsFile = os.path.join(node.internalFolder, 'viewpoints.sfm').format(**node._cmdVars) with open(node.viewpointsFile, 'w') as f: json.dump(sfmData, f, indent=4) From d37a70347165d3ecb6053f3c2f23298c562721f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 23 Jan 2025 09:54:22 +0100 Subject: [PATCH 1085/1093] [nodes] ScenePreview: Use `{nodeSourceCodeFolder}` for the script's path --- meshroom/blender/ScenePreview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/blender/ScenePreview.py b/meshroom/blender/ScenePreview.py index 4467082936..154a841e3c 100644 --- a/meshroom/blender/ScenePreview.py +++ b/meshroom/blender/ScenePreview.py @@ -32,7 +32,7 @@ class ScenePreview(desc.CommandLineNode): name="script", label="Script", description="Path to the internal script for rendering in Blender.", - value=os.path.join(currentDir, "scripts", "preview.py"), + value=os.path.join("{nodeSourceCodeFolder}", "scripts", "preview.py"), invalidate=False, group="", advanced=True, From 0ab1435671fd55dad8ef8d50b31002ddf1b9824f Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Wed, 5 Mar 2025 17:55:39 +0100 Subject: [PATCH 1086/1093] images export nodes --- meshroom/aliceVision/ExportImages.py | 83 +++++++++++++++++++ .../aliceVision/IntrinsicsTransforming.py | 67 +++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 meshroom/aliceVision/ExportImages.py create mode 100644 meshroom/aliceVision/IntrinsicsTransforming.py diff --git a/meshroom/aliceVision/ExportImages.py b/meshroom/aliceVision/ExportImages.py new file mode 100644 index 0000000000..31a9fe75ed --- /dev/null +++ b/meshroom/aliceVision/ExportImages.py @@ -0,0 +1,83 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class ExportImages(desc.AVCommandLineNode): + commandLine = 'aliceVision_exportImages {allParams}' + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=40) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + category = 'Utils' + documentation = ''' + Export images referenced in the input sfmData by transforming + them to adapt to the required target intrinsics. For example, the target + intrinsics may be the same without the distortion. + ''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file. Contains the original intrinsics of the images.", + value="", + ), + desc.File( + name="target", + label="Target", + description="This sfmData file contains the required intrinsics for the output images.", + value="", + ), + desc.ChoiceParam( + name="outputFileType", + label="Output File Type", + description="Output file type for the exported images.", + value="exr", + values=["jpg", "png", "tif", "exr"], + advanced=True, + ), + desc.BoolParam( + name="evCorrection", + label="Correct Images Exposure", + description="Apply a correction on images' exposure value.", + value=False, + advanced=True, + ), + desc.ChoiceParam( + name="namingMode", + label="Naming mode", + description="image naming mode :\n" + " - viewId: viewid.ext.\n" + " - frameId: Frameid.ext.\n" + " - keep: Keep original name.\n", + value="viewId", + values=["viewid", "frameid", "keep"], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Images Folder", + description="Output folder.", + value=desc.Node.internalFolder, + ), + desc.File( + name="undistorted", + label="Undistorted Images", + description="List of undistorted images.", + semantic="image", + value=desc.Node.internalFolder + "<VIEW_ID>.{outputFileTypeValue}", + group="", + advanced=True, + ), + ] diff --git a/meshroom/aliceVision/IntrinsicsTransforming.py b/meshroom/aliceVision/IntrinsicsTransforming.py new file mode 100644 index 0000000000..18b898d3b5 --- /dev/null +++ b/meshroom/aliceVision/IntrinsicsTransforming.py @@ -0,0 +1,67 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +class IntrinsicsTransforming(desc.AVCommandLineNode): + commandLine = 'aliceVision_intrinsicsTransforming {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' + Transforms all intrinsics in the sfmData to a new type. + ''' + + inputs = [ + desc.File( + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", + ), + desc.File( + name="inputTracks", + label="Input Tracks", + description="Input Tracks file.", + value="", + ), + desc.ChoiceParam( + name="type", + label="Camera Type", + description="Mathematical model used to represent a camera:\n" + " - pinhole: Simplest projective camera model without optical distortion " + "(focal and optical center).\n" + " - equirectangular: Projection model used in panoramas.\n", + value="pinhole", + values=["pinhole", "equidistant", "equirectangular"], + ), + desc.FloatParam( + name="fakeFov", + label="Virtual FOV", + description="If the input intrinsic is not a pinhole but the output is, what is the virtual FOV requested.", + value=90.0, + range=(1.0, 179.0, 0.1), + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Output SfMData", + description="Output SfMData file.", + value=desc.Node.internalFolder + "sfmData.abc", + ), + desc.File( + name="outputTracks", + label="Output Tracks", + description="Output Tracks file.", + value=desc.Node.internalFolder + "tracksFile.json", + ), + ] From f917e048c2cda358beca1f79e230b307dfd9b6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Thu, 6 Mar 2025 14:42:48 +0100 Subject: [PATCH 1087/1093] [nodes] ExportImages: Fix category and `namingMode` parameter Change the category to "Export" instead of "Utils" and align the default value of the `namingMode` parameter with the one used in the AliceVision's executable. Moreover, the value "viewId" was incorrect, as "viewid" if the expected one. --- meshroom/aliceVision/ExportImages.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ExportImages.py b/meshroom/aliceVision/ExportImages.py index 31a9fe75ed..ae35cb61fa 100644 --- a/meshroom/aliceVision/ExportImages.py +++ b/meshroom/aliceVision/ExportImages.py @@ -10,7 +10,7 @@ class ExportImages(desc.AVCommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' - category = 'Utils' + category = 'Export' documentation = ''' Export images referenced in the input sfmData by transforming them to adapt to the required target intrinsics. For example, the target @@ -49,10 +49,10 @@ class ExportImages(desc.AVCommandLineNode): name="namingMode", label="Naming mode", description="image naming mode :\n" - " - viewId: viewid.ext.\n" - " - frameId: Frameid.ext.\n" + " - viewid: viewid.ext.\n" + " - frameid: Frameid.ext.\n" " - keep: Keep original name.\n", - value="viewId", + value="frameid", values=["viewid", "frameid", "keep"], ), desc.ChoiceParam( From ee11ca9ca560af2bcff52fd295f70461b0125bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 10 Mar 2025 11:29:28 +0000 Subject: [PATCH 1088/1093] [nodes] Replace `desc.Node.internalFolder` with `{nodeCacheFolder}` For nodes that were added right before the merge of #2629, the replacement still needed to be done. --- meshroom/aliceVision/ExportImages.py | 4 ++-- meshroom/aliceVision/IntrinsicsTransforming.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/aliceVision/ExportImages.py b/meshroom/aliceVision/ExportImages.py index ae35cb61fa..029b1092c9 100644 --- a/meshroom/aliceVision/ExportImages.py +++ b/meshroom/aliceVision/ExportImages.py @@ -69,14 +69,14 @@ class ExportImages(desc.AVCommandLineNode): name="output", label="Images Folder", description="Output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name="undistorted", label="Undistorted Images", description="List of undistorted images.", semantic="image", - value=desc.Node.internalFolder + "<VIEW_ID>.{outputFileTypeValue}", + value="{nodeCacheFolder}/<VIEW_ID>.{outputFileTypeValue}", group="", advanced=True, ), diff --git a/meshroom/aliceVision/IntrinsicsTransforming.py b/meshroom/aliceVision/IntrinsicsTransforming.py index 18b898d3b5..223851afbb 100644 --- a/meshroom/aliceVision/IntrinsicsTransforming.py +++ b/meshroom/aliceVision/IntrinsicsTransforming.py @@ -56,12 +56,12 @@ class IntrinsicsTransforming(desc.AVCommandLineNode): name="output", label="Output SfMData", description="Output SfMData file.", - value=desc.Node.internalFolder + "sfmData.abc", + value="{nodeCacheFolder}/sfmData.abc", ), desc.File( name="outputTracks", label="Output Tracks", description="Output Tracks file.", - value=desc.Node.internalFolder + "tracksFile.json", + value="{nodeCacheFolder}/tracksFile.json", ), ] From 2118387b72de0c4efa4638bf857b592b65cb3c2c Mon Sep 17 00:00:00 2001 From: Fabien Servant <fabien.servant@technicolor.com> Date: Tue, 11 Mar 2025 11:40:35 +0100 Subject: [PATCH 1089/1093] Injecting survey points --- meshroom/aliceVision/ConvertSfMFormat.py | 6 +++ meshroom/aliceVision/SfMSurveyInjecting.py | 47 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 meshroom/aliceVision/SfMSurveyInjecting.py diff --git a/meshroom/aliceVision/ConvertSfMFormat.py b/meshroom/aliceVision/ConvertSfMFormat.py index 9f10a327d7..1b8d5a2aad 100644 --- a/meshroom/aliceVision/ConvertSfMFormat.py +++ b/meshroom/aliceVision/ConvertSfMFormat.py @@ -80,6 +80,12 @@ class ConvertSfMFormat(desc.AVCommandLineNode): description="Export observations.", value=True, ), + desc.BoolParam( + name="surveys", + label="Surveys", + description="Export surveys.", + value=True, + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", diff --git a/meshroom/aliceVision/SfMSurveyInjecting.py b/meshroom/aliceVision/SfMSurveyInjecting.py new file mode 100644 index 0000000000..fc52ea574b --- /dev/null +++ b/meshroom/aliceVision/SfMSurveyInjecting.py @@ -0,0 +1,47 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +import json + +class SfMSurveyInjecting(desc.AVCommandLineNode): + + commandLine = "aliceVision_sfmSurveyInjecting {allParams}" + size = desc.DynamicNodeSize("input") + + category = "Utils" + documentation = """ +Use a JSON file to inject survey measurements inside the SfMData. +""" + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file.", + value="", + ), + desc.File( + name="surveyFilename", + label="Survey", + description="Input JSON file containing the survey.", + value="", + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="SfMData", + description="Path to the output SfM file.", + value="{nodeCacheFolder}/sfmData.abc", + ), + ] From 5bb6db530dddceec5071c91dabed547109330f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Mon, 17 Mar 2025 14:48:23 +0100 Subject: [PATCH 1090/1093] `CMakeLists.txt`: Add option to install AV's Meshroom plugin --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f1b8d9f775..767d941bf8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ option(ALICEVISION_BUILD_TESTS "Build AliceVision tests" OFF) option(AV_USE_CUDA "Enable CUDA" ON) option(AV_USE_OPENMP "Enable OpenMP" $<$<CXX_COMPILER_ID:"AppleClang">,OFF,ON>) # disable by default for AppleClang option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(ALICEVISION_INSTALL_MESHROOM_PLUGIN "Install AliceVision's plugin for Meshroom" ON) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type for AliceVision" FORCE) @@ -85,6 +86,13 @@ install( endif() +if (ALICEVISION_INSTALL_MESHROOM_PLUGIN) + install( + DIRECTORY meshroom + DESTINATION ${CMAKE_INSTALL_DATADIR}/aliceVision + ) +endif() + # Bundle target (see src/cmake/MakeBundle.cmake) # Note: require that the install rule has been executed # Include VCPKG installed dir for runtime dependencies lookup From af6f6802a7a6dc28b1348d2a235b318e040df278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Tue, 18 Mar 2025 17:12:34 +0100 Subject: [PATCH 1091/1093] [ci] Update functional tests to set correctly AV's nodes and templates --- .github/workflows/continuous-integration.yml | 47 +++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6da25933cb..765803f5ea 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -94,24 +94,27 @@ jobs: - name: Functional Tests - PanoramaFisheyeHdr Pipeline working-directory: ./functional_tests run: | - # clone required repos + # Clone required repos git clone --branch develop https://github.com/alicevision/Meshroom.git git clone --branch main https://github.com/alicevision/dataset_panoramaFisheyeHdr.git cd Meshroom/ - # select meshroom branch meshroom_avBranch=$(git ls-remote --heads https://github.com/alicevision/Meshroom.git $GITHUB_HEAD_REF | cut -f 1) if [ $meshroom_avBranch != "" ]; then git checkout $meshroom_avBranch; echo "Use Meshroom/$GITHUB_HEAD_REF"; fi + + # Set environment variables specific to Meshroom export MESHROOM_INSTALL_DIR=$PWD + export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom + export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom + + # Set environment variables to find executables and libraries export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/bin:${PYTHONPATH} export PATH=$PATH:${ALICEVISION_ROOT}/bin export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH} - mkdir ./outputData - cd bin/ - python3 --version - pip3 --version + + # Run the test pipeline pip3 install psutil - echo "ldd aliceVision_cameraInit" - ldd ${ALICEVISION_ROOT}/bin/aliceVision_cameraInit + cd bin/ + mkdir ./outputData python3 meshroom_batch -i $PWD/../../dataset_panoramaFisheyeHdr/RAW -p panoramaFisheyeHdr -o $PWD/../outputData - name: Functional Tests - SfM Quality Evaluation @@ -119,13 +122,11 @@ jobs: run: | git clone --branch master https://github.com/alicevision/SfM_quality_evaluation.git cd SfM_quality_evaluation/ - # checkout a specific commit to ensure repeatability + # Checkout a specific commit to ensure repeatability git checkout 36e3bf2d05c64d1726cb4a0e770923794f203f98 export PYTHONPATH=${ALICEVISION_ROOT}/bin:${PYTHONPATH} export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH} - echo "ldd aliceVision_cameraInit" - ldd ${ALICEVISION_ROOT}/bin/aliceVision_cameraInit - python3 --version + python3 EvaluationLauncher.py -s ${ALICEVISION_ROOT}/bin -i $PWD/Benchmarking_Camera_Calibration_2008/ -o $PWD/reconstructions/ -r $PWD/results.json -v - name: Python Binding - Unit Tests @@ -135,6 +136,27 @@ jobs: pip3 install pytest pytest ./pyTests + - name: Meshroom Plugin - Templates validity + working-directory: ./functional_tests + run: | + git clone https://github.com/meshroomHub/mrSegmentation.git + cd Meshroom/ + export MESHROOM_INSTALL_DIR=$PWD + export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom:$PWD/../mrSegmentation/meshroom/nodes + export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom + export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/bin:${PYTHONPATH} + export PATH=$PATH:${ALICEVISION_ROOT}/bin + export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH} + + echo " + import sys + from meshroom.core import test + if test.checkAllTemplatesVersions(): + sys.exit(0) + sys.exit(1) + " | tee test_templatesVersions.py + python3 test_templatesVersions.py + build-windows: runs-on: windows-latest env: @@ -229,6 +251,7 @@ jobs: -DALICEVISION_BUILD_PHOTOMETRICSTEREO=OFF -DALICEVISION_BUILD_SEGMENTATION=OFF -DALICEVISION_BUILD_SWIG_BINDING=ON + -DALICEVISION_INSTALL_MESHROOM_PLUGIN=OFF -DBOOST_NO_CXX11=ON cmakeBuildType: Release From 87322a6efeab81cbbc44014d81f3fb5ee3a1b7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 19 Mar 2025 10:02:10 +0100 Subject: [PATCH 1092/1093] [build] Move Meshroom plugin from `/share/aliceVision` to `/share` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 767d941bf8..af94db7699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,7 @@ endif() if (ALICEVISION_INSTALL_MESHROOM_PLUGIN) install( DIRECTORY meshroom - DESTINATION ${CMAKE_INSTALL_DATADIR}/aliceVision + DESTINATION ${CMAKE_INSTALL_DATADIR} ) endif() From 9ab9801d8caf9182fa033b52de294689e2346a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= <candice.bentejac@gmail.com> Date: Wed, 19 Mar 2025 10:02:24 +0100 Subject: [PATCH 1093/1093] [ci] Update install paths for Meshroom plugin --- .github/workflows/continuous-integration.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 765803f5ea..91095d3a23 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -103,8 +103,8 @@ jobs: # Set environment variables specific to Meshroom export MESHROOM_INSTALL_DIR=$PWD - export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom - export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom + export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom + export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom # Set environment variables to find executables and libraries export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/bin:${PYTHONPATH} @@ -142,8 +142,8 @@ jobs: git clone https://github.com/meshroomHub/mrSegmentation.git cd Meshroom/ export MESHROOM_INSTALL_DIR=$PWD - export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom:$PWD/../mrSegmentation/meshroom/nodes - export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/aliceVision/meshroom + export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom:$PWD/../mrSegmentation/meshroom/nodes + export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/bin:${PYTHONPATH} export PATH=$PATH:${ALICEVISION_ROOT}/bin export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}