Skip to content

Commit

Permalink
Merge pull request #2446 from alicevision/dev/distortionConstraints
Browse files Browse the repository at this point in the history
Add 3de undistortion models
  • Loading branch information
cbentejac authored Jul 11, 2024
2 parents e450a40 + 9835353 commit 204de11
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 40 deletions.
24 changes: 3 additions & 21 deletions meshroom/nodes/aliceVision/CameraInit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "10.0"
__version__ = "11.0"

import os
import json
Expand Down Expand Up @@ -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],
),
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/DistortionCalibration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '4.0'
__version__ = '5.0'

from meshroom.core import desc
from meshroom.core.utils import VERBOSE_LEVEL
Expand Down Expand Up @@ -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],
),
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ExportDistortion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
),
Expand Down
4 changes: 2 additions & 2 deletions meshroom/pipelines/cameraTracking.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/pipelines/cameraTrackingWithoutCalibration.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions meshroom/pipelines/distortionCalibration.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -29,6 +29,7 @@
],
"inputs": {
"input": "{CameraInit_1.output}",
"useNestedGrids": true,
"exportDebugImages": true
}
},
Expand Down
2 changes: 1 addition & 1 deletion meshroom/pipelines/hdrFusion.mg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"header": {
"nodesVersions": {
"CameraInit": "10.0",
"CameraInit": "11.0",
"LdrToHdrCalibration": "3.1",
"LdrToHdrMerge": "4.1",
"LdrToHdrSampling": "4.0",
Expand Down
4 changes: 2 additions & 2 deletions meshroom/pipelines/nodalCameraTracking.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/pipelines/panoramaFisheyeHdr.mg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"header": {
"nodesVersions": {
"CameraInit": "10.0",
"CameraInit": "11.0",
"FeatureExtraction": "1.3",
"FeatureMatching": "2.0",
"ImageMatching": "2.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/pipelines/panoramaHdr.mg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"header": {
"nodesVersions": {
"CameraInit": "10.0",
"CameraInit": "11.0",
"FeatureExtraction": "1.3",
"FeatureMatching": "2.0",
"ImageMatching": "2.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/pipelines/photogrammetry.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions meshroom/pipelines/photogrammetryAndCameraTracking.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/pipelines/photogrammetryDraft.mg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"header": {
"nodesVersions": {
"CameraInit": "10.0",
"CameraInit": "11.0",
"FeatureExtraction": "1.3",
"FeatureMatching": "2.0",
"ImageMatching": "2.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/pipelines/stereoPhotometry.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 204de11

Please sign in to comment.