Code Monkey home page Code Monkey logo

Comments (2)

AdrianEddy avatar AdrianEddy commented on June 2, 2024

360 support in Gyroflow is not planned, unless someone contributes it. But I doubt it as it's a significant amount of work and a lot of refactoring would need to be done.

from gyroflow.

jumpjack avatar jumpjack commented on June 2, 2024

I can contribute telling you how to use ffmpeg to convert a fisheye image into equirectangular, and then virtualling moving around the camera by changing yaw, pitch and roll

Fisheye to equirectangular:

ffmpeg -i input.png -vf v360=fisheye:e:ih_fov=180:iv_fov=180 -y output.jpg

If you have a fisheye camera pointg up...

image

you will get a quite distorted image, because the ceiling is centered in the equirectangular image:

image

If you want the image to be seen like if camera was horizontal, you must add pitch parameter to compensate the 90° angle:

ffmpeg -i input.png -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=-90 -y output.jpg

... obtaining this:

image

You can also play with yaw and roll, but the three angles (yaw, pitch, roll) combine "weirdly" depending on which order you specify them: the default order used by ffmpeg is ypr , but you can change it adding parameter "rorder=YOUR_SEQUENCE":

ffmpeg -i input.png -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=-90:rorder=pry -y output.jpg

For example, to rotate camera left to put ceiling fan at center of image:

ffmpeg -i input.png -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=-90:yaw=-150:rorder=pry -y output.jpg

image

If you also want to point the camera up to the fan, you must change the pitch:

ffmpeg -i input.png -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=-150:yaw=-150:rorder=pry -y output.jpg

image

You can notice that to point the camera up again, you cannot put the pitch to 0, due to "interference" of changed yaw.
Adding roll makes things even more complex...

Although the image looks very distorted, it is intended to be viewed into a VR viewer or into a panorama viewer like this:

https://renderstuff.com/tools/360-panorama-web-viewer/

Using last image, view will appear centered on the fun right from the beginning, which makes the "navigation" in the image with panning quite uncomfortable, but if you use the first image, with flat horizon, everything goes fine.

You can make experiments with ffmpeg online using this site: https://ffmpeg.lav.io/ If you use thumbnail images for testing, it's very fast. Don't forget to change extension of input file to "." to be able to load images rather than videos.

What I am nto able to do is how to use ffmpeg to generate a PRY triplet per each frame of a video, I only know how to process single images.

from gyroflow.

Related Issues (20)

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.