2
$\begingroup$

I am writing a lens correctionion code and the process should do several things:

  • Inverse fisheye projection to obtain rectilinear image
  • Barrel/pincushion correction
  • Vignetting correction
  • Lateral chromatic aberration correction

The problem is - in what order apply these steps?

Should the image be first "de-fished" or the chromatic aberration, vignetting etc. affects already formed fisheye image?

I am not familiar with optics so maybe any ordering is okay as long as correct models/parameters are used - but I would like to go for simplest solution in that case - e.g. if chromatic aberration is most easily corrected in rectilinear images, then de-fishing should go first.

$\endgroup$
1
$\begingroup$

It seems I found an answer on the Panotools Wiki:

Unlike rectilinear lenses, fish-eye lenses do not follow the tangent-plane geometry, but instead have built-in distortions designed to achieve wide fields of view. The radial lens distortion parameters are used the same way for rectilinear lenses and fisheye lenses, but they should never be used to attempt to remap a fisheye to a rectilinear image. This is done by selecting the proper source and destination projection. Fisheye geometry follows a rapidly-changing trigonometric function which can hardly be approximated by a third degree polynomial.

For fisheyes, the lens correction parameters correct for the deviation between a real lens and the ideal fisheye geometry.

The last sentence suggests that the lens correction is done to get a proper geometry of whatever lens it is. The fisheye is therefore remapped after the lens corrections are done.

Looking at the Fulla tool source code from Hugin, it seems that it performs corrections in the following order:

  1. Flat-field correction (i.e. removing vignetting
  2. Radial distortion correction (barrel, pincushion, wavy distortion)
  3. TCA correction (i.e. removing one type of chromatic aberration)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.