Ordering of geometry transformation and anti-destortion

51 views
Skip to first unread message

Torsten Bronger

unread,
Nov 28, 2013, 10:00:25 AM11/28/13
to hugi...@googlegroups.com
Hall�chen!

I own a nearly-stereographic fisheye (Samyang 8mm). I calculated
its distortion parameters a, b, c with Hugin. If I map the photos
to rectilinear, everything is fine.

Now I did some experiments by generating photos of a checkerboard
with a computer program, taken with a stereographic lens with the
above a, b, c distortion parameters. To my suprise, they are
properly corrected in Hugin only if I apply distortion *before* I
switch to the stereographic projection.

This means that the anti-distortion polynomial does not apply to the
original sensor image but the remapped one.

This also means that if I want to have a *perfect* stereographic
picture, Hugin needs to map to rectilinear, apply a, b, c, and map
back to stereographic. This would be rather wasteful.

Can anybody confirm or dispute this?

Thank you!

Bye,
Torsten.

--
Torsten Bronger Jabber ID: torsten...@jabber.rwth-aachen.de
or http://bronger-jmp.appspot.com

Erik Krause

unread,
Nov 28, 2013, 6:08:35 PM11/28/13
to hugi...@googlegroups.com
Am 28.11.2013 16:00, schrieb Torsten Bronger:

> This means that the anti-distortion polynomial does not apply to the
> original sensor image but the remapped one.

Yes. The polynomial describes the deviation from the ideal fisheye (or
in this case: stereographic) mapping. See
wiki.panotools.org/Lens_correction_model#Lens_distortion_and_fisheyes

> This also means that if I want to have a*perfect* stereographic
> picture, Hugin needs to map to rectilinear, apply a, b, c, and map
> back to stereographic. This would be rather wasteful.

All remappings in panotools based programs are done in one step. The
different remapping functions (lens correction, shift, shear, lens
remapping, output remapping etc.) are put on a stack which is executed
for any destination pixel and calculates the place of the respective
source pixel. No intermediate images are created. See
http://wiki.panotools.org/Panotools_internals#Remapping

--
Erik Krause
http://www.erik-krause.de

Torsten Bronger

unread,
Nov 29, 2013, 2:50:29 AM11/29/13
to hugi...@googlegroups.com
Hall�chen!

Erik Krause writes:

> Am 28.11.2013 16:00, schrieb Torsten Bronger:
>
>> This means that the anti-distortion polynomial does not apply to the
>> original sensor image but the remapped one.
>
> Yes. The polynomial describes the deviation from the ideal fisheye
> (or in this case: stereographic) mapping. See
> wiki.panotools.org/Lens_correction_model#Lens_distortion_and_fisheyes

Thank you, and I indeed could finally reproduced this. Thus, my
above statement is wrong: The polynomial applies to the original
(i.e. fisheye) sensor image, and going from imperfect fisheye to
perfect fisheye needs only the polynomial and no intermediate
rectilinear representation.

Tsch�,

Erik Krause

unread,
Nov 29, 2013, 4:21:56 PM11/29/13
to hugi...@googlegroups.com
Am 29.11.2013 08:50, schrieb Torsten Bronger:
> The polynomial applies to the original
> (i.e. fisheye) sensor image, and going from imperfect fisheye to
> perfect fisheye needs only the polynomial and no intermediate
> rectilinear representation.

Yes, indeed, that would be impossible (I mistook you one or the other
way). Rectilinear can't represent 180� or above, hence there would be no
way back to a 180� fisheye image.
Reply all
Reply to author
Forward
0 new messages