Infinite error but CPs seem all ok... what's happening?

157 views
Skip to first unread message

Hugo Rodriguez

unread,
Aug 12, 2021, 3:32:16 PM8/12/21
to PTGui Support
I having problems with a particular project. CPs seem all ok (I've revised all them), settings and everything looks OK but Optimizer gives an infinite error. When deleting some CPs, it gives an acceptable error (5) but if I initialize and optimize again goes back to infinite. I suspect it's a bug, you want to check it, Joost?
Regards,

Erik Krause

unread,
Aug 13, 2021, 4:29:21 AM8/13/21
to pt...@googlegroups.com
Am 12.08.21 um 21:32 schrieb Hugo Rodriguez:

> Optimizer gives an infinite error.

Could you attach the project file? Just the .pts without the images...

--
Erik Krause
Message has been deleted

Hugo Rodriguez

unread,
Aug 13, 2021, 12:41:36 PM8/13/21
to PTGui Support
Yes, of course. Here it is.
weird-project-hugo-s.zip

John Houghton

unread,
Aug 13, 2021, 1:21:37 PM8/13/21
to PTGui Support
Thanks for the project file.  It doesn't,  however,  give the infinite error when the optimizer is run.  The report shows an average control point distance of 9, and a maximum of 36, which is rather poor.   When the control points of the zenith and two nadirs are not included, the figures are much better:  average 1, maximum 3.8.  Perhaps the setup of the panorama head is not adequate.  

Obviously it is not possible to generate control points without the images, so it's not possible to speculate further on the causes of the error.  If jpeg copies of the images can be made available for download, then it should be possible to reproduce the infinite error.

John

John Houghton

unread,
Aug 13, 2021, 1:45:33 PM8/13/21
to PTGui Support
Further information, I tried including the lens shift parameters for the zenith and nadir images in the optimization, and that produced a much better result:  Average 1.5, max 6.7 (which can be further improved by applying Delete worst points).  This suggests that the zenith and nadir images are in an incorrect orientation owing to false information from the camera's orientation sensor when the camera points directly up or down.

John

Erik Krause

unread,
Aug 13, 2021, 1:47:32 PM8/13/21
to pt...@googlegroups.com
Am 13.08.2021 um 19:21 schrieb John Houghton:
> It doesn't, however, give the infinite
> error when the optimizer is run.

I guess Hugo did "Initialize and Optimize" (Alt+F5) which in fact causes
the inf on average and maximum control point distance.

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

Erik Krause

unread,
Aug 13, 2021, 2:21:47 PM8/13/21
to pt...@googlegroups.com
Am 13.08.2021 um 19:47 schrieb Erik Krause:
> I guess Hugo did "Initialize and Optimize" (Alt+F5) which in fact causes
> the inf on average and maximum control point distance.

This feels like a bug. If I export to a PTGui 10 project file and load
that one again v12 it works. That is, F5 and Alt+F5 give the same result.

Hugo Rodriguez

unread,
Aug 14, 2021, 4:34:51 AM8/14/21
to PTGui Support

Thanks John. To get the infinite error you have to initialize and optimize, otherwise you get the mentioned 9 avg.
I started a new project and set the CPs by myself, ending in a working project with 4-5 avg that this time does not behave weirdly. I think for this photo I probably made any mistake while mounting the head. It's and old photo from 2012 when I was still learning and improving my skills and I probably did not mount it exactly as required.
In normal conditions I usually get 1-2 pixels avg and 5-8 max as I did a careful setup of my pano head for my camera and lens.
Yes, I can made JPGs for download but in this case I tihnk the problem is different, as Erik said. BTW: If I downsize the original TIFFs and load them into PTGui, does the project work properly or is it size-related? (I never tried that).

Hugo Rodriguez

unread,
Aug 14, 2021, 5:34:43 AM8/14/21
to PTGui Support
Aha, so that confirms my suspect that this is a bug. Thanks for helping. Let's hope Joost puts an eye on this.
Regards,

PTGui Support

unread,
Aug 14, 2021, 6:06:40 AM8/14/21
to pt...@googlegroups.com
Hi Hugo,

Yes this looks like a bug. I will investigate.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com
> http://www.erik-krause.de <http://www.erik-krause.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 on the web visit
> https://groups.google.com/d/msgid/ptgui/8c6706eb-9353-405c-a876-9c32320499e1n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/8c6706eb-9353-405c-a876-9c32320499e1n%40googlegroups.com?utm_medium=email&utm_source=footer>.

John Houghton

unread,
Aug 14, 2021, 6:14:17 AM8/14/21
to PTGui Support
On Saturday, August 14, 2021 at 9:34:51 AM UTC+1 info.hugo...@gmail.com wrote:

Thanks John. To get the infinite error you have to initialize and optimize, otherwise you get the mentioned 9 avg.

Hugo, Yes, I mistakenly thought that the supplied project file would yield the infinite error when the optimizer was run.
 
I started a new project and set the CPs by myself, ending in a working project with 4-5 avg that this time does not behave weirdly. I think for this photo I probably made any mistake while mounting the head. It's and old photo from 2012 when I was still learning and improving my skills and I probably did not mount it exactly as required.

No, I don't think there was anything wrong with the setup of the head.  I believe the problem was that the autorotate feature in the camera was set on, and as a result the zenith and nadir images happened to be in an inconsistent orientation owing to the orientation sensor delivering arbitrary data when the camera was pointing straight up or down. (Gravity is then acting at right angles to the plane of the image sensor).  This only matters because of the processing of the lens shift parameters, which are used to correct for the optical axis of the lens not being exactly aligned with the centre of the image sensor.  If there is a mix of image orientations (and remember there are 4 possible orientations, not just landscape and portrait), a global set of lens shift parameters cannot apply the appropriate correction for all of the images.  By using individual lens shift parameters for the zenith and nadir images (selected on the Lens Settings tab), this problem can be overcome, and indeed in this project it results in a very marked improvement in the optimisation figures.  Alternatively, you can usually switch off the autorotate feature in the camera, or rotate the images into a common orientation in raw conversion by reference to the orientation tag setting in the images' metadata.

John

Hugo Rodriguez

unread,
Aug 14, 2021, 6:41:38 AM8/14/21
to PTGui Support
What do you mean, John?
To set the viewpoint to 'optimize' for the nadir and zenith?

John Houghton

unread,
Aug 14, 2021, 8:01:36 AM8/14/21
to PTGui Support
On Saturday, August 14, 2021 at 11:41:38 AM UTC+1 info.hugo...@gmail.com wrote:
What do you mean, John?
To set the viewpoint to 'optimize' for the nadir and zenith?

Hugo, No.  The change required concerns only the selection of individual lens shift parameters for the three images suspected of being in a different orientation to the 6 images in the main row.   The latter will use the usual global shift parameters by default.

So, taking your project file as supplied, and running the optimizer gives the following optimisation figures.

global opt.jpg

Now select Advanced mode and the Lens Settings tab, and select individual lens shift parameters for the zenith and nadir images:

shifts.jpg

On the Optimizer tab, select Advanced mode and see that the shift parameters for the 3 images now have their own check boxes (which need to be checked):

shifts opt.jpg

Now run the optimizer, and get the figures shown below:

shifts figs.jpg

Which I think you will agree is a worthwhile improvement!  And running Delete worst points then gives:

del worst.jpg

So I would say the head setup was very good.

John

Hugo Rodriguez

unread,
Aug 14, 2021, 10:21:01 AM8/14/21
to PTGui Support
Great, thanks!

Hugo Rodriguez

unread,
Aug 14, 2021, 11:34:35 AM8/14/21
to PTGui Support
Oh, that's very interesting. I mistakenly thought that PTGui figures out the right orientation for nadir and zenith. I used to rotate those two photos manually when developing RAWs as sometimes the camera's sensor gets fool when pointing upwards and downwards and leaves the photo as a landscape, but didn't realize even in portrait orientation PTGui couldn't figure out if the photo was at 0 or 180º.
That trick definitely gives a very interesting improvement to my projects, as I'm sure my setup is good enough to keep under 2 pixels avg :-), so a big thanks for that, I didn't know it.
But... wait... now a question arises: what orientation is the right one? Once the photo is placed at 90º of pitch, there's no orientation, so I guess PTGui decides which one is right and when is wrong. So then to fix that there should be two options:
  1. Try rotating 180º the photo in the RAW editor, delete and create new CPs and optimize to see if the new values are better or worse.
  2. Doing the same you explained so PTGui finds the right shift values for each photo
Am I wrong?
Thanks!

Erik Krause

unread,
Aug 14, 2021, 12:10:06 PM8/14/21
to pt...@googlegroups.com
Am 14.08.2021 um 17:34 schrieb Hugo Rodriguez:
> I used to rotate those two
> photos manually when developing RAWs as sometimes the camera's sensor gets
> fool when pointing upwards and downwards and leaves the photo as a
> landscape

The best is to disable the orientation sensor in camera altogether for
panoramas. Another option is to not tilt up (or down) 90° but only 70°
or 80° (such that the nadir and zenith hole is filled). Then the
orientation sensor is always the same.

John Houghton

unread,
Aug 14, 2021, 12:44:01 PM8/14/21
to PTGui Support
On Saturday, August 14, 2021 at 4:34:35 PM UTC+1 info.hugo...@gmail.com wrote:
That trick definitely gives a very interesting improvement to my projects, as I'm sure my setup is good enough to keep under 2 pixels avg :-), so a big thanks for that, I didn't know it.
But... wait... now a question arises: what orientation is the right one? Once the photo is placed at 90º of pitch, there's no orientation, so I guess PTGui decides which one is right and when is wrong. 

Hugo, PTGui can't tell which way is right way up, given that the orientation data is random.  But you can often tell, just by looking at the images.  For example, if you rotated the camera up to point at the zenith immediately after taking the last shot of the row beneath., then you would expect the bottom of the zenith image (in portrait) to match with the top of the last image of the row.  Similarly for the nadir shot:  the top of the nadir shot should match the bottom of the last image in the row above.  Of course, you may not remember exactly how the images were shot, or maybe somebody else took the shots.  It's worth mentioning that the Source Images tab displays the thumbnails in the orientation as opened by PTGui.  They never change during processing so they are useful for performing the check described above.  No amount or rotating errant images manually in PTGui will fix the problem.  Do that in raw conversion or Photoshop etc.

John

Hugo Rodriguez

unread,
Aug 14, 2021, 4:03:18 PM8/14/21
to PTGui Support
Yup, I already thought about that but thanks for pointing up!
I think the 2nd one is more convenient as I prefer to leave the auto orientation on for standard photos. In fact, sometimes helps to shoot at 75 or 80º when the horizon is flat and there's almost no objetcs near, so nothing to put CPs over it.

Erik Krause

unread,
Aug 15, 2021, 9:48:48 AM8/15/21
to pt...@googlegroups.com
Am 14.08.2021 um 22:03 schrieb Hugo Rodriguez:

> I prefer to leave the auto orientation on for standard photos.

My camera (EOS 5D2) supports three custom programs. I've used one to
preset anything for panoramas...

Hugo Rodriguez

unread,
Aug 16, 2021, 5:09:05 AM8/16/21
to PTGui Support
Hmm, I think my Nikon D7200 doesn't allow to include the auto orientation within custom modes. shame that even in 2021 most (if not lal cameras) still have an auto orientation sensor that fails in these cases... :-(

Michał Niedźwiecki

unread,
Aug 16, 2021, 7:52:13 AM8/16/21
to pt...@googlegroups.com
I have the same problem very often when no CP is found in some images. 

How I fix it:
1/ Add CP manually
2/ In Panorama Editor click "Edit individual images" and adjust manually.
3/ Run Optimizer - if I still get infinite try 1/ and 2/ again

--
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/9d075074-43d0-4c8b-8fd1-6d382236e679n%40googlegroups.com.


--
Pozdrawiam
Michał Niedźwiecki

Hugo Rodriguez

unread,
Aug 17, 2021, 6:01:33 PM8/17/21
to PTGui Support
Thanks man.
I usually add CPs manually but I avoid adjust images manually as precision goes way off the desired values, I always find the way to let PTGui place the photos in the panorama with great precision.
Anyway, as Erik and Joost said, this time it seems really a bug, so let's hope Joost find it and fix it.
Regards,

Reply all
Reply to author
Forward
0 new messages