Giter VIP home page Giter VIP logo

ocvwarp's Introduction

OCVWarp

Warping images and videos for planetarium fulldome display using OpenCV. Windows and Linux binaries are available in Releases. The wiki has some more information.

In case you want to build your own binaries, if OpenCV and CMake are installed on your system, instructions for building:

cd build
cmake ..
make OCVWarp.bin

Initial behaviour and parameters are set using OCVWarp.ini in the build folder. Please see transformtype.txt for supported transforms.

A file open dialog asks you for the input ini file, then for the input video file, and finally the filename of the desired output file. The codec used for the output is the same codec as for the input if available on your system, or as chosen in the ini file. (If the input file's codec is not available, the output is saved as an uncompressed avi, which can quickly become huge.)

Keyboard commands are

ESC, x or X to exit
u, + or =   to increase angley by 1 degree - the angle seen vertically in output
m, - or _   to decrease angley by 1 degree 
U           to increase angley by 10 degrees
M           to decrease angley by 10 degrees
k, ] or }   to increase anglex by 1 degree - the angle seen horizontally in output
h, [ or {   to decrease anglex by 1 degree - the angle seen horizontally in output
K           to increase anglex by 10 degrees
H           to decrease anglex by 10 degrees
d or D      to toggle display of warped file. Turning off display marginally increases processing speed.

ocvwarp's People

Contributors

hn-88 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ocvwarp's Issues

support for single frame input and output

Currently, single frame input seems to work OK on Linux, to be tested on Windows. Output filename like output.mp4 works, from which the single frame can be extracted with avidemux.

output fps can't be set properly if input is frame sequence

As seen with hn-88/OCVvid2fulldome#10 - OpenCV's undocumented support for image sequences has the quirk that it assumes the input fps (based on locale?) - to be 25 fps (could be different for people in different locales). So, if processing a 30 fps image sequence, I would initially get a 25 fps video which I would then need to convert to 30 fps, for example using the method at https://hnsws.blogspot.com/2024/02/60-fps-to-30-fps-with-ffmpeg-without.html

choose codec

Check out various ways of choosing your own codec. Adding a fourcc line to the ini file should be easy.

add support for animating anglex and angley

Currently anglex and angley - the viewing angles inside the 3d scene - can be varied on the fly using keyboard shortcuts. It would be easier to use if we can give initial anglex/y and final anglex/y, with a spline to ramp up rotation ... or at least constant velocity rotation.

visible seam when converting from equirect video

One pixel wide seam (for 1080x1080 output) is seen for transformtype 0, 1, 5 where the leftmost image pixels meet the right-most image pixels.

For example, along centre of image when Anglex = 90, Angley = -90

issue

Submitter: HN
Testing gitreports.com

Command Line only

Hello,

Could a version for Windows be compiled that works as a command-line tool? So, instead of opening dialogs, it reads three paths as command-line parameters.

Thank You,
Maciej Mucha

Windows build

Try an appveyor build. Check Windows build using a VM. If it doesn't work, try another build just removing the tinyfiledialogs. Because ViewportSaverc appveyor build works.

bottom ten pixels in transformtype=5

Bottom ten pixels are black. This seems to be due to clipping in transformtype=1 When transformtype=1 mapping is changed to allow r<=1.01, the extra pixels are not continuous.

Command Line Usage still force user to use dialogs

The tool is amazing, and now works way much better still does not allow to be used as a commandline tool for images for two reasons:

  • it does not allow to run on sequences starting not from 0 (so starting with frame 600 is not possible), so you cannot run it in batches, or in case of fail, you have to run it again from 0
  • when using a single picture input (so literally written number, like: "Frame_00569.png" it opens a dialog with a question if it is a sequence or not. It should be possible to force him do the image which is not a sequence.

explore options to use stills as input

We could possibly add some parameters to ini file like
fps
number of frames
which would decide how long the video needs to be, instead of outputting just a single frame.

Of course, this can be worked around using avisynth, so this is just an enhancement.

generate the ini file with gui

If we want support for multiple still image files + position each of them individually + animate each of them individually, it may be easier to enter all the details using a ui?

explore single remap options

For transformtype 4 and 5, multiple flips, remaps and resizes slow down processing. Explore the possibility of refactoring code to have a single remap, to speed up processing a little bit.

transformtype 1 goes at 10 fps while 5 goes at 3.8 fps. For the same input and output resolutions.

issue

Submitter: HN2
More details

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.