These scripts are for...
- generating a nadir image (
nadir-generate.sh) - overlaying a nadir image on 360 degree media (
nadir-apply-to-image.sh) while retaining all original meta data.
The scripts are separate because you likely only need to generate one nadir image that can be overlayed on a sequence of images. Every image in a sequence is almost always the same size. At this time, only still images are supported.
Since these are Bash scripts, clone this repo then install the requirements.
git clone https://github.com/JasonRaveling/nadir-bash.gitYou will need to install the following packages.
- imagemagick (v6)
- exiftool
Some files are included to show an example of how nadir-bash can be used. Try it out with the commands below.
Change in to the nadir-bash directory.
cd nadir-bashThe command below uses the images in the example directory. The image at example/space-spiral.jpg is a regular image. It will be used to generate a nadir image for overlaying on example/some-360-image.jpg. The nadir image will be 20% of the height of some-360-image.jpg. The nadir image will have a filename of space-spiral-nadir.jpg.
./nadir-generate.sh example/some-360-image.jpg example/space-spiral.jpg 20 space-spiral-nadir.jpgThe nadir image has been created with the filename of space-spiral-nadir.jpg. Now add it as an overlay on the 360 image.
./nadir-apply-to-image.sh example/some-360-image.jpg space-spiral-nadir.jpg 20 some-360-with-nadir.jpgThe file some-360-with-nadir.jpg was created with a nadir overlay!
The steps involved in generating a nadir image were taken from the article How to Add a Custom Nadir to a 360 Photo Programmatically (using ImageMagick).