Loading ...
Sorry, an error occurred while loading the content.

cubicQTVR projection

Expand Messages
  • Hannes Hensel
    Hi group, can someone tell me, which projection is used by QT, when showing cubic QTs? I m looking for the exact formula to calculate the position of a
    Message 1 of 13 , Dec 28, 2006
    • 0 Attachment
      Hi group,

      can someone tell me, which projection is used by QT, when showing cubic
      QTs? I'm looking for the exact formula to calculate the position of a
      projected point on the viewers flat area from a given point on the
      sphere (given by lon and lat).
      Any suggestions?

      Regards, H. Hensel
    • Roger Howard
      ... It s simply 6 faces of a cube, each of which is a 90x90 degree rectilinear image.
      Message 2 of 13 , Dec 28, 2006
      • 0 Attachment
        On Thu, December 28, 2006 8:56 am, Hannes Hensel wrote:
        > Hi group,
        >
        > can someone tell me, which projection is used by QT, when showing cubic
        > QTs? I'm looking for the exact formula to calculate the position of a
        > projected point on the viewers flat area from a given point on the
        > sphere (given by lon and lat).

        It's simply 6 faces of a cube, each of which is a 90x90 degree rectilinear
        image.
      • Hannes Hensel
        ... rectilinear ... Forget the cube. I need to get from the imaginary sphere to the flat image shown by the viewer. So, how can I calculate the position of a
        Message 3 of 13 , Dec 28, 2006
        • 0 Attachment
          --- In PanoToolsNG@yahoogroups.com, "Roger Howard" <rogerhoward@...>
          wrote:

          > It's simply 6 faces of a cube, each of which is a 90x90 degree
          rectilinear
          > image.
          >
          Forget the cube. I need to get from the imaginary sphere to the flat
          image shown by the viewer. So, how can I calculate the position of a
          given point on the surface of the sphere projected on the viewers flat
          rectangular surface?
          For example: Lets say I have the point +30Deg Lat and -60Deg Lon on the
          sphere. And the QT Viewer is set to +20Deg Tilt, -50Deg Pan and 60Deg
          FoW. What I need then, is the formula to calculate the position x, y of
          this point in the viewer. Something like x=f(lat,lon,Tilt,Pan,FoW) and
          y=f(lat,lon,Tilt,Pan,FoW). Or, if dLat=Tilt-Lat and dLon=Pan-Lon, there
          must be x=f(dLat,dLon,Fow), y=f(dLat,dLon,Fow).
          You know what I mean? ;-)
        • rogerhoward@rogerroger.org
          ... I can t, and you shouldn t! ... It s not a sphere, it s a cube. ... First, think of it as a cube. What part of Cubic QuicktimeVR implies a sphere? You
          Message 4 of 13 , Dec 29, 2006
          • 0 Attachment
            On Dec 28, 2006, at 11:31 PM, Hannes Hensel wrote:

            > --- In PanoToolsNG@yahoogroups.com, "Roger Howard" <rogerhoward@...>
            > wrote:
            >
            >> It's simply 6 faces of a cube, each of which is a 90x90 degree
            > rectilinear
            >> image.
            >>
            > Forget the cube.

            I can't, and you shouldn't!

            > I need to get from the imaginary sphere to the flat
            > image shown by the viewer.

            It's not a sphere, it's a cube.

            > So, how can I calculate the position of a
            > given point on the surface of the sphere projected on the viewers flat
            > rectangular surface?

            First, think of it as a cube. What part of Cubic QuicktimeVR implies
            a sphere? You asked about what projection it's using, I told you, and
            you told me to forget about it!
          • Hannes Hensel
            ... Ok, so lets ask me for the projection of the cube faces on the viewer area. This is a 2D view of a virtual 3D scene, and I want to know the projectiontype
            Message 5 of 13 , Dec 29, 2006
            • 0 Attachment
              --- In PanoToolsNG@yahoogroups.com, rogerhoward@... wrote:
              > First, think of it as a cube. What part of Cubic QuicktimeVR implies
              > a sphere?

              Ok, so lets ask me for the projection of the cube faces on the viewer
              area. This is a 2D view of a virtual 3D scene, and I want to know the
              projectiontype and the formulas (to find x and y for given point with
              lon and lat) for it. Can it be, that it is a simple central projection
              (as used as perspective view in maya etc.)?

              > You asked about what projection it's using, I told you, and
              > you told me to forget about it!
              You can forget it in this special manner. Because I surley know about
              the cubical projection, but the question is for the 3D to 2D conversion
              in the QT viewer. Maybe I didn't make myself clear enough here.
            • Rik Littlefield
              ... Yes, these are simple central projections. To *generate* the cubic image file from spherical coordinates, the sphere is centrally projected onto six
              Message 6 of 13 , Dec 30, 2006
              • 0 Attachment
                --- In PanoToolsNG@yahoogroups.com, "Hannes Hensel" <h.hensel@...>
                wrote:
                >
                > --- In PanoToolsNG@yahoogroups.com, rogerhoward@ wrote:
                > > First, think of it as a cube. What part of Cubic QuicktimeVR
                > > implies a sphere?
                >
                > Ok, so lets ask me for the projection of the cube faces
                > on the viewer area. This is a 2D view of a virtual 3D scene,
                > and I want to know the projectiontype and the formulas
                > (to find x and y for given point with lon and lat) for it.
                > Can it be, that it is a simple central projection
                > (as used as perspective view in maya etc.)?

                Yes, these are simple central projections.

                To *generate* the cubic image file from spherical coordinates, the
                sphere is centrally projected onto six planes, one for each of the
                cube faces. In its exact form, this transformation involves lots of
                trig for every pixel, to turn sines and cosines of lat/lon into pixel
                coordinates. Sometimes computational shortcuts are taken, using
                planar triangle approximations instead of doing the trig
                independently for every pixel.

                To *show* the cubic image file, each visible cube face is projected
                to the viewing screen. This transformation involves no trig at all
                on a pixel-by-pixel basis. It just projects an oblique plane (one of
                the cube faces) onto the viewing plane (the display screen). This
                can be implemented as a matrix multiply in homogeneous coordinates,
                followed by perspective division.

                I forget the exact formulas. You can find the general forms in any
                good computer graphics text, but working out the details is always
                fiddly.

                Can I ask, why are you looking for these formulas?

                --Rik
              • Hannes Hensel
                ... Hey Rik, thanks so far. That goes into the right direction. I m only trying to get a bit deaper in that graphic stuff, to understand what is done there.
                Message 7 of 13 , Dec 30, 2006
                • 0 Attachment
                  > Can I ask, why are you looking for these formulas?
                  >
                  > --Rik

                  Hey Rik, thanks so far. That goes into the right direction. I'm only
                  trying to get a bit deaper in that graphic stuff, to understand what is
                  done there. And I wonder, if there is a shortcut, to do those 2 steps
                  in one (sph > cube and cube > viewer = sph > viewer). Than it should be
                  a sphere with the vCamera (central point) as center and the viewing
                  plane inbetween (inner surface of the sphere BEHIND the viewing plane),
                  right? How is the zoom realized then? Is it only done by bringing the
                  viewing plane more to the camera (zoom out) or more to the sphere (zoom
                  in)?
                • Rik Littlefield
                  ... Hannes, Yes, zooming is equivalent to changing the distance between projection plane and center of projection. All of these operations can be combined into
                  Message 8 of 13 , Dec 30, 2006
                  • 0 Attachment
                    --- In PanoToolsNG@yahoogroups.com, "Hannes Hensel" <h.hensel@...>
                    wrote:
                    > How is the zoom realized then? Is it only done
                    > by bringing the viewing plane more to the camera
                    > (zoom out) or more to the sphere (zoom in)?

                    Hannes,

                    Yes, zooming is equivalent to changing the distance between
                    projection plane and center of projection.

                    All of these operations can be combined into one step, for some
                    definition of "step". They are usually kept separated to simplify
                    thinking/coding and to move the cost of computations to where they
                    can be afforded.

                    A little more discussion...

                    In my previous reply, I followed your lead and wrote in terms of
                    lat/lon --> cubic image coordinates --> viewscreen coordinates.

                    But in fact, the transformations are usually run in the opposite
                    direction. For each viewscreen pixel, one computes the corresponding
                    cubic image coordinates. From cubic image coordinates, one computes
                    the corresponding lat/lon. From lat/lon, one computes the
                    corresponding coordinates within a "perfected" camera image (after
                    correction for lens distortion). From those, one computes
                    coordinates within the camera image -- the one that was fed to
                    Panorama Tools as a source image.

                    Pixel value interpolation typically occurs at several places in the
                    pipeline, once for every actual image that is constructed. Suppose,
                    for example, that you run Panorama Tools to stitch multiple camera
                    images into a single equirectangular image, then run PanoCUBE to
                    generate a cubic file, then view with QuickTime or ptviewer. In this
                    case there will be at least three separate interpolations of pixel
                    value: one to go from camera images to equirectangular image, a
                    second to go from equirectangular image to cubic image, and a third
                    to go from cubic image to screen image.

                    In theory, all of this manipulation could be combined into a single
                    step, generating a screen image directly from camera images with only
                    a single interpolation of pixel values.

                    However, that would put the entire cost of the calculation into the
                    viewing loop. At present, that's not feasible because it would be
                    too slow. Instead, the expensive calculations are done once, to go
                    from camera images to cubic image file, so that only very simple
                    calculations are needed for interactive panning/zooming. The viewing
                    calculations can be done quickly even in software, and are simple
                    enough to be done in hardware for even better performance.

                    It is interesting to notice that if you start with camera images from
                    a perfect rectilinear lens, then in theory the entire viewing
                    pipeline can be done without any spherical trig at all! All this
                    lat/lon stuff is just a convenient way to think about the
                    calculation. Ultimately, what's being accomplished is only to
                    project each planar camera image onto the planar viewscreen. That
                    process requires only matrix multiply and perspective division, using
                    homogeneous coordinates. I'm not aware of any software that actually
                    takes this approach, however.

                    --Rik
                  • Hannes Hensel
                    ... Yes, that s true, but there is the problem of blendig, then. If the images were perfect, that should be no problem. But if they did not fit 100% or have
                    Message 9 of 13 , Dec 31, 2006
                    • 0 Attachment
                      --- In PanoToolsNG@yahoogroups.com, "Rik Littlefield"
                      <rj.littlefield@...> wrote:

                      > It is interesting to notice that if you start with camera images from
                      > a perfect rectilinear lens, then in theory the entire viewing
                      > pipeline can be done without any spherical trig at all!

                      Yes, that's true, but there is the problem of blendig, then. If the
                      images were perfect, that should be no problem. But if they did not fit
                      100% or have some exposure differences, one would notice that in the
                      viewer. Maybe it would be a good approach, to correct and blend the
                      images, but to leave their ratio and size. Still it would need some
                      more calculations, like z-buffering, but that shouldn't be a problem.
                      The question here is: is there an advantage in having the (almost)
                      original images available in the viewer or its context? I can already
                      hear "Protect my images! Copyright!" - which is an important thing...
                    • Hans Nyberg
                      ... The fact is there is a guy who stitches panoramas this way. Well not quite but what he does is actually combining 6 images from a fisheye in a 3D software
                      Message 10 of 13 , Dec 31, 2006
                      • 0 Attachment
                        --- In PanoToolsNG@yahoogroups.com, "Rik Littlefield" <rj.littlefield@...> wrote:

                        > It is interesting to notice that if you start with camera images from
                        > a perfect rectilinear lens, then in theory the entire viewing
                        > pipeline can be done without any spherical trig at all! All this
                        > lat/lon stuff is just a convenient way to think about the
                        > calculation. Ultimately, what's being accomplished is only to
                        > project each planar camera image onto the planar viewscreen. That
                        > process requires only matrix multiply and perspective division, using
                        > homogeneous coordinates. I'm not aware of any software that actually
                        > takes this approach, however.

                        The fact is there is a guy who stitches panoramas this way.
                        Well not quite but what he does is actually combining 6 images from a fisheye in a 3D
                        software (CINEMA 4D). They are converted to rectilinear and cropped to 90x90 degree + a
                        seam area.
                        He also use a 15mm fisheye the same way but they have to be combined for each
                        cubeface.

                        His Name is Toshio Fuji
                        http://www.11moon.com/

                        You would know him if you were on the Quicktime list.

                        But be prepared if you contact him. He is a very special guy.
                        He also designs his own panorig and this is what he did to demonstate that his rig was the
                        best.
                        http://www.11moon.com/QuickTimeVR/temp/crush_test_s.mov


                        Hans
                        www.panoramas.dk
                      • georgesur2003
                        I use standalone versions of SPi-V and DevalVR to view equirectangular versions of 360x180 panos. I don t know whether or not they build on the fly cubic
                        Message 11 of 13 , Jan 1, 2007
                        • 0 Attachment
                          I use standalone versions of SPi-V and DevalVR to view equirectangular
                          versions of 360x180 panos.

                          I don't know whether or not they build "on the fly" cubic faces...

                          BTW, the displayed rectilinear image is good and moves are very smooth.
                          This is very helpful for previews before end of stitcher use, but this
                          is out of topic!
                        • Erik Krause
                          Hallo, Hannes ... Search for Euler Angles if you want to know the math behind it... -- Erik Krause Resources, not only for panorama creation:
                          Message 12 of 13 , Jan 1, 2007
                          • 0 Attachment
                            Hallo, Hannes
                            on Sat, 30 Dec 2006 09:00:12 -0000 Rik wrote:

                            > I forget the exact formulas. You can find the general forms in any
                            > good computer graphics text, but working out the details is always
                            > fiddly.

                            Search for "Euler Angles" if you want to know the math behind it...

                            --
                            Erik Krause
                            Resources, not only for panorama creation:
                            http://www.erik-krause.de/
                          • John Riley
                            My memory of Euler Angles had grown fuzzy with time (hey, I haven t really worried about them since my mechanics classes in physics grad school 20+ years
                            Message 13 of 13 , Jan 1, 2007
                            • 0 Attachment
                              My memory of Euler Angles had grown fuzzy with time (hey, I haven't
                              really worried about them since my mechanics classes in physics grad
                              school 20+ years ago), so I googled them to remind myself. I got a
                              kick out of the blue-boxed warning at the beginning of the article on
                              Wikpedia. You know, the same one where they say that the article may
                              need to be cleaned up or doesn't provide proper references. This one
                              said: "This article or section may be confusing or unclear for some
                              readers." I had to laugh 8-) I know I can imaging an unsuspecting
                              reader wondering what the heck THAT is!

                              John


                              John Riley
                              johnriley@...
                              jriley@...




                              On Jan 1, 2007, at 12:06 PM, Erik Krause wrote:
                              >
                              >
                              > Search for "Euler Angles" if you want to know the math behind it...
                              >
                              > --
                              > Erik Krause
                              > Resources, not only for panorama creation:
                              > http://www.erik-krause.de/
                              >
                            Your message has been successfully submitted and would be delivered to recipients shortly.