>For instance in the Adobe doco, you'll see the quantity on the left of the lens distortion equation is labelled "xd" (distorted).
Right, because Adobe thinks in terms of "distorting" the original shot, and I'm thinking in the terms of "undistorting" the original shot. Different points of view on the same transform. >Also, tracing through the code in lib/lensfun/mod-coord.cpp in the ApplyGeometryDistortion routine, the code takes a coordinate, transforms it using the callback for the model, and then looks up the (distorted) image data at the transformed coordinates. Wrong, there are two kinds of callbacks: "_Dist_XXX" and "_UnDist_XXX". The second kind *undistorts* the original image (e.g. applies the given formula directly on the source image). The first kind *distorts* it, e.g. solves the reverse equation (Rd as function of Ru). That's why they're a bit complex - solving 3rd and 5th order equations is not too easy. >Regarding the use of "x" and "y" in the Adobe doco, this is equivalent to writing the transform using "r". In fact, it's pretty much identical to how it's coded in lensfun: Not quite identical. The Adobe formula uses both "x" and "y" for calculating the undistorted pixel coordinates. In fact, you even have x^2 in the formula for Xd and y^2 in the formula for Yd. That's why I think it's not possible to map directly Adobe lens model to one of existing lensfun models; however, it's pretty easy to implement as a new lens model (at least the "undistortion" callback, for the reverse it should be needed to use again Newton approximation). I may try to implement it and submit to SVN, you then may try it with a real lens model and see if it works. I will also try ALPC with latest wine, it has improved a lot in the last year. ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Lensfun-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lensfun-users
