From 423c7bebfca855e7834791e2699322af539116ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Mon, 5 Jun 2023 12:33:55 +0200 Subject: [PATCH] [pipeline] cam track pipeline adjustments --- meshroom/pipelines/camTrackTmp.mg | 280 ++++++++++++++++-------------- 1 file changed, 150 insertions(+), 130 deletions(-) diff --git a/meshroom/pipelines/camTrackTmp.mg b/meshroom/pipelines/camTrackTmp.mg index 7867478b7c4..7c58c7238e7 100644 --- a/meshroom/pipelines/camTrackTmp.mg +++ b/meshroom/pipelines/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