Sony RX100: how to best deal with heavy distorted raw images

70 views
Skip to first unread message

Harm de Vries

unread,
Jun 5, 2025, 4:15:10 PMJun 5
to PTGui Support
I use a Sony RX100M7. My workflow always has been to process Raw images in DxO Photolab to correct for CA, lens distortion, etc, and output as 16bit Tiff images. And then load the Tiff images in PTGui. This generally works very well.

Recently I read into Raw processing in PTGui and that the recommendation actually is to not perform lens correction and let PTGui handle the correction for lens distortion. I started to experiment with this.

The uncorrected images from the RX100M7 at the wide angle have a strong barrel distortion (as is typical for a compact zoom lens). As a result, there are black corners in the image that would end up in the panorama if they are not cropped-out in some way (added example below). Using a rectangular crop would throw away a big part of the image. Alternatively, I can use a circular crop, but that is only available when I set the lens type as "Circular fisheye". However, the lens type should be "Rectilinear", this is detected when loading the images.

What would be the recommended workflow here? Is there really a downside of applying the lens correction in the Raw processor such as DxO Photolab?

I have added an example of an uncorrected image as illustration of the strength of the barrel distortion. Note that this is not my own image, but from the DPReview sample gallery of the RX100M7.
DSC00032.jpg

Javier Cruz

unread,
Jun 5, 2025, 4:25:30 PMJun 5
to pt...@googlegroups.com
Una consulta en el momento de solapar la imagen ( generar la esfera)  las esquinas negras no desaparecen? En tal caso se podría desaparecer con el borrador del mismo ptgui? 
Esto es solo consulta ya que realmente no uso el programa 

--
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 visit https://groups.google.com/d/msgid/ptgui/01a8af6d-7861-4e80-90c4-77c059cfb16en%40googlegroups.com.

Erik Krause

unread,
Jun 5, 2025, 6:10:49 PMJun 5
to pt...@googlegroups.com
Am 05.06.2025 um 22:13 schrieb Harm de Vries:

> The uncorrected images from the RX100M7 at the wide angle have a strong
> barrel distortion (as is typical for a compact zoom lens). As a result,
> there are black corners in the image that would end up in the panorama if
> they are not cropped-out in some way (added example below). Using a
> rectangular crop would throw away a big part of the image. Alternatively, I
> can use a circular crop, but that is only available when I set the lens
> type as "Circular fisheye". However, the lens type should be "Rectilinear",
> this is detected when loading the images.

In fact you actually can use "circular fisheye" and still have it
treated as a rectilinear projection. You only have to enter 1.0 as
Fisheye Factor.

More on Fisheye Factor here: https://ptgui.com/support.html#3_28

Interestingly, the barrel distortion is pretty much removed, if I set
the Fishey Factor to 0.0 (at 9mm focal length), which would suggest,
that the lens has a mild equidistant fisheye projection.

However, usually if you shoot for a panorama, you have overlap. PTgui
will try to put seams through the middle of the overlap area, thus
avoiding the dark corners. If you use Zero Overlap blending, the area
outside the seam won't affect the stitching. If you use Optimum Seam,
where PTGui tries to route seams around objects, a seam might come near
to the dark corner. In this case, you can still mask the corners with a
red mask. And since PTGui can save and load masks, you can apply such a
mask to all of your input images as well.

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

Erik Krause

unread,
Jun 5, 2025, 6:26:05 PMJun 5
to pt...@googlegroups.com
Am 06.06.2025 um 00:10 schrieb 'Erik Krause' via PTGui Support:

> Interestingly, the barrel distortion is pretty much removed, if I set
> the Fishey Factor to 0.0 (at 9mm focal length), which would suggest,
> that the lens has a mild equidistant fisheye projection.

The distortion is corrected even better at a fisheye factor of -0.4,
which is closer to an equisolid projection. But this doesn't matter
much. In any case, I used a 14.6 mm crop circle on the Crop tab, which
sits just inside the blue fringe.

Harm de Vries

unread,
Jun 9, 2025, 4:31:32 PMJun 9
to PTGui Support
Thanks for the feedback!

I use PTGui, not the Pro version. So I cannot mask the dark corners of the image out. They do appear as dark shaded areas in the panorama if I do not crop them out.
I played around a bit using lens settings as Circular Fisheye, with Fisheye Factor 1.0. The result looks good, but so does 0.0 or -0.4. By eye (for me) difficult to judge what would be the correct setting. The optimizer does not seem to adjust the Fisheye factor.

Op vrijdag 6 juni 2025 om 00:26:05 UTC+2 schreef Erik Krause:

PTGui Support

unread,
Jun 10, 2025, 2:41:47 AMJun 10
to pt...@googlegroups.com
Hi Harm,

You can optimize the fisheye factor:

First reset the lens distortion (abc) paraneters to zero in the Lens
Settings tab by clicking on the Reset Button

Then go to Optimizer and click on Advanced.

Check the fisheye factor checkbox and uncheck a/b/c. Then run the optimizer.

In practice no lens will follow a perfect fisheye projection. Therefore,
now enable a/b/c and do another optimization.

A 'wrong' fisheye factor can be compensated largely for by optimizing a/b/c.

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 visit https://groups.google.com/d/msgid/ptgui/
> ddf502fe-d833-4c68-a8a6-e3c079c7cf5an%40googlegroups.com <https://
> groups.google.com/d/msgid/ptgui/ddf502fe-d833-4c68-a8a6-
> e3c079c7cf5an%40googlegroups.com?utm_medium=email&utm_source=footer>.

Harm de Vries

unread,
Jun 11, 2025, 4:45:10 PMJun 11
to PTGui Support
Great! Resetting a/b/c and then running the Optimizer with the Fisheye factor only first, did the trick. The optimized value for the Fisheye factor then becomes approximately -0.3.

I will experiment some more. I'm curious whether I can see a difference between panorama's build from the uncorrected images and the panorama's as build from the lens-corrected images by DxO Photolab.

Op dinsdag 10 juni 2025 om 08:41:47 UTC+2 schreef PTGui Support:
Reply all
Reply to author
Forward
0 new messages