From 2b167d7960aec9894b3e3f39c15ec7f2e04a2e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Mon, 5 Jun 2023 12:41:42 +0200 Subject: [PATCH] [pipelines] overwrite cameraTracking with camTrackTmp --- meshroom/pipelines/camTrackTmp.mg | 416 --------------------------- meshroom/pipelines/cameraTracking.mg | 394 ++++++++++++++++++++++--- 2 files changed, 352 insertions(+), 458 deletions(-) delete mode 100644 meshroom/pipelines/camTrackTmp.mg diff --git a/meshroom/pipelines/camTrackTmp.mg b/meshroom/pipelines/camTrackTmp.mg deleted file mode 100644 index 7c58c7238e..0000000000 --- a/meshroom/pipelines/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/pipelines/cameraTracking.mg b/meshroom/pipelines/cameraTracking.mg index d70bcb32ff..0fdb261b8c 100644 --- a/meshroom/pipelines/cameraTracking.mg +++ b/meshroom/pipelines/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" } } }