Sunday, March 25, 2012

Shallow Hal - calibrating complex wide angle lenses

I have spent a couple of weeks now chasing down various methods to get a COTS camera calibrated to sub-pixel accuracy. We are effectively measuring the terrain hidden in the lens and the CCD, while assuming the target being imaged is as perfect as we could get it. There are a few ways of modeling the imperfection:

  1. Classic Brown's polynomial model with radial and tangential components assuming a symmetric lens
  2. More realistic 2D spline based models which can be assymmetric and most likely fit the lens better.
Vertical distortion
The spline based solution has more parameters and is messier to solve for, but I started by image processing career filling holes in 3D models of teeth with thin-plate-splines (TPS). So they come naturally to me. Here is the methodology used to estimate a B-spline to fit the distortion, you can do the same with more complex splines (Cubic splines) as well. As always a set of targets (equally spaced solid circles) is used as a target.
Transform to estimate chromatic aberration
The lens distortion manifests itself by the variation in the distance between the dots and via the distortion of the dots into ellipses. Multiple views of the coplanar dots helps establish greater sampling of the distortion space. We always depend on our perception being the only reality, without taking time to calibrate the lenses of prejudice through which we view the world. Fit all the changes from the flatworld view by accounting for the curvature using splines and you turn a hippo in to Gwyneth Paltrow.
Post a Comment