Math error in DNG lens correction?
Issue #177
resolved
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)
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
looks like a typo indeed, thanks for reporting!