## Friday, March 7, 2008

--- 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).

#### 1 comment:

retrocycler said...

Something doesn't square here. In an earlier post about focal length and perspective, you pointed out that perspective - as a value describing the rate of diminishing size of ever more distant objects - is reduced with increased focal length. I think perspective must be analogous to deviation or parallax. Thus increased focal length should reduce parallax. What gives?

Then again, you also point out that increased focal length enlarges all deviations - so maybe that's where we get the constancy of deviations overall, as focal length is increased?

I hate math, but do love geometry.