moustache distortion?

276 views
Skip to first unread message

Steve Z

unread,
Nov 23, 2011, 4:20:27 AM11/23/11
to PTGui Support
I thought I could put a bunch of T1's in to straighten out a moustache
distortion, but no.
How do we do that please? Thanks

Steve Z

unread,
Nov 23, 2011, 4:33:26 AM11/23/11
to PTGui Support
Also in trying this, the output image gets 20-30 % smaller!! Yet all
I did was
the tiniest change. And fuzzier.

PTGui Support

unread,
Nov 23, 2011, 4:35:24 AM11/23/11
to pt...@googlegroups.com
Hi Steve,

Would need to see what you mean. Please post your images:
http://www.ptgui.com/support.html#3_17

Joost

Steve Z

unread,
Nov 23, 2011, 7:13:18 PM11/23/11
to PTGui Support
OK, try this:
http://ge.tt/9fR8SKA?c
6800 was supposed to be the final about which I am
asking the moustache distortion. 6800v4 shows fuzzy
and smaller. 6800PT shows try again today, no
shrinkage, but yes fuzzy.

John Houghton

unread,
Nov 24, 2011, 3:34:12 AM11/24/11
to PTGui Support
Steve, It would help a lot if you could also post your project file.
The image quality will be affected by the choice of interpolator. The
output file size ought to be approximately correct if you select
optimium size maximum. I used the line control points type t3, t4,
t5... on the long edges of the main building, and interpolator
spline36 for this output:

http://www.johnhpanos.com/_D7H6800-jh.jpg

(The PTGui optimizer doesn't support t3,t4,.. points. You need
PTOptimizer from: http://www.ptgui.com/panotools.html ).

John

> > >> How do we do that please?  Thanks- Hide quoted text -
>
> - Show quoted text -

PTGui Support

unread,
Nov 24, 2011, 3:58:24 AM11/24/11
to pt...@googlegroups.com
So it's not actually a panorama, you're attempting to correct a single
image?

As John said for correcting a single image with t1/t2/t3 points you will
need the Panorama Tools optimizer.

Another way to handle this would be to take a real panorama with the
same lens, preferably a single row 360 degree panorama (use a panoramic
head to avoid parallax). When that panorama is finished, copy the
settings from the Lens Settings tab to this project. Any lens distortion
should be magically corrected now.

Joost

Steve Z

unread,
Nov 24, 2011, 1:10:02 PM11/24/11
to PTGui Support
Thank you
It's kept it's sharpness, but you see how the right lines bow in, and
the
center line actually waves left, then right. What is T3, 4, etc?
How
are we supposed to know about that? What actually needs to happen is a
transform. Is that what T3's, 4's do? Do you really want me to supply
a
untouched version?

Erik Krause

unread,
Nov 24, 2011, 3:32:45 PM11/24/11
to pt...@googlegroups.com
Am 24.11.2011 19:10, schrieb Steve Z:
> What is T3, 4, etc?

-> http://wiki.panotools.org/Straight_line_control_points

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

John Houghton

unread,
Nov 24, 2011, 5:15:27 PM11/24/11
to PTGui Support
On Nov 24, 6:10 pm, Steve Z <stevezavo...@gmail.com> wrote:
> What actually needs to happen is a
> transform. Is that what T3's, 4's do? Do you really want me to supply
> a untouched version?

Lens distortion correction is effected via the lens parameters, which
are evaluated as part of the optimization process. The standard PTGui
optimizer uses the t1 and t2 points solely to level the whole
panorama. They take no part in the general optimization and cannot
therefore have any effect on the lens parameters. OTOH, the Panorama
Tools optimizer (PTOptimizer) does take all the t1, t2, t3.... points
into account during the optimization and so they can be used for both
distortion correction and levelling. The points identify features
that should be rendered vertical, horizontal, or straight - as they
appear in the panorama image in the currently selected output
projection.

By all means post an unprocessed camera image with details of the
camera and lens focal length (if not available in exif data) so that a
more accurate correction can be attempted with PTGui. There's no
guarantee that a perfect correction can be achieved, though.

John

Steve Z

unread,
Nov 25, 2011, 1:45:15 AM11/25/11
to PTGui Support
Thanks John,
will this do? Got enough exif data?
http://www.stevezavodny.com/clients/_D7H6800.jpg

Steve Z

unread,
Nov 25, 2011, 1:47:44 AM11/25/11
to PTGui Support
OK i did all that rectilinear 360 with the same lens and mm, got
good panos, entered the lens data base,
applied those numbers to the image in question, and it still looks
much the same, bent left and right, squished top bulging bottom....

John Houghton

unread,
Nov 25, 2011, 3:22:44 AM11/25/11
to PTGui Support
Steve, This is the result I got, with the distortion well corrected:

http://www.johnhpanos.com/_D7H6800-2.jpg

This is not to say that you won't *see* any distortion. The angle of
view is wide, and for the eye to see correct perspectives, your eye
needs to be quite close to the image so that the angle subtended by
the image at the eye matches that seen by the lens (90 degrees). It's
common for the proportions of objects to appear distorted in wide
angle shots.

John

PTGui Support

unread,
Nov 25, 2011, 6:16:48 AM11/25/11
to pt...@googlegroups.com
I think what you mean is not lens distortion, but just the normal
perspective effect. If you take a photo of a building pointing the
camera upwards, the vertical lines will converge. Traditionally
photographers compensated for this by using a (tilt-)shift lens. You can
achieve the same effect in PTGui by dragging the image up or downwards
in the panorama editor.

This is shown in the video tutorial:
http://www.ptgui.com/videotutorials.html

See the second video, at around 6:30

Joost

Steve Z

unread,
Nov 25, 2011, 10:57:21 AM11/25/11
to PTGui Support
well, so far, that's the first image in a couple of years that
I have not been able to fix well enough so i'm puzzled and
disappointed.
I should have used a narrower lens and a vertical pan stitched I'm
guessing, for a better result, but no one knew that was the view to
get at the time. Plus leaning out over a roof edge makes a tough
foundation for pano shooting.

Michel Thoby

unread,
Nov 25, 2011, 8:29:34 AM11/25/11
to pt...@googlegroups.com
Hi Steve,

Le 23 nov. 2011 à 10:20, Steve Z a écrit :

I thought I could put a bunch of T1's in to straighten out a moustache
distortion, but no.

Sorry to jump a little late on this thread. I think John, Erik and then Joost wisely told you all.
Reading the EXIF from your posted image, I am a little puzzled by the title of your original post and I am curious to know what makes you write that the Nikkor AF-S 14-24 mm f/2.8 lens is affected by **mustache** distortion? Many reviews concerning this lens can be read and I could not find one that confirms such a moustache-like shape for this Nikon made lens. They all tell about simple "barrel" distortion and viewing their test results, I would join them on this. You may find a dozen of review links (or related references) on the following table of mine:
In contrast, the otherwise astounding Samyang 14mm f/2.8 is IMO the most affected by mustache distortion of all...

BTW mustache distortion is a big challenge for stitching applications. But AFAIK none of the original PanoTools or the descendant programs (PTAssembler, PTMac, PTGui, Hugin, etc.) have ever been really challenged by this kind of complex distortion. To get a similar result, other program editors (e.g. Realviz with Sticher) had to improve their lens distortion model and their lens distortion correction algorithm as well.  Kolor is also currently so evolving (with AutoPano Pro/Giga) to allow the user to properly stitch images shot with "standard rectilinear" affected with "hefty" moustache distortion such as the Samayang 14 mm. 
There are two different and "opposite types" of polynomial lens distortion models that can be adopted by the stitching program developers. But whatever is the type and as long as a sufficient number of correction coefficients is included in the model, then any type of distortion of real world commercial lens can be quite accurately corrected. Of course the settings have to be properly selected and for instance the PTGui user should activate all of the three correction coefficients (a, b, c) when needed.

Michel

John Houghton

unread,
Nov 25, 2011, 11:07:04 AM11/25/11
to PTGui Support
On Nov 25, 3:57 pm, Steve Z <stevezavo...@gmail.com> wrote:
> I should have used a narrower lens and a vertical pan stitched I'm
> guessing, for a better result,

A different lens would make absolutely no difference, whether stitched
or not. Only by moving further away will you improve matters by
reducing the angle of view of the scene.

John

Steve Z

unread,
Nov 25, 2011, 4:26:18 PM11/25/11
to PTGui Support
hmm, makes me wonder, cuz i got a 35mm PC that is more rectilinear
than
the 14-24. I feel like an assembly from the 35 would knock out that
bow or that bulge. With just one parameter left to mend, transform
tools should make an adequate fix. What say you?

Steve Z

unread,
Nov 25, 2011, 5:02:47 PM11/25/11
to PTGui Support
So this would actually be a transforming operation?
Would it work on the picture I'm writing about in
this thread?

John Houghton

unread,
Nov 25, 2011, 5:57:04 PM11/25/11
to PTGui Support
On Nov 25, 9:26 pm, Steve Z <stevezavo...@gmail.com> wrote:
> hmm, makes me wonder, cuz i got a 35mm PC that is more rectilinear
> than
> the 14-24. I feel like an assembly from the 35 would knock out that
> bow or that bulge.  With just one parameter left to mend, transform
> tools should make an adequate fix. What say you?

I'm not sure that I understand. Are you saying that there is a bow or
bulge remaining in the last image I posted that needs fixing? If so -
where exactly?

John

Steve Z

unread,
Nov 25, 2011, 11:31:30 PM11/25/11
to PTGui Support
Wow, my bad, it must be an illusion. Guides show me it is correct.
What was your technique may I ask?

John Houghton

unread,
Nov 26, 2011, 2:25:56 AM11/26/11
to PTGui Support
On Nov 26, 4:31 am, Steve Z <stevezavo...@gmail.com> wrote:
> Wow, my bad, it must be an illusion.  Guides show me it is correct.
> What was your technique may I ask?

I just added a few vertical line (t1) points and straight line (t3 -
t6) points along the long edges of the building and optimized lens
parameters a,b,c together with pitch and roll using the PTOptimizer
from the PTGui web site. I've uploaded the project file so you can
see how the points are placed:

http://www.johnhpanos.com/_D7H6800-2.zip

John

Steve Z

unread,
Nov 26, 2011, 11:38:23 PM11/26/11
to PTGui Support
OK I see that. So how are we supposed to know all those
sub actions like no FOV, yes a yes b yes c, no yaw
yes pitch yes roll, yes PToptimizer. If that is a
standard formula, shouldn't that be in faq, etc?
Thanks !

John Houghton

unread,
Nov 27, 2011, 3:37:29 AM11/27/11
to PTGui Support
On Nov 27, 4:38 am, Steve Z <stevezavo...@gmail.com> wrote:
> OK I see that. So how are we supposed to know all those
> sub actions like no FOV, yes a yes b yes c, no yaw
> yes pitch yes roll, yes PToptimizer. If that is a
> standard formula, shouldn't that be in faq, etc?

A solution to your problem is already provided in in the FAQ:

5.16 How can I correct a single image for lens distortion
5.19 How do I level/straighten a panorama using horizontal/vertical
control points

PTGui is primarily used for stitching multiple images together. With
experience, an understanding of what the various elements of the
stitching process do will gradually develop (hopefully). In advanced
mode, PTGui is capable of doing many unusual things, but at heart, it
is essentially a simple, elegant image processing system. Processing
a single image is little different to stitching several images, but
very few stitchers allow you to do this. There are many tutorials
available, and understanding the optimizer will help a lot. See:

http://wiki.panotools.org/Optimization (brief guide)
http://www.johnhpanos.com/optitute.htm (longer guide)

John

Erik Krause

unread,
Nov 27, 2011, 7:53:54 AM11/27/11
to pt...@googlegroups.com
Am 25.11.2011 23:02, schrieb Steve Z:
> So this would actually be a transforming operation?

Yes. Any panorama stitching implies warping of images aka
transformation. PTGui lets you control any step very detailed.

> Would it work on the picture I'm writing about in
> this thread?

Straight Line control points are those t3, t4 etc. control points John
used to perfectly correct your image...

Steve Z

unread,
Nov 25, 2011, 4:17:49 PM11/25/11
to PTGui Support
I used mustache distortion loosely in this case for simplicity of
title. I understand
the distortion seen in this picture is not exactly that. However, it
does seem to distort
in 2 ways, it's bowed left and bulged bottom, a first for me with this
lens. The 14-24
is a truly a very good lens and I've not been confounded by
circumstance yet with it.
But it's my job not to be confounded by circumstance ever, and
suddenly, this picture
is quite distorted in spite of all the available tools that utilize
exif data & correction
coefficients, etc. I might also add that at times I've played fast and
loose with wide angle
scenes and usually manage a successful picture. Fast & loose means
hand-held, or cramming
more than 120 degrees into a rectilinear, and so forth. It's not my
preferred approach and
I'm not lazy, but things happen sometimes & I try stuff to solve a
problem. Anyway, I need
to anticipate such problems and have a solution.

Steve Z

unread,
Nov 25, 2011, 5:14:35 PM11/25/11
to PTGui Support
I understand we are not seeing a classic example of mustache
distortion, but I used the
term for simplicity of title. But there seems to be 2 distortions
occurring that makes
this a tough fix. And yes the 14-24 is a great lens. That's why
suddenly getting
a complicated distortion is a problem and I need to avoid or fix
problems.

On Nov 25, 6:29 am, Michel Thoby <thobymic...@wanadoo.fr> wrote:

PTGui Support

unread,
Nov 29, 2011, 5:11:47 AM11/29/11
to pt...@googlegroups.com
Steve's messages were posted 4 days ago already but they ended up in the
spam filter. Sorry for the delay.

Joost

On 25-11-2011 23:14, Steve Z wrote:
> I understand we are not seeing a classic example of mustache
> distortion, but I used the
> term for simplicity of title. But there seems to be 2 distortions
> occurring that makes
> this a tough fix. And yes the 14-24 is a great lens. That's why
> suddenly getting
> a complicated distortion is a problem and I need to avoid or fix
> problems.
>
> On Nov 25, 6:29 am, Michel Thoby<thobymic...@wanadoo.fr> wrote:
>> Hi Steve,
>>

>> Le 23 nov. 2011 � 10:20, Steve Z a �crit :

Reply all
Reply to author
Forward
0 new messages