Lens Distortion Workflow (Single Images)

73 views
Skip to first unread message

Tim Hufnagl

unread,
Apr 26, 2021, 5:10:29 AM4/26/21
to PTGui Support
dear PTGui group,

PTGui has become my swiss army knife way beyond stitching. i'm regularly using it for HDR creation as well as perspective correction for single images.

now i'd like to use its advanced lens distortion correction since i have a special case at hand: i'm using a pentax 645 35mm A lens with a shift adapter on my GFX for architectural work, which naturally involved a lot of stitching. Is there a best practice workflow for this?

what i've done so far:

- calibrated the lens on a NPP adapter
- shot a full 360 pano with 0 shift, 2mm rise and 2mm fall (no tilt)
- results look phantastic and i stored the abc and d (lens shift) paramters in my local lens database
- on loading a single image i change the projection to rectlinear and then load/apply the lens data with its correction parameters. 

questions:
- should i rather use the CP3+n "lines" based on a single shot or is it fine to have PTGui do the hard work?
- are those parameters applicable for both, portrait and landscape format? they should, since the shift paramter (d) indicates long side shift and distoration (should be) is concentrical - correct?
- however i do still experience issues with correction single shots, which in 50% of the cases still are off  - is there any way i could improve on that?

thanks for your feedback and best regards,
tim



John Houghton

unread,
Apr 26, 2021, 7:01:33 AM4/26/21
to PTGui Support
Tim, Applying your calibrated lens parameters to a single image should work ok.  One thing that might cause problems is the auto-rotate feature in the camera if that is active.  For shots taken with the camera pointing directly up or down, gravity is acting at right angles to the plane of the image sensor so the orientation sensor generates random data.  Hence the images may sometimes be rendered upside down, which results in the shift corrections being applied in the wrong direction.  This can be corrected in raw conversion or avoided by disabling the auto-rotate feature in the camera.

John

Tim Hufnagl

unread,
Apr 26, 2021, 8:12:56 AM4/26/21
to PTGui Support
thanks, john! no issues with autorotation since for my use case the camera will always be aligned level and then have rise of fall. i'll just have either landscape or potrait shots. so i did have PTgui figure out the values for a 360 with max shift of 11mm and did the math to translate this into percentage steps to map to shift in mm. this worked well for both, rise and fall by just negating the shift value. so ideally i can get away with only "one" set of abc parameters, adapting the amount of shift. (esp. since i'm shooting at hyperfocal/f14 at all times). i might add one version for very close focus in smaller rooms.

any other thoughts appreciated!
best,
t

John Houghton

unread,
Apr 26, 2021, 8:49:11 AM4/26/21
to PTGui Support
On Monday, April 26, 2021 at 1:12:56 PM UTC+1 Tim Hufnagl wrote:
thanks, john! no issues with autorotation since for my use case the camera will always be aligned level and then have rise of fall. i'll just have either landscape or potrait shots. so i did have PTgui figure out the values for a 360 with max shift of 11mm and did the math to translate this into percentage steps to map to shift in mm. this worked well for both, rise and fall by just negating the shift value. so ideally i can get away with only "one" set of abc parameters, adapting the amount of shift. (esp. since i'm shooting at hyperfocal/f14 at all times). i might add one version for very close focus in smaller rooms.

Tim, So if applying the lens parameters only works ok in 50% of the cases, there must be something wrong somewhere. If it's a case of images exhibiting obvious converging verticals when they ought to be parallel, you might try editing the shift parameters to see if they might still be the culprits.

John

PTGui Support

unread,
Apr 26, 2021, 12:52:56 PM4/26/21
to pt...@googlegroups.com
Hi Tim,

If I understand correctly, you are shifting the lens? In that case
please see 3.13:
https://www.ptgui.com/support.html#3_13

Generally there's little benefit in using a shift lens for panoramas,
not even for architectural shots. And it complicates the stitching process.

If you need more help please make a set of images available for download.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com
> --
> 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/f60afad8-e33e-4c98-a774-ead7fbb57decn%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/f60afad8-e33e-4c98-a774-ead7fbb57decn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Tim Hufnagl

unread,
Apr 26, 2021, 1:51:50 PM4/26/21
to PTGui Support
hi joost. thanks for the link. no stitching involved - "only" applying lens distortion correction to single images. however i'm using using a pano to have PTGui determine the correction parameters. sorry for the typo in my original post. best, t. 
Reply all
Reply to author
Forward
0 new messages