100
« Last post by Paulo on April 29, 2026, 11:30:22 AM »
Hello support,
with latest release we have the new Calibration.todict() method that creates a dictionary of calibration parameters according to given Metashape.CalibrationFormat argument.
I have noticed that for a given sensor with following Metashape calibration parameters:
Calibration interna: {'f': 4241.725572564694, 'cx': -19.744119513936447, 'cy': 25.30570870270943, 'k1': -0.04742383277638246, 'k2': 0.009341131199137442, 'k3': -0.0818087829741068, 'p1': -0.002427327074582477, 'p2': 0.0024229055174815107, 'width': 4243, 'height': 2828, 'pixel_height': 0.00848517808414172, 'pixel_width': 0.00848517808414172}
then all dictionaries generated with this method, gives Height and Width always equal to None which is clearly not correct:
Cannot convert to CalibrationFormatXML
CalibrationFormatAustralis {'B1': 1.8512978933901667e-06, 'B2': 1.8581352244169444e-05, 'F': 35.99297145631443, 'Height': None, 'K1': 3.759855012313016e-05, 'K2': -8.643312913091593e-09, 'K3': 5.613039045797369e-11, 'K4': 0.0, 'K5': 0.0, 'P1': 7.260026638501581e-05, 'P2': 7.195829882121052e-05, 'PixelH': 0.00848517808414172, 'PixelW': 0.00848517808414172, 'Width': None, 'XP': -0.16683782364373978, 'YP': -0.21417025125188566}
CalibrationFormatAustralisV7 {'B1': 1.8512978933901667e-06, 'B2': 1.8581352244169444e-05, 'F': 35.99297145631443, 'Height': None, 'K1': 3.759855012313016e-05, 'K2': -8.643312913091593e-09, 'K3': 5.613039045797369e-11, 'K4': 0.0, 'K5': 0.0, 'P1': 7.260026638501581e-05, 'P2': 7.195829882121052e-05, 'PixelH': 0.00848517808414172, 'PixelW': 0.00848517808414172, 'Width': None, 'XP': -0.16683782364373978, 'YP': -0.21417025125188566}
CalibrationFormatPhotoModeler {'F': 35.99297225547551, 'Height': None, 'K1': 3.759890070257822e-05, 'K2': -8.646511955609014e-09, 'K3': 5.613501389810374e-11, 'P1': 7.260125485470465e-05, 'P2': -7.196154377056473e-05, 'SensorH': 23.996083621952785, 'SensorW': 36.00267767266935, 'Width': None, 'XP': 17.834497461018884, 'YP': 12.212211359325547}
CalibrationFormatCalibCam {'B1': -6.4956177365707814e-18, 'B2': -1.763623124214219e-18, 'F': 35.99179686726943, 'Height': None, 'K1': 3.6609145532296556e-05, 'K2': -5.5665402754890215e-09, 'K3': 3.7633859355668355e-11, 'K4': 4.7607071063685285e-26, 'P1': 6.744111952881907e-05, 'P2': 6.731827050526766e-05, 'PixelH': 0.00848517808414172, 'PixelW': 0.00848517808414172, 'Width': None, 'XP': -0.17177495923239808, 'YP': -0.2189660339299748}
CalibrationFormatCalCam {'B1': -3.79103253669379e-15, 'B2': -4.969934454311953e-16, 'F': 4241.725572564694, 'Height': None, 'K1': -2.6357943068717864, 'K2': 0.02885553972829178, 'K3': -0.014045736832816257, 'P1': 0.5712075135536271, 'P2': -0.5722499093959164, 'SensorH': 23.996083621952785, 'SensorW': 36.002610611013324, 'Width': None, 'XP': 2101.7558804860637, 'YP': 1439.3057087027094}
CalibrationFormatInpho {'F': 35.99179686726943, 'Height': None, 'K0': 0.0, 'K1': -3.6227395677127616e-05, 'K2': -3.3208938136972416e-09, 'K3': -1.675303221593597e-11, 'K4': -4.326441434127576e-14, 'K5': 0.0, 'K6': 0.0, 'K7': 0.0, 'P1': -7.259665105175374e-05, 'P2': -7.195212884283947e-05, 'P3': 0.0, 'P4': 0.0, 'PixelH': 0.3054008097193703, 'PixelW': 0.30540118317550785, 'Width': None, 'XP': -6.005004527076301, 'YP': -7.708482382065446}
CalibrationFormatUSGS {'F': 35.99162438156715, 'Height': None, 'K0': 0.0, 'K1': 3.651743937500354e-05, 'K2': 5.924497093295806e-10, 'K3': 2.704884909024307e-11, 'K4': 2.981798232189306e-14, 'P1': 6.995592483553787e-05, 'P2': 6.95626656336004e-05, 'P3': -6.623318724058881e-05, 'P4': 5.523686703692391e-07, 'PixelH': 0.00848517808414172, 'PixelW': 0.00848517808414172, 'Width': None, 'XP': -0.1672968207186483, 'YP': -0.2144770044017617}
CalibrationFormatPix4D {'F': 35.99179601888123, 'Height': None, 'K1': -0.047423289255992006, 'K2': 0.12141941945946487, 'K3': -1.0818028284131138, 'P1': 0.002422905769286615, 'P2': -0.002427327214695368, 'PixelH': 0.00848517808414172, 'PixelW': 0.00848517808414172, 'Width': None, 'XP': 17.833772936025532, 'YP': 12.212765254940223}
CalibrationFormatOpenCV {'Height': None, 'K1': -0.04742383277638246, 'K2': 0.009341131199137489, 'K3': -0.08180878297410689, 'P1': 0.002422905517481513, 'P2': -0.002427327074582477, 'Width': None, 'cx': 2101.2558804860637, 'cy': 1438.8057087027094, 'fx': 4241.725572564694, 'fy': 4241.725572564694}
CalibrationFormatPhotomod {'B1': -9.404631083862874e-18, 'B2': -3.986889953738333e-18, 'F': 35.99179686726943, 'Height': None, 'K1': 3.6609145532297694e-05, 'K2': -5.566540275501142e-09, 'K3': 3.763385935571101e-11, 'P1': 6.744111952881854e-05, 'P2': 6.731827050526854e-05, 'PixelH': 0.00848517808414172, 'PixelW': 0.00848517808414172, 'Width': None, 'XP': -0.1675323701903271, 'YP': -0.21472344488790387}
Cannot convert to CalibrationFormatGrid
Cannot convert to CalibrationFormatSTMap