Stitching difficulties with the ocean

271 views
Skip to first unread message

éric Thoreau

unread,
Aug 28, 2026, 10:14:09 AMAug 28
to PTGui Support
Hello,

I've shot a pano using my DJI Air 3s; 
as a result, I have 137 images.
In PTgui, I'm using papywizard; the *.xml was created with xml-creator (thanks Kilian).
As you can see, my horizon isn't totally flat. I've tried my best but still not perfect.
When adding manual control points (4th screenshot, I'll see it''s kind of difficult to add some on the sea), what do I do next ?
Go back to the project assistance & launch the optimizer ?
Thanks

eric
PTgui_4.jpg
PTgui_5.jpg
PTgui_2.jpg
PTgui_1.jpg
PTgui_3.jpg

John Houghton

unread,
Aug 28, 2026, 12:21:28 PMAug 28
to PTGui Support
Eric,  You can get a level and straight horizon by adding straight line control points of type "Line 1" on the horizon in each image.  (1 control point pair spanning the image).  The optimizer will attempt to get all of the line points in a straight line.  (The Papywizard horizontal spacing may be adequate).  Beware of the control point type selection reverting to the default "Vertical" when switching images.  This behaviour can be inhibited via settings in Tools Options.

John

éric Thoreau

unread,
Aug 31, 2026, 8:13:33 AMAug 31
to PTGui Support
Hello John,

I've added horizontal ctrl points on all horizon images (20 files) but still have this small issue I cannot correct.
Any idea on how to correct this problem ?
ThanksPTgui_CTRL_pts.jpgCapture d’écran 2026-08-31 à 14.12.29.png

Erik Krause

unread,
Aug 31, 2026, 11:56:32 AMAug 31
to pt...@googlegroups.com
Am 31.08.26 um 14:13 schrieb éric Thoreau:

> I've added horizontal ctrl points on all horizon images (20 files) but
> still have this small issue I cannot correct.
> Any idea on how to correct this problem ?

Add another two pairs of control points with the same line number as the
other horizon points near the place where the issue appears, one pair in
each image. If this doesn't help, remove the control points on the
clouds in the respective image pair.

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

John Houghton

unread,
Aug 31, 2026, 1:51:53 PMAug 31
to PTGui Support

John Houghton

unread,
Aug 31, 2026, 2:36:03 PMAug 31
to PTGui Support
On Monday, August 31, 2026 at 1:13:33 PM UTC+1 éric Thoreau wrote:
Hello John,

I've added horizontal ctrl points on all horizon images (20 files) but still have this small issue I cannot correct.
Any idea on how to correct this problem ?

(2nd attempt at a reply):  
Eric, I find it hard to advise when it's not clear exactly what you are doing and images are merely screenshots.  It's difficult to distinguish between what might be layers of land or cloud or sea near the horizon.  Is the position of the actual horizon clearly identifiable in all of the relevant images?  And are you using only horizontal line control points rather than straight line control points or a mixture of the two?  As Erik mentioned, control points on (moving?) clouds should generally be avoided if possible, though those in the far distance near the horizon are probably ok.

John 

John Houghton

unread,
Sep 1, 2026, 1:59:19 AMSep 1
to PTGui Support
On Monday, August 31, 2026 at 7:36:03 PM UTC+1 John Houghton wrote:
And are you using only horizontal line control points rather than straight line control points or a mixture of the two? 

eric,  Another thing to check:  If using only horizontal line control points, have you selected the option at the bottom of the Optimizer's Advanced screen "Hor / Vert control points" to "Include in single pass"?  If this not selected, the horizontal line points will have no effect on the way the images align with each other. 

John

éric Thoreau

unread,
Sep 1, 2026, 9:14:17 AMSep 1
to PTGui Support
360 pano pointe du Grouin
Thanks for your help.
Horizon isn't perfect ;) 

John Houghton

unread,
Sep 1, 2026, 2:10:53 PMSep 1
to PTGui Support
Eric,  Perhaps the dip in the horizon near the sun is due to control points being placed on features that look like the horizon but are not actually the horizon!  However, if you have Photoshop, the fault can be adequately corrected by using Edit->Transform->Warp.  It's worth doing. I think.  My attempt attached.

John

eric-warped.jpg

Mike Cowlishaw

unread,
Sep 3, 2026, 2:06:16 PMSep 3
to PTGui Support
This has been a 'running sore' with PTGui for many, many,  years.   A horizon over sea is (assuming it is clear and not foggy) is about the best example one can find of a straight line in the natural world.  Yet PTGui (presumably the PT underlying code) continues to be  incapable of recognising that straight line.

It's absurd that this has to be done manually (especially given that trying to correct it fails unless one selects precisely the correct pel to place on the line).   Maybe it's time to add some AI if the original code cannot be fixed?

Mike

Erik Krause

unread,
Sep 3, 2026, 6:23:09 PMSep 3
to pt...@googlegroups.com
Am 03.09.2026 um 20:06 schrieb Mike Cowlishaw:

> A horizon over sea is (assuming it is clear and not foggy) is about
> the best example one can find of a straight line in the natural world.

Really? In my experience, the horizon at the sea is rarely a clearly
defined line. Most of the time, it’s a blurry, indistinct transition. In
this example, over large areas, it doesn’t even seem to be the horizon,
but rather a distant coastline. Or are these clouds?

Hannu Lehto

unread,
Sep 4, 2026, 9:43:15 AMSep 4
to pt...@googlegroups.com
I agree. If you place vertical control points (buildings etc), they work
almost every time.
But using horizontal control points work now and then.

I think that Ptgui is not aware of the subject ;-)
So the reason for not working is the horizon that is not clear and
sharp. And sometimes the horizon is not ocean or sea, it can be flat
ground or distant forest.

/hannu

Mike Cowlishaw

unread,
Sep 4, 2026, 10:23:45 AMSep 4
to pt...@googlegroups.com
[Resending .. image was too big.]

Attached is the kind of view I'm used to seeing in Asturias or Cantabria (where the view is usually to the North, so not into the sun).  I have dozens of drone panoramas like this, taken over many years.  The mis-stitch is very distracting.

That one was stitched by PTGui 12.21 (I have not tried restitching with a later version, but I don't think there have been recent changes in this area?).

Mike

--
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/GUaMZsFywYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ptgui/4c96ada4-2d4a-4e00-a18e-152a0ad734eb%40gmx.de.
100_0176-papy-6K-pan.jpg

Kevin Henderson

unread,
Sep 4, 2026, 10:26:24 AMSep 4
to pt...@googlegroups.com
easy fix in photoshop, and call it a day.

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 visit https://groups.google.com/d/msgid/ptgui/CAC%3DyYA%3DYyg50DxsxAz%2B9vuePM8RQBi1j8MoDcf0-UdEP89%3DrQg%40mail.gmail.com.

Erik Krause

unread,
Sep 4, 2026, 10:51:05 AMSep 4
to pt...@googlegroups.com
Am 04.09.26 um 15:42 schrieb Hannu Lehto:

> I agree. If you place vertical control points (buildings etc), they work
> almost every time.
> But using horizontal control points work now and then.

Note, that horizontal control points have two different use cases:
Either to join horizontal lines ("Include in single pass") or to level
the whole panorama ("Level in second pass"). Choosable on Optimizer tab,
advanced interface.

And straight line control points are a different thing. The try to keep
straight lines straight in the output projection. It's important to know
which lines are kept straight in which projection to use them properly.

John Houghton

unread,
Sep 4, 2026, 11:01:08 AMSep 4
to PTGui Support
On Friday, September 4, 2026 at 3:23:45 PM UTC+1 Mike Cowlishaw wrote:
Attached is the kind of view I'm used to seeing in Asturias or Cantabria (where the view is usually to the North, so not into the sun).  I have dozens of drone panoramas like this, taken over many years.  The mis-stitch is very distracting.

That one was stitched by PTGui 12.21 (I have not tried restitching with a later version, but I don't think there have been recent changes in this area?).

Mike,  I would expect to be able to get a straight horizon with straight line control points correctly assigned, but in an automatic stitch you may well have had parallax issues causing local difficulties.  The row of images containing the horizon can normally be stitched perfectly by using normal control points only on the most distant features plus horizontal and straight line control points on the horizon itself.  Horizontal positioning may have to rely on exif data or manual input.  If you can supply the project for your sample panorama I would be happy to investigate.  

John

Hannu Lehto

unread,
Sep 5, 2026, 2:13:48 AMSep 5
to pt...@googlegroups.com
thx, I did'nt know that
(no wonder my horizontal cp's have not always worked ;-) )
/hannu

PTGui Support

unread,
Sep 5, 2026, 6:22:34 AMSep 5
to pt...@googlegroups.com
Hi Mike,

I see no reason why this cannot be solved with horizontal line control
points and 'include in single pass'.

It requires manual work though. If your complaint is merely that PTGui
doesn't do this automatically: yes there's certainly room for improvement.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 9/4/26 16:23, Mike Cowlishaw wrote:
> [Resending .. image was too big.]
>
> Attached is the kind of view I'm used to seeing in Asturias or Cantabria
> (where the view is usually to the North, so not into the sun).  I have
> dozens of drone panoramas like this, taken over many years.  The mis-
> stitch is very distracting.
>
> That one was stitched by PTGui 12.21 (I have not tried restitching with
> a later version, but I don't think there have been recent changes in
> this area?).
>
> Mike
>
> On Thu, Sep 3, 2026 at 11:23 PM 'Erik Krause' via PTGui Support
> <pt...@googlegroups.com <mailto:pt...@googlegroups.com>> wrote:
>
> Am 03.09.2026 um 20:06 schrieb Mike Cowlishaw:
>
> > A horizon over sea is (assuming it is clear and not foggy) is about
> > the best example one can find of a straight line in the natural
> world.
>
> Really? In my experience, the horizon at the sea is rarely a clearly
> defined line. Most of the time, it’s a blurry, indistinct
> transition. In
> this example, over large areas, it doesn’t even seem to be the horizon,
> but rather a distant coastline. Or are these clouds?
>
> --
> Erik Krause
> http://www.erik-krause.de <http://www.erik-krause.de>
>
> --
> 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/GUaMZsFywYc/unsubscribe <https://groups.google.com/d/
> topic/ptgui/GUaMZsFywYc/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> ptgui+un...@googlegroups.com
> <mailto:ptgui%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> ptgui/4c96ada4-2d4a-4e00-a18e-152a0ad734eb%40gmx.de <https://
> groups.google.com/d/msgid/ptgui/4c96ada4-2d4a-4e00-
> a18e-152a0ad734eb%40gmx.de>.
>
> --
> 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/
> CAC%3DyYA%3DYyg50DxsxAz%2B9vuePM8RQBi1j8MoDcf0-
> UdEP89%3DrQg%40mail.gmail.com <https://groups.google.com/d/msgid/ptgui/
> CAC%3DyYA%3DYyg50DxsxAz%2B9vuePM8RQBi1j8MoDcf0-
> UdEP89%3DrQg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Mike Cowlishaw

unread,
Sep 5, 2026, 2:19:34 PMSep 5
to PTGui Support
John, thanks [I think we had a similar conversation some years ago :-)].

As a recap. these panoramas are generated from the spherical collection of images 'captured' by a drone.  The drone is essentially at a fixed point  (remarkably stable in even gusty winds) and the horizon is a long way away.  So parallax issues are unlikely.

I was able to manually assign control points when we went through this before and the results were 'acceptable' but still limited by my (poor) ability to place the mouse cursor consistently on the same part of the sky/sea
boundary.

I'm sure that, as before, you can achieve far better manual results that I can.   But I have a project where I took dozens of images of the limestone cliffs of Asturias.   I covered about 20% of my intent when I realised that the manual post-processing of the stitching was impractical.  It's fine for a one-off of that 'perfect' image, but it doesn't scale to dozens or hundreds of panoramas.

Which is why I would still suggest that the horizon line in the image I posted yesterday is sufficiently well-defined that the software should be able to align the horizon without manual intervention being necessary.

Despite Erik's valid observation that often the horizon line is hard to determine, sailors using sextants have used that line as a baseline for around 300 years.

Mike

John Houghton

unread,
Sep 6, 2026, 3:38:34 AMSep 6
to PTGui Support
On Saturday, September 5, 2026 at 7:19:34 PM UTC+1 Mike Cowlishaw wrote:
The drone is essentially at a fixed point  (remarkably stable in even gusty winds) and the horizon is a long way away.  So parallax issues are unlikely.

The scene may have a good view of the horizon at a considerable distance from the drone, so parallax there is negligible.  However, there may be features elsewhere that are very much closer and so can and do often suffer from major parallax issues.  If PTGui  tries to align all of these areas at the same time, compromises may result in misalignments anywhere, including the horizon.


I was able to manually assign control points when we went through this before and the results were 'acceptable' but still limited by my (poor) ability to place the mouse cursor consistently on the same part of the sky/sea boundary.

Even if you click on wildly different points on the intended feature, you can use the arrow keys to nudge the control point into the exact position required.  You should be able to judge whether the points are exactly on similar positions in the feature. (or as close as possible).  Of course, the actual horizon is often poorly defined and some guesswork may be needed, so perfection isn't always guaranteed!

John

Mike Cowlishaw

unread,
Sep 8, 2026, 11:47:58 AMSep 8
to PTGui Support
Many thanks to all for the useful comments etc.   To summarise:
  • I've been taking spherical panoramas with several different drones for a good many years, now.   Since typically the drone is at least 50m from the closest subject (for legal/flight reasons as well as aesthetic reasons) there is rarely anything near enough to cause any kind of parallax problem.

  • Nowadays even small drones (e.g., the DJI Mini 5 Pro) stitch the spherical panoramas while in flight and moving to the next photo position.   But every so often there's an error, and, in any case, PTGui working with the original 30+ images gives visible improvement in quality as well as in stitching.

  • PTGui's stitching of drone sphericals is superb.   I never have to manually add control points for any sphericals that I create, with the single exception (mentioned by me and  many other users of PTGui over the years) of horizons of sea and sky.

  • I have many (dozens) of sphericals that need such horizons corrected.  That's not going to happen if each one needs manual interventions.   So those images remain unshared.
I'd just like to agree with Joost here:  "there's certainly room for improvement"  :-).

Mike

Erik Krause

unread,
Sep 8, 2026, 12:43:52 PMSep 8
to pt...@googlegroups.com
Am 08.09.26 um 17:47 schrieb Mike Cowlishaw:

> Since typically the drone is at least 50m from
> the closest subject (for legal/flight reasons as well as aesthetic reasons)
> there is rarely anything near enough to cause any kind of parallax problem.

"Near" is a relative measure. In case of parallax the relation between
displacement and distance is relevant. You get the same parallax value
(in pixels) regardless of whether “near” is 50m and the displacement is
50cm, or whether “near” is 5m and the displacement is 5cm.

See https://wiki.panotools.org/Parallax#Calculation for details.

But I suspect that most of the problems with the horizon arise from
control points on waves and/or moving clouds, since these are the only
distinctive features besides the horizon itself.

John Houghton

unread,
Sep 8, 2026, 2:30:02 PMSep 8
to PTGui Support
On Tuesday, September 8, 2026 at 4:47:58 PM UTC+1 Mike Cowlishaw wrote:
  • I have many (dozens) of sphericals that need such horizons corrected.  That's not going to happen if each one needs manual interventions.   So those images remain unshared.
It seems a shame that you cannot spend 5 minutes or so to create a single "Line 1" control point pair on each of the maybe few images containing the horizon, at least for new panoramas.  Think of hanging a bed sheet on a washing line using two pegs  (= one straight line control point pair per sheet/image).  In my test it took less than 30 seconds to accurately place the two pegs required per sheet).

John

Mike Cowlishaw

unread,
Sep 10, 2026, 6:49:42 AMSep 10
to pt...@googlegroups.com
John, when I tried it before I had to iterate several times (I forget whether the discussion was with you or Erik) and it was several hours (over some days) .. and it still wasn't quite right.  I just don't seem to be able to get a mouse to position to much better than 5 pels, and that error is easily visible on-screen.   That's why I got frustrated, abandoned the project, and haven't tried horizontal control points since.

Mike

--
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/GUaMZsFywYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.

Erik Krause

unread,
Sep 10, 2026, 7:14:35 AMSep 10
to pt...@googlegroups.com
Am 10.09.26 um 12:49 schrieb Mike Cowlishaw:

> I just don't seem to be
> able to get a mouse to position to much better than 5 pels,

...but you know that the mouse pointer slows down once you click and
hold the left button, and that you can nudge points in place with the
cursor keys, don't you?

John Houghton

unread,
Sep 10, 2026, 11:53:40 AMSep 10
to PTGui Support
On Thursday, September 10, 2026 at 11:49:42 AM UTC+1 Mike Cowlishaw wrote:
I just don't seem to be able to get a mouse to position to much better than 5 pels

Mike, See the full size PTGui screen image attached.  It shows a control point of type "Line 1" being created on Image 6, which is selected in both windows.  The Line 1 option has been selected at the bottom of the screen.  (Beware! It defaults to Vertical Line when the same image is selected in both windows. If you accidently create the wrong type of control point, right click the point and select the correct type).  Left click roughly on the horizon on the left hand side of the left hand window and then on the right hand side in the right window., The two created points will then be flashing.  Left click on one of the points and use the up/down keys to nudge the point to sit exactly on the horizon, as shown in the greatly enlarged view on the left point.  I had just done this before taking the screenshot.   I then did the same to the right hand point in the right hand window.  In this case I had to press the down arrow key 8 times to accurately shift the right hand point down to match the left hand point position.  So yes, you can readily do a great deal better than 5 pels!

You would do the same assignment of a Line 1 point on each of the other images showing a portion of the horizon.  The optimizer will attempt to get all of these points into a straight line, as they appear in the output panorama image, so the horizon will hopefully appear to be continuous without discontinuities.

If you opt to use horizontal line control points instead, you would create each point addressing two different images rather than the same image.  And you need to optimize with the advanced optimizer option "Include in first pass" selected, to enable the images to be aligned with each other.

I hope that helps.

John
add_straight.jpg

Mike Cowlishaw

unread,
Sep 11, 2026, 12:57:15 PM (13 days ago) Sep 11
to pt...@googlegroups.com
Erik, that's news to me .. you're saying that in PTGui the mouse behaves differently than in every other application?    I would never have guessed that.

But we're drifting of the OP (original poster)'s point, which is that PTGui should be able to stitch horizontal lines as well as it can stitch vertical lines.



--
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/GUaMZsFywYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.

Mike Cowlishaw

unread,
Sep 11, 2026, 12:59:04 PM (13 days ago) Sep 11
to pt...@googlegroups.com
John, I do appreciate the advice .. but the bottom line is that I don't want to spend my life tweaking control points, and in any case the coastline project is over for me. <sigh>

Mike

--
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/GUaMZsFywYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ptgui+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages