Sie sind nicht angemeldet.

1

Montag, 1. Februar 2010, 06:34

Get cube size from equirectangular width and height?

How can I calculate cube size that I will get after equirectangular->cube6 tansformation with krpano Tools?

That formula I've found on http://panospace.wordpress.com/2008/07/0…-on-the-iphone/ :

cubeface side = sqrt(3)/6 * equirect longside
Edit: removed hotlink

But with krpano I get other results.
Example: equirectangular source 4366x2183px.
Cube size from ktransform 1390px.
Cube size from formula 1260px.

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »firefoxer« (1. Februar 2010, 06:53)


2

Montag, 1. Februar 2010, 09:12

Hi,

the krpano tools are using this formula:

cubewidth = spherewidth / PI

with that formula the cube encloses the sphere,
and so there are no information/resolution losses,

best regards,
Klaus

3

Montag, 1. Februar 2010, 09:28

I guess finally it's cubewidth = Math.round(spherewidth / PI)
Thank you, Klaus!

5

Montag, 1. Februar 2010, 21:16

sqrt(3)/6 = 1/3.46 which is slightly smaller than 1/PI (1/3.14).

There are no losses with both formulas. with sqrt(3)/6 the pixel count stays the same. with 1/PI the pixel count is slightly bigger. Both formulas are viable.

@firefoxer: please be more respectful of other people's work and resources in the future. You have hot-linked the image of the formula from my blog without permission.

6

Dienstag, 2. Februar 2010, 08:52

Hi,

I have removed/replaced the hotlink,

Zitat

There are no losses with both formulas. with sqrt(3)/6 the pixel count stays the same. with 1/PI the pixel count is slightly bigger.
sorry, I don't agree
same pixel counts doesn't mean some resolution/details,
e.g. the first complete pixel line in a spherical image will result after remapping to cube in just one single pixel,
and some informations/details in the middle of each cubeface will be lost, but...

Zitat

Both formulas are viable.
...in practice - yes

best regards,
Klaus

7

Sonntag, 9. Juni 2013, 16:22

cubewidth = spherewidth / PI
Excuse my probably noob question but isn't spherewidth the diameter? Then how come equirectangular picture width is the sphere diameter?

8

Montag, 10. Juni 2013, 20:21

Excuse my probably noob question but isn't spherewidth the diameter?
No, the width of the sphere/equirectangular-image is the sphere-circumference!