Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<action name="calc_pos_from_hfov_yaw_pitch_roll"> div(hfov,%1,57.295779); div(yaw,%2,-57.295779); div(pitch,%3,57.295779); div(roll,%4,-57.295779); mul(hfov,0.5);Math.tan(hfov);mul(width,hfov,1000);set(height,'prop'); Math.cos(ch,yaw);Math.sin(sh,yaw); Math.cos(ca,pitch);Math.sin(sa,pitch); Math.cos(cb,roll);Math.sin(sb,roll); mul(m0,ca,ch); mul(tmp,cb,sa);mul(tmp,ch);mul(tmp2,sb,sh);add(m3,tmp,tmp2); mul(m4,cb,ca); mul(tmp,cb,sa);mul(tmp,sh);mul(tmp2,sb,ch);sub(m5n,tmp,tmp2);mul(m5n,-1); mul(tmp,sb,sa);mul(tmp,ch);mul(tmp2,cb,sh);sub(m6n,tmp,tmp2);mul(m6n,-1); Math.atan2(yaw,m6n,m0); Math.atan2(roll,m5n,m4); Math.asin(pitch,m3); mul(ath,yaw,57.295779); mul(atv,pitch,57.295779); mul(rotate,roll,57.295779); </action> |
![]() |
Source code |
1 2 3 4 5 6 |
<hotspot name="spotNNN" url="pool_extract.jpg" distorted="true" onloaded="calc_pos_from_hfov_yaw_pitch_roll(150, -90, -4, -30);" ... /> |
![]() |
Source code |
1 2 3 |
<!-- lower resolution images for HTML5 and mobile devices --> <hotspot name="water" url="pool_extract_html5desktop.jpg" devices="html5+desktop" /> <hotspot name="water" url="pool_extract_html5mobile.jpg" devices="mobile|tablet" /> |
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
This post has been edited 1 times, last edit by "Tuur" (May 15th 2012, 1:27pm)
Set 'Horizontal compression' and 'Vertical compression' to 0.0 !In my test the hotspot alignment is not perfect. Maybe i did somthing wrong.
Best regards,
Quoted
After step 2.3. round the hfov, yaw, pitch and roll values to 2 or 3 decimal places and enter them again in the stitcher.
Why that?
PTGUI and Hugin are only displaying the first 4 decimal places of these values but the real intern values have more decimal places. So to make the rendering and the values exactly fitting together, a manual rounding and re-entering is necessary.
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
This post has been edited 2 times, last edit by "Tuur" (Jun 6th 2012, 2:13pm)
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
This post has been edited 2 times, last edit by "Tuur" (Jun 14th 2012, 2:57pm)
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer