How to align horizon line on open water and clear skies?

314 views
Skip to first unread message

Victor Lin

unread,
Dec 17, 2022, 11:35:52 AM12/17/22
to PTGui Support
This is a tough one, but a common issue.

Portions of my panoramas will often have a horizon time with 1) featureless (and changing) water below it and 2) featureless (or changing) sky / moving clouds above it.

In this case is there a way to tell PTGUI to just make sure the line itself is connected? There really aren't any discrete control points that I can make above or below the horizon line.
Screenshot 2022-12-17 193142.jpg

John Houghton

unread,
Dec 17, 2022, 12:00:23 PM12/17/22
to PTGui Support
Victor, you can use straight line control points to align the horizon.  Assign the points along the straight line feature (the horizon here) in much the same way as hor/vert points:  First select control point type as "New line".  Subsequent points created will be of type Line 1.  Sprinkle them along the horizon in each image where the horizon appears.  The optimizer will try to get all the points aligned in a straight line (as it appears in the output panorama image). NB. before you run the optimizer, you MUST select the option to include hor/vert points in a single pass at the bottom of the Advanced screen of the Optimizer tab.  You may want to supplement the line points with a pair of horizontal line control points to get the horizon horizontal as well as flat.  If you want to straighten more than one line feature,  reselect New Line  to get points of type Line 2, Line 3 etc.

John

Mike Cowlishaw

unread,
Dec 18, 2022, 11:13:23 AM12/18/22
to PTGui Support
This does seem to be a recurring problem.  Given that the horizon line is 'clear to see' why is it that PTGui ignores it?   And DJI drones with far less processing power seem to be able to make the stitch nicely in real time (2-3 seconds) and within the drone?

This really seems to be a case where control points should be automatic and not need human twiddling :-).

Mike

PTGui Support

unread,
Dec 18, 2022, 12:13:32 PM12/18/22
to pt...@googlegroups.com
Hi Mike,

PTGui is looking for control points. With those seascapes there's no
point to be found, there's only a line. It would require modifying PTGui
to look for lines instead of points, which is not trivial.

I'll add this to the wish list.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/ptgui/b0663237-3421-4f7f-836c-e48a662ea6d2n%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/b0663237-3421-4f7f-836c-e48a662ea6d2n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mike Cowlishaw

unread,
Dec 18, 2022, 1:04:36 PM12/18/22
to pt...@googlegroups.com
OK :-)    

In truth, looking for lines might have all sorts of benefits -- it's what our brains do, after all.  :-)

You received this message because you are subscribed to a topic in the Google Groups "PTGui Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ptgui/HPcy8nvu1Lc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/16fafbca-9c30-87ce-7f03-167c12dbcc5e%40ptgui.com.

geo cloete

unread,
Dec 28, 2022, 3:35:47 AM12/28/22
to PTGui Support
I second this and am glad to see that it's now been added to a wish list and can only hope that it will enjoy high priority. As a person who mainly shoots seascape panoramas, the inability of PTGui to render the horizon without flaws has seen me canning many to-be-completed panoramas and seize using the program.

John Houghton

unread,
Dec 28, 2022, 4:09:38 AM12/28/22
to PTGui Support
On Wednesday, December 28, 2022 at 8:35:47 AM UTC geo cloete wrote:
....  the inability of PTGui to render the horizon without flaws

Geo, As already pointed out, PTGui is well able to align a clear horizon perfectly, though not automatically.  Creating straight line control points manually is usually easy and not particularly arduous.  There's certainly no reason to abandon a project simply because there are no control points automatically assigned on the line of the horizon.  Additionally, reasonably accurate horizontal positioning of images is normally possible in a variety of ways depending on how the shots were taken - e.g. from metadata or the planned yaw and pitch values for rows and columns.  All images in a row will share the same pitch values and all images in a column will share the same yaw values.

John

geo cloete

unread,
Dec 28, 2022, 4:43:32 AM12/28/22
to PTGui Support
John, I have tried on more than one project to use the straight-line control points and it failed me. 

Erik Krause

unread,
Dec 28, 2022, 5:12:11 AM12/28/22
to pt...@googlegroups.com
Am 28.12.22 um 10:43 schrieb geo cloete:

> John, I have tried on more than one project to use the straight-line
> control points and it failed me.

Usually it should work. Please make one of these projects available for
download, so we can have a try. Half size jpegs in a ZIP will be fine.
Use wetransfer, dropbox or similar.

--
Erik Krause

John Houghton

unread,
Dec 28, 2022, 5:13:42 AM12/28/22
to PTGui Support
On Wednesday, December 28, 2022 at 9:43:32 AM UTC geo cloete wrote:
John, I have tried on more than one project to use the straight-line control points and it failed me. 

Then you are doing something wrong.  It always works if done properly!  The most common reasons why it doesn't work are:

1.  You didn't select the option to include hor/vert points in 1st pass of the optimizer on the Advanced page of the Optimizer .

2.  All the added points are not actually of type "Line 1" (for a single line).  The "cp  type to add" setting may change back to the default when switching between different pair of images.  So some points may be inadvertently not "Line 1".  Check all the added points at the end of the Control Points Table are the correct type.  You can control this behaviour on Tools->Options->Control Point Editor.

If neither explanation applies in your case, I would be happy to investigate if you provide copies of the images and project file.

John

geo cloete

unread,
Dec 29, 2022, 1:27:28 AM12/29/22
to PTGui Support
I am currently out of town John, but will check the projects upon my return and get back to you.

geo cloete

unread,
Jan 9, 2023, 11:41:13 AM1/9/23
to PTGui Support
Hi John, can you forward me your e-mail address please so that I can send you the files.

Thanks
Geo

John Houghton

unread,
Jan 9, 2023, 3:46:52 PM1/9/23
to PTGui Support
Email address forwarded to your gmail address as requested.

Michael Learmonth

unread,
Jan 11, 2023, 8:55:19 PM1/11/23
to PTGui Support
If I put in a horizontal line, like the horizon at sea, shouldn't PTGUI position that horizontal line along the center of the panorama?

Isn't the only straight horizontal line through the center (unlike the vertical lines that can all be straight)?

Mike

HDouris

unread,
Jan 11, 2023, 11:27:18 PM1/11/23
to pt...@googlegroups.com
Michael,


In som case you can have other horizontal lines, like under this dome :

rv



--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/63411da8-ebc6-4ca7-ade1-e51d8795c3fen%40googlegroups.com.

PTGui Support

unread,
Jan 12, 2023, 3:06:27 AM1/12/23
to pt...@googlegroups.com
In an equirectangular projection, the horizon line is only horizontal
line that is straight in the panoramic projection and also straight in
the real world.

You can have other horizontal straight lines in the equirectangular
projection, above or below the horizon, but these will be curved
(actually circular) in the real world.

Also, viewpoint correction can affect this. If your images were not
taken from the same viewpoint, and you are correcting this with
viewpoint correction, the scene's horizon may end up above or below the
center.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> --
> 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 on the web visit
> https://groups.google.com/d/msgid/ptgui/63411da8-ebc6-4ca7-ade1-e51d8795c3fen%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/63411da8-ebc6-4ca7-ade1-e51d8795c3fen%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mike Cowlishaw

unread,
Jan 12, 2023, 4:30:08 AM1/12/23
to pt...@googlegroups.com
" You can have other horizontal straight lines in the equirectangular
projection, above or below the horizon, but these will be curved
(actually circular) in the real world."

To visualise these, turn on the Grid overlay in PanGazer.  This adds a grid showing the horizon and the points at 15° intervals above and below, and similar vertical 15° intervals (aligned with North, if North is known/set).   Screenshot attached.

You received this message because you are subscribed to a topic in the Google Groups "PTGui Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ptgui/HPcy8nvu1Lc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/b0a0b3ef-78cf-88e6-5f1a-8add9212ba8a%40ptgui.com.
pic633.jpg

John Houghton

unread,
Jan 12, 2023, 4:40:46 AM1/12/23
to PTGui Support
On Thursday, January 12, 2023 at 8:06:27 AM UTC PTGui Support wrote:
Also, viewpoint correction can affect this. If your images were not
taken from the same viewpoint, and you are correcting this with
viewpoint correction, the scene's horizon may end up above or below the
center.

The position of the horizon also depends on the altitude of the viewpoint.  A panorama shot from the top of Everest would have the horizon roughly 6 degrees below the centre line.

horizon.jpg

John 

PTGui Support

unread,
Jan 12, 2023, 6:27:29 AM1/12/23
to pt...@googlegroups.com
But I think you cannot see sea level from the Everest :-)

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> horizon.jpg
>
> John
>
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/ptgui/a6ce2928-925a-41fe-9370-4c84ead93811n%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/a6ce2928-925a-41fe-9370-4c84ead93811n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Erik Krause

unread,
Jan 12, 2023, 8:30:09 AM1/12/23
to pt...@googlegroups.com
Am 12.01.23 um 12:27 schrieb 'PTGui Support' via PTGui Support:

> But I think you cannot see sea level from the Everest :-)

No, you can't:
https://www.quora.com/Is-there-a-total-view-of-Mount-Everest-from-sea-level-to-the-summit

But there's a funny video by Matt Parker, where he tries to calculate
the earth's radius by measuring how far down the horizon is seen from
the London Shard: https://www.youtube.com/watch?v=ckcdqlo3pYc

--
Erik Krause

John Houghton

unread,
Jan 12, 2023, 1:50:27 PM1/12/23
to PTGui Support
On Thursday, January 12, 2023 at 1:30:09 PM UTC Erik Krause wrote:
But there's a funny video by Matt Parker, where he tries to calculate
the earth's radius by measuring how far down the horizon is seen from
the London Shard: https://www.youtube.com/watch?v=ckcdqlo3pYc

I hadn't seen that amusing video before but the diagram they used for their calculations was virtually identical to the one I drew, including the mountain!  More importantly, I realised I made a stupid mistake in my calculations, since I accidentally used the value of the diameter of the earth as the radius.  Correcting that gives a figure of 3 degrees down for the angle of the horizon (if it can be seen).  So it should be negligible for most purposes including tops of buildings and flying drones.

John

Reply all
Reply to author
Forward
0 new messages