Posts: 4
Threads: 1
Joined: Feb 2025
Reputation:
0
Gimp version:
Operating system(s): Linux
02-05-2025, 12:01 AM
![[Image: imgp3485-panorama_small.jpg]](https://christinasartblog.com/wp-content/uploads/2025/02/imgp3485-panorama_small.jpg)
This is a stitched panorama (PTGui, 6 images). If this had been taken on film (e.g. 6x17) the facade would be rectangular. Is there any tool in GIMP that can 'rectangularize' such an image? The perspective tool doesn't really work because the falloff is curved.
Posts: 6,568
Threads: 286
Joined: Oct 2016
Reputation:
578
Gimp version:
Operating system(s): Linux
(02-05-2025, 12:01 AM)christinanorwood Wrote: This is a stitched panorama (PTGui, 6 images). If this had been taken on film (e.g. 6x17) the facade would be rectangular. Is there any tool in GIMP that can 'rectangularize' such an image? The perspective tool doesn't really work because the falloff is curved.
Film would have produced a distortion as well, because it comes from the technique: ff you are (relatively) close, the things at the center of the panorama are closer to the camera and therefore appear bigger. I have not used PTgui for ages, but it probably has a choice of "projections", some projection produce some kind of bend, while other don't.
Now, to fix the problem at hand, two ways, both in Filters > Distorts
Lens distortion:
Curve bend:
In both cases I eyeballed the result, you can probably get slightly better results
Posts: 4
Threads: 1
Joined: Feb 2025
Reputation:
0
Gimp version:
Operating system(s): Linux
(02-05-2025, 08:42 AM)Ofnuts Wrote: (02-05-2025, 12:01 AM)christinanorwood Wrote: This is a stitched panorama (PTGui, 6 images). If this had been taken on film (e.g. 6x17) the facade would be rectangular. Is there any tool in GIMP that can 'rectangularize' such an image? The perspective tool doesn't really work because the falloff is curved.
Film would have produced a distortion as well, because it comes from the technique: ff you are (relatively) close, the things at the center of the panorama are closer to the camera and therefore appear bigger. I have not used PTgui for ages, but it probably has a choice of "projections", some projection produce some kind of bend, while other don't.
Now, to fix the problem at hand, two ways, both in Filters > Distorts
Lens distortion:
Curve bend:
In both cases I eyeballed the result, you can probably get slightly better results
Thanks very much, something to work with and looks promising. I think film would give a rectangular facade because although the height at the side appears less due to greater distance, it's projection onto a flat film plane would be larger (I think) because it's further from the lens (distance from lens to film plane). Certainly Nick Carver's panos taken with his Shen Hao 617 don't seem to suffer from the distortion shown in my image. Using a stitched pano the film plane is essentially a faceted cylinder by rotating the camera.
Posts: 1,224
Threads: 182
Joined: Sep 2018
Reputation:
122
Gimp version:
Operating system(s): Windows (Vista and later)
Using PTGui, just load the panorama photo in PTGui, and set some horizontal and vertical control points on the building and create a new panorama from this previous made panorama. In the attached photo, I just used 3 horizontal points on the roof
Posts: 4
Threads: 1
Joined: Feb 2025
Reputation:
0
Gimp version:
Operating system(s): Linux
(02-05-2025, 10:50 AM)denzjos Wrote: Using PTGui, just load the panorama photo in PTGui, and set some horizontal and vertical control points on the building and create a new panorama from this previous made panorama. In the attached photo, I just used 3 horizontal points on the roof
That's an excellent result! Unfortunately my attempts to use horizontal control points don't produce nearly as good a result. Not sure what I'm doing wrong. Select a line that should be horizontal, place a point at one end in one image, and at the other end in the other image. Right? Repeat for a couple of other lines that should be horizontal. Optimize and create panorama.
Posts: 1,224
Threads: 182
Joined: Sep 2018
Reputation:
122
Gimp version:
Operating system(s): Windows (Vista and later)
Change Lens settings / Lens Type : Cylindrical panorama
Posts: 4
Threads: 1
Joined: Feb 2025
Reputation:
0
Gimp version:
Operating system(s): Linux
02-05-2025, 08:09 PM
(This post was last modified: 02-05-2025, 08:23 PM by christinanorwood.)
(02-05-2025, 05:06 PM)denzjos Wrote: Change Lens settings / Lens Type : Cylindrical panorama
I really appreciate your help here, though I must admit I'm struggling to get as good a result. This is probably a stupid question, but I just want to clarify something which seems to contradict the advice given in the PTGui videos, where the subject of placement of horizontal control points was covered for approx 0.5 sec.
A pair of normal control points, placed on a pair of images, are meant to be placed on the same location.
A pair of vertical control points, placed on 2 copies of a single image, are meant to be placed on different locations on the same vertical line
You're suggesting that for a pair of horizontal control points they be placed on the same location of a horizontal line, and multiple pairs are placed on the same line to define the horizontality. Have I got that right? I must admit that the 'official' videos are not very helpful on this point.
As a complete aside, shooting a series of images with a shift lens for a panorama, instead of rotating the camera, should obviate these issues. I do actually have an old Hartblei 65mm shift lens with Pentax mount, but would have to upgrade to a K1 to get close to the resolution I want.
Posts: 1,224
Threads: 182
Joined: Sep 2018
Reputation:
122
Gimp version:
Operating system(s): Windows (Vista and later)
(02-05-2025, 08:09 PM)christinanorwood Wrote: (02-05-2025, 05:06 PM)denzjos Wrote: Change Lens settings / Lens Type : Cylindrical panorama
I really appreciate your help here, though I must admit I'm struggling to get as good a result. This is probably a stupid question, but I just want to clarify something which seems to contradict the advice given in the PTGui videos, where the subject of placement of horizontal control points was covered for approx 0.5 sec.
A pair of normal control points, placed on a pair of images, are meant to be placed on the same location.
A pair of vertical control points, placed on 2 copies of a single image, are meant to be placed on different locations on the same vertical line
You're suggesting that for a pair of horizontal control points they be placed on the same location of a horizontal line, and multiple pairs are placed on the same line to define the horizontality. Have I got that right? I must admit that the 'official' videos are not very helpful on this point.
As a complete aside, shooting a series of images with a shift lens for a panorama, instead of rotating the camera, should obviate these issues. I do actually have an old Hartblei 65mm shift lens with Pentax mount, but would have to upgrade to a K1 to get close to the resolution I want.
One program I know that does the job real good : Altostorm Panorama Corrector.
A tip: if I want to make a panorama of a graffiti on a long wall, I move along the wall to take several photos with the camera pointed perpendicular to the wall. Also pay attention to the proportions of the panorama: for example, check whether a square window or bricks are not distorted.
Posts: 1,058
Threads: 87
Joined: Aug 2018
Reputation:
83
Gimp version:
Operating system(s): Windows Vista or 7, 8, 10 (64-bit)
Ehh.. I tried the plugin suggested in this post by denzjos: https://www.gimp-forum.net/Thread-Straig...gn+to+path
I'm not sure if it was a good idea on my part, but this is the result I got:
.....
Samj Portable - Gimp 2.10.28 - Win-10 /64.
Posts: 1,224
Threads: 182
Joined: Sep 2018
Reputation:
122
Gimp version:
Operating system(s): Windows (Vista and later)
(02-06-2025, 09:19 AM)Krikor Wrote: Ehh.. I tried the plugin suggested in this post by denzjos: https://www.gimp-forum.net/Thread-Straig...gn+to+path
I'm not sure if it was a good idea on my part, but this is the result I got:
Answer: no. Because the photo in this post expects correction for barrel distortion and the forum post you mentioned is about perspective correction.
|