Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for negative distortion during automatic calibration #148

Open
g3force opened this issue Sep 10, 2019 · 2 comments
Open

Add support for negative distortion during automatic calibration #148

g3force opened this issue Sep 10, 2019 · 2 comments

Comments

@g3force
Copy link
Member

g3force commented Sep 10, 2019

The new high resolution cameras of the SSL league have a negative distortion. Support was added to set the distortion to a negative value manually, but the optimizer for the automatic calibration can not optimize for negative values right now.

@joydeep-b Your input in how to solve this would be very helpful.

@joydeep-b
Copy link
Member

The problem is three-fold:

  1. There is some trivial hookups to the slider to the optimizer that needs to be done.
  2. The optimizer sets constraints on the distortion parameter, which need to be removed
  3. The cubic solver for undistortion assumes a positive distortion coefficient. Without this assumption, the general form of the cubic solver is MUCH more involved.

We can use some off-the-shelf general purpose cubic solvers (e.g. GSL: https://www.gnu.org/software/gsl/doc/html/poly.html#cubic-equations), remains to be seen how slow they are for calibration.

Alternatively, it could be a good time to ditch the custom implementation of LM with numeric differentiation and adopt Ceres-Solver (http://www.ceres-solver.org/) for optimization, using automatic differentiation. We will not need the inverse formulae, then, just the forward propagation: SE(3) transform -> pinhole projection -> radial distortion .

@g3force
Copy link
Member Author

g3force commented Jan 26, 2020

#163 solves this issue as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants