Hi Pablo,
This is of course a great idea and we have a plan to release to the
community some
internal tools that helps to measure for example distortion ( to release
means put
them open source ).
My comments about the database :
Distortions :
> radial distortion, same as PTLens, 3 parameter radial
> polynmial, described in detail at:
http://wiki.panotools.org/Lens_correction_model> Varies mainly with focal length. Parameters can be estimated
> at several focal lengths and interpolated in between. Each focal length
> requires a single image for calibration.
I'm against this model of distortion. It has been proven in many paper that
we can find
better and more accurate lens radial distortion parameter.
For example, for standard lens (not fisheyes), a and c can be set to null
with the same
quality of undistortion. The only effective parameter is b ( radius * radius
parameter).
Panotools needs to have a radius^4 parameter which it doesn't have yet.
If the scope of this database is to go beyond just the panotools community,
we need to
choose carrefully the model that this database will use.
The two good points of the current model is that it's the same for standard
lens and
fisheye ( thus preventing to change model between the two kind of lens ) and
we already
have some database to use to populate this one.
For vignetting, it easy to get the radial parameter, but I'm more sceptical
about the
focal / aperture dependency.
For Ca ... It's all about workflow.
BTW : Why didn't you include the photometric parameter for the camera in
this database ?
Another point that is not in this discussion : To be able to build an
efficient database,
we need to have strong measure method.
It's not really hard to get figures to put in the database, but if anyone is
doing measure
with it's own method, it will definitively leads to contradiction in result.
What would be great, is to have a tool that measures distortion / ca /
vignetting with
standard protocoles. This tool has to be simple and accurate. Everyone
should use the same
tool to make measure, and this tool should be the only data provider for the
database.
Alexandre
Kolor
> -----Message d'origine-----
> De :
hugin-ptx@...
> [mailto:
hugin-ptx@...] De la part de Pablo d'Angelo
> Envoyé : vendredi 11 mai 2007 00:49
> À :
create@...; hugin and other free
> panoramic software
> Cc : michel thoby;
sandersn@...
> Objet : [hugin-ptx] Lens correction database
>
>
> Hi together
>
> Some people who have attended my talk about hugin at the LGM
> might remember that I proposed to build a database of lens
> correction coefficients, that can be used by open source
> software (such as ufraw, gimp, krita, digikam, f-spot, etc)
> to automatically correct for lens "defects" such as lens
> distortion, vignetting and even transverse chromatic abberation.
>
> The slides for my LGM talk are available at:
>
http://hugin.sf.net/tech/LGM_2007.pdf>
> At least the Krita people are interested in such functionality:
>
http://www.valdyas.org/fading/index.cgi/2007/05/08#hugin>
> I plan to write a lightweight C library that contain the main
> pieces of code required to apply the corrections and use the
> proposed database.
>
>
> Current situation:
>
> Several databases and associated programs for correcting lens
> defects exist.
>
> For example PTLens uses a database with lens distortions
> coefficients.
> Unfortunately, Its author, Thomas Niemann has decided to
> close and encrypt
> the underlaying database a bit more than one year ago,
> shortly after I wrote
> "fulla", a command line tool to correct lens distortion.
> fulla can use the
> old, unencrypted PTLens database and correct distortions in images
> automatically. Note that PTLens requires manual user
> interaction for other
> corrections (vignetting, chromatic abberation).
>
http://epaperpress.com/ptlens/>
> In a sense the proposed database is a free alternative to the PTLens
> database, but additionally can include coefficients for
> automatic correction
> of vignetting and chromatic abberations.
>
> DxO is a commercial software that can correct the mentioned
> defects and even
> more. Obviously their database and correction methods are not
> available.
>
http://www.dxo.com>
>
> Proposed solution:
> ==================
>
> Before that can happen, we need to agree on a database format
> that can
> include all required parameters. This specifically includes:
>
> During the panorama stitching process, hugin is required to
> correct these
> distortions, and can thus be used for estimation of the
> calibration parameters.
>
> The idea is that people who want to correct their lens take
> some test shots,
> and use hugin to estimate the required calibration
> parameters. These are
> then sent (hugin projects and original images) to a lens database
> coordinator, where they are checked for plausibility and
> incorporated into
> the database.
>
>
> Scope of database:
>
> 1. Distortion correction:
> radial distortion, same as PTLens, 3 parameter radial
> polynmial, described
> in detail at:
http://wiki.panotools.org/Lens_correction_model> Varies mainly with focal length. Parameters can be estimated
> at several
> focal lengths and interpolated in between. Each focal length
> requires a
> single image for calibration.
>
> 2. Vignetting correction:
> radial correction, radial vignetting correction by division:
> I = I / (1 + b*r^2 + c*r^4 + d*r^6)
> The parameters vary with both focal length and aperture.
> Each focal length and aperture setting require 2 or 3 images for
> calibration.
>
> 3. Chromatic abberations:
> Individual distortion correction of red and blue channel, parameters
> can be estimated using hugin (more work than the other
> approaches), or by
> trial and error. Most lenses require just a single scaling factor.
> Mainly depends on focal length.
>
> Instructions for estimating the respective parameters with
> hugin are in
> the works.
>
> Who would be interested in using and building such a database?
>
> License:
>
> What kind of license should be used (for the code and more
> important, the
> database)? A GPL like license to restrict usage to open
> source software or a
> LGPL like license? Or a non-commercial license? Can code
> licences be applied
> to databases?
>
>
>
> Database (XML) layout:
>
> For each camera and lens, a single entry would be required.
> Note that my XML skills are seriously lacking, so any comments
> with respect to a different xml syntax are appreciated.
>
> Camera description:
> ===================
>
> <!-- name of the camera, crop factor -->
> <camera make="Canon" name="EOS 300D" cropfactor="1.6">
>
> <!-- exif data required for recognition of the camera -->
> <exif make="Canon" model="Canon EOS 300D DIGITAL"/>
>
> <!-- mount of the camera (used to identify matching lenses) -->
> <mount>canonSLR</mount>
> <mount>canonEfsSLR</mount>
> <mount>genericSLR</mount>
>
> <!-- a free from text field for misc annotations -->
> <comment>Any annotation</comment>
> </camera>
>
>
> Description of a lens:
> ======================
>
> <lens name="Canon EF-S 10-22mm f/3.5-4.5 USM"
> minfocallength="10" maxfocallength="22"
> maxaperture="3.5"
> <!-- type of lens, either rectilinear or fisheye -->
> type="rectilinear">
>
> <!-- person calibrating the lens -->
> <author>Author</author>
>
> <!-- mount(s) of a lens (ie. the type of cameras it can be
> mounted on) -->
> <mount>canonEfsSLR</mount>
>
> <!-- a rating (quality control passed or not) -->
> <rating>1</rating>
>
> <!-- serial number range (for lenses with same name but different
> properties, not required) -->
> <serial number="300" min="1" max="1000">
>
> <!-- arbitrary user comment -->
> <comment></comment>
>
> <!-- correction coefficients for each focal length
> <calibration focallength="10">
>
> <!-- radial distortion correction, as in PTLens -->
> <distortion a="0.02" b="-0.012" c="0">
> <!-- transverse chromatic abberation correction -->
> <tcaRed a="0" b="0" c="0" d="0">
> <tcaBlue a="0" b="0" c="0" d="0">
>
>
> <!-- aperture specific calibration values (vignetting) -->
> <calibration aperture="3.5">
> <vignetting b="-0.1" c="-0.2 d="0">
> </calibration>
>
> <calibration aperture="8">
> <vignetting b="-0.1" c="-0.2 d="-0.3">
> </calibration>
>
> <calibration aperture="22">
> <vignetting b="-0.1" c="-0.2 d="0">
> </calibration>
> </calibration>
>
> <calibration focallength="14">
> <distortion a="0.003" b="-0.001" c="0">
> <tcaRed a="0" b="0" c="0" d="0">
> <tcaBlue a="0" b="0" c="0" d="0">
>
> <calibration aperture="4">
> <vignetting b="-0.1" c="-0.2 d="0">
> </calibration>
> <calibration aperture="8">
> <vignetting b="-0.1" c="-0.2 d="-0.3">
> </calibration>
> <calibration aperture="22">
> <vignetting b="-0.1" c="-0.2 d="0">
> </calibration>
> </calibration>
> <calibration focallength="22">
> <!-- some more data -->
> </calibration>
>
> </lens>
>
>
> Any feedback appreciated. Please continue discussion on the
> CREATE mailing list.
>
> ciao
> Pablo
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQTo post to this group, send email to
hugin-ptx@...
To unsubscribe from this group, send email to
hugin-ptx-unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/hugin-ptx-~----------~----~----~----~------~----~------~--~---