[CREATE] Lens correction database

Andrew Zabolotny zap at homelink.ru
Mon Aug 27 13:02:46 PDT 2007


Hello again!

I hope this is the right list to discuss such questions here; if not I
beg pardon in advance and would kindly ask to redirect me to a more
appropriate place for technical discussions.

I finished a draft of the interface (just the interface... the
implementation is in a quite early development) for a lens database
library. I have attached it to this message. I would gladly
listen to any comments on it, since on this list there are people good
both at theory and practice.

At a second thought I decided that a universal library should provide
support for multiple lens models... otherwise it won't be universal :-)
So I decided to include all lens models that (IMHO of course) can have
practical application.

I've included the 3rd and 5th order polynomial models as well as the
1st order Field-of-view model (used in Picture Window Pro), the PTLens
model for rectilinear and fish-eye lenses. I hope this complexity could
be hidden somehow in user interface to not make users mad :-)

By the way, here's what the author of Imatest says about the PTLens
model:

------8<------8<------8<------
This equation drives me nuts! rsrc and rdest are reversed from
the equations on this page; it only goes up to fourth power (when you
include rdest outside the parentheses; third power if you don't); and
it has even order terms (a and c) when the theory implies that
distortion can be modeled with odd terms only. Give me a higher order
term (h * rdest4 ) and dump a * rdest3 and c * rdest. But nonetheless
it works pretty well.
------>8------>8------>8------

:-)

For lateral chromatic aberrations I decided to include for now only the
linear model (e.g. rd = ru * k) since I experimented a little with the
GIMP Fix-CA plug-in (http://kcd.sourceforge.net/fix-ca.php) and found
it to work pretty well for all images I had at hand (including some
images taken with a fisheye with severe TCA) despite the simplistic
(linear) model used. Also several papers I found on Internet state that
a linear model for TCAs is enough. So for now I'm not sure there are
reasons for a more sophisticated TCA model, but if somebody knows
some, don't hesitate to tell me :)

-- 
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lensfun.h
Type: text/x-chdr
Size: 13700 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/create/attachments/20070828/0e0e5297/attachment.h 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/create/attachments/20070828/0e0e5297/attachment.pgp 


More information about the CREATE mailing list