On Fri 04-Aug-2017 at 04:13 -0700, Evert Vorster wrote:


I have been playing around with ffmpeg's remap filter, that moves pixels around in the frames based on a map consisting of two pgm images, which encode y translations and x translations respectively. With this I am able to get a decent 5fps conversion. The problem that I am having with the remap filter in ffmpeg is that the example program that generates the translation maps assumes a perfect fisheye lens.

What I am hoping to do here is to make a translation map based on a Hugin .pto file rather than a perfect lens.

Oooo, this is an interesting ffmpeg feature.

Attached is a quick script that generates the two map files from any PTO project (it requires the perl Panotools::Script module and it probably only works on a unix-y system due to the way it pipes pano_trafo).

This is very fast, I can see this being useful for converting fisheye video to Panini projection for example. A drawback is that ffmeg only uses integer coordinates, so the sampling quality isn't so great.

Unfortunately, this script only generates maps for the first image in the project, so it isn't going to directly work for your use-case. Also, Panotools::Script doesn't know about PTO masks, so this will map all the unwanted areas in your input photos 🙁. You could edit the PGM files in an image editor and white out the areas you don't want, then overlay two streams in ffmpeg, maybe.

This is an often requested Hugin feature, I think it would be useful to be able to generate these PGM files directly from Hugin. The trick for rendering these multiple-fisheye-camera files is to load the file multiple times in the PTO project, so this would need to be noticed somehow.

--
Bruno

--
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/20170805083353.GA3162%40postle.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: pto-ffmpeg.pl
Description: Perl program

Reply via email to