Sorry, I didn't adjust the lens parameters correctly. After doing that there is only a small error left. Will try to adjust the nodal point more precisely.
Sorry, I didn't adjust the lens parameters correctly. After doing that there is only a small error left. Will try to adjust the nodal point more precisely.
On Thu 11 Aug 2016 at 17:44:15 UTC+2 SEMPERVIVUM1412 (Ulrich Bangert) wrote seeking help with a spherical panorama with some recalcitrant stitching flaws and a conversation then ensued with John Houghton about how to resolve them. John sought a full set of images and the project file and Ulrich kindly supplied links to them on Thu 11 Aug 2016 21:25:29 UTC+2.
I realise that this is now rather an old topic, and indeed some of the relevant files have already evaporated from the internet. But I took advantage of the full information to look into the issue in more detail, because it gave me a chance to explore a type of stitching I am not familiar with and anyway I was interested in Ulrich’s subject-matter. I did come up with some conclusions I think it is worth placing on the record, even though I think in the meantime John has guided Ulrich to a satisfactory solution.
When I looked at Ulrich’s pts file I was puzzled that John attributed his problems to mixing images in portrait and landscape modes. True, there were stitching flaws in Ulrich’s panorama – that’s why he wrote. But at an overall level the question is surely why his stitch was so successful. If mixed orientations were the problem, one might have expected more catastrophic failures. The answer, I think, is that, even though his images are rectangular, the lens type is specified as ‘circular fisheye’. In that particular circumstance the images, though rectangular and in the different orientations, do not have different horizontal fields of view. For both portrait and landscape modes the images have the same horizontal field of view, dependent, I think, on the diameter of the cropping circle. Here, the cropping circle spills out beyond the sides of the portrait-mode images and also beyond the top and bottom of the landscape-mode images and yields a horizontal field of view that is the same for both portrait and landscape orientations.
To check that it is possible to deal with the stitching flaws without rotating the landscape images I took Ulrich’s original images and pts file, including its control points and optimised afresh via the Advanced setting of the Optimizer tab. The result is the project file a6_HDR_Panorama circ.pts, downloadable from here. It has average/max control-point distances of 1.2/2.9 pixels.
Ulrich’s images can be obtained from the links he listed in his posting mentioned above. But since then he has rotated the nadir and zenith images from their original landscape mode to agree with the portrait-mode orientation of the others. If you are downloading the images as they are at present and want to try my pts files you will have to rotate the nadir and zenith images clockwise to obtain the images expected by the pts file. The pts file listed there is (I think) still the original one using the landscape-mode nadir and zenith images; he has since revised it. His revised version can be found from his posting of Thu 11 Aug 2016 22:42:45 UTC+2 (though this too may be a replacement).
To improve the actual stitching I optimised all the lens/camera parameters a to e and carried out repeated rounds of deleting the worst control points (via the Control Points menu) and then reoptimising. I don’t suggest this is anything subtle and I think that approach is already included in Ulrich’s latest revision. Deleting the worst control points pruned a good number of presumably questionable control points.
Finally, I added a few control points to quench the vestiges of a stitching flaw in the front of the top gallery immediately to the right of the altar (i.e. at the top of the seam between images 0 and 3 as numbered in the pts file).
I did give the nadir and zenith images special treatment. As the portrait-mode images seemed pretty satisfactory I treated then as a set, optimising their parameters globally. But I gave the nadir and zenith images individual parameters, first to accommodate some possible parallax that had been suggested, and secondly because I was concerned about the horizontal and vertical shift parameters, which I think are measured against physical axes determined by the camera body. That means their values do depend on the actual orientations of the images. Tat , at least, is what I have understood from some of John’s earlier posts, though it is not the factor he was relying on here.
It is worth examining the Image Parameters tab. It shows that all the images, whether in portrait or landscape mode, have the same horizontal field of view of 142 degrees. I think we can conclude that Ulrich’s stitching problems stem not from the orientation of the images but, rather more mundanely, from the way optimisation has been applied and achieved.
For comparison, I converted the circular fisheye pts file into one specifying full-frame fisheye, which is what I think the lens actually is, and then reoptimised (a6_HDR_Panorama ff.pts). I made no other changes to the pts file before optimising and got average/max control-point differences of 1.2/2.9, which was just about identical to the circular case. The stitch that resulted was not significantly different from that for the circular fisheye, though I noticed a slightly different seam position between images 3 and 5 that exposed a few slight glitches in the divisions between the floor-boards. No doubt they could be removed if desired by suitable masking. However, with a cropping rectangle that followed the edges of the images, the horizontal fov of the portrait-mode images was now 104 degrees and that of the landscape-mode images 156 degrees – rather more in line with what one might expect.
In both cases making all the lens/camera parameters separately optimisable pushed the average cp distance below the magic 1 pixel, but with no obvious improvement in the stitched panorama. I have kept off viewpoint correction to keep the file compatible with the non-Pro version of PTGui. At any rate, both files open satisfactorily in PTGui 9, which I retain on my PC.
There is no absolute ban on mixing images of different orientations, provided that, as here, individual lens parameters are used – see the final paragraph here. But that is not to say that John’s recommendation to avoid mixed orientations is not good practical advice, amongst other reasons because it clears some of the issues out of the way before optimising is started. It’s just that the example here – of a full-frame fisheye treated as a circular fisheye – seems a remarkably special case, to which the normal considerations relating to horizontal and vertical fields of view of a rectangular image do not apply.
So my question to Ulrich would be whether he chose to specify the lens as a circular fisheye for some special reason and if so what. I also wonder what considerations led to his choice of diameter for the cropping circle. In general, is specifying a full-frame fisheye lens as circular a well-recognised technique?
Roger Broadie
Hallo Roger, thanks for the very detailed explanation, it is much appreciated. I was unsure whether to choose fullframe or circular fisheye. I tried both and was not able to spot a significant difference in the result.
My lens is a 8mm Walimex Pro II. I assume that fullframe fisheye is the correct choice?
Yet I do not know how to handle the cropping. Is it advisable to use cropping in order to exclude the outer regions of the images where the quality might be lower?
One issue being not yet clarified to me is why adding additional control points in the region of a stitching error had no effect on the result. Can anyone explain?
In the next day I'm going to take photos of a scenery outdoors and stitch them.
Ulrich, thanks. I’m delighted you have put the panorama on your website. I think it makes a splendid pair with your panorama of the Marienkirche in Wolfenbüttel – a couple of churches some century apart in date, I think, but one still basically a gothic structure despite the wealth of renaissance detail and the other immediately recognisable as baroque. Rather naively I had not realised the style had made itself felt so far north.
I was interested in John Houghton’s comment that people commonly treat full-frame fisheye lenses as circular when they want the advantage of the cropping circle for cropping – rather, that is, than simply for defining the field of view. But, like you, I didn’t detect any significant difference between these formats in the case of your images, so I guess you use whichever seems to work best in the circumstances. I think the rectangular corners of the full-frame are not a problem in your case, because they are lost in the overlap.
I tried cropping circles of the size you had, of the default size that just reaches the short sides of the image, one even larger, so that it passes through the corners of the image, and one small enough to touch the long sides of the image. But I couldn’t really detect any difference between them, other than that the final one was too small since it left little black triangles where the cropped images failed to overlap. There were also differences in the magnitude of the parameters a, b and c, though they did not appear to effect the quality of the stitch. That did lead me to wonder what they represent. They can’t be lens distortion parameters in the normal sense that applies to a rectilinear lens. My supposition is that there is actually an invisible function that transforms the fisheye image into something that can be projected onto the panosphere and, for this and probably other non-rectilinear lenses, a, b and c are merely correcting factors to be applied to that function. Perhaps somebody knowledgeable can comment.
Roger
Hallo Roger, thanks for the very detailed explanation, it is much appreciated. I was unsure whether to choose fullframe or circular fisheye. I tried both and was not able to spot a significant difference in the result.
My lens is a 8mm Walimex Pro II. I assume that fullframe fisheye is the correct choice?
Yet I do not know how to handle the cropping. Is it advisable to use cropping in order to exclude the outer regions of the images where the quality might be lower?
One issue being not yet clarified to me is why adding additional control points in the region of a stitching error had no effect on the result. Can anyone explain?
In the next day I'm going to take photos of a scenery outdoors and stitch them.
Best regards - UlrichBTW: This is my final version of the panorama of the church online:
--
Many people are reading this forum via email and get every post delivered to their inbox. To limit the amount of data please do not add attachments or images to your posts; instead upload your files at a file sharing site (for example http://sendspace.com// ) and include a link in your message.
---
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+unsubscribe@googlegroups.com.
To post to this group, send email to pt...@googlegroups.com.
Visit this group at https://groups.google.com/group/ptgui.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/4516311e-0089-41dd-9ca6-7f4c00a9d766%40googlegroups.com.
My supposition is that there is actually an invisible function that transforms the fisheye image into something that can be projected onto the panosphere and, for this and probably other non-rectilinear lenses, a, b and c are merely correcting factors to be applied to that function. Perhaps somebody knowledgeable can comment.
--
Many people are reading this forum via email and get every post delivered to their inbox. To limit the amount of data please do not add attachments or images to your posts; instead upload your files at a file sharing site (for example http://sendspace.com// ) and include a link in your message.
--- 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+unsubscribe@googlegroups.com.
To post to this group, send email to pt...@googlegroups.com.
Visit this group at https://groups.google.com/group/ptgui.
To view this discussion on the web visit https://groups.google.com/d/msgid/ptgui/a00fc0b0-8b2e-b5e1-483a-00314df7b4d8%40gmx.de.