How to automatically level/straighten a panorama?

70 views
Skip to first unread message

Alfred Molon

unread,
Apr 19, 2026, 6:30:02 AM (3 days ago) Apr 19
to PTGui Support
When I start a new project and let PTGUI find the control point, I get something like this:
example1.jpg

Then it's a lot of manual effort to get everything straight, level etc. The final result is something like this:
example2.jpg

It would be a great help if PTGUI could automate this step. Could this be implemented?

Erik Krause

unread,
Apr 19, 2026, 1:53:50 PM (2 days ago) Apr 19
to pt...@googlegroups.com
Am 19.04.2026 um 12:30 schrieb Alfred Molon:

> Then it's a lot of manual effort to get everything straight, level etc. The
> final result is something like this:
> [image: example2.jpg]

If your images were shot from a well levelled panoramic tripod head in
one row pitched up or down you can do the following:
On Optimizer tab (advanced interface)
- check "link pitch"
- check Pitch for all images (including the anchor image)
- Press Run Optimizer
- uncheck "link pitch"
- uncheck Pitch for your anchor image
- Press Run Optimizer again.

Then all images will be pitched equally, resulting in a straight and
levelled panorama.

I always expected "Level Panorama" from Pano Editor Edit menu to do
this, but it works differently. Maybe it could be improved. Joost?

For all other panoramas if you have some vertical features or the true
horizon in it see this very good tutorial:
https://www.johnhpanos.com/horizons.htm

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

Alfred Molon

unread,
Apr 19, 2026, 3:19:41 PM (2 days ago) Apr 19
to PTGui Support
Thanks for the reply. The pictures were shot handheld, and this is usually the case. 

Then, I have heard about this horizontal line points technique in the past. But can't PTGUI be made to automatically apply it? 

Because if I have to assign manually additional horizontal line points, this is quite cumbersome and it may well be less effort to manually try to straighten the panorama.

Erik Krause

unread,
Apr 19, 2026, 5:38:05 PM (2 days ago) Apr 19
to pt...@googlegroups.com
Am 19.04.2026 um 21:19 schrieb Alfred Molon:

> Then, I have heard about this horizontal line points technique in the past.

Most of the time it's better to use vertical line control points on
vertical structures, since the horizon itself is rarely visible.

> But can't PTGUI be made to automatically apply it?

Humans are still far better at identifying vertical structures than
machines. And setting two or three pairs of vertical control points –
which is usually sufficient – takes just a few seconds.

Another way to solve this problem would be for a camera to provide
precise three-axis rotation values in the captured image's metadata.
This would allow PTGui to pre-position the images on the spherical
stitching canvas.

PTGui Support

unread,
Apr 19, 2026, 5:55:55 PM (2 days ago) Apr 19
to pt...@googlegroups.com
Hi Alfred,

If you shoot a row of images from a tripod, the automatic leveling in
PTGui should work. But for two hand held images like these, PTGui
doesn't know how to level, it requires a visual understanding of the scene.

But manual leveling should not be much work. Drag the image upwards with
the left mouse button, followed by dragging with the right mouse button
until it's level. Then adjust the field of view, or crop the image.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 4/19/26 12:30, Alfred Molon wrote:
> When I start a new project and let PTGUI find the control point, I get
> something like this:
> example1.jpg
>
> Then it's a lot of manual effort to get everything straight, level etc.
> The final result is something like this:
> example2.jpg
>
> It would be a great help if PTGUI could automate this step. Could this
> be implemented?
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/ptgui/
> f14c1db5-d763-4690-bc6a-a99bd938163dn%40googlegroups.com <https://
> groups.google.com/d/msgid/ptgui/f14c1db5-d763-4690-bc6a-
> a99bd938163dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

John Houghton

unread,
Apr 20, 2026, 3:48:41 AM (yesterday) Apr 20
to PTGui Support
On Sunday, April 19, 2026 at 8:19:41 PM UTC+1 Alfred Molon wrote:
Because if I have to assign manually additional horizontal line points, this is quite cumbersome and it may well be less effort to manually try to straighten the panorama.

Alfred, For this panorama, there are many strong vertical features and so you would use vertical line control points for levelling.  I levelled your panorama with 4 vertical line control points and it took me 1 minute.  Not really a lot of effort.  

Another thing worth mentioning is the ability to superimpose grid lines on the image to assist with manual levelling.  You do this by dragging to the right, the tiny white triangle at the centre of the bottom edge of the Panorama Editor frame.

John

Alfred Molon

unread,
Apr 20, 2026, 2:34:50 PM (yesterday) Apr 20
to PTGui Support
Well, the question is if this perspective straightening could be added to PTGUI, i.e. at a mouse-click the lines get straightened / evened. This would clearly add value to the software.

By the way, the algorithms seem to exist - an Internet search delivers several results.
Reply all
Reply to author
Forward
0 new messages