This is a small bash script which rectifies (levels the horizon) in Theta S spherical images using the internal pitch and roll values stored in the EXIF data. This is an alternative implementation to the THETA EXIF Library by Regen. I use his cute Lama test images for reference. All credit for the funky images go to Regen.
Download, fork or copy paste the script to your machine and make it executable.
$ chmod +x theta_rectify.sh
$ theta_rectify.sh image.jpg
The above command will rectify the image.jpg file and output a new file called image_rectified.jpg.
Visual comparison between my results and those of Regen's python script show good correspondence.
The script depends on a running copy of exiftools, imagemagick and POVRay. These tools are commonly available in most Linux distros, and can be installed on OSX using tools such as homebrew. I lack a MS Windows system, but the script should be easily adjusted to cover similar functionality.