Showing posts with label Theory. Show all posts
Showing posts with label Theory. Show all posts

Saturday, October 3, 2015

How to Measure Stereoscopic Deviation using StereoPhoto Maker


In this blog I will describe three ways to measure the stereoscopic deviation in a stereo pair, using the free software StereoPhoto Maker. This is based on a Tutorial published in the Stereogram 20.2 (October 2015). Stereogram is the newsletter of the Ohio Stereo Photographic Society (OSPS) and it has been published since 1997. For subscription information, see www.ohio3d.com

What is Stereoscopic Deviation and Why Should I Care?

If you look at a stereo pair it consists of two seemingly identical pictures. However, the pictures are not identical, but have small differences in the form of displacements in the horizontal direction. It is these displacements (stereoscopic deviations) that are responsible for the sense of depth when the pictures are seen in stereo. So, yes, you should care :)

Here is a stereo pair. Notice that the house is displaced with respect to the tree. This is easier to see if the two images are superimposed:


Back in the good old slide film days, the only practical way to superimpose images was in stereo projection. Today, this is easy to do with digital images and programs like StereoPhoto Maker.

The deviations vary across the image (see the road in this picture), being zero at the “window” (tree in the figure above) and maximum at the furthest object (house). We are usually interested in the maximum stereoscopic deviation (P, I have used the letter P from "parallax" another term for this displacement). For an image to be viewed comfortably, this maximum stereoscopic deviation must be less than a certain amount, which depends on the viewing method. One popular recommendation for projection is to keep the maximum stereoscopic deviation under 3.3% or 1/30.  Note that P has a value of length and it can be measured on film or a camera sensor or a display, so it depends on the image size, but it is more meaningful to divide this deviation by the image width to produce a ratio or %, which does not depend on image size.

So, now that we know what the stereoscopic deviation is, let's address the question, how can we measure it? But, first, let's load up an image to work with. I selected this stereo pair, a close-up of a butterfly. I took this picture during the 2010 NSA Convention. I would like to measure the maximum stereoscopic deviation and answer the question if this image will project well or cause problems. Here it is (in LRL format, click to enlarge and freeview):


But where is the far point in this image (which is responsible for the maximum stereoscopic deviation)? It seems to be in the lower part of the purse. There is black spot there which is easy to see (and measure). I will consider that to be the far point whose deviation I would like to measure.

1. Using SPM’s Auto Alignment report

After auto alignment with SPM, a window pops up with “Auto alignment values.”  Look for the value reported as “disparity of the infinity points” near the bottom. This is reported as a ratio and in this case it is 1/18. This is about twice as large as the recommended 1/30 value. This serves as a warning that there will be excessive deviation in stereo projection.  Here is how the report looks. I have circled the disparity value:


2. Using a grid in SPM

Dennis Green (of the Detroit Stereo Club) made me aware of this method. First, go to anaglyph (or interlaced) mode to overlap the two images. Then go to View -> Grid Setting (bottom of the menu, see the figure below). Set the V Line to 29 (this will divide the image to 30 segments). With just one look you can see which points are within one segment so have the maximum recommended deviation (1/30) or less. For the maximum deviation (shown below) this method gives a value of 2.5 times the recommended value (2.5/30 = 1/12).


3. Using SPM’s Position Alignment X value

At the bottom center of the SPM screen you see this: Position Alignment (x=0, y=0). If you press the R or L arrow keys, the x value changes (pressing the top and bottom arrows changes the y value). So my procedure for measuring deviation is this: Overlap the images (I like to use interlaced because I have an interlaced 3d monitor). Here is what I see. I have highlighted the far points that I will overlap to measure their deviation:


Use the R/L arrow keys to overlap two objects. Read the x displacement. This is the stereoscopic deviation in pixels. Here is what I get:



Divide this by the width of the image to get the % deviation. Using this method I measured 84 pixels for the far points. 84/936 (image width) = 9% or 1/11, which is close to Dennis’ grid method.

Note: the default displacement is 4 pixels every time you press the arrow keys, but this can be changed to a different value through the “Preference” menu shown here (to get to this menu go: Edit, Preferences, Adjustment).


Changing it to 1 pixel will give you the best possible accuracy. This value will also affect how fast the stereo window changes every time you press the arrows, so you might want to bring it back to the default 4 if you have changed it to 1 (4 works well, 1 is a bit too slow).

Note added later: Pierre Meindre mentioned in photo-3d that if you hold the shift key while pressing the arrows, the adjustment is made in 1 pixels increments, no matter what the default is. In this case, there is really little need to lower the default. As a matter of fact, Pierre increased the default to 10 for fast adjustments and then presses the shift key for fine adjustments. The default value of 4 works for me so it is good to know that I do not have to change this, just remember to hold the shift key when I want fine adjustments. (PS. I have now increased the default, like Pierre has done. This works the best for me. The window moves quickly and when I want to slow it down, I press the shift key.)

One last "trick" when using the Position Alignment method: If you press the Home key, the X and Y values are initialized (set to zero).  You can also use this method to measure Y displacements (there should not be any Y displacements in a perfectly aligned image, but they often are because alignment is not or cannot be perfect).

Comparing the Three Methods

Notice that the SPM alignment report gives a smaller deviation than the other two methods. Using the grid or displacement method is more accurate because it is targeted to specific points. The report is based on image alignment which selects a certain number of points used in the alignment. The far point might have been missed (better: "not included") in the alignment. So the alignment report is good for giving you one quick value for the maximum deviation. If you are using auto alignment, you get this value with no extra effort.

The grid allows you to estimate the stereoscopic deviation in the entire image with one glance.

The Position Alignment method allows you to accurately measure the stereoscopic deviation for specific pairs in the image. It is the most accurate but also most time consuming.

Does the Excessive Deviation Matter?  

This is a very good question. The fact that the maximum deviation is excessive does not mean that the image will have a problem in projection. It depends on how prominent the “offending” (showing excessive deviation) part of the images is.

In this particular image it is just a spot on the purse.  One could use photo editing to remove this spot. The attention of the viewer is focused on the butterfly and the hand. The purse is mostly irrelevant and does not draw much attention. In that respect, this image works, even though it has about 3x the recommended maximum deviation. But if the background is prominent and cannot be ignored, then excessive deviation will be a problem. Knowing the maximum stereoscopic deviation is not enough to decide if an image will work or not. You need to see the entire image and make a subjective call.  No matter if the deviation is a problem or not, knowing how to measure it can be useful.

One last comment: I think this image demonstrates the difficulty in taking a close-up of a small object with the Fuji with B = 75mm. A different camera (Panasonic 3D1 with B = 30mm) or a Cyclopital close-up attachment with the Fuji (B = 30mm) would have been a better tool for this particular picture.

Let me know if you have any comments and make sure that you check my other blogs for 3d stereoscopic information.

Friday, March 7, 2008

Stereo Drawings



Back in 1988-1990 I wrote a program in “C” (that’s a programming language), to create stereoscopic drawings. It worked like this: The program will read a data file with the three coordinates of an object in space (X, Y, Z) plus simple instructions for plotting them, and then it would create a stereo pair. A fancy (for 1990 computer technology) interface allowed the user to rotate the image in space, while viewing it in 3d.

This was a nice learning experience for me and took quite a bit of time. See here some examples of the drawings I produced (click to enlarge) and also of the keyboard layout that allowed me to rotate, translate (even in the z-direction, i.e. affecting the stereo window), magnify the image, and also change the two important variables, perspective and parallax.

I am amazed that I did this work 18 years ago and then abandoned it. I am now feeling an urge to resume this, but what tools to use today? The reason I want to resume this work is that I want to study some interesting situations, like “keystoning” using simple drawings instead of actually trying to take pictures.



The program did a lot of things, like scaling, centering, rotating, etc., but the most important operation for 3d purposes is the projection of the point on the “plane of the screen”. Here is how this goes (see figure on the left):

We start with a point in space with coordinates (Xo, Yo, Zo). The observer is sitting at the point Z in the z-axis. If from this point Z we project this point to the projection plane (x, y), we get these projection coordinates: (Xc, Yc). We then move the observer to the Right and Left by B/2 each time (B is the stereo base) and project. Only the x-projections change. In the end, we get two pairs of points (XR, YR=Yc), (XL, YL=Yc). These are the coordinates of our starting point in the right and left projections.



I soon realized that there are two variables involved: One is the stereo base (B), which controls the stereoscopic deviation in the pair. This is clear. The other variable is not so obvious: For a given object, it is possible to come closer and photograph it with a short FL lens, or stay back and photograph it with the long FL lens. The difference between these two situations is the perspective. So I decided to use two variables in my program:

- PAX (Parallax) defined as B/D
- PER (Perspective) defined as S/D

B is the Stereo Base, S is the size of the object, D is the distance of the “camera” from the object.

The Parallax value is what I have called in previous postings “convergence ratio”, B/I in my current terminology. The Perspective variable is inversely proportional to the distance. It is related to the angle of view that the lens sees, which is also related to the size of the film and inversely related to the focal length. We can call this variable the “field of view ratio”.

It is interesting that I note as reasonable values 0.3 for PER (a “normal lens” has a ratio closer to 1. A ratio of 0.3 corresponds to lens of focal length between 80 and 120mm for 35mm film(depending on how you define the film angle of view, horizontal, vertical, or diagonal – the diagonal dimension is normally considered, but in stereo the horizontal is more appropriate, but should this be 36mm or maybe 28mm-7p or 21mm-5p?). So my choice of 0.3 is definitely conservative, meaning that it leads to milder perspective changes.



I also note that 0.06 is a good convergence ratio. Written as a ratio, this is 1/17, which is stronger than the 1/30 rule of thumb for normal stereo photography, but more in line with close-up/macro stereo photography.

It is interesting to study the formulas that give the coordinates of the projected points. There is a variable (which I called M because it looks like a magnification factor since it affects both variables the same degree.) This variable is not constant but it depends on distance (z) only. This expresses the perspective. Object points close to the camera, project further away, i.e. they look larger. The true stereo part of the coordinates depends also on the distance. As expected, objects closer to the camera have more depth. As we have discussed, distance affects all three metric aspects of the stereo image: Size, perspective, and depth.

Two interesting situations: If we set PAX = 0 (B = 0), there is no stereo! The two projections will be identical. The 2d images will have perspective but it will be flat. If we set PER = 0 we can still create a stereo pair, but there will be no perspective. This is known as “orthogonal projection”. Now, to have zero perspective we must be far away from the object, but then how do we have depth? By increasing the stereo base. The bottom line is that by changing our two variables we can create stereoscopic drawings that have various amount of depth (stereoscopic deviation) and perspective.

Infinite Road Problem

--- Background:

This is something that has been in my mind for a while, since we discussed the effects of changing the stereo base and focal length, and their interaction.

The fundamental stereoscopic formula (P = FB/I, P: parallax, or stereoscopic deviation, B: Stereo base, F: Focal length, I: near object distance, assuming far object is at infinity) clearly shows that increasing the focal length increases the stereoscopic deviation *for the same near object distance*.

In practice however, the near distance does not stay the same as we "zoom into the scene", but it is pushed back. I have watched Jay in our stereo club, zoom into a scene using digital stereo projection. This zooming is equivalent to increasing the focal length of the recording lens (yes, it is!) and as he zooms into the scene, it appears that the magnified scene is perfectly balanced depth-wise. So, it appears that zooming into a random scene is not a problem and stereoscopic deviation is under control. While it is difficult to analyze a random scene, it is easy to analyze this “Infinite Road” situation.

--- The Problem:

I set my camera on a tripod, at height H from the ground, in front of a road which is flat and extends far away. The only near point to the camera is this road. When I use a wide angle lens the near point is at I1 (see figure at left) If I switch to a longer focal length lens, the near point is now I2. The far point is at infinity. Now, by increasing the focal length I am increasing the stereoscopic deviations according to P = FB/I, but I am also increasing I, which is the nearest point in the road seen by the camera. Question: What happens to the stereoscopic deviation? Does it increase, decrease or remain the same?

--- Solution:

As we change the focal length, we have in front of the camera a triangle with H as its height, and I as its length (angle φ is the half of the angle of view). The schematic here shows what is happening in front and behind this triangle (this schematic is upside-down, compared to the previous one). From similar triangles we have H/I = h'/F. h' is the image of H in the film, or half the image height. Rearranging we get: h'/H = F/I. The stereoscopic formula is P = FB/I. Substituting the ratio B/I, we get:

P = (h'/H) B (1)

This is interesting: The stereoscopic deviation is independent of the focal length! Since H and h' are constants, P depends on B only, not F. Conclusion: The stereoscopic deviation remains the same. It is does not change with focal length.

--- Discussion:

This is actually a “constant magnification problem in disguise. The ratio H/h' is actually the magnification (H is the object photographed and h' is its image in film). We already know that P = M B (this formula is actually more general than the stereoscopic deviation formula P = FB/I) and we know that if the magnification is the same, then the stereoscopic deviation only depends on B, not F. But, there is no actual object of height H in front of the camera! H is the height of the camera above the road. What magnification am I talking about? It does not really matter that there is no object of height H. The way the geometry works, as we change the focal length, it is as if there is always an (imaginary) object of height H at distance I from the camera that fills the frame. Think about it!

--- An application:

Let’s say that I am using my RBT camera (B = 75mm) and I want to achieve 1.2mm total deviation on film. How high should I raise my camera? Let’s plug some numbers to (1): P = 1.2mm, h' = 12mm (half the film height), B = 75mm. Solving for H = (h’/P) B = 12x75/1.2 mm = 750mm (about 30 inches). So if I raise my tripod by 30 inches (3/4m) I will get good depth, no matter what lenses I use.

--- Implications:

It is easy to see that instead of a road we can have any type of surface (a tunnel, etc) that follows simple perspective geometry as it recedes from the observer and the conclusion will be the same, i.e. stereoscopic deviation is independent of focal length as long as the near object is this ground and not a tree or something else. We have also seen that the same conclusion applies when there is an object like a tree or a person or animal and we are then *moving* so that this object is framed to “fill the frame” (constant magnifications). So there are more than one situations where we arrive at the same conclusion. Maybe having a camera with fixed stereo base and variable focal length (like an RBT camera with fixed lenses) is not so bad after all!

--- An extension:

What happens if the ground is not level but slopes up or down (uphill/downhill, see picture). In this case, I worked out the math as:

P = (h’/H) B tan (φ-θ)/tanφ, where θ is the slope, and tanφ = h'/F

Notice that if θ = 0 then we get (1). The sign of θ is important (positive is slope down in my formula). This result shows that P now depends on the focal length. If the ground is sloping down, then the deviation decreases as we increase F. Note that if φ = θ, then the camera never sees the ground because of this slope (the lower filed of view runs parallel to the road) so P = 0 (no near object, only infinity, thus no depth!) If the slope is negative (uphill) then the deviation increases with focal length. Finally, the same result applies if the camera is tilted by θ with respect to the ground (ground flat, camera tilted).

Monday, February 25, 2008

Long FL stereo photography - PePax Principle


To neutralize the compression resulting from the use of longer lenses we can increase the stereo base. This leads us to the “PePax Principle”, advocated by H. C. McKay in the '50s. According to this principle, if you increase the focal length of the recording lens you should increase the stereo base proportionally to get a picture that resembles ortho stereo.

This technique is used for wild animal photography and assumes two things: 1) The near object is far away from the camera, and this is the reason for using long FL lenses. 2) The background is limited (there is no infinity and the depth range of the scene is restricted). These two conditions ensure that the stereoscopic deviation remains under control. (As we showed in the previous posting, under constant magnification and narrow depth range, p ~ B/F, so doubling B and F results in the same stereoscopic deviation.)

Two examples are shown here: The bear was photographed in the Cleveland zoo using 135mm lenses. At first, I took the picture with the camera side-to-side (6 inches). I was not happy with the depth compression so I tried increasing the stereo base to follow the PePax principle (10 inches). The results looked better. When I entered this picture in Detroit, someone asked me how could I come so close to the bear with my Realist, an indication that the picture looks like it was photographed closer with shorter FL lenses.


The three bowling pins have been photographed and are shown so that the front pin has the same size (constant magnification). The depth range is also limited. The middle picture is taken at F, B, I. For the top picture the camera is moved twice away from the subject (2I) and the focal length is doubled (2F) but the stereo base remains the same. This picture (2F, B, 2I) shows depth compression, compared to the (F, B, I). In the bottom picture, we have doubled the stereo base (2F, 2B, 2I). This bottom picture compares well with the original one.

So, What's the Catch?

By increasing F and B proportionally we make further objects, photographed with a longer lens, look as if they were photographed closer with a normal lens. This sounds too good to be true. As a matter of fact, it is too good to be true! To understand how the resulting pair differs from the “ortho pair”, compare the top and bottom figures of the bowling pins. Even though the depth is increased and the compression seen at the top is partially eliminated, the bottom picture is still different from the middle (which was recorded from closer). The difference is in the perspective, or the relative sizes of objects at different distances from the camera which has not changed. As a result, distant objects appear larger than nearby objects or nearby objects appear smaller than distant objects. This is direct result of trying to fool the brain into thinking that we are closer to our subject when we are really further away.

Effect of Focal Length on Stereoscopic Deviation

What happens to the stereoscopic deviation as we increase the focal length? We have mentioned that the focal length acts as a magnification factor and magnifies the stereoscopic deviation, per the formula: p = FB (1/Imin – 1/Imax) (1)

So, according to (1), if we double the focal length, the stereoscopic deviation will be doubled. This assumes that the distances of the near and far objects do not change as we change the focal length. Now, what are the chances of this happening? Pretty slim, I think. Unless if the near and far objects are in the line of sight near the center, as we zoom into the scene we will be moving past near objects, thus keeping the deviation under control. I first noticed this while watching zooming during digital stereo projector. As our projectionist was zooming into the scene, the range of depth changed and the deviation and sense of depth seemed well-balanced and under good control.

Constant Magnification

So far we have examined the effect of the focal length with a fixed distance from the subject. What happens if we change both the focal length and the distance to the subject so we can have the subject fill the frame? “Fill the frame” implies constant magnification. In this case we can either use a short FL lens and come close to the subject or use a long FL lens and stay far back. There are many situations (wild life photography, portraits, etc) where we use long FL lenses in order to stay further from the subject and still fill the frame. In the case of constant magnification, instead of using (1) we should go back to the original formula: p = M B (2)

This formula shows that if the magnification remains the same, the stereoscopic deviation is independent of the focal length. This formula assumes that there is infinity in the picture. But in many real situations not only there will not be any infinity, but the scene will have a rather narrow depth range.

Narrow Depth Range

From (1) we have: dp = F B dI / I**2 (dI is the depth range). Substituting M = F/I, we get:

dp = M**2 B (depth) / F (3)

This formula shows that for constant magnification and a narrow depth range, the stereoscopic deviation varies inversely to the focal length. So, if we want to maintain the same amount of deviation, while we are increasing the focal length, we need to increase the stereo base. This is the basis of the “PePax” principle.

Effect of Focal Length


In previous postings we examined the effect of the stereo base. Now we will see what happens if we change the focal length of the recording lens or the viewing lens (or viewing distance).

These effects are summarized in the Table here. Note that what matters for these effects is not the absolute value of the focal lengths of the individual lenses, but the relationship between the two.

If no lenses are used (as in the case of mirrors or projection) we can substitute the focal length of the viewing lens with the viewing distance. If the original film chips are magnified (as with prints) then the focal length of the recording lens must be multiplied by the magnification. A better way to treat this subject is to talk about angles. The condition for ortho stereo is that the scene is viewed from the same angle as it is recorded.

Why does this mismatch of recording/viewing affect the perception of depth?

One way to explain it is this: A longer focal length lens (which essentially magnifies the image) makes it look as if the camera was closer to the subject than it really was. When we view this picture we mentally compare it with the one recorded from closer. In this case, to be compatible with the reduced perspective (2d) and deviation (3d), the depth must be reduced. Hence the perceived depth compression.

Some people think that the focal length affects the perspective (relative size of near vs. far objects). This is not correct. Only the distance affects perspective. Let’s say that we record a scene with a wide angle lens, and then, without changing position, switch to a long FL lens and take another picture. If we then enlarge the picture from the wide angle lens to match the size of the objects in the picture from the long FL lens, the two pictures will be identical! The focal length acts only as a magnification factor and this is true both in 2d and 3d. What creates the compression/stretch “illusion” is the mismatch of the viewing distances. If both the wide angle and telephoto lens pictures are viewed from the same distance, then they will result in a different impression.

A Simple Experiment

Here is an experiment anyone can do right now: While viewing a stereo image (for example, freeviewing some of the images in this newsletter) move the image away and see how this affects the perceived depth. You should see the depth increase (“stretch”). By bringing the image closer, the depth should decrease (“squash”). The effect is rather subtle but most people notice it. Another experiment is to move back and forth during stereo projection. There appears to be more depth in the projected image when viewed from further away. Note that these effects are not perceived proportionally.

Seen Also in 2D

This effect is seen in both 2d and 3d images but it is more noticeable in stereo. In 2d it is the change in perspective with distance that creates this impression. Most of us are familiar with races in which, when filmed straight-on with long lenses, it appears that all the runners are in the same line and we are surprised to see how far apart they are when the camera changes angle of view. The reason the runners appear in the same line (depth compressed) is that their sizes are the same (zero perspective). That's the result of filming the race from far away and not the result of using long lenses, but the long lenses help get a larger image. To be more exact we should say that this compression is the result of viewing the image from much closer than it was recorded. We should always have in mind that it is not the recording lens or distance that creates the effect but the mismatch between the recording and viewing distances.

What is the BEST Stereo Base?

Given the freedom to achieve any stereo base (as it is the case when using a slide bar and a single camera) what is the correct stereo base to use for a given scene?

This has been the subject of some debate. My answer to this is that there is only one “correct” stereo base and this is Bv (B=Bv, equal to the spacing of the eyes). Anything else will result in an impression that alters reality, in which case there is no right or wrong.

If we decide however that we want to alter reality then there are formulas and rules of thumb which guide us into producing stereo pairs with a decent amount of depth (not too little or too much). There are two schools of thought: One advocates having a constant/maximum on-film deviation. It uses the basic stereoscopic formula, plugs the distances Inear, Imax, also F, and maximum-on-film-deviation, usually 1.2mm (for 35mm film) and calculates B.

I find this approach very artificial. The stereo base will change any time the distances of near/far objects change. Imagine that the spacing of our eyes changes as we move around, thus changing the distances of near/far objects. It is crazy!

The other school of thought advocates a constant convergence angle (expressed as ratio: B/I). One example is the well-known rule of thumb the “1/30 rule” which says that the stereo base should be equal to 1/30 the distance of the nearest object (B/I = 1/30). I prefer this approach for my stereo photography, but I understand that the convergnece angle can change, depending on the subject. For example, close-ups and macro photography generally requires a larger convergence (1/20 to 1/10). The reason I like the convergence approach is that it is easier to measure (divide the stereo base by the distance of the near object, or, multibly the ratio with the distance, to get the stereo base) and easier to visualize.

Is "More" Always "Better"?

Related to the this topic is the frequently asked question: “Wider stereo base means more depth. Stereo photography is about depth. So a wider base (and therefore more depth) is always better, right?”

I hope it is clear that the answer is “not necessarily”. More is not always better. Sometimes less can be better. The effect of putting more depth into the scene will result in the scene appearing smaller in size. This can lead to unusual and impressive images, like a “toy model” impression of a building or Grand Canyon. But many times making an object appear larger in size is equally, or more impressive. And many times just reproducing a scene in near-ortho (as seen by the eyes) is best. It all depends on the subject, application, and personal taste.

By all means experiment with different stereo bases but it would be a mistake to assume that more is always better!

Ortho Hyper Hypo Stereo



By considering the stereo base with respect to the interpupillary distance, we can talk about three special types of stereo images: ortho stereos, hyperstereos, and hypostereos, defined in the Table here.

Sunday, February 24, 2008

Stereo Base

In a previous posting we looked at the three variables that affect a stereo image, the stereo base (distance between lenses, B), the focal length of the lenses (F) and the distance from the subject. A conventional stereo camera has fixed lenses so the only way to affect the image is by changing the distance to the subject. Going beyond the stereo camera usually means changing B or F. From these two variables, the stereo base is perhaps the easiest variable to experiment with, since any camera (including a stereo camera) can be used in two successive exposures to record stereo pairs with any desired stereo base.


The effect of changing the stereo base are summarized in this statement: Increasing the stereo base increases the deviations, pulls the scene closer to the observer and makes the objects within the scene appear smaller. Reducing the stereo base decreases the deviations, pushes the scene away from the observer and makes the objects appear larger.

The effect on the deviations is pretty clear from the fundamental stereoscopic deviation: p = FB/I, but how increasing B makes the scene come closer or appear smaller? The figures on the left might will help clarify this.

Why Appear Closer?

Consider the series of pictures of the 3 bowling pins, taken with different stereo bases. These pictures are shown here exactly as recorded (with a slide bar) with no attempt to adjust the stereo window. It is clear that the image is shifting towards the inner edge of the frame with increasing base. From our discussion of the stereo window we know that when the film chips are pushed closer, the scene appears to be moving towards the observer. Stereoscopic viewing of the bowling pin pictures confirms that this is indeed the case. Increasing the stereo base does make the scene appear closer to the observer.

Why Appear Smaller?

This is a direct consequence of the previous effect. The actual size of the objects does not change but when the stereo base increases they appear to be closer, so our brain concludes that they must be smaller.

This is a little more subtle to observe and is more pronounced in stereo projection than freeviewing on this page. But let's try it: Consider the series of letters in the stereogram here. All letters have the same size. The relative shift of the letters (artificial deviation) makes the ones in the center (“Smaller”) appear closer to the observer. Hence they look smaller. The ones in the back (“Larger”) appear the furthest from the observer hence they look larger. It might take a little while for this to be clearly seen. Stereoscopic viewing is absolutely essential to experience this. If instead of parallel, you use cross-freeviewing then the opposite effect will be perceived, i.e. the “Larger” will be forward and smaller and the “Smaller” will be pushed the back and appear larger.

Stereo Photography Viewing Variables


The three "recording" variables F, B, and I, affect the way the stereo image is recorded on film but they also affect the way the stereo image is perceived, i.e. how it appears during stereoscopic observation.

To understand the stereoscopic impression when we view a stereo image, we also need to know the focal length of the viewing lens, Fv, and the interpupillary distance (eye spacing) of the observer, Bv. Fv and Bv are now our viewing variables.

Finally, even if we know the recording variables and the viewing variables, what we actually perceive also depends on our brain & experience, what we call "peception". So, we can say that:

3d image perceived = (recording variables) + (viewing variables) + (Perception)

There are two conditions that, when satisfied, viewing the stereo image most closely imitates viewing directly the original scene: 1) Stereo base is equal to the interpupillary spacing (B=Bv, approximately 65mm or 2.5") and 2) focal length of the recording lens is equal to the focal length of the viewing lens (or viewing distance), F=Fv. This is known as “ortho stereo”.

Ortho Stereo: B = Bv & F = Fv

General-use stereo cameras are well-suited for this type of stereo photography which explains the choice of lens separation in Realist-format cameras. The focal length of the recording lens is not important as long as it is matched by the viewing lens. Most 35mm film viewer lenses have a FL of 40-50mm. The 35mm FL lens in many stereo cameras is a compromise, offering good depth of field, decent field of view, and near-ortho viewing conditions.

Any deviation from these conditions will result in a visual impression that deviates from reality. We will explore some of these situations in subsequent postings.

Stereo Photography Recording Variables

This blog is based on my Tutorial “Beyond the Stereo Camera”. You can purchase the entire collection of my stereo Tutorials by going to: http://www.stereotutorials.com/

There are three variables which affect the way images are recorded on film:

1) Focal length (F) of recording lens.
2) Stereo base (B) of stereo system.
3) Distance (I) of the camera to the subject.

These three variables affect three “metric” (measurable) aspects of the recorded image:

1) On-film size of an object (or magnification).
2) Relative sizes of objects at different distances from the camera (this is also known as linear or geometric perspective).
3) Stereoscopic deviation.


These effects are summarized in the Table reproduced here. Note the formulas that express the relationship between the recording variables and the metric aspects of the recorded image:

  • Magnification: M = s’/s = f(I-f) ~ f/I, or on film size s’ = s f / I, only depends or object size, focal length and distance.
  • Perspective: ds/S = dI/I, only depends on subject distance. (ds is a change in image size due to a change in image distance dI)
  • Stereoscopic Deviation: p = FB/I, depends on F, B and I

    Some comments:
    • The focal length acts as a magnification factor. It magnifies the size of the recorded image without altering the perspective. It also increases the stereoscopic deviations.
    • The stereo base is the only variable unique to stereo photography and it only affects the stereoscopic deviations, which is the only metric aspect unique to stereo.
    • The distance of the camera to the subject, essentially the only variable available in a standard stereo camera, affects all three aspects of the recorded image. The effects are proportional to the inverse distance (1/I) which we can call “closeness to the subject”. By coming closer to the subject you 1) increase the on-film size of the subject, 2) intensify the perspective (make closer objects appear larger than further objects) and 3) increase the stereoscopic deviations. That's a good argument for getting closer!

    Basic Stereoscopic Equation


    Consider an object A at a distance I from the lenses of the stereo camera, which are separated by B (stereo base). An object at infinity is formed at O1 on the left side and at O2 at the right side, while the image of A is A1 and A2. The situation is symmetric so half the stereoscopic deviation (or parallax) is P/2. From similar triangles we have:

    B/2 / I = P/2 / I' or P/B = I'/I (1)

    From our previous posting we know that the ratio I'/I is the magnification M. So we get:

    P = M B (2)

    This is the basic stereoscopic equation. I cannot help but make the following analogy: Variables in the image space (with prime ') are related to variables in the object space through the magnification. For example, I' = M I, s' = M s, and here we have P = M B, so we can think of P as B', in other words, the stereoscopic deviation is the “image space” equivalent of the object space stereo base.

    If the subject is far away from the lens we can use the low magnification approximation and write (2) as follows:

    P = FB / I (3)

    Equation (3) gives the parallax with respect to infinity (remember, we measured P from point O which is a point at infinity). If we have a near object at Imin and a far object at Imax, then the stereoscopic deviation equation can be written more generally as:

    P = F B (I/min – Imax) (4)

    The stereoscopic deviation is proportional to the focal length, the stereo base, and inversely proportional to the distance.

    Basic Lens Equation


    I find myself using the basic lens equation quite a bit so I would like to derive some important formulas. Consider a lens of focal length f. The object is at distance I from the lens, while the image is formed at distance I'. The size of the object is s, the size of the image is s'. See the diagram here.

    The basic lens equation is: 1/f = 1/I + 1/I' (1)

    The magnification by definition is M = S'/S = I'/ I (2)

    If we use equation (2) to solve for either I or I' and substitute it in equation (1), we obtain these two useful formulas:

    M = f/x (3) and M = x'/f (4)

    From (3) and (4) we can write (1) as: f**2 = x x'

    If the subject is far away from the lens (low magnification) then I >> f and I = x, I' = f, so the magnification is approximately equal to M = f/I. This is the low magnification approximation.

    At high magnifications I gets close to f, and I' gets very large, so I' = x' and M = I'/f. this is the high magnification approximation.

    An interesting situation occurs at M = 1, then x = x' = f, and the subject is at distance 2f from the lens and the image is formed at distance 2f from the lens. In this case the total distance from the object to the film plane is the smallest possible (4f).

    Sunday, February 10, 2008

    Close-ups with a Stereo Realist - Theory

    The Stereo Realist is designed to take pictures with the near object at 7 feet (2.1m). For “normal” stereo photography, the following advice applies: “Do not let the near objects come closer than 7ft to the camera”. So, before taking a picture, make sure that there is nothing closer than 7ft to the camera.

    You can of course take pictures of objects closer than 7ft, and the camera will focus as close as 2.5ft. This is the area of close-up Realist photography. One advantage of the Stereo Realist for Close-ups is that the viewfinder is centrally located and parallax-free. So the framing is always accurate and you don’t need a focusing frame or other aids. You will appreciate this if you try close ups with other stereo cameras. One disadvantage is that distance of the lenses (Stereo Base, 70mm) is too wide for close-ups.

    There are two precautions not only for Realist but all close-up & macro photography: As you get closer and closer to your subject, you have to block distant objects. If you don’t, then your stereo pair will have too much deviation and it will be impossible to project and possibly difficult to view in the viewer.

    Also, you have to be prepared to make certain adjustments (cropping) in mounting to set the proper stereo window. For the slide film user, this means that you might have to use close-up or half-frame mounts, instead of standard (5p) realist-format mounts.

    Without any aid, the Stereo Realist camera will focus as close as 2.5 ft (0.76m), which is surprisingly close (the near focus of most 35mm lenses is 0.9m, or 1m). This near focus can be extended in two ways: The first way is by using a close-up (supplementary) lens. This is a universal way, and can be used with any camera/lens. A +1 lens will bring the near focus to 0.43m (1.4 ft). The second way is Realist-specific. You can remove the little screw that stops the focus wheel at 2.5ft and focus even closer. We will discuss these practical issues in the next posting.


    Here are the basic metrics of the Stereo Realist:
  • Focal Length, F = 35mm
  • Spacing of lenses (Stereo Base), B = 70mm
  • Near focusing distance, Inear = 2.5ft (0.76m)
  • Internal cropping = 1.2mm

    • This last item needs an explanation: The distance between the film gates is 71.2mm, which is 1.2 mm longer than the spacing of the lenses. This shift is done on purpose to block out a small part of the image (left edge of left image and right edge of right image, remember the images are reversed inside the camera) and set the stereo window at 7 ft.

      The Table below gives basic measurements for the Stereo Realist close up photography. I have elected to list the following near object distances: 1) 7 ft, that’s where close up photography starts, 2) 4 ft 3) 2.5 ft (near unaided focus), 4) 1.4 ft (focusing with the Realist at 2.5 ft and +1 close up filter).

      I have tabulated the following quantities of interest (all values are in mm):
      • Inear = near object and where the camera is focused.
      • Ifar = the recommended maximum distance of the far object, in order to keep the total stereoscopic deviation to 1.2mm.
      • Back Plane Extension, BPE: The Realist focus by moving the back plane away from the lenses. This value shows you how much the plane is moved back. We have called this quantity x' in our formula derivations here. Mostly a curiosity item.
      • Magnification M: This is expressed as a ratio, for example 1/21 at 2.5ft. This can show you the field of view. Considering that the height of the film gate is 25mm or about 1 inch, a magnification of 1/25 means that you can get 25 inches of your subject matter inside the picture. For comparison, a portrait usually requires 12 to 16 inches so the Realist is not really capable for a tight portrait even at the closest focusing distance.
      • Convergence: This is the ratio of the stereo base over the near distance, B/Inear. This ratio is 1/30 at 7ft. Values from 1/10 to 1/30 are generally acceptable.
      • Image Loss: This is the amount of film that needs to be cropped in order to fix the stereo window. It takes into account the internal cropping of 1.2mm so at 7ft there is no image loss. This quantity is of practical mounting value for slide film users.

      Limit to Stereo with Translation – Converge or not Converge?

      As the magnification increases, translation cannot be used effectively any more. Consider for example M = 5 (5 times magnification).

      I = 1.2F, I' = 6F, Cropping = 5B

      How much should I translate? My rule of thumb B = I/20. Assuming F = 100mm, B = 6mm. But cropping = 30mm. If we use 35mm film, all we have is 36mm to record the image. If we crop 30mm, we have very little image to work with. We need to work this the other way around. Let’s say we need to maintain half the film width. Then cropping = 18mm, B = 1.8mm. We can only translate by 3.6mm, not 6mm we originally had planned. That might not be enough and result to a flat image.

      In practical terms, we are forced to converge the lenses or use tilt instead of translation for magnifications of 10x or higher. I mentioned earlier that you should avoid convergence because it leads to keystone distortion. As it turns out, at high magnifications the working distance becomes equal to F and the extension equal to MF. Because of the large extension, perspective is minimized, which means that we can use tilt with no problem. (I will try to explain this “perspective is minimized” in a subsequent post.)

      The same is true of very long focal length lenses are used. Perspective is minimized and convergence is not only acceptable, but also the only practical way to record the image.

      Image Loss In Macro 3d Photography

      This is an important issue that can cause problems for a beginner. Every time you take a stereo picture by shifting a camera/lens parallel, the “stereo window” is placed at infinity. This creates two wide bands on the left side of the left image and the right side of the right image, which not only do not contribute anything but they also do not help to properly locate the image in space. To restore the proper location of the stereo window, some cropping is required.

      Consider the picture shown here. This is a close up of a 10 inch doll taken by shifting a digital camera. Can you see these wide bands? A rule for proper placement of the stereo window (3L rule) says that “The Left eye should see Less on the Left side”. In this case clearly there is more to see on the left side of the left image, not less. We need to crop out these bands. By doing this, the entire picture will now properly be behind the stereo window, as you see in the corrected pair.

      How do you get rid of these bands? It is easy to do it in digital photography or when making prints (cut off part the left side of the left print and the right side of the right print). But what do you do if shoot slide film? In this case you use the stereo mount to crop the edges, by shifting the film chips away from each other until the bands are hidden behind the mount.

      The amount of cropping needed depends on the stereo base (B) and the magnification (M). It is given by basic stereoscopic formula: Cropping = P = M B. See this blog for derivation.

      Consider some special cases: As infinity (M=0) no cropping is needed. At low magnifications (regular stereo camera distances) M = F/I, and the formula becomes Cropping = FB/I, where I is the distance of the subject. This is about 1.2mm for most stereo cameras.

      At M = 1 we have the interesting situation where a shift of B in the object space creates the same shift B in the image plane, so cropping = B. In a previous slide bar example we showed that for M=1, a good value for B is 5mm. The final image will require cropping by 5mm. So our 36mm length of 35mm film image area is now reduced to a useable 31mm length. This is important for slide film stereo photographers because it means that you cannot use 33mm or 31.5mm (all available by RBT) to mount this stereo pair and the next available size is 30mm. If you want to preserve more of the stereo image, you might want to consider less stereo base, just to reduce image loss. You might need to work this the other way around. Let's say that you want to mount your image in a 31.5mm mount. You cannot crop more than 4.5mm. To have some room in mounting, you put a limit of 4mm cropping. This corresponds to 4mm shift. So, instead of 5mm, you shift by 4mm only, the choice being dicated by cropping considerations only.

      Most stereo cameras from the '50s are constructed with a built-in stereo window. This is achieved by shifting the film gates with respect to the lenses. For example, the Realist lenses are separated by 70mm while the film gates are separated by 71.2mm. This shift creates a window at 7ft from the camera, which saves film and makes automatic mounting easier (by just centering the chips in the mount we get a window at 7ft.)

      Consider the schematic here (click at it to enlarge it). In the camera on the left, the film gates are centered under the lenses. The stereo window is at infinity and you will notice that at any distance from the camera the left eye sees more on the left side instead of less, which means that this point is in front of the stereo window. The correct stereo window can be set by trimming parts of the final image. The camera on the right creates a stereo window by separating the film gates wider than the lenses. The left eye now sees less in the left side for objects past the stereo window. In this case, if the film chips are centered, the window is set automatically and less film trimming is required for close-ups.

      Saturday, February 9, 2008

      Macro Photography with Extension



      When an object is at infinity, the image of this object is formed at a distance equal to the focal length (f) behind the lens. As the camera is focused close and closer, the image is formed further and further behind, at a distance x' from f.

      Most camera lenses are designed to operate satisfactorily with an object lying between infinity and about 10 focal lengths. The maximum lens focusing distance is then about 1/10 of the focal length, representing a maximum magnification of 0.1. One exception are macro lenses who are designed to work at higher magnifications, usually 0.5 or 1.0.

      To make a lens focus closer than its minimum focusing distance, one can use extension tubes or bellows. This is of course possible only if the lens can be removed from the camera. The basic equations in work here are the fundamental lens formula and the definition of magnification. I will write these as follows (see also this blog):

      1/f = 1/I + 1/I'
      and:
      M = s'/s = I'/I = f/x = x'/f

      I am using this notation: f = focal length, x' = lens extension (distance of lens from film plane), I = Subject distance (distance of subject from lens), also known as working distance because it shows you how much room to you have to work with your subject, M is the magnification.

      An interesting situation exists at M=1. In this case, I = I' = 2F, i.e. the extension is equal to the working distance and it is equal to two times the focal length. For example, if you are using a 50mm macro lens at M=1, then the subject is at 100mm in front of the lens and the image is formed 100mm behind the lens. As it turns out, the total distance from object to film plane (4F or 200mm) is the smallest possible. As you increase the magnification beyond 1, the image moves quickly behind the lens and a bellows system will be needed. For best optical performance, it is recommended that the lens is reversed when M > 1

      Another note of practical importance: At magnifications close to 1 or higher, focusing is not done by changing the distance of the lens to the film plane, because this changes the magnification. Focusing is done but my moving the lens and camera closer to the object. So, in macro stereo photography, first you set the magnification by fixing the extension I', and then you focus by changing the working distance I. For stereo photography with a slide bar, you might need a stereo bar with two axes. The vertical axis is used for stereo translation. The horizontal axis is used for focusing.

      Macro Stereo Photography

      I have been interested in close-up/macro stereo photography, since I got my first real camera, a Minolta X-700 in 1988. Instead of the standard 50mm lens, I elected to buy the 50mm Macro lens for a lot more money (the lens cost as much as the camera body, if not more). That was a lot of money and I had to think long and hard before making the decision. But we only live once, so I decided to go for it. This is one of the best decisions I have ever made. I used this lens extensively in my research and for personal 3d photography. At some point I had acquired all Minolta macro photography equipment including Bellows, and microscope lenses. Even though I eventually sold all the Minolta equipment, I kept the macro lens (see picture) and at least one X-700 body.

      Two methods are used go get a lens to focus closer than its minimum focusing distance: 1. Extension, 2. Close up lenses. We will look at these methods in subsequent postings.

      Regarding the math behind 3d macro photography, you only need to use two formulas:

      1. The fundamental lens formula: 1/f = 1/I + 1/I', where f = focal length of the lens, I = distance of object from film plane, I' = distance of image from film plane. See also this blog.

      2. The basic stereoscopic formula: P = FB/I = FB (1/Imin – 1/Imax), where P is the stereoscopic deviation, F is the focal length of the recording lens, B is the stereo base, I is the distance of the subject from the camera (Imin is the minimum distance, Imax is the maximum distance, Imax – Imin is the range of depth in the scene.) See also this blog.