Math error in DNG lens correction?

Issue #177 resolved
Paolo DePetrillo created an issue

Comparing to the DNG spec, I think there’s a * in this line that should be a +, in ExifLensCorrection::correctDistortion:

    const float f = dist_[0] + r2 * (dist_[1] + r2 * (dist_[2] * r2 * dist_[3]));

should be:

    const float f = dist_[0] + r2 * (dist_[1] + r2 * (dist_[2] + r2 * dist_[3]));

Haven’t actually tested this myself as I just realized my phone camera outputs a no-op lens correction and doesn’t need it..

Comments (2)

  1. Log in to comment