GithubHelp home page GithubHelp logo

fdd4s / skybox2equirectangular Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 16 KB

script to map 6 skybox cubemap faces into an equirectangular projection with ffmpeg

License: The Unlicense

Shell 100.00%
360-photo 360-view cubemap cubemap-to-equirectangular equirectangular equirectangular-panorama matterport

skybox2equirectangular's Introduction

skybox to equirectangular, a cube2sphere faster alternative

What it does

script to map 6 skybox cubemap faces into an equirectangular projection with ffmpeg v360 filter. This script adds automatically exif tags of 360 equirectangular pano view, this allows to view the pano in viewers like Ricoh Theta https://play.google.com/store/apps/details?id=com.theta360&hl=en&gl=US

the default size of equirectangular image result is 4 * (cube face width) width.
height of equirectangular image is the half of width.

sky2equi.sh is the main tool

mattersky2equi.sh is a tool to simplify the conversion for matterport skybox downloaded with https://github.com/fdd4s/matterport-downloader
e.g: to convert all skybox downloaded to a equirectangular:

$ ls -1 pan*skybox1*jpg | awk ' { print "\"" $0 "\""; } ' | xargs -n 1 ./mattersky2equi.sh  

(both sh scripts and skyboxs must be in the same folder)

resize_equi.sh is a tool to resize the equirectangular pano and set exif tags of the new size

Dependencies

imagemagick, ffmpeg, exiftool

this code is designed to work over linux (as /dev/shm ram tmpfs)

Usage

$ ./sky2equi.sh <front> <back> <right> <left> <top> <bottom> <equirectangular> [<width>]  

Examples

$ ./sky2equi.sh f.jpg b.jpg r.jpg l.jpg t.jpg b.jpg equi.jpg  
$ ./sky2equi.sh f.jpg b.jpg r.jpg l.jpg t.jpg b.jpg equi.jpg 4096  

Known issues

"montage-im6.q16: cache resources exhausted " can be resolved changing ImageMagick configuration, more info here: ImageMagick/ImageMagick#396

Viewers

Android: Ricoh Theta App https://play.google.com/store/apps/details?id=com.theta360&hl=en&gl=US

PC: Linux/Mac/Windows: Panini https://github.com/lazarus-pkgs/panini

Web Browser: Chrome and Firefox: three.js (webgl based): https://github.com/pljhonglu/threejs-panorama https://threejs.org/examples/webgl_panorama_equirectangular.html

Youtube 360 slideshow video

Equirectangular panoramas can be uploaded to Youtube as a 360º video slideshow. It can be created using FFmpeg (like a normal slideshow of jpg images), add the tag to the video of 360º panoramic using "spatial-media" and upload to youtube where the slideshow video will be shown as a 360º video.

https://github.com/FFmpeg/FFmpeg
https://github.com/google/spatial-media

Credits

Created by fdd4s
Send feedback and questions to [email protected]
All files are public domain https://unlicense.org/

skybox2equirectangular's People

Contributors

fdd4s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.