Pages: [1]   Go Down

Author Topic: Projections are not only for stitching: UWA image enhancement  (Read 369 times)

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2013
    • http://www.guillermoluijk.com
Projections are not only for stitching: UWA image enhancement
« on: August 04, 2026, 02:31:42 pm »

Most photographers who know what cylindrical, Mercator, Panini,... projections are just think of them in the context of stitching (merging several captures that cover a very large field of view). But there is no reason why single images cannot benefit from reprojection. In particular UWA images covering a large FOV, in some situations can be improved by reprojecting them from the pinhole camera model (usually called 'perspective' projection in computer vision) to any other projection.

The pinhole projection that most camera and lenses work with has a unique and valuable property: it's the only one that projects ALL straight lines found in the scene as straight lines on the projected 2D image. But it has a drawback: when the FOV is large, important distortion occurs in those subjects far from the image centre. It's not a problem of the optics, in fact it is not a photographic issue but just a mathematical consequence of the linear projection.

I have been playing with the following (re)projections and applying them to different UWA captures:





Gemini Pro wrote the functions in C++ for me, but these reprojections can also be done on any serious stitching software such as PTGui, and probably you can even cheat Photoshop by duplicating your input image and use its rudimentary stitching module to perform the reprojection.


I practised on four use cases where the reprojection enhanced in some way the original UWA capture:


Cylindrical projection for landscapes

A cylindrical projection can be used in landscape photography to eliminate the distortion that appears near the lateral edges of an ultra-wide-angle image, making geographical features appear at a scale and with proportions closer to what the photographer actually saw. Applied to the following panoramic-format photograph by Javier Camacho Gimeno, captured from a single 18 mm full-frame equivalent exposure, the projection makes the Cervino, located at the centre of the image, more prominent while removing the characteristic edge stretching and restoring more realistic shapes to the peaks near the sides of the frame (click on link to view at higher resolution):

http://guillermoluijk.com/datosimagensonido/cervino18mm.gif



Stereographic projection to restore spherical shapes

A stereographic projection can restore the circular appearance of spherical objects in the original scene, which the camera projection rendered as ellipses that are difficult to interpret. A Mercator projection would also provide a good correction, although both projections introduce curvature into straight lines in the scene (click on link to view at higher resolution):

http://guillermoluijk.com/datosimagensonido/spheres12mm.gif



Panini projection in urban scenes

A Panini projection is well suited to urban scenes, where it counteracts the distortion caused by a very wide angle of view. The result is a more natural-looking image, with the appearance of having been taken using a longer focal length while preserving the full horizontal field of view. This correction works particularly well when the scene contains a central vanishing point toward which all perspective lines converge. Another urban example can be found here (click on link to view at higher resolution):

http://guillermoluijk.com/datosimagensonido/street12mm.gif



Panini projection in 3D video games

This may sound exotic but a Panini projection can also be applied to 3D video games (e.g. Mordhau), preserving the wide horizontal field of view needed for better situational awareness while ensuring that characters near the edges of the screen do not appear distorted. At the same time, distant subjects are brought visually closer, making them easier to identify (click on link to view at higher resolution):

http://guillermoluijk.com/datosimagensonido/mordhau.gif



Full article here (pick English translation top right if you don't speak Spanish):

UWA image enhancement through reprojection


Regards!
« Last Edit: August 04, 2026, 03:02:20 pm by Guillermo Luijk »
Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2013
    • http://www.guillermoluijk.com
Re: Projections are not only for stitching: UWA image enhancement
« Reply #1 on: August 06, 2026, 02:59:22 am »

Brussels (Belgium - Europe) Atomium's ellipses restored as perfect circles using a Stereographic reprojection (Mercator would also work):

http://guillermoluijk.com/datosimagensonido/atomium2.gif


The drawback is that the straight tubes connecting the spheres get curved as expected.

Regards

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1892
    • Frank Disilvestro
Re: Projections are not only for stitching: UWA image enhancement
« Reply #2 on: August 06, 2026, 08:20:43 am »

Excelente Guillermo!

You can use Hugin, a free tool based on Panorama Tools, which is capable of performing the projections using a single image.

A similar effect to restore the elipses to circles is to add barrel distortion to the image, but the stereographic projection works better.

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2013
    • http://www.guillermoluijk.com
Re: Projections are not only for stitching: UWA image enhancement
« Reply #3 on: August 07, 2026, 03:36:54 am »

A similar effect to restore the elipses to circles is to add barrel distortion to the image, but the stereographic projection works better.
Any radial modification that compresses the borders while keeping (or expanding) the centre will have the effect of turning ellipses into circles, but the Stereographic projection is the only one that mathematically converts those ellipses (originally spheres) into circles.

Yesterday I did another exercise including several steps where the output of each one acts as the input of the next step:









Regards
« Last Edit: August 07, 2026, 04:08:09 am by Guillermo Luijk »
Logged
Pages: [1]   Go Up