PanoTools mailing list archive

Mailinglist:PanoTools NG
Sender:NobodyisPerfect@...
Date/Time:2017-Mar-13 16:25:29
Subject:Re: Easy way to convert cubic panorama to equirectangular panorama [3 Attachments]

Thread:


PanoTools NG: Re: Easy way to convert cubic panorama to equirectangular panorama [3 Attachments] NobodyisPerfect@... 2017-Mar-13 16:25:29
Hi,

Thanks your suggestions and hints.

 For the part cubic sides to equirectangular panorama I worked out the following solution:
I analyzed the "cubic2erect" http://search.cpan.org/dist/Panotools-Script/bin/cubic2erect script and it won't work with the current version of Hugin 2016.2 (nona.exe). All tries with PT Tools (pano12.dll) were either frustrating or terrible slow.

Therefore I created a batch script (Cubesides2Equirect.cmd for Windows 7) converting cube sides automatically using HUGIN.
It is either possible to use a specific file name or a wildcard (no input = *.jpg)  for the input of cube sides. It will create a PTO script (HUGIN) that will be executed automatically (with hugin_executor.exe). Later on it is also usable by means of "double click" with HUGIN GUI.
It is the fastest way I found for mass conversion (lots of cubic panoramas converted into equirectangular panoramas).
If you use Windows you are welcome to try the script (Cubesides2Equirect.cmd).
It uses HUGIN 2016.2 (for other versions change variable HUGINPATH) and ImageMagick 7.01 (for other versions change variable IMMAGICK) . ImageMagick  is used to determine the cube size (width). Without ImageMagick  it is set to a fixed value (variable CUBEWIDTH). A template script "template.pto" is also used.

Before use try "Cubesides2Equirect.cmd -h" for help.


 For the part cubic panoramas to cube side I worked out the following solution:

 I created a batch script (JPG2Cubesides.cmd for Windows 7) converting cubic panoramas automatically to cube sides using ImageMagick. It is analyzing the cubic panorama for the ratio width/height and detect 5 cubic structures:
vertical cross, horizontal cross, vertical line (Gear VR or plain) and horizontal line (Panorado viewer = plain).
First the panoramas are cut in 12 or 6 equal sized tiles. Afterwards the "black" tiles are deleted (can be disabled) and the remaining tiles are renamed for use with PANO2QVTR or my own script (see above) as:
*_0.jpg = front side
*_1.jpg = right side
*_2.jpg = back side
*_3.jpg = left side
*_4.jpg = top side
*_5.jpg = bottom side
 
If you use Windows you are welcome to try the script (Cubesides2Equirect.cmd).
It uses ImageMagick 7.01 (for other versions change variable IMMAGICK).

Before use try "JPG2Cubesides.cmd -h" for help.
If you have considerable cubic panorama formats I can implement them into the script.

 For the part mov panoramas to cube side I use the following solution:
Ken Silverman (http://advsys.net/ken/kube/kube.htm) wrote a simple and fast program called qmov2jpg.exe converting mov panoramas into cube sides (low and high quality). I am testing a script (using 
ImageMagick) to determine automatically the correct order and rotation of each resulting cubic side (not finished yet). qmov2jpg.exe is faster than the Adapter solution as less steps are necessary and it can be batched [used in batch scripts :)].


 



Next thread:

Previous thread:

back to search page