Panography - Patching the zenith and nadir

(Morgan Hardwood) #1

Great news for all photographers shooting 360x180° panoramas! As of now, it couldn’t be easier to patch the zenith and nadir while staying at a high bit depth using software that cares about your freedom. No more buying Adobe Photoshop plugins (eek!), no more fiddling with Hugin (it is a powerful program mind you), no more resorting to command-line utilities. Do it with GIMP and G’MIC, DO IT NAO!

1. Open your equirectangular panorama

Open your equirectangular panorama in GIMP-2.9.anything (I pity the fool that still uses 2.8).
It must be in the equirectangular projection and the canvas must stretch to the full 360x180° dimensions - this is pretty much standard behavior of any decent panorama stitching program. You can easily check that it is so by making sure that the width:height are at a 2:1 ratio.

2. Extract the zenith and nadir

Open G’MIC.
You need to get the latest filters, so click on the “Update filters” button.
Click “Deformations > Equirectangular to nadir-zenith”, and set the “Mode” to “to nadir/zenith”. You can see in the preview that your nadir and zenith are ready to be extracted. Just one more thing.
Since you will need to re-project the nadir and zenith back into the panorama when they’re fixed, you will want to hold on to the original panorama layer, so set “Output mode…” to "***New layer(s)***"
Hit “OK”.

3. Patch the zenith and nadir

Some like to smack a logo on the nadir, some like to cover the hole with a fisheye projection of the whole pano which looks like a mirror ball. Me, I just like to fix it and leave it looking natural. The various ways of fixing the hole (cloning, healing, in-painting, merging a separately taken photo of the floor and ceiling/sky to cover the holes) are general retouching knowledge and not within the scope of this guide.



4. Inject the zenith and nadir

Back to G’MIC, click “Deformations > Equirectangular to nadir-zenith”, and set the “Mode” to “to equirectangular”.
To save RAM (huge 32-bit panoramas live on grass and RAM) set “Output mode…” to “***In place (default)***”.
Hit “OK”.

That leaves you with this:

Make both layers visible, and “Flatten Image”:

Done. Couldn’t be easier.

Thank you @David_Tschumperle for G’MIC and for porting the script! And of course thank you to the developers of GIMP and countless other open-source programs involved in the whole workflow and to the generations of their ancestors making the right choices and not eating the wrong mushrooms which all lead to their birth :]

G'MIC 1.7.1
GIMP 2.9.5 AppImage
[Tutorial] How to edit 360° Photos without distortion using GIMP and Blender
(paul matthijsse) #2

Thank you, I’ll give it a try right away!

(Pat David) #3

Awesome write-up! Thanks @Morgan_Hardwood!

For patching the hole, there are some neat algorithms that @David_Tschumperle has been building, including [texture resynthesis][tr] and various [inpainting][in] options - perhaps they could be of interest for others to play with?

Neat texture resynthesis example:

And David’s bear inpaint:


(David Tschumperlé) #4

@Morgan_Hardwood, I’d like to use your images of the zenith/nadir reconstruction for an article I’m writing for a french web site about latest G’MIC features. Is it OK if I re-use them for illustration purpose ?

(Morgan Hardwood) #5

@David_Tschumperle go right ahead!

(David Tschumperlé) #6

Thanks @Morgan_Hardwood. I’ll post the link when it’s ready!