diff --git a/meshroom/nodes/CamPairs.py b/meshroom/nodes/CamPairs.py new file mode 100644 index 00000000..ef9414ae --- /dev/null +++ b/meshroom/nodes/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/nodes/DepthMap.py b/meshroom/nodes/DepthMap.py new file mode 100644 index 00000000..b6562ac1 --- /dev/null +++ b/meshroom/nodes/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/nodes/DepthMapFilter.py b/meshroom/nodes/DepthMapFilter.py new file mode 100644 index 00000000..6727b5bb --- /dev/null +++ b/meshroom/nodes/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/nodes/Fuse.py b/meshroom/nodes/Fuse.py new file mode 100644 index 00000000..7ef9642e --- /dev/null +++ b/meshroom/nodes/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/nodes/Meshing.py b/meshroom/nodes/Meshing.py new file mode 100644 index 00000000..b69c3286 --- /dev/null +++ b/meshroom/nodes/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/nodes/PrepareDenseScene.py b/meshroom/nodes/PrepareDenseScene.py new file mode 100644 index 00000000..4b87a498 --- /dev/null +++ b/meshroom/nodes/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/nodes/Texturing.py b/meshroom/nodes/Texturing.py new file mode 100644 index 00000000..038054ae --- /dev/null +++ b/meshroom/nodes/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, + ) diff --git a/sfm.mg b/sfm.mg index 675adc64..bb49bb31 100644 --- a/sfm.mg +++ b/sfm.mg @@ -26,5 +26,47 @@ "featuresDir": "{FeatureExtraction.outdir}", "matchdir": "{FeatureMatching.out_dir}" } + }, + "PrepareDenseScene": { + "nodeType": "PrepareDenseScene", + "attributes": { + "sfmdata": "{StructureFromMotion.out_sfmdata_file}" + } + }, + "CamPairs": { + "nodeType": "CamPairs", + "attributes": { + "mvsConfig": "{PrepareDenseScene.mvsConfig}" + } + }, + "DepthMap": { + "nodeType": "DepthMap", + "attributes": { + "mvsConfig": "{CamPairs.mvsConfig}" + } + }, + "DepthMapFilter": { + "nodeType": "DepthMapFilter", + "attributes": { + "mvsConfig": "{DepthMap.mvsConfig}" + } + }, + "Fuse": { + "nodeType": "Fuse", + "attributes": { + "mvsConfig": "{DepthMapFilter.mvsConfig}" + } + }, + "Meshing": { + "nodeType": "Meshing", + "attributes": { + "mvsConfig": "{Fuse.mvsConfig}" + } + }, + "Texturing": { + "nodeType": "Texturing", + "attributes": { + "mvsConfig": "{Meshing.mvsConfig}" + } } } \ No newline at end of file