Skip to content

Instantly share code, notes, and snippets.

@khufkens
Created July 1, 2021 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khufkens/01230df307689d7660d3eaa6d5230a5d to your computer and use it in GitHub Desktop.
Save khufkens/01230df307689d7660d3eaa6d5230a5d to your computer and use it in GitHub Desktop.
Convert equirectangular files to polar projections (upward looking)
#!/bin/bash
# convert equirectangular 2 fisheye
files=`ls *.jpg`
for i in $files;
do
noext=`echo $i | cut -d'.' -f1`
echo $noext
convert $i -crop 100%x50%+0+0 -virtual-pixel HorizontalTile -background Black +distort Polar 0 ../polar/${noext}_polar.jpg
done
@khufkens
Copy link
Author

khufkens commented Jul 1, 2021

Note files should be have extension jpg, correct for other file formats or use modifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment