Skip to content

Instantly share code, notes, and snippets.

@typebrook
Created May 5, 2022 04:06
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 typebrook/75e28c3ffcba00ec7b09b07a6c7d83bf to your computer and use it in GitHub Desktop.
Save typebrook/75e28c3ffcba00ec7b09b07a6c7d83bf to your computer and use it in GitHub Desktop.
Panorama solution for insta360 images (deprecated)
.ONESHELL:
test: xmap.pgm ymap.pgm
ffmpeg -y -i test.jpg -i xmap.pgm -i ymap.pgm -filter_complex remap out.jpg
exiftool -UsePanoramaViewer=TRUE -ProjectionType="equirectangular" out.jpg
which SimplePanoramaViewer 2>/dev/null && SimplePanoramaViewer out.jpg
pgm: dualfisheye2equirectangular
cd $<
gcc -o projection projection.c -lm
./projection \
-x ../xmap.pgm \
-y ../ymap.pgm \
-h 3040 \
-w 6080 \
-r 3040 \
-c 6080 \
-b $${CROP:-160} \
-m $${MODE:-thetas}
dualfisheye2equirectangular:
git clone --depth=1 https://github.com/raboof/dualfisheye2equirectangular
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment