Calculation for the Equirectangular Image

345 views
Skip to first unread message

Hugh

unread,
Jan 23, 2023, 10:11:19 AM1/23/23
to PTGui Support
It may be 'brain fade' due to age, but I am confused regarding the calculation for the equirectangular image when Creating the Panorama.
I have read article 3.26 [https://ptgui.com/support.html#3_26] and related items and think I understand them, but cannot see how the formula can work for all sensor sizes.
I have a DX and an FX camera, both of which have 24 Mp sensors, that can be used with two lenses.

Using the formula [w =  px/mm   x  f  x   2 π] I get the following results:
FX camera + 10.5mm Fisheye = 11056 x 5528  Equirectangular   = 61 Mp
DX camera + 10.5mm Fisheye = 16844 x 8422  Equirectangular   = 142 Mp
FX camera + 8mm Fisheye = 8424 x 4212 Equirectangular   = 35 Mp
DX camera + 8mm Fisheye = 12834 x 6417 Equirectangular = 82 Mp

Surly, I should get a higher resolution Equirectangular with an FX (full frame) sensor than a DX (APS-C) sensor using the same lens, or am I missing something?

John Houghton

unread,
Jan 23, 2023, 10:46:49 AM1/23/23
to PTGui Support
Hugh, The  FX sensor has a lower pixel density than the DX sensor, so it has a lower resolution (smaller equirectangular size).

John

Hugh

unread,
Jan 23, 2023, 11:07:48 AM1/23/23
to PTGui Support
Thank you John,

I understand that the FX sensor has a lower pixel density, but surely there is more to determining the sizeof an equirectangular image than pixel density and focal length as this would suggest that the only advantage of using an FX body would be that less images are required for a given lens.

Best regards, Hugh.

Erik Krause

unread,
Jan 23, 2023, 11:59:34 AM1/23/23
to pt...@googlegroups.com
Am 23.01.2023 um 17:07 schrieb Hugh:

> I understand that the FX sensor has a lower pixel density, but surely there
> is more to determining the sizeof an equirectangular image than pixel
> density and focal length as this would suggest that the only advantage of
> using an FX body would be that less images are required for a given lens.

But that is exactly the case. An image with 360° field of view and a
specific pixel dimension implies a specific number of pixels per degree.
Pixels per degree is calculated by the focal length and the pixel
density of the sensor. Also see:
https://wiki.panotools.org/DSLR_spherical_resolution#Lenses

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

Hugh

unread,
Jan 24, 2023, 5:07:55 AM1/24/23
to PTGui Support
Thank you Erik,

I conclude that I have been looking at this from the wrong perspective.
What I have now learned from thinking about your and John's answers is that there are two different benefits in upgrading form a DX camera to an FX camera:
1)  Using the same lens with an FX camera as on a DX camera enables the panorama to be captured with kess shots which has some applications, and 
2)  Keeping the same shooting pattern with a longer focal length enables a higher resolution equirectangular.
Looking back over he years, I have benefitted from both scenarios without really understanding the mathematics.

My reason for looking at the formula is that I am corresponding with a person in Italy who is using a Canon 2000D and 8mm Sigma Fisheye to add 'real world colour' to the Point Cloud captured with his Leica Scanner and is not satisfied with results with the points towards the limits of the scanner range so is considering a Canon 5D IV with a 16mm (16-35mm f4).
Now that I am happy with the formula I can see that he would double the pixel count  by upgrading, which should solve his problem.
Canon 2000D + Sigma 8mm = 13500 x 6750 = 91 Mp
Canon 5D + 16mm Lens = 18900 x 9450 = 178 Mp

Thank you both for helping me to understand.

Best regards, Hugh.

Erik Krause

unread,
Jan 24, 2023, 1:25:15 PM1/24/23
to pt...@googlegroups.com
Am 24.01.2023 um 11:07 schrieb Hugh:

> considering a Canon 5D IV with a 16mm (16-35mm *f*4).

I hope he realizes that this lens is not a fisheye and requires more
frames for the same resolution than a fisheye with the same focal length.

Hugh

unread,
Jan 25, 2023, 2:08:49 PM1/25/23
to PTGui Support
Yes, this is recognised.
However, from this discussion I deduce that PTGui will give the same dimensions for the equirectangular from a 16mm Fisheye as from a 16mm Rectilinear lens so we should be considering using a Fisheye lens to keep the number of shots down.

Hugh

unread,
Feb 5, 2023, 7:44:47 AM2/5/23
to PTGui Support
I think it would be useful if there was an explanation in the FAQs that the value for (focal length) in the equation    width  =  2π  x  f  x  (px/mm)   is determined by PTgui when Aligning Images and generating Control Points, as alluded to 3.25, as opposed to the nominal value for  f  supplied by the manufacturer (perhaps this could even included in 3.26) as there can be significant differences between the two.

I have collated data from a variety of cameras and lenses I have used getting on for two decades and in most cases the size of the equirectangular from PTGui is close to the that using the formula with the supplied focal length of the kens.
For example:
Nikon D3200 + Sigma 4.5 mm Fisheye
Nikon D5300 + Nikon 10.5 mm Fisheye
Nikon D5300 + Sigma 10-20 mm Zoom at 10 mm and 12 mm
Nikon Z5 +  Nikon 10.5 mm Fisheye
to name a few.

In 2020 I purchased a Nikon Z5 together with a Nikon FTZ Adaptor so I could use the Nikon 10.5 mm Fisheye with it as I had successfully with the Nikon D800 it was replacing, but this device was " too clever" and recognized the lens as a DX and switched the camera into DX mode (i.e. used only the APS-C dimensions on the sensor). Nikon Support advised me that there was no way I could override this function and that they had no plans to include in any firmware upgrade the ability to enable it to be overridden in the foreseeable future, so I returned the FTZ and looked for Nikon Z fit Fisheye lenses and found the Pergear 7.5 mm Fisheye and TTArtizan 11 mm Fisheye.
Both lenses do not 'talk' to the camera so the focal length is shown as 0 mm in the EXIF file
Using the formula the size of the equirectangular for the Nikon Z5 + Pergear 7.5 mm Fisheye is 7900 x 3950 = 31Mp
From PTGui the size of the  equirectangular for the Nikon Z5 + Pergear 7.5 mm Fisheye is 10900 x 5450 = 59Mp
Lens Settings - Circular fisheye - Focal length: 10.56 mm - theoretical: 7.5 mm
Using the formula the size of the equirectangular for the Nikon Z5 + TTArtizan 11 mm Fisheye is 11580 x 5790 = 67Mp
From PTGui the size of the  equirectangular for the Nikon Z5 + TTArtizan 11 mm Fisheye is 15760 x 7880 = 124Mp
Lens Settings - Full frame fisheye - Focal length: 15.01 mm - theoretical: 11 mm
which are significant differences.

This is where my confusion came from as these results suggested that using an FX sensor provided a significantly larger equirectangular, which I now know not to be the case thanks to John's and Erik's responses to my question. However, these results show that using the focal length quoted by the manufacturer for the lens in the formula or the table at  https://wiki.panotools.org/DSLR_spherical_resolution#Lenses  are raelly only a guide and not difinitive. Purchasing a new camera and/or lens can be a significant financial investment so knowing these are guides means that someone considering such a purchase should seek information from users who have experience with the camera lens combination, which is why I think that this information should be included in the FAQs.

More recently I acquired a 'dumb' Nikon F to Z adapter so I could use the Nikon 10.5 mm Fisheye with the Z5 and the size for the equirectangular is the same using the formula with 10.5 mm as the focal length or as derived by PTGui, which is why it is included in the examples above.

Erik Krause

unread,
Feb 5, 2023, 11:41:56 AM2/5/23
to pt...@googlegroups.com
Am 05.02.2023 um 13:44 schrieb Hugh:
> From PTGui the size of the equirectangular for the Nikon Z5 + TTArtizan 11
> mm Fisheye is 15760 x 7880 = 124Mp
> Lens Settings - Full frame fisheye - Focal length: 15.01 mm - theoretical:
> 11 mm
> which are significant differences.

Many fisheyes are mislabeled. The old Samyang 8mm Fisheye f.e. was also
sold as Opteka 6.5mm.

PTGui Support

unread,
Feb 5, 2023, 12:59:26 PM2/5/23
to pt...@googlegroups.com
On 05/02/2023 17:41, Erik Krause wrote:
> Am 05.02.2023 um 13:44 schrieb Hugh:
>>  From PTGui the size of the  equirectangular for the Nikon Z5 +
>> TTArtizan 11
>> mm Fisheye is 15760 x 7880 = 124Mp
>> Lens Settings - Full frame fisheye - Focal length: 15.01 mm -
>> theoretical:
>> 11 mm
>> which are significant differences.
>
> Many fisheyes are mislabeled. The old Samyang 8mm Fisheye f.e. was also
> sold as Opteka 6.5mm.

The TTArtisans also seem to be mislabeled.

Also, the PTGui optimum size is not set in stone, it's just a possible
interpretation. Both the lens and the equirectangular projection have a
non uniform resolution. You can output your panorama at any desired size.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

Hugh

unread,
Feb 6, 2023, 7:10:19 AM2/6/23
to PTGui Support
Thank you Erik and Joost,

The information is much appreciated.
This explains what I am experiencing and now I understand a bit more.

Best regards, Hugh.

Reply all
Reply to author
Forward
0 new messages