Panorama correction - straight lines

591 views
Skip to first unread message

Lukasz Gajewy - 8infinity.art

unread,
Jan 2, 2022, 10:05:36 AM1/2/22
to PTGui Support
Hi All,

I am looking for software that will give me better panorama stitching effects than Photoshop in landscape photography.
There are several reasons, incl. no possibility of applying masking, no control over the places of stitching, visible differences in color tones in places of stitching.

This is how I found PTGui. Especially the Pro version gives me what I miss in PS.
I downloaded the trial version and did some tests on my files.
The main tests were carried out on photos where straight lines (such as stairs) are in the foreground and the horizon line is visible at the same time.
And here I come across a problem in PTGui that I cannot deal with - perhaps the goal that I want to achieve in the target photo is impossible use PTGui only. Aim = all lines should be straight (horizon, vertical lines and other straight lines)

In PTGui, after joining the photos to a panorama, I get a very good stitching. However, I am not able to get straight lines no matter what projection I use (rectilinear - is impossible to use because the panorama is too wide; cylindrical or spherical projection causes curvature).

Of course, it is similar in PS, but there is an Adaptive Wide Angle (AWA) filter that helps to correct the line. The effect of these adjustments is satisfactory. However, stitching alone is not satisfactory. And an important note here, AWA is fully functional in PS only when the entire process of aligning and blending and correction of photos is carried out in one cycle. It is interesting that if during the course of work we make alignment, blending and save the work to a file as the first step and we want to make correction from the restored file, we will not be able to do so! For some reason, AWA then does not recognize the curves and it is not possible to apply all corrections.

Probably for this reason I was unable to achieve the expected results using this workflow: PTGui -> saving to a PS file -> opening it in PS and using AWA

Also, I tried to use "New Line" in the Control Points tab.
I did it as follows:
I assigned each step of the stairs a new line in each photo, for example, the step that is in each photo had "Line 1" assigned
Maybe I am making a mistake and use "New Line" differently - let me know.

Do you have any ideas or comments?
Perhaps I am doing something wrong in PTGui or I should somehow modify the workflow between PTGui and PS.

In the attachment I add sample output files (I did this for show purposes only without paying much attention to detail).
File after alignment and merging in PS - suffix pano_raw
And the final file after AWA correction - suffix pano_awa
All of this was made in PS

Hardware information:
camera: Nikon Z7
lens: Nikkor 14-30 F4 S
Shots taken at 16mm with the use of a rail that allows to eliminate parallax

BR,
Lukasz Gajewy
_Z716381_pano_awa.jpg
_Z716381_pano_raw.jpg

Lukasz Gajewy - 8infinity.art

unread,
Jan 2, 2022, 10:08:20 AM1/2/22
to PTGui Support
And rest files part 1

_Z716374.jpg
_Z716377.jpg
_Z716375.jpg
_Z716376.jpg

Lukasz Gajewy - 8infinity.art

unread,
Jan 2, 2022, 10:09:37 AM1/2/22
to PTGui Support
Part 2
_Z716380.jpg
_Z716379.jpg
_Z716378.jpg
_Z716381.jpg

John Houghton

unread,
Jan 2, 2022, 1:15:16 PM1/2/22
to PTGui Support
Lukasz, I'm sorry, but the angle of view of your complete panorama is just too wide to be rendered satisfactorily in a rectilinear projection.  Upwards from around 120 degrees,  you will get increasing levels of distortion at the corners and edges of the panorama.  And it is only in the rectilinear projection that all straight line features will be rendered straight.  In cylindrical or equirectangular projections, the steps will be curved, and there is nothing that you can do about that.  Straight line control points can only be used to straighten features that would be expected to be straight in the currently selected projection.  You cannot warp individual curved features.  In particular cases you may be able to straighten diagonal lines in Vedutismo projection.  See FAQ: https://www.ptgui.com/man/projections.html .

John

John Houghton

unread,
Jan 2, 2022, 2:01:14 PM1/2/22
to PTGui Support
On Sunday, January 2, 2022 at 3:05:36 PM UTC Lukasz Gajewy - 8infinity.art wrote:

Do you have any ideas or comments?
Perhaps I am doing something wrong in PTGui or I should somehow modify the workflow between PTGui and PS.

One thing you could try is to align the images nicely in PTGui and then generate fake "perfect" camera images for easy stitching in PS.  Just set the output projection to be rectilinear with a modest fov.  Shift the whole panorama about in the Panorama Editor window (manually or use the Numerical Transform feature) to generate overlapping views.  For absolute perfection, you might need to stitch the full equirectangular panorama (180x180 uncropped) and then input that image to PTGui in a separate project for generating the fake views.

John

Erik Krause

unread,
Jan 2, 2022, 8:06:50 PM1/2/22
to pt...@googlegroups.com
Am 02.01.2022 um 16:05 schrieb Lukasz Gajewy - 8infinity.art:

> Probably for this reason I was unable to achieve the expected results using
> this workflow: PTGui -> saving to a PS file -> opening it in PS and using
> AWA

You can do that if you stitch to a full spherical (360°x180°) image,
then crop after using AWA. See attached. Photoshop needs the full sphere
to estimate the bending of the edges.

--
Erik Krause
http://www.erik-krause.de
_Z716374 Panorama.jpg

Lukasz Gajewy - 8infinity.art

unread,
Jan 3, 2022, 3:26:20 AM1/3/22
to PTGui Support
Erik thx - I see a light in the tunnel ;)

Can you please send the PTGui project file for this case?
Which option did you use in PS -> AWA: fisheye or panorama?
Message has been deleted

Lukasz Gajewy - 8infinity.art

unread,
Jan 3, 2022, 3:31:28 AM1/3/22
to PTGui Support
One thing you could try is to align the images nicely in PTGui and then generate fake "perfect" camera images for easy stitching in PS.  Just set the output projection to be rectilinear with a modest fov.  Shift the whole panorama about in the Panorama Editor window (manually or use the Numerical Transform feature) to generate overlapping views.  For absolute perfection, you might need to stitch the full equirectangular panorama (180x180 uncropped) and then input that image to PTGui in a separate project for generating the fake views.

@John - I tried to do this, unfortunately the effect was weak and the workload was large and time-consuming.

John Houghton

unread,
Jan 3, 2022, 10:21:37 AM1/3/22
to PTGui Support
On Monday, January 3, 2022 at 8:31:28 AM UTC Lukasz Gajewy - 8infinity.art wrote:
@John - I tried to do this, unfortunately the effect was weak and the workload was large and time-consuming.

 I'm not sure what you mean by "the effect was weak".   But I agree that it's a time-consuming method:  it took me 10 minutes to create a set of 10 fake images.  You can download them from https://we.tl/t-gRdOTsDq0O if interested.  Included is a PTGui project to stitch them.  But Erik's suggestion is a far more practical solution.

John

 

Erik Krause

unread,
Jan 3, 2022, 11:23:41 AM1/3/22
to pt...@googlegroups.com
Am 03.01.2022 um 09:26 schrieb Lukasz Gajewy - 8infinity.art:

> Can you please send the PTGui project file for this case?

Sure. It's attached.

> Which option did you use in PS -> AWA: fisheye or panorama?

Full spherical. This way photoshop will know the curvature of originally
straight lines.
_Z716374 Panorama.pts

Lukasz Gajewy - 8infinity.art

unread,
Jan 6, 2022, 1:54:29 PM1/6/22
to PTGui Support
I come back to the topic after testing pano with your suggestions. The tests were done on raw files.
I would like to share my observations - it may be helpful for someone.

Erik's solution - full spherical (360 ° x180 °) and PS -> AWA -> Full spherical
This method works and can apply it to align edges.
This is a fairly quick fix. However, it has a disadvantage of generating a full panorama and thus the resulting file is huge. When working with files from the ~ 47Mpix matrix, a flattened PS file with a size of ~ 4.4GB is generated. If PSB had individual layers it would be even bigger.
Perhaps it is influenced by the fact that so far I only have a trial version, which adds watermarks to the entire panorama. In the case of the full version, there will be no watermarks, so there will be real transparency for the unfilled panorama. However, I think that it will not be too big reduction of the resulting file size.
It is also impossible to crop (resize with ratio 1:2) this panorama because then AWA will not work.
The second and bigger problem for me is the preview of the panorama after loading it into AWA. It is difficult to work with on details, as AWA allows only 150% magnification. And most of the panorama is empty space.
The two above-mentioned difficulties can only be solved in hardware (a larger monitor and a different resolution and a more efficient computer), which, unfortunately, is not a cheap solution.
In addition, if someone replace the camera with another one with a larger matrix or switch to the medium format at all, unfortunately this solution cannot be used without major investments in equipment.

John's solution - fake "perfect" camera images
I admit that I rejected this solution at the beginning as too time-consuming. However, I decided to try them out anyway. Unfortunately, I haven't been able to make as good fake images from raw files as you do. @John - I'd love to see you do it :) By "fov" you meant Field of View?
So I ran tests on files generated by you (compressed jpg) but for a workflow it doesn't matter. Just like the size of the generated files does not matter, because it is similar to the output files.
After uploading these fake files to PS, aligning and creating a panorama, AWA had no problem with correcting the straight lines.
There is also no unnecessary transparent space that would take up the working space in the AWA preview.

Overall, the Erika solution will be faster and more effective for large panoramas with 8 or more combined images.
John's solution may be more effective with smaller panoramas, especially when working with large raw files.

A few more notes:
1. Panorama 180x360 gave me a file with 23K x 11.6K pixels. After aligning the lines, the image had a useful 7600 x 5250 pixels (horizontal position). That is less than one output file which has 5500 x 8200 pixels (vertical position). Of course, this is the result of a correction that causes the frame to be shrinked.
I would like to add that the solution with false images gives a slightly larger usable image (about 10%) than the 180x360 panorama. Here, I made the comparison for both cases on jpg files.
2. While reading the forum, in one of the threads someone asked when the version 13 of PTGui will be. And he got a counter-question: what do you need because version 12 offers a lot?. And here is what comes to my mind, what should be in PTGui in the next version. This is lens / edge correction similar to what is in PS -> AWA. I think it would be a great addition to PTGui, making it easier to work on panoramas. Everything in one place. This is my dream;)
@Erik, @John - how do you think it is possible to implement and put on the roadmap?

Thanks again for Erik and John help. This is called a real support!
@John - if you had a moment I would love to see you generating these fake images.

John Houghton

unread,
Jan 6, 2022, 4:43:29 PM1/6/22
to PTGui Support
On Thursday, January 6, 2022 at 6:54:29 PM UTC Lukasz Gajewy - 8infinity.art wrote:
@John - if you had a moment I would love to see you generating these fake images.

I have put details of exactly how to create the fake images (together with the files needed) in a download available here: https://we.tl/t-P5sgmv4XRG .  I hope you will be able to follow them.  It's really quite straightforward when you know what you're doing, albeit tedious! 

John

Reply all
Reply to author
Forward
0 new messages