Undistortion not possible with external calibration

Issue #230 closed
FUNMORPH UA created an issue

Dear Ben, dear all,

Is there a way to apply grid undistortion to a project with external calibration?

I am attempting to reproduce the xmalab undistortion feature, because I need to calculate epiclines in an external program to apply a custom optimization procedure on manually tracked 2D points.

In that process, I learned that, on a project with full calibration (cube and circular grid), there are two “layers” of undistortion. The first one is camera undistortion, and parameters are stored in a “Camera x_UndistortionParameter.csv” file in the xma project. There also seems to be a second undistortion algorithm, according to the original publication, which involves a local weighted mean (LWM) transformation.

The LWM procedure is not directly stored in the xma project (unless maybe in the form of point lists), and I guess from the long loading times that it is applied each time I load a project.

However, there is no way to load grid images for a project with external calibration, or did I miss it?

In my external algorithm, I can apply an interpolation that replaces LWM. However, that interpolation is slow with large grids. It would be good to get the LWM output for reference.

minimal working example

  • create a normal data set (1 camera) with cube calibration and grid image
  • undistort, calibrate
  • undistort the grid image via “file → undistort sequence”

  • create a data set with external calibration
  • enter all the parameters found in “csv” files in the “xma” project from above
  • undistort the same grid image via “file → undistort sequence”

→ the outcome does not match

I would expect that it was possible to create an “external calibration” data set which also handles the undistortion.

Thank you in advance for advice!

Kind regards,

Falk

Comments (2)

  1. Benjamin Knorlein

    Hi Falk, as i mentioned before the undistortion is not supported when using external calibration.

    And if you want to use the calibration from xmalab in another program you can simply use the calibration parameters and the undistorted trial images.

    Also I am not sure what you are planning to do and how your workflow is. If you provide more info maybe i can help

    Ben

  2. Benjamin Knorlein

    Hi Falk, As i do not want what you are trying to do and as there was no response on my last email I am closing this issue. Ben

  3. Log in to comment