You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2012-09-22 05:47:43

bradtem
Member
Registered: 2008-11-18
Posts: 224

APG 3 -- What are XnMin/YnMin/Max?

I have scripts that convert .pano files to the parameters for the bpan.xml file for krpano.  The scripts use the thetamin and phimin/max parameters from the old .pano files which were expressed in radians to generate the parameters for krpano's fov and offset.

These don't work now that these fields have been replaced, it seems, by xnmin/xnmax/ynmin/ynmax whose meaning is not obvious.  Do you have docs on these parameters?  Or is there an existing script to convert data from .pano files to krpano xml which is updated for version 3?

Offline

 

#2 2012-09-22 07:23:17

Destiny
Moderator
From: Australia
Registered: 2010-04-27
Posts: 2357
Website

Re: APG 3 -- What are XnMin/YnMin/Max?

Hi.. I believe they are part of a code coordinate system used to calculate a set of vertex normals in 2D space; 3D space would have znmin/znmax. It’s liked to the UCS, 'User Continent System' in CAD apps. Basically these are vector coordinates. Placement of assets can be placed using the X/Y values in 2D space..


Destiny…


Virtual Tours and 3D/360 Object/Product Photographer - Our aim is to create a 3D/360 Virtual Tour Shop/Store with links to 3D/360 degree products. My gear, VR Drive II - D90 - Nikon 10.5 fisheye - Nikon D800 with Nikon-Nikkor 14-24 - NOVOFLEX Magic Balance - Acratech GP Ball-head - Nodal Ninja 4 + RD-16 Rotor - Manfrotto 190CXPRO4 Carbon Fiber Tripod smile smile

Online

 

#3 2012-09-22 09:06:57

bradtem
Member
Registered: 2008-11-18
Posts: 224

Re: APG 3 -- What are XnMin/YnMin/Max?

All very well and good, but they seem to have replaced the theta and phi values and I need those for the krpano, so if the formula is available, let me know.  I have noticed that for a 360 degree pano the Xn value is 0 to 1, but for other panos it is not simply the FOV where 1 is 360.

Offline

 

#4 2012-09-26 03:05:13

bradtem
Member
Registered: 2008-11-18
Posts: 224

Re: APG 3 -- What are XnMin/YnMin/Max?

Just a bump on this -- with the switch to APG 3, I can no longer convert my panos to krpanos for display without a formula to generate the hfov, vfov and voffset numbers -- is this the wrong place to ask for that formula?  APG still displays the numbers in the pano editor so the formula obviously exists in the code.

Last edited by bradtem (2012-09-26 03:05:46)

Offline

 

#5 2012-09-26 11:34:06

Destiny
Moderator
From: Australia
Registered: 2010-04-27
Posts: 2357
Website

Re: APG 3 -- What are XnMin/YnMin/Max?

bradtem wrote:

All very well and good, but they seem to have replaced the theta and phi values and I need those for the krpano, so if the formula is available, let me know.  I have noticed that for a 360 degree pano the Xn value is 0 to 1, but for other panos it is not simply the FOV where 1 is 360.

Hi.. I think you are confusing two mathematical terms and uses. A Virtual Tour, as far as I understand, does not use the rho, phi or theta maths since that is used for calculating the spherical surface of a sphere, ie longitude and latitude etc.. As I understand it, a Virtual Tour pano uses the Cartesian Coordinates System, which is the spacial values of a sphere - x and y with no z value since that is an absolute position, which cannot be changed. The rho, phi, theta are Spherical Coordinates. There are similarities but the maths is different ie; But I might be wrong since I look at the word in 3D.. roll

x = p sin ϕ = θ
y = p sin ϕ sin θ 
z = p cos ϕ

With regards to the krpano question, I would do search on that web site.. Its full of good information...

Destiny...

Last edited by Destiny (2012-09-28 10:11:58)


Virtual Tours and 3D/360 Object/Product Photographer - Our aim is to create a 3D/360 Virtual Tour Shop/Store with links to 3D/360 degree products. My gear, VR Drive II - D90 - Nikon 10.5 fisheye - Nikon D800 with Nikon-Nikkor 14-24 - NOVOFLEX Magic Balance - Acratech GP Ball-head - Nodal Ninja 4 + RD-16 Rotor - Manfrotto 190CXPRO4 Carbon Fiber Tripod smile smile

Online

 

#6 2012-09-26 13:42:56

ThomasV
Member
Registered: 2012-08-27
Posts: 246

Re: APG 3 -- What are XnMin/YnMin/Max?

Hi,

The reason for this change is that theta/phi do not have mean for some of the new projections.

In your case, I suppose your are considering sperical projection, and then formulas are quite simple:

Code:

Theta_min = (2 * xmin - 1) * Pi
Theta_max =(2*xmax - 1) * Pi
Phi_min = Pi/2 - Pi * ymax
Phi_max = Pi/2 - Pi * ymin

Applying these formulas should give you the same theta/phi values as before.

Regards,
Thomas

Offline

 

#7 2012-09-26 18:39:56

bradtem
Member
Registered: 2008-11-18
Posts: 224

Re: APG 3 -- What are XnMin/YnMin/Max?

Krpano doesn't seem to have much docs on working with APP/APG.     As noted I am not interestd so much in theta and phi, though I had worked out formulae for those numbers because they were used in the old .pano format.   What I really want are the hfov, vfov and yoffset that krpano uses (and which, to an extent, APP displays when you have the crop tool on display.   Are the formulae the same for cylinders?  I mostly do cylinders and a few planars and now the Panninis -- I only rarely do spherical.   I have never called this "virtual tour" as I don't even usually do 360 degree panos, but krpano and its ilk are the only tools to let you display a large pano on the web.

I was under the impression that with the partnership between krpano and Kolor that a lot of people are mapping APP generated panos into krpano files and so you might want to consider officially supporting this in some way.   I realize that the parameters in the .pano file are not generally officially supported.

Offline

 

#8 2012-09-28 09:45:51

bradtem
Member
Registered: 2008-11-18
Posts: 224

Re: APG 3 -- What are XnMin/YnMin/Max?

ThomasV wrote:

Hi,

The reason for this change is that theta/phi do not have mean for some of the new projections.

In your case, I suppose your are considering sperical projection, and then formulas are quite simple:

Code:

Theta_min = (2 * xmin - 1) * Pi
Theta_max =(2*xmax - 1) * Pi
Phi_min = Pi/2 - Pi * ymax
Phi_max = Pi/2 - Pi * ymin

Applying these formulas should give you the same theta/phi values as before.

Regards,
Thomas

I note that while the first forumal makes sense (in radians), the second one does not at all match the results you see in the crop tool,  so can you please double check this formula.   (krpano wants it in degrees but of course I can convert.)  Multiplying by two almost works but not quite, which is odd.

Offline

 

#9 2012-09-28 16:03:14

ThomasV
Member
Registered: 2012-08-27
Posts: 246

Re: APG 3 -- What are XnMin/YnMin/Max?

Hello,

In spherical coordinates:

Code:

Theta = (2 * x - 1) * Pi
Phi_min = Pi/2 - Pi * ymax
Phi_max = Pi/2 - Pi * ymin

When ymax = 1 ==> phi_min = -Pi/2
When ymin = 0 ==> phi_max = Pi/2

That's what I can see in the crop window (with a conversion between radians and degrees of course)

Do I miss something ?

Regards,
Thomas


Uploaded Images

Offline

 

#10 2012-09-28 19:40:13

bradtem
Member
Registered: 2008-11-18
Posts: 224

Re: APG 3 -- What are XnMin/YnMin/Max?

I was looking at some other projections for which the numbers differ a lot.  Let me explore more.  I care mostly about sphere, cyclinder and now I like pannini though I suspect that may be best viewed as a flat image (something krpano still is not perfect at.)

Offline

 

#11 2012-10-10 11:30:28

ThomasV
Member
Registered: 2012-08-27
Posts: 246

Re: APG 3 -- What are XnMin/YnMin/Max?

Hello bradtem,

After a deeper look at what you need, I think you could just use what is stored in panorama exif.
Indeed, there is a field named 'UserCOmment' in the EXIF containing several informations. It seems to include the Fovs and the offset you need.

Hope it helps,
Thomas

Offline

 

#12 2012-10-10 12:56:55

klausesser
Member
From: Düsseldorf, Germany
Registered: 2006-05-22
Posts: 6436
Website

Re: APG 3 -- What are XnMin/YnMin/Max?

bradtem wrote:

. . but krpano and its ilk are the only tools to let you display a large pano on the web.

Zoomify and Gigapan can do also. The mechanism of the Gigapan.org site is very interesting i mean - and it´s easy done: http://api.gigapan.org/gigapans/97639

best, Klaus


If you want something you´ve never had,
then you´ve got to do something you´ve never done.

Offline

 

#13 2012-10-10 17:46:22

bradtem
Member
Registered: 2008-11-18
Posts: 224

Re: APG 3 -- What are XnMin/YnMin/Max?

Yes, that's what I mean by "and its ilk" -- the browser based zoom viewers.    I have many photos on gigapan, hardly unaware of it.

Offline

 

#14 2012-10-10 18:13:01

klausesser
Member
From: Düsseldorf, Germany
Registered: 2006-05-22
Posts: 6436
Website

Re: APG 3 -- What are XnMin/YnMin/Max?

bradtem wrote:

Yes, that's what I mean by "and its ilk" -- the browser based zoom viewers.    I have many photos on gigapan, hardly unaware of it.

Ahhh big_smile I didn´t know the term "ilk", sorry. What else viewers for the net resp. displaying on the screen would there be besides browser-based ones? And: for which reason?

best, Klaus

Last edited by klausesser (2012-10-10 18:14:39)


If you want something you´ve never had,
then you´ve got to do something you´ve never done.

Offline

 

#15 2012-10-10 20:51:10

bradtem
Member
Registered: 2008-11-18
Posts: 224

Re: APG 3 -- What are XnMin/YnMin/Max?

Oh, in the early days the first viewers, like the quicktime vr player, were independent programs or possibly worked via java applet or dedicated plug-in.   Even today, the players are usually flash based though some html 5 based viewers are now available, entirely browser based.

Offline

 

#16 2012-10-10 22:35:09

klausesser
Member
From: Düsseldorf, Germany
Registered: 2006-05-22
Posts: 6436
Website

Re: APG 3 -- What are XnMin/YnMin/Max?

bradtem wrote:

Oh, in the early days the first viewers, like the quicktime vr player, were independent programs

Yes. I used QT - and QTVR-Studio - from 1998 to 2005 commercially.

bradtem wrote:

or possibly worked via java applet or dedicated plug-in.   Even today, the players are usually flash based though some html 5 based viewers are now available, entirely browser based.

That´s what i said: interactive panoramas usually are presented via a browser. Either as spheres or as hires rectangulars - interactivity works on screens only.

The only other way is printing. Printing isn´t interactive - or can you zoom into a print? No - but of course you can move closer nevertheless . . . big_smile

best, Klaus


If you want something you´ve never had,
then you´ve got to do something you´ve never done.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson