Align to Grid undeterministic [using 13.3]

209 views
Skip to first unread message

Mike Cowlishaw

unread,
Sep 11, 2025, 10:33:53 AM (12 days ago) Sep 11
to PTGui Support
A problem reported earlier .. in which a panorama ends up with a significant slant .. seems to have got worse.  I took a number of panoramas a couple of days ago, and when I came to stitch them with PTGui yesterday I got strange results:
  • The first panorama, using Align to grid, 2x5, and Apply, came out just fine.  The verticals are vertical and known level points on the curtain wall are level.
  • The second (New project, identical images apart from exposure settings) again Align to Grid 2x5 and Apply resulted in a panorama with a 10° tilt.
  • Ditto the third.
Today I uninstalled PTGui, reinstalled, set Project settings to Defaults, and tried again:
  • The first panorama, using Align to grid, 2x5, and Apply, came out just fine, as before.
  • I then tried New Project with the *same* images, again  Align to Grid 2x5 and Apply.  This came up with a badly aligned image with the invitation to align images again, which I tried.
  • The new result was better .. but with the 10° tilt again.
I've attached three screen shots (923: after Apply align to grid, 924: after first Align Images, 925: after second Align Images) for the last attempt just described.  

Any ideas what' going on?  I would expect reprocessing of the same set of images as a New Project to give identical results.

Mike

pic923.jpgpic924.jpgpic925.jpg

John Houghton

unread,
Sep 11, 2025, 2:26:06 PM (12 days ago) Sep 11
to PTGui Support
Mike,  It's hard to diagnose what's going on just by looking at the output stitched images.  Much depends on what Align to Grid settings are being used, the processing specified in the Project Settings tab, and the individual camera images themselves.  And one thing that you should know is that the control points generator won't necessarily generate exactly the same set of points if you repeat the generation.  Copies of the project files together with the input images would be very helpful if that can be arranged.

John

Mike Cowlishaw

unread,
Sep 12, 2025, 9:51:34 AM (11 days ago) Sep 12
to PTGui Support
Of course;  apologies for not thinking to do that yesterday.  

You can find them at:  https://speleotrove.com/misc/Kenilworth-Castle-20250909-PanA.zip

There are two .pts files there; one is from the earlier attempt and the other from yesterday, but the settings should be the same for both of them.

This looks to be the same problem that I reported back in July (https://groups.google.com/g/ptgui/c/OieMA_beybU/m/IswwuOh5DAAJ).  I don't think I saw the problem earlier than that.

Mike

John Houghton

unread,
Sep 12, 2025, 2:05:07 PM (11 days ago) Sep 12
to PTGui Support
Mike, Thanks for making the images available.  There are two main issues with your processing:

You have chosen to have image 1 as the anchor. This is a bad choice because it is mostly sky.  In my tests, the control point generator created only 1 point or 0 points.  One  point isn't sufficient to align its neighbours in the correct orientation.  They are free to rotate about the control point.   As I mentioned previously, the control point generator doesn't necessarily create identical control points in repeat runs, so variable results are to be expected.

Another issue is the choice of the Align Images options "Fit" and  "Straighten".  In Align Images, Fit does a "centre panorama" operation.  With your images, this results in the horizon being in the wrong place, i.e. it's not level.  Straighten might work, but often doesn't.  Here, it's operation might well have been affected by a false orientation of image 1 as the anchor.

Lastly, I don't know what values you input when you run Align to Grid.  Do you arrange to correctly position the images more-or-less as shot, or do you accept defaults (centering both horizontally and vertically)?

John

John Houghton

unread,
Sep 13, 2025, 6:19:18 AM (11 days ago) Sep 13
to PTGui Support
Mike,   Here's my result (project file attached).  The panorama Editor window shows the horizon correctly positioned (I think).  Align Images was not used.

PanEd.jpg

John

Mike Cowlishaw

unread,
Sep 13, 2025, 11:02:39 AM (10 days ago) Sep 13
to PTGui Support
Hi John,  apart form setting the rows and columns (2 x 5 in this case), I made no changes in the Align to Grid dialog.   

I have not 'chosen to have image 1 as the anchor'.  That does not seem to be an option in that dialog (previously you mentioned this and I did experiment although it seemed to me that Image 1 was the default?).

Similarly  'the choice of the Align Images options "Fit" and  "Straighten"''.  Again this was not my choice, in fact I carefully clicked on 'Reset to defaults' in case I had chosen the wrong settings.  Indeed, back in July you suggested turning off Straighten .. and that worked and I added it to my checklist.  However, I tried this earlier this week and it no longer made a difference.

On the orientation of Image 1 as the anchor, all the images are almost perfectly level (the camera is mounted on a DJI RS4 Mini Gimbal).

Attached is screen shot of Align to Grid dialog  just before I click Apply.

Today .. no changes to any settings from yesterday .. repeating the process as a New Project ended up with a good stitch.    But then choosing a second set of 2x5 images gave the bad roll .. and then coming back to the first set also bad roll.   I changed nothing in any dialog at any time and clicked Apply in Align to Grid each time.

What's frustrating is that prior to July I stitched dozens of panoramas like this (testing different combinations of cameras and lenses, etc.) and never saw the added roll effect.  Now it happens almost every time after the first.  In short:  I can no longer stitch even small panoramas reliably; I dare not even think of stitching 6x18 and the like.

Mike

pic926.jpg

Mike Cowlishaw

unread,
Sep 13, 2025, 11:02:47 AM (10 days ago) Sep 13
to PTGui Support

Yes, that's pretty much what I get on the first run after starting PTGui (though mine I have to crop manually).  Did you try New Project then repeating with the same images?

John Houghton

unread,
Sep 13, 2025, 12:16:54 PM (10 days ago) Sep 13
to PTGui Support
On Saturday, September 13, 2025 at 4:02:39 PM UTC+1 Mike Cowlishaw wrote:
I have not 'chosen to have image 1 as the anchor'.  That does not seem to be an option in that dialog (previously you mentioned this and I did experiment although it seemed to me that Image 1 was the default?).

If you check the Optimiser tab, you will see this (in simple mode):

anchor.jpg

In the Advanced mode of the Optimizer, you will see this:

anchorA.jpg

These tables indicate which parameters the Optimizer is allowed to vary, in its efforts to align your images.  As the entries for image 1 (yaw, pitch and roll) are all blank,  the Optimizer will not change the values of these parameters, which define the position of image 1 in PTGui's internal stitching area, which is a complete 360x180 spherical surface.  Since it cannot change the position of Image 1, it effectively acts as a fixed anchor, around which the other images must align.
 

Similarly  'the choice of the Align Images options "Fit" and  "Straighten"''.  Again this was not my choice, in fact I carefully clicked on 'Reset to defaults' in case I had chosen the wrong settings.  Indeed, back in July you suggested turning off Straighten .. and that worked and I added it to my checklist.  However, I tried this earlier this week and it no longer made a difference.

You are in charge!  The settings in the Project settings tab are under your control.  Defaults are set, but you can and should review them and choose alternative settings according to what you want to happen.  You can uncheck the options to Fit and Straighten if that is appropriate.
 

On the orientation of Image 1 as the anchor, all the images are almost perfectly level (the camera is mounted on a DJI RS4 Mini Gimbal).

It depends what you mean by "the images are almost perfectly level ".  Images are shot with the camera at different angles of pitch and roll for the two rows.  The camera is not considered "level" for all shots.  What is hopefully level, is the panorama head, i.e. the vertical axis of rotation should be perfectly vertical.


 
Attached is screen shot of Align to Grid dialog  just before I click Apply.

Align to Grid sets the individual positions of all the images on the stitching sphere as the starting point from which the Optimizer begins shifting images around in order to align them with each other.  It saves the optimizer the bother of working the layout out from scratch for itself.  It appreciates a helping hand!

 John

Erik Krause

unread,
Sep 13, 2025, 2:22:47 PM (10 days ago) Sep 13
to pt...@googlegroups.com
Am 13.09.2025 um 18:16 schrieb John Houghton:

> It depends what you mean by "the images are almost perfectly level ".
> Images are shot with the camera at different angles of pitch and roll for
> the two rows. The camera is not considered "level" for all shots. What is
> hopefully level, is the panorama head, i.e. the vertical axis of rotation
> should be perfectly vertical.

John, could it be, the setting "Center vertically" in Align to Grid
changes the pitch of all images such, that the horizon is assumed in the
vertical middle of the panorama? In this case, pitch of all images,
including the anchor image, would be changed, resulting in a bent panorama.

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

Mike Cowlishaw

unread,
Sep 13, 2025, 2:29:41 PM (10 days ago) Sep 13
to pt...@googlegroups.com
John, many thanks, as always.

First, I have never touched the 'Optimiser tab'  (unless possibly during the July discussion).

On the Project settings .. I never needed to change those before.  I always assumed the defaults were the best, and they were always fine in the past.

On "t depends what you mean by "the images are almost perfectly level ".  Images are shot with the camera at different angles of pitch and roll for the two rows.  The camera is not considered "level" for all shots.  What is hopefully level, is the panorama head, i.e. the vertical axis of rotation should be perfectly vertical".

I have to disagree on this.  The images are shot with different yaw (for each image in a row) and a different tilt (for each row).  But the roll is the same .. ideally zero .. for all the images.  We may be just using different terms, here.  But roll, to me, is a rotation about the forward axis of the lens [i.e., the same as for a pilot in an aircraft].   And by 'level' in the previous sentence I meant 'it has no roll (but it might be tilted up or down].  Hopefully that clarifies!

Your final sentence is exactly what I understood, and what has worked perfectly well for me for many months or years and dozens of panoramas.   It is now 'broken' and I would really like to understand why and/or how I can regain the 'dependable-PTGui-stitching' again!

As I said, I cannot reliably stitch simple panoramas any more!   [360° spherical drone panoramas are fine].   

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/iuP-ACtuSqI/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/c69a0cf8-7611-46ae-b10c-4d22452197b0n%40googlegroups.com.

Erik Krause

unread,
Sep 13, 2025, 2:44:07 PM (10 days ago) Sep 13
to pt...@googlegroups.com
Am 13.09.2025 um 20:22 schrieb 'Erik Krause' via PTGui Support:
> the setting "Center vertically" in Align to Grid
> changes the pitch of all images such, that the horizon is assumed in the
> vertical middle of the panorama

I just tried, this is exactly the case. After "Align to Grid" the images
are aligned with the horizon line in the middle. A subsequent Align
Images creates exactly the result Mike showed.

Mike: PTGui can not know, that you shot the images mostly tilted up. It
tries to put the horizon in the middle by default. You need to tell how
you shot the images, either by specifying the pitch angle in "Align to
Grid -> Vertical axis" or by the use of vertical line control points on
vertical features. If the horizon was visible in the image (and only
then), you also could set horizontal control points on the horizon
instead. Or you drag the image in Panorama Editor.

John Houghton

unread,
Sep 13, 2025, 4:01:15 PM (10 days ago) Sep 13
to PTGui Support
On Saturday, September 13, 2025 at 7:29:41 PM UTC+1 Mike Cowlishaw wrote:
First, I have never touched the 'Optimiser tab'  (unless possibly during the July discussion).
  
Understanding the Optimizer is key to getting the very best results.  20 years ago, I wrote a tutorial describing the basics of the Panorama Tools optimizer.  You might read through it at PANORAMA TOOLS - USING THE OPTIMIZER .  Make allowances for the changed appearance of the screens, but the general gist is there.


On the Project settings .. I never needed to change those before.  I always assumed the defaults were the best, and they were always fine in the past.

Fully automatic stitching using the defaults usually gives very good results but not always, for a variety of reasons.  Opening up the engine compartment (The Optimizer) and tinkering with the controls then enables problems to be overcome.  Experience tells!  Erik and myself have been users of PTGui for around 25 years or more, so we do know our way around, but we still come across situations that we don't understand or have difficulty dealing with.  There was no Align Images function in the early releases.  It's first appearance was in V6 (in 2006).

On "t depends what you mean by "the images are almost perfectly level ".  Images are shot with the camera at different angles of pitch and roll for the two rows.  The camera is not considered "level" for all shots.  What is hopefully level, is the panorama head, i.e. the vertical axis of rotation should be perfectly vertical".

I have to disagree on this.  The images are shot with different yaw (for each image in a row) and a different tilt (for each row).  But the roll is the same .. ideally zero .. for all the images.  We may be just using different terms, here.  But roll, to me, is a rotation about the forward axis of the lens [i.e., the same as for a pilot in an aircraft].   And by 'level' in the previous sentence I meant 'it has no roll (but it might be tilted up or down].  Hopefully that clarifies!

That does clarify.  PTGui's understanding of roll is the same as you describe.  However, in the project file I supplied, inspection of the roll parameter values suggests that they are in fact slightly different for the two rows!  For the top row it's -0.2 degrees, and +0.5 degrees for the bottom row.  The Optimizer enables all of the roll parameters to be linked together so that the roll can be optimized for all images as a group, keeping the same value for all images.  When I try that, the optimization figures are poor.  So no, roll is not the same for all images, apparently.  It's not what I expected.

The process I adopted for the project file I supplied was to first add only the bottom row of images.  I created control points and ran the Optimizer with roll linked for all images (to level the panorama with respect to the orientation of the vertical axis of rotation of the head).  I made the central image the anchor and then added the upper row of images and aligned those to the lower row with further control point creation.  I centred the result horizontally in the Panorama Editor window.  The result appeared to be excellent.

John

Mike Cowlishaw

unread,
Sep 15, 2025, 8:50:48 AM (8 days ago) Sep 15
to PTGui Support
Thank you both (John and Erik).

There's a lot to experiment with here, and I will read through this thread again mañana.

But what concerns me most is that I did not have these problems before July.   You can see that I have been using  PTGui for this test image since November 2022, at: https://speleotrove.com/gallery/Kenilworth_Castle.html

These images are all taken from the same spot (give or take a metre, due to residue left by cows sometimes) and at the same elevation (to within centimetres) so have always been 'angled up'.  Yet I never saw this roll effect before -- and it is not ignorable.  It's good that Erik has been able to recreate this, so I am not imagining this.

Erik: you suggest setting the pitch angle in Align to Grid.  To save some experimenting, I am guessing that this should be the (vertical angle) difference between the centre of the uncropped aligned image and the position of the camera when 'straight and level' (i.e., as aligned by the gimbal).   Indeed that's a point a little below the base of the curtain wall in the images.   I'm a little unsure, however, how to calculate that before 'Align Images'?


A separate thought did occur to me over the weekend:  July is when I started using  a new camera for these panoramas.  Until February this year I was using Panasonic (µ4/3) cameras, then switched to Sony  ZV-E10 II (APS-C) and had no problems with that.  I was so pleased with the Sony and Sigma E-mount lenses that I traded in all my µ4/3 gear for a Sony A7CR (Full-frame and APS-C) which has produced some very pleasing images -- and I started using that camera in July.  Could the change of camera be a factor?  e.g., different metadata in the source images?

Mike


John Houghton

unread,
Sep 15, 2025, 12:40:06 PM (8 days ago) Sep 15
to PTGui Support
Mike,  Certainly different metadata could play some part in the differences you are seeing.  But if you are not putting realistic parameters into the Align to Grid function, then probably that's not the root cause.   I assume you have some old sets of images that stitched ok with the then current versions of software and hardware.  You can do some some comparison stitches yourself and see what might account for the differences in results.  

But having said that, I would guess that most people level the output panorama image using vertical and horizontal line control points with the optimizer, or they do it manually by dragging and rotating the image in the Panorama Editor window.  (You can drag in a variable grid of lines to help with that by dragging the tiny triangle in the middle of the bottom edge of the frame to the right).

For landscapes without any reliable vertical features, one technique is to take one shot with the camera absolutely level (using perhaps a bubble level) and use that as an anchor image for the panorama. 

John

Erik Krause

unread,
Sep 15, 2025, 1:26:57 PM (8 days ago) Sep 15
to pt...@googlegroups.com
Am 15.09.2025 um 14:50 schrieb Mike Cowlishaw:

> Erik: you suggest setting the pitch angle in Align to Grid. To save some
> experimenting, I am guessing that this should be the (vertical angle)
> difference between the centre of the uncropped aligned image and the
> position of the camera when 'straight and level' (i.e., as aligned by the
> gimbal).

It says "Topmost pitch angle" and exactly that is meant. Given a perfect
vertical pan axis, it's the angle you point the camera up (relativ to
horizontal) for the topmost image (in your example: top left). For this
to work, you need to disable "Straighten panorama" on Project Settings tab.

BTW.: I tried your images with PTGui 11 and 12 with the same result: the
panorama leans to the left. PTGui 10 however changed roll for the first
image such, that the panorama doesn't lean, which is considered a bug,
since the first image should be anchored.

In all versions I did the same: Loading images, "Align to Grid" as in
your screenshot, followed by "Align Images". All versions centred the
panorama vertically, as requested in "Align to Grid". In the result of
"Align Images" there were slight differences, though, because of the
heuristic of the Control Point generator. Sometimes it didn't find
control points for the first image.

I suspect the different results before July were due to some other
defaults you might have (accidentally) set, most likely "Straighten
panorama" on Project Settings tab disabled.

As a note: You could shoot your images in portrait mode, which would
give you more vertical overlap with non-sky features.

Mike Cowlishaw

unread,
Sep 15, 2025, 3:14:11 PM (8 days ago) Sep 15
to pt...@googlegroups.com
Hi Erik, thanks.   

I also did lots of experiments this afternoon, and have got confusing results (for example: 'disabling  "Straighten panorama" on Project Settings' was suggested back in July, and it seemed to work .. but of course this has to be changed for every new panorama so is not very practical.  Disabling 'fit' also seemed to work, but has the same problem.  And they only work for one 'Align Images', it seems.

On the vertical pitch angle .. simply turning that off also seemed to work, until the next panorama.   Similarly, setting changing ignore roll or set roll to zero also worked for one-time.

I then noticed that changing any of these .. and then back to the previous setting .. before pressing Apply also worked.   I am now suspecting that Apply has no effect unless some change has been made (dirty bit set).  If this is the case then it should not be enabled(?).  

The underlying problem is that (as per the Subject line):  one can make a perfectly good panorama  [with a tip of the hat to John 's good suggestions that point out that fine tuning would make it better] -- but one cannot repeat the same process with either the same set of images or a new set and get a usable result.  The second attempt has the 10° roll.

I think the above is clear, but am happy to make a video showing the steps I have taken, if that would help.   Essentially it would be:
  • Start PTGui, load images as in the zip I shared, use Align to Grid 2x5 and Apply -> good panorama.
  • New project, load images as in the zip I shared, use Align to Grid 2x5 and Apply -> bad panorama.
  • New project, load images as in the zip I shared, use Align to Grid 2x5, change something else in the dialog, and Apply -> good panorama.
Quite weary after all afternoon and much of the evening on this, and despite copious notes I may have got something wrong, but would appreciate it if someone reading this would try and re-create.

(Re portrait mode: this is quite a bit harder to balance on the gimbal.  But in any case, lots of sky was never a problem before July, using Align to Grid .. in many of my panoramas (both at Kenilworth and in Spain) much or most of the top row of images are sky.)

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

John Houghton

unread,
Sep 15, 2025, 6:06:33 PM (8 days ago) Sep 15
to PTGui Support
Mike,  Just a few comments on your use of Align to Grid.  Generally speaking, people plan their shooting configuration in advance  (rows x columns at whatever intervals of yaw and pitch) so as to cover the intended field of view efficiently with adequate overlap.  Panorama calculators are available online to help with this.   This is the information that is fed into Align to Grid, so when this is run, the images will then already be in more-or-less their correct positions.  Control points and optimization then make the very minor adjustments to align the images precisely.  Any bland images such as blue sky will be devoid of control points but should be adequately positioned nevertheless such that they blend in well.  Really, you don't need to run Align Images.  Just Load in the images.  Run Align to Grid.  Then run Generate control Points, and then run the optimizer.  I don't know how you control the gimbal to shoot the planned shots, or do you let it work everything out automatically from basic information fed in?  But do you have access to the precise information that you can input to Align to Grid that will match how the images are actually shot?  Your screen prints show poorly positioned images after running Align to Grid, which is not what you should be seeing.  (With the Nodal Ninja Mecha panorama heads, it is possible to download a PTGui project file that includes the parameters for all the images exactly matching the shots taken.  This makes things a lot easier!).

John

Erik Krause

unread,
Sep 16, 2025, 10:33:52 AM (7 days ago) Sep 16
to pt...@googlegroups.com
Am 15.09.25 um 21:13 schrieb Mike Cowlishaw:

> I also did lots of experiments this afternoon, and have got confusing
> results (for example: 'disabling "Straighten panorama" on Project
> Settings' was suggested back in July, and it seemed to work .. but of
> course this has to be changed for every new panorama so is not very
> practical. Disabling 'fit' also seemed to work, but has the same problem.
> And they only work for one 'Align Images', it seems.

You always can save your settings to a template, which you then can
apply. Even automatically, if you use the Batch Builder. Or for all
future panoramas by "Make Default".

What I see until now: Your Align to Grid horizontal spacing is not too
wrong, but the vertical spacing is off, at least in your example images.
You see that, if you switch off Blending in the panorama Editor or view
single images.

Align to Grid does exactly what it is supposed to do, the images are
arranged in a perfect grid as specified. But they don't fit, since the
parameters are not exact and the panorama was shot slightly up.

Any further attempts to align the images using control points (including
‘Align images’) will distort the panorama in one way or another, as it
was taken facing upwards, which introduces perspective distortion. The
panorama must be placed such, that it's vertical center is on the middle
line of the Panorama Editor preview pane (the horizon line), in order to
compensate for perspective distortion ("falling lines, keystoning").

To achieve that, it won't be sufficient to use any combination of anchor
image, Straighten Panorama or not, Fit Panorama or not and such. You
have three possibilities to do that:
1. Use the correct (very precise!) value of the pitch of the topmost
image in Align to Grid "Vertical axis".
2. Set vertical line or horizontal line control points on vertical
features or the horizon (if visible).
3. Move the panorama manually in Panorama Editor.

There is a fourth possibility, though: if your gimbal outputs the exact
angles for each shot as a PapyWizard file, you can import that into PTGui.

By the way: If you take more images, their alignment might correctly
guess the vertical placement, as it is the case in the example on
> https://ptgui.com/examples/creating_gigapixel_panoramas_with_a_robotic_panohead.htmlBefore Align Images the horizon line is in the sky, but after that it is
pretty much on the horizon.

--
Erik Krause
Herchersgarten 1
79249 Merzhausen

Mike Cowlishaw

unread,
Sep 16, 2025, 11:18:43 AM (7 days ago) Sep 16
to PTGui Support
John, thanks.

The app that controls the gimbal is very similar to that for other (2-axis) motorised heads such as Benro, Syrp, etc.     On sets the camera sensor size (FF, APS-C, etc.), lens length (mm), overlap % desired, and timing (e.g., 3 secs between images).   You then point the camera at the top left of the desired image (using a joystick or in the case of the gimbal optionally pushing the camera) and set that as top left, then do the same for bottom right).  The app then calculates how many columns are rows are needed (e.g., 5x2) and on pressing Start effects the 10 images, moving the camera appropriately for each.

I've been using this information (from the various heads' apps) for some years, putting the columns and rows directly into Align to Grid without problems until July this year.  I have always next run Align Images next without problems.  However it is interesting, indeed, that one can skip that and just run Generate control Points and then run the optimizer.  I shall try that (not today).

Mike

Mike Cowlishaw

unread,
Sep 16, 2025, 11:40:51 AM (7 days ago) Sep 16
to PTGui Support
Erik, thanks.

I haven't looked at Templates, so have noted this to look at.  But, to be honest, I really want to treat PTGui as a 'black box' .  I did play with control points a few years ago (trying to fix sea horizons in drone spherical panoramas) and did not enjoy the experience :-).   So now I use just the Align Images and Create Panorama which are fine for drone panoramas.  With 'flat' panoramas it became obvious that Align to Grid was necessary when there was much sky in the field of view, and I've been using that for some time (years?) with results that I haven't felt a need to adjust (see the Kenilworth Castle images I referred to earlier).

So I still do not understand where the 10% roll is coming from.  Joost suggested that it might be from using image 1 (the default) as the anchor .. but all the images are level (to much better than one degree, and better that I used to achieve with a levelling base and large bubble level).

In short, I am not trying to make subtle changes to adjust for perspective distortion and the like.  I'm am just trying to get rid of the roughly 10° (ten degrees) roll that PTGui is now creating -- which may well be due to something I changed erroneously, but there does not seem to be a way to diagnose what is going wrong?

I did try uninstalling PTGui and reinstalling to reset everything to square one, but it seems some settings survive that process (e.g., I noticed that Align to Grid columns and rows were preset to 18x6 .. values I used in a July panorama but very different from the 7x3 and 5x2 I have typically used more recently.

Pitch of the topmost image I will look at .. but surely if this is a bit wrong (or not set at all, which I have definitely tried) this should not cause the result panorama to be rolled by 10°?

Mike

John Houghton

unread,
Sep 16, 2025, 11:46:52 AM (7 days ago) Sep 16
to PTGui Support
Mike, Thanks for detailed information clarifying the shooting process.  Do make a sensible choice for which image to act as anchor, and specify this either on the optimizer's Simple page or by setting the image's y,p,r all to 0 in the "Optimize per image" list on the Advanced page.

John

Erik Krause

unread,
Sep 16, 2025, 12:37:43 PM (7 days ago) Sep 16
to pt...@googlegroups.com
Am 16.09.25 um 17:40 schrieb Mike Cowlishaw:

> So I still do not understand where the 10% roll is coming from. Joost
> suggested that it might be from using image 1 (the default) as the anchor
> .. but all the images are level (to much better than one degree, and better
> that I used to achieve with a levelling base and large bubble level).

By using image 1 as anchor image you fix it in place. Since the rest of
the panorama is free to move, it does so in order to align. Since it was
taken slightly upwards, the perspective distortion forces it to bend.

Another factor could be that there are only a few control points
generated on the tree leaves, which could move in the wind.

> I really want to treat PTGui as a 'black box'.

Your black box approach does not work in this case, as additional
information is required that PTGui cannot extract from the images alone.

I suggest you learn to like control points, at least vertical ones. It's
so much easier.

John Houghton

unread,
Sep 16, 2025, 2:13:49 PM (7 days ago) Sep 16
to PTGui Support
On Monday, September 15, 2025 at 8:14:11 PM UTC+1 Mike Cowlishaw wrote:
 'disabling  "Straighten panorama" on Project Settings' was suggested back in July, and it seemed to work .. but of course this has to be changed for every new panorama so is not very practical.  Disabling 'fit' also seemed to work, but has the same problem.  And they only work for one 'Align Images', it seems.

Mike, You can run File-> Make default so the the current settings will be set automatically in future runs. 

With the new details you provided about what information you were likely using to set up Align to Grid based on my last good stitch (and also disabling Straighten and Fit  in Project Settings) I did several runs and got a properly levelled result for your panorama each time. Control points were generated for image 1 each time.  My Align to grid panel looks like this:
align-to-grid.jpg

John

Mike Cowlishaw

unread,
Sep 17, 2025, 10:07:10 AM (6 days ago) Sep 17
to pt...@googlegroups.com
I am delighted to report that, after more experiments, success has been achieved -- using a combination of John's and Erik's suggestions. :-).

The key was that I was confused by never having to set the anchor image before and I incorrectly assumed that it would be less necessary for smaller panoramas (wider lens, fewer images) than for larger ones -- so my experiments didn't seem to make sense.   It turns out that it is only for the smaller panoramas that I have been taking recently is setting the anchor image needed .. and this was not necessary for the larger images that I was taking in the first half of this year.  Indeed, it's not necessary for a 3x7 panorama that I took on the same day as the 2x5 that I shared at the start of this thread.  (I never got to try that one having 'stalled' with the problems on the earlier 2x5s that day.)

I'll copy my 'new' revised process below, which tries to minimise the steps.   But also I do appreciate the hints and tips for finer tuning of an image once I have a working image.  I rarely need this but will now probably revisit at least my 6x18s  [once I've processed a summer's-worth of backlog :-)].

So, thank you, John and Erik, for your patience and all the time you have spent on this!

Below is my current checklist, followed by my Align to Grid dialog settings.  I am hoping that only the YxX numbers need changing in the future.

Mike

Processing multi-row panoramas

Using ‘wizard’: 

First, Load Images – select images to be used for the panorama (typically all in a single directory).  then: 

  1. If a detailed panorama (i.e., all images have useful detail): 
    • Click “Align Images” and wait until done
    • Click “Create Panorama”
      → Adjust target filename to (e.g.) PanA-pan.jpg
    • Click new “Create Panorama” button to stitch the panorama
      → View → use default, to view

  2. Otherwise (e.g., some images mostly sky): 
    • Menu → Project (wait until sub-menu appears, then) → Align to Grid
      • Set Shooting configuration: e.g., Order: By row (top→bottom), Direction: Unidirectional (left→right always), Start at: Top Left)
      • Enter Grid dimensions (e.g., 5 rows× 14 columns)
      • Select Center horizontally and vertically, and set Spacing Overlap percentages (e.g., 30% in both)
      • Orientation → Roll angle [tick] Do not change
      • Click “Apply”.  (Can now close that dialog, or leave active if more to do.)

    • Then as above in case 1 (Align Images and Create Panorama). 

  3. If case 2 resulted in a sloping panorama, then: 
    • Align to Grid with settings as in case 2, including Apply. 
    • Control points → Generate Control points
    • Optimizer (Simple menu)
      • Set anchor image to that which is directly ahead of the camera when centred and levelled in pitch and roll. 
      • Run Optimizer
    • View in Panorama Editor (Fit if needed)
  4. Then Create Panorama, as in case 1. 

image.png





Mike Cowlishaw

unread,
Sep 17, 2025, 11:48:34 AM (6 days ago) Sep 17
to pt...@googlegroups.com
An additional  piece of information that I have just confirmed.   I did try to set the Anchor image several times before but it never made a difference.   I now believe that setting the Anchor image was ignored because when I then ran the Optimizer I got the error that no control points were set.  No matter, I assumed, they will be set by Align Images, as indeed I assume they were.   However I suspect that my selection of Anchor image was at that point thrown away (without asking me).   Hence I concluded that changing the Anchor image had no effect, whereas in a few edge cases (small panoramas) it seems to have a large effect.

(Separately, why is the default Anchor image 1?  I think I asked this before, but I forget the reply.)

Mike

John Houghton

unread,
Sep 19, 2025, 3:41:14 PM (4 days ago) Sep 19
to PTGui Support
Mike, The optimizer doesn't have any concept of an "anchor image" as such.  By unchecking yaw, pitch and roll parameter boxes of one image, the optimizer is directed not to alter the values of those parameters, meaning that the image concerned will not normally change position.  It therefore behaves as an anchor.  The rest of the images must be arranged around that image. The optimizer will not change the y,p,r parameter settings on the Optimizer Advanced panel of its own accord, so there is no question of the anchor image being "thrown away".  Running Align Images is another matter!

Why is the default Anchor image 1?  Well, there is always an "Image 1" in every project.  It seems simple and logical to offer that as a default.  How would PTGui choose an alternative?  There is no requirement to shoot the images in nice tidy rows and columns.  You can shoot them randomly in all directions and PTGui won't mind.  You should be in a better informed position to make a more useful choice.

None of the strategies you have outlined earlier for doing your stitches to obtain a perfectly stitched and levelled result will do the job, and in particular, you don't seem to have access to the actual shooting parameters of the gimbal, so Align to grid is not as useful as it should be.  The problem not solved is one of levelling the panorama to avoid unintentional roll.  But there are ways of doing this quite accurately, if not automatically.  For architectural subjects, one can usually use vertical line control points to identify vertical features in the scene for the optimizer.  And if the natural horizon is visible, you can use horizontal line control points too.  (I can easily help to discover the reason why you fail to get those to work).  But here's just one way (not the only way) to get your 2-row Kenilworth panorama stitched perfectly (hopefully):

1. Load in just the bottom row of images.
2. Align them with Align Images.
3. Visit the Edit menu of the Panorama Editor window and run Centre  panorama horizontally if it's not already centred.
4. Go the the Optimizer tab and select the Advanced screen. 
5. Check y,p,r boxes for all images except uncheck the yaw box of the central image. This will keep the panorama centred.
6. At the bottom of the screen, check "Link roll" and run the Optimizer.  This should level the row precisely.
7. Uncheck the "Link roll" box (Don't forget to do this!).
 We are now going to treat the whole of the bottom row as an anchor:
8. Uncheck y,p,r boxes for all images so the optimizer won't change their positions.
9. Goto the Images menu and run Add Images to add in the top row of images.
10. Run Generate control points for all images.
11. Run the optimizer.  With luck, all of the images will now be in their proper places.
12. Run Delete worst points from the Control Points menu.
13. Run the optimizer again.
You should now have really good optimizer figures and a well aligned and level panorama (assuming the Gimbal had a truly vertical vertical axis of rotation).
14. Adjust cropping in the Panorama editor window to taste.
15. Generate the panorama.

I hope that helps.

John

Mike Cowlishaw

unread,
Sep 20, 2025, 10:14:46 AM (3 days ago) Sep 20
to pt...@googlegroups.com
John, very many thanks for this.  Indeed it helps.  Although I don't think that 5x2 image merits that much work (I was mostly just comparing different lenses) there are a lot of details in your process that are truly useful.

A couple of follow-ups:

  1. "Why is the default Anchor image 1?  Well, there is always an "Image 1" in every project.  It seems simple and logical to offer that as a default.  How would PTGui choose an alternative?  There is no requirement to shoot the images in nice tidy rows and columns."

  1. However, Align to Grid has been 'told' exactly the order in which the images were taken (that's why one uses it).  So surely it can make an at least as good (if not better) choice of Anchor Image than I can?

  1. "you don't seem to have access to the actual shooting parameters of the gimbal"

  1. I asume these are in the metadata for each image, as in drones from the same manufacturer (DJI).  But I have not checked this.

  1. " 14. Adjust cropping in the Panorama editor window to taste."

  1. This is a particular weakness of PTGui .. all the other stitching programs I have used provide auto-crop as an option (that is, they offer a crop that includes as much of the image as possible, i.e., exclude pels that have no data).   Having to do this manually is both very slow (I always seem to get the menu pop-out when trying to select the right-hand edge) and inaccurate, so I end up doing a crop that throws away good data, every time.   I'm happy to crop later, but the trade-off for accuracy of the reported lens length (mm) just seems to me that auto-crop will give a more precise result (and often won't need any fine tuning later, either).
But, again, very many thanks for your insights!

Mike

John Houghton

unread,
Sep 20, 2025, 11:00:43 AM (3 days ago) Sep 20
to PTGui Support
On Saturday, September 20, 2025 at 3:14:46 PM UTC+1 Mike Cowlishaw wrote:
A couple of follow-ups:

However, Align to Grid has been 'told' exactly the order in which the images were taken (that's why one uses it).  So surely it can make an at least as good (if not better) choice of Anchor Image than I can?

I think you are in a better position to make a sensible choice, as you can see what the images contain, but maybe PTGui could ask you to specify one or suggest one.
  1. I asume these are in the metadata for each image, as in drones from the same manufacturer (DJI).  But I have not checked this.
If your images do contain orientation metadata, then PTGui can use use it to position the images automatically, so Align to Grid is then unnecessary.  See the Metadata tab in Advanced mode.  But take care not to lose metadata in image pre-processing.

John

Mike Cowlishaw

unread,
Sep 22, 2025, 11:34:51 AM (yesterday) Sep 22
to pt...@googlegroups.com


I think you are in a better position to make a sensible choice, as you can see what the images contain, but maybe PTGui could ask you to specify one or suggest one.

Ultimately, yes.  But I suspect that choosing a 'middle' image would generally be better than choosing 'Image 1'. 
  1. I asume these are in the metadata for each image, as in drones from the same manufacturer (DJI).  But I have not checked this.
If your images do contain orientation metadata, then PTGui can use use it to position the images automatically, so Align to Grid is then unnecessary. 

Ah, thanks, hadn't tried that tab before.  No orientation metadata.  On thinking about it, only the gimbal has that information; the camera does not have it (although as far as I can see the gimbal could 'educate' the camera with that information since the USB connection is bidirectional).
 
 But take care not to lose metadata in image pre-processing.

I never touch the images before running PTGui.

Mike
 

John Houghton

unread,
4:16 AM (15 hours ago) 4:16 AM
to PTGui Support
Mike, It seems to me that the DJI  RS4 app should provide at least access to some technical details for each "shoot" in one form or another.  As has been mentioned, other automatic heads offer a Pappywizard file or PTGui template file for download.  Maybe you could make representations to DJI Support to do likewise.  The  DJI RS4/RS4 PRO facebook group might help there.

John

Mike Cowlishaw

unread,
6:20 AM (13 hours ago) 6:20 AM
to pt...@googlegroups.com
The DJI app has a number of shortcomings and restrictions (e.g., maximum lens length 200mm) that I've had to work around.  I reported them carefully to DJI support .. but no sign of any fixes or updates, so I don't thing I'll raise another ticket for this just yet.

It's an RS4 Mini, by the, to keep the weight down (see https://speleotrove.com/gallery/DJI_RS4_Mini_weights.html .. pix at bottom of that page).

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/iuP-ACtuSqI/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