Agisoft Metashape

Agisoft Metashape => Camera Calibration => Topic started by: j.senn on December 27, 2021, 06:44:39 PM

Title: format conversion - Parameter consistency
Post by: j.senn on December 27, 2021, 06:44:39 PM
Hi All,
I have calibrated my camera using an external software (VMS). I have saved the parameters in a mm format.
Is there a way to import and convert the parameters to use them in MetaShape, but without estimating additional parameters.
I.e. my calibration uses K1, K2 and K3 but after importing into MetaShape there is a value for K4. I have used the Australis Type.

Thanks for your help,
Johannes

Title: Re: format conversion - Parameter consistency
Post by: Alexey Pasumansky on December 28, 2021, 06:16:16 PM
Hello Johannes,

If the distortion model used by the external application (and related format) is different from the distortion model implemented in Metashape, then the conversion on import would be performed via approximation, which may result in different values for the parameters with the same label (as their meaning is different in different models).
Title: Re: format conversion - Parameter consistency
Post by: j.senn on December 28, 2021, 06:41:09 PM
Hi Alexey,
thanks for your reply.

My aim is to compare the MetaShape calibration and the external calibration.

I have done the calibration in MetaShape using the same dataset and found that the K parameters show too much correlation. Additionally, the external software can only determine K1-3. Therefore, I have decided to omit K4 altogether.

I understand that MetaShape approximates the K1-4 parameters on import. Does that mean the conversion is not done by a straight forward equation? I was assuming the conversion just calculates pixel values from the mm values. As mentioned above, my parameters are generated in VMS (not Australis).
Can you provide conversion equations? I could calculate my own values and feed them directly into the camera calibration window without using the conversion tool.

Thank you,
Johannes
Title: Re: format conversion - Parameter consistency
Post by: Alexey Pasumansky on December 29, 2021, 11:18:36 AM
Hello Johannes,

The distortion model used in Metashape is described in Appendix C of the User Manual:
https://www.agisoft.com/pdf/metashape-pro_1_7_en.pdf
Title: Re: format conversion - Parameter consistency
Post by: j.senn on December 29, 2021, 11:55:28 AM
Hi Alexey,
thanks again. The appendix was indeed helpful for calculating distortion profiles. However it does not say anything about parameter conversion. What are the equations used when exporting camera calibration in the australis format? From this I should be able to reverse-engineer the equations to convert my parameters from VMS to Metashape.
Thanks,
Johannes
Title: Re: format conversion - Parameter consistency
Post by: j.senn on December 29, 2021, 12:16:45 PM
In addition I dug out this old post, that helped me to approximately calculate the radial parameters.

Hi Alexey/All,

I apologize up front if this has been answered elsewhere, but can you point me to the algorithm/papers that describe the conversion  between the australis calibration coefficients and the defaults shown in the Photoscan GUI?

For the radial terms, It appears that the conversion is roughly (but certainly not exact):

k1_photoscan = f^2 * k1_australis
k2_photoscan = f^4 * k2_australis
...

where f is the focal length.

Any insight greatly appreciated.

Thanks!