Need help to convert from equirectangular to rx ry rz

  • Would some genius please help me this.
    I have this image hotspot (yellow area):
    (image 1)

    It is descripted in kpt by 4 points:

    <point x="0.572843" y="0.369941"/>
    <point x="0.67479" y="0.370735"/>
    <point x="0.675106" y="0.50119"/>
    <point x="0.57254" y="0.501432"/>
    When XML file is built, it looks like this:

    It is descripted in XML:

    <hotspot name="spotpicture53"
    url="%FIRSTXML%/spots/spot.png"
    distorted="true"
    scale="1.0"
    ath="44.169299"
    atv="-2.496672"
    width="244"
    height="461"
    rx="58.374289612600599"
    ry="24.619635269375699"
    rz="1.8306804508499752"
    enabled="true"
    capture="false"
    handcursor="false"
    />
    I tried to understand what math to convert 4 points of equirectangular to rx ry rz ath atv. At first, I thought ath atv is centroid of 4 points. However, it's not correct because it should be (44.55654,-11.53605). I also tried Cartesian coordinates but no luck. Would someone please shed some light to this or help me?
    Much appreciation!

  • ath/atv (and depth) define the hotspot position in spherical coordinates (angles)
    alternatively you could use tx/ty/tz for a 3D space definition
    these will place the origin of the hotspot

    the coordinates of a polygonal hotspot are just 2d, related to the origin of the hotspot

    rx/ry/rz in conjunction with rotationorder describe the rotation of a hotspot
    if you do not set rx/ry/rz the hotspot will be perpendicular to the center (camera)
    sadly rotationorders are really tricky .-)
    http://www.euclideanspace.com/maths/geometry/rotations/
    http://www.euclideanspace.com/maths/geometry…euler/index.htm

    equirectangular is a projection, not a rotation, what do you mean by "convert from equirectangular to a rotation" ?
    also a polygonal hotspot can not be an image hotspot at the same time *squint*
    you can not 3d define a polygonal hotspot, they are always 2d, like image hotspots

    it is not really clear what do you want to do ... *confused*

  • ahh.. hmm.. you want to exactly match the corners of the rectangle in the equirectangular image by using a hotspot?
    i think this is very complex... the 2d coords of the equirectangular image correspond to ath/atv values.
    but then point coordinates of a polygonal hotspots are 2d again and dont correspond to the ath/atv values ...

    have a look at tuurs toolbox, with that you can place/roatate hotspots manually.
    you can drag the hotspot (sets ath/atv) and tune rx/ry/rz until it fits.

    https://krpano.com/forum/wbb/inde…74910#post74910

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!