Stereo Camera


install JAVA! (Image as JPS) full-size    install JAVA! (Image as JPS) half-size
   · Orthoscopic camera view ·   

all previews cross-eyed

geometrical camera test structure

It permits to study and demonstrate the various properties and perspectives. Centered at origin, it is comprised of a cylindrical stack of circles and spheres and of lines on the floor going off to infinity repeated everery 30 degrees, the radius of the circles beeing 1 m. Tangential lines and distance marks complete the picture. And then, behind, we see something very strange...

At the time I first created this page, StereoPOV was based on POV-Ray 3.1. The information presented here is still up-to-date though (Feb.2003). POV-Ray 3.1 had some nasty bugs and inconsistencies in the non-standard camera types, that made them difficult to use. Of course, I fixed this bugs in my stereoscopic cameras – POV-team fixed them in 3.5 as well. So, to circumvent this "historical" bugs here on this page, I did the following: (1) all images are rendered quadratic (aspect ratio 1:1). (2) the non-stereoscopic (monoscopic) images added for sake of completeness were rendered with POV-Ray 3.5ß (You will note that some textures got tinted brown at this renders — POV 3.5 interprets the filter texture properties slightly different; but, of course, meanwhile the scene has been updated accordingly). Btw. you can get the source of this camera test scene on the download page.

Image Size and Stereoscopic Window

By convention here in this scene, one POV-Ray scene unit = 1 m. The Stereoscopic Base is defined as 65mm. We use the standard perspective camera with all camera vectors set to 1 m length.

camera {location 0
        direction 1*z
        right 1*x
        up 1*y              // aspect ratio 1:1
        stereo_base 0.065  //  avg human eye speparation

        translate -2*z

Thus, by the general rule built into all my stereoscopic camera types, the image claims to be 1 m wide and is best viewed at 1 m distance from the (slide projection) screen. (When viewed on monitor, the image of course is smaller than 1 m and, as a consequence, can't deliver the full depth impression. But – if you view with anaglyph or LCD shutter glasses – at least you can position yourself aproximately at the same distance to the monitor as the image is wide).

In stereoscopy, the image border formes a window (»Stereoscopic Window«). Here, this window is automatically adjusted such that it appears in 1 m distance from the position of the camera, because the direction is defined to be 1 meter. As the camera was shifted 2 m backwards and the radius of the circles takes 1 m, the Stereoscopic window just touches the circular structure.
standard perspective view install JAVA! (Image as JPS) full-size
install JAVA! (Image as JPS) half-size

Perspective camera (dist=1; width=1)

To achieve larger image angles, in stereoscopy we can take two different approaches. One possibility is, to use a shorter focal length. In the first of the following examples, we chose direction z/2 (comparable to f=12mm in Photography). As a consequence, the window now is located much nearer to the viewer. Another possibility is to make the image double the size: In the lower example, we chose up 2 and right 2. The image now claims to be 2m wide (and has to be projected on a 2m wide screen in order to get the right depth impression). But as the direction vector is unchanged, the stereoscopic window will be at the same location with respect to the objects in the scene, as it was as in the original setup (namely just touching the circles).
half focal length install JAVA! (Image as JPS) full-size
install JAVA! (Image as JPS) half-size

Perspective camera (dist=1/2; width=1)

doubled image size install JAVA! (Image as JPS) full-size
install JAVA! (Image as JPS) half-size

Perspective camera (dist=1; width=2)

Degeneration Problem of Perspective Camera

Now we'll step in to the circular structure, placing the camera at origin and 1 m above ground. We use the "angle" keyword to set the image angle to 90 °. This already is a rather strong wide angle, so objects at the corners will be "pulled apart". When we try to force up the image angle (right example: 170 deg), the distortions get more and more severe. Note that the horizontal circles are depicted curved.
Wide Angle Perspective Camera Distortions caused by extreme wide angular Perspective Camera

Perspective View 90° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half


Perspective View 170° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half

experimental Fisheye Feature

One well known possibility to overcome this degeneration problem is the use of fisheye type perspective. In photography, fisheye lenses are often also used to create a "distorted look". Whilst using fisheye lenses in stereoscopy is possible, it is somehow problematic:

As an experimental Feature my Stereo Fisheye camera behaves similar to a real world stereo camera with fisheye lenses. The depth impression drops to zero when aproaching 180°, the image gets flat in the outer image regions. But this flat image is adjusted so that it appears rather in the window plane. Without such a builtin correction factor it would go off to infinity. So the created image sort of "opens to depth" at center, as if we were looking into a cave. The use of this camera is probably rather to create strange distorted views. To get a real stereoscopic spherical perspective, we need a slightly different approach. (See below)
Please note, that as of the mentioned problems, the implementation can't use the StereoCache, so both views are traced independently.
Fisheye 90° install JAVA! (Image as JPS) full-size
  install JAVA! (Image as JPS) half-size
Stereoscopic Fisheye 90°
Fisheye 180° install JAVA! (Image as JPS) full-size
  install JAVA! (Image as JPS) half-size
Stereoscopic Fisheye 180°

Panoramic Cameras

By utilizing projection onto a cylinder, they overcome the degeneration problem and allow arbitrary angles in horizontal direction, while keeping sort of normal perspectivic imaging in vertical direction (including the degeneration problem for large angles). Real world panoramic cameras use an optical system turning round at exposure time. The russian "Horizont" is an well known example of such a construction. Panoramic views can also be obtained by taking several shots and fitting the resulting photographs side by side. Panoramic Views and the cylindrical perspective were invented in Great Britain about the time of the french revolution. In 19th century, the exhibition of giant panoramic oil paintings of sightseeing places and battle fields was a wide spread and very successful commercial venture. This panorama and diorama shows, followed later in 19th century by the first boom of stereoscopy, were somewhat the first (visual) mass media encountered.

POV-Ray comes with several built in panoramic camera types. They differ in the orientation of the image cylinder as well in the way the imaging in the »upward« direction (direction of the cylinder axis) is handled. Moreover, they differ in the effect of the "angle" keyword. The panoramic camera doesn't obey to angle, it always uses an overall image angle of 180° in both directions. In vertical direction the image looks as if transfered from a sphere to a cylinder (Mercator projection without correction factor? I don't know the theory behind this camera, there is a mention of some paper in the POV-Ray manual). For cylinder cameras the angle keyword controlles the overall viewing angle, but only in horzontal direction. In vertical direction (direction of the cylinder axis), the visible angle is defined through the up and direction vectors, analogous to perspective camera. As a consequence, the images don't stick to the given aspect ratio and have to be scaled accordingly.

POV-Ray Panoramic Camera POV-Ray Cylinder 1  Camera Cylinder 1 with angle=180

camera { panoramic
        location 0
        direction 1*z
        right 1*x
        up 1*y
        // no angle


camera { cylinder 1
        location 0
        direction 1*z
        right 1*x
        up 1*y
        angle 90


camera { cylinder 1
        location 0
        direction 1*z
        right 1*x
        up 1*y
        angle 180

For my Stereo Panoramic Camera I used a simple cylinder projection type similar to "cylinder 1". To be able to implement a consistent behaviour of angle, aspect ratio, image size and stereoscopic window for all stereoscopic cameras, I introduced a new cylinder camera type, "cylinder 5"

As the stereoscopic baseline is oriented (turned round) for every ray, we have unlimited depth impression at all directions. Larger angle means smaller cylinder diameter; when image size remains unchanged, this will result in a position of the stereoscopic window nearer to the viewer.
Stereo Panoramic Camera 90 deg Stereo Panoramic Camera 180 deg

width=1m angle=90° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half


width=1m angle=180° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half

Stereo Spherical Ultra Wide Angle Camera

This newly developed camera type adheres to the same rules mentioned before. It uses a image sphrere rather than an image cylinder and as a consequence doesn't show degeneration problems at larger vertical image angles. As a price to pay, vertical lines get more and more slanted, they "fall" towards the middle axis. (There is principally no way to get an image off the sphere to a planar presentation without producing distortions of some sort).
But before discussing my new addition, let's fist have a look at Dan Farmer's Ultra Wide Angle Camera built into POV-Ray by default:

ultra_wide_angle 90° ultra_wide_angle 180°

Dan Farmer's · angle = 90°


· angle = 180°

This camera uses sort of a fisheye perspective: you can see the typical curved lines, as we look around in all directions. But it is aimed at filling the whole image area. To achieve this, the image stretches out diagonally to reach the square borders. This means we get distortions at the edges. In this camera test scene, all spheres at a given level have the same distance to the camera (at origin). But here the speres near the image corners show up much larger.

If we use this camera rather at smaller image angles, the imaging is verry good and often superior to the perspective camera. For stereoscopy, the only problem is, since this camera is derived from fisheye, it will produce »height errors« as well. So the goal for my newly developed Spherical Ultra Wide Angle Camera was, to use a construction similar to the panoramic camera with baseline turning round in order to gain full stereoscopic depth at all angles, and at the same time to utilize an image sphere for the benifits of »spherical perspective«. (To be more precise: I use two independent image spheres, one for each stereoscopic half image)

Spherical Wide Angle Camera 90 ° Spherical Wide Angle Camera 180 °

Spherical 3D at 90° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half


the same at 180° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half

The image area for this projection type is constrained to one time the whole surface of the sphere. At the usual, smaler angles the image field will be completely filled, but when aproaching higher image angles, at some point the curved borders will show up. Note that the borders are running in depth as well, bending forward in the middle. Vertical lines go sloped more and more at larger angles. As horizontal lines always stay at the same height (important for stereoscopy), objects get shearing distortions at the borders, but the overall area coverd by a given object stayes almost constant (see e.g. the spheres).


Spherical 3D at 360° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half

In this example, we choose an angle of 360° to get a "I-see-everything-view", fully stereoscopic over the whole image area. Our image is quadratic, and so large regions will be black. But as this camera adheres to the same rule with regard to window placement and image size as the other stereoscopic cameras in this patch, we can easily adjust the aspect ratio or place the window at a given point. To demonstrate this, we setup a extreme panoramic view whilst placing the Stereoscopic Window at 1 m distance (i.e. the spheres will be located in the window plane). To get the desired large angle, we simply make the image 6 m wide:

camera { ultra_wide_angle 2
         location 0
         direction z
         right x*6
         up y
         stereo_base -0.065  // cross-eyed view
spherical panorama  

panoramic spherical view 360° · install JAVA! (Image as JPS) full    install JAVA! (Image as JPS) half

using Spherical Ultra Wide Angle Camera

Such extreme panoramic views may be interesting – they may indeed be of some use in a virtual reality setup – but for common stereoscopic imaging there always is the rather strong constraint of the given image size and aspect ratio. As mentioned before, any stereoscopic image always is dedicated to a given image (Window) size and distance. If you are new to stereoscopy, you probably won't bother much about that, but after some years of experience, you may realize this beeing a rather strong constraint. So if we want to make use of a stereo panoramic view with full quality (I mean, beyond the mere «WOW» effect), we need expensive and rare viewing equipment or we need a projection screen of at least 3 m

But spherical projection type openes another possibility often overlooked. We can use this perspective at rather "normal" viewing angles, i.e. where the difference to standard perspective is not so obvious at first glance. But after looking awhile at images with this perspective they may deliver a strong sense of beeing »in« the scene and looking around, to the left, to the right and above.

So to finish this little camera-type test and demo, we'll step out of the geometrical circles at origin and have a look at the strange "background" of this scene...

standard perspective camera install JAVA! (Image as JPS) full-size
install JAVA! (Image as JPS) half-size

View with standard perspective camera

Spherical Ultra Wide Camera install JAVA! (Image as JPS) full-size
install JAVA! (Image as JPS) half-size

Same view with spherical camera

Spherical Ultra Wide Camera install JAVA! (Image as JPS) full-size
install JAVA! (Image as JPS) half-size

Another view with spherical camera

StereoPOV by Ichthyostega Hermann Vosseler home images usage download