You are not logged in.

1

Thursday, April 18th 2013, 12:13pm

Script to convert partial panorama to equrectangular/cubes projections

Hello All,



Look for a way to convert more 5,000 partial panoramas to equirecangular - or better 6 faces projections - to be played with the HTML5 KRPano viewer, such like http://krpano.com/examples/116/examples/…artialpano.html (see images here : https://picasaweb.google.com/11314155127…CPm-q8OT8I32qAE)


I've downloaded yesterday Hugin, but I am bit lost *confused* , someone has an idea ? Thanks.


Best regards,


Gregoor

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Thursday, April 18th 2013, 1:41pm

i would say use photoshop. make a droplet so that the output is a 2:1 picture black with your panorama in the middle.. horizon on horizon..
But i think that you have to do every photo seperate..
*question*

Tuur *thumbsup*

This post has been edited 1 times, last edit by "Tuur" (Apr 18th 2013, 2:14pm)


3

Thursday, April 18th 2013, 2:32pm

Thanks Tuur,


But I thought that a script, designed with Hugin or PanoTools could be used as template to automate the treatment !


I've tried *confused* to do by setting Cylindrical or Normal as input and Equirectangular output, but the final projection is wrong...

jsimpson

Beginner

Posts: 10

Location: United States

Occupation: Programmer

  • Send private message

4

Friday, April 19th 2013, 7:23am

Batch conversion of partial panos

Batch conversion of partial panos would require knowing either the horizontal or vertical field of views.
If the horizontal fov was the same for all images then conversion could be scripted using the ktransform tool which is part of the krpano package.
If the vertical fov was the same for all images then some other tool in concert with ktransform would be required to read the height and width of the image in pixels and then calculate the horizontal fov of the image based on the width/height ratio and the vertical fov.
Possible tools would be sips (mac only), exiftool (mac and pc) or imagemagick (mac, pc and unix/linux).

jsimpson

Beginner

Posts: 10

Location: United States

Occupation: Programmer

  • Send private message

5

Sunday, April 21st 2013, 4:38am

Batch conversion of partial panos

Here is a droplet to convert partial spherical panoramas when either the vFOV or hFOV is known. It makes a full spherical image padded with black as required. Then it transforms the spherical image to the chosen format using the ktransform tool bundled with krpano.

Usage:
Unzip the droplet into your krpano tools folder.
Drag and drop one or more images onto the droplet.
Enter the known FOV value.
Click the appropriate hFOV or vFOV button.
Select the desired output image format.
Output image(s) are created in the same folder as the input image(s).
Output image(s) are named using the ktransform naming convention.

Limitations:
Mac only

This droplet uses the sips shell command (Mac only) to make a full spherical image. It pads the image with black as required.

Supported image formats:
jpeg | tiff | png | gif | jp2 | pict | bmp | qtif | psd* | sgi | tga

*If a psd file is used for input, it must be a flat RGB psd without alpha channels. Otherwise the output image may be inverted. This is due to a bug in the sips program.

As with all free software, no waranty is expressed or implied.
jsimpson has attached the following file: