Introduction to Anaglyph Stereoscopy in Excel – part #2: the principles of creating and viewing 3D pictures

This tutorial explains the basic principles of creating and displaying anaglyph pictures.

Excel anaglyph stereoscopy #2 – how to split the image

by George Lungu

– The previous section showed an improvement in the practical implementation of spreadsheet
multiplication, namely based on the associativity of matrix multiplication the three elementary rotation
matrices were combined in a composite rotation matrix which was computed and updated in a single
place then used all over the worksheet for a possibly large number of coordinate transformations. This
improves speed, saves spreadsheet area and development time.

– In this section the effect of anaglyph stereoscopy is explained using sample pictures and diagrams.

A quoted explanation from Wikipedia:

“- Anaglyph images are used to provide a stereoscopic 3D effect, when viewed with glasses where the
two lenses are different (usually chromatically opposite) colors, such as red and cyan. Images are made
up of two color layers, superimposed, but offset with respect to each other to produce a depth effect.

Usually the main subject is in the center, while
the foreground and background are shifted late-
rally in opposite directions.

The picture contains
two differently filtered colored images, one for
each eye. When viewed through the “color coded“
“anaglyph glasses”, they reveal an integrated
stereoscopic image.

The visual cortex of the brain
fuses this into perception of a three dimensional
scene or composition.”
<www.excelunusual.com>

The anaglyph goggles:

“A pair of eyeglasses with two filters of the same colors, once
used on the cameras (or now simulated by image processing
software manipulations) is worn by the viewer.

In the case
above, the red lens over the left eye allows only the red part
of the anaglyph image through to that eye, while the cyan
(blue/green) lens over the right eye allows only the blue and
green parts of the image through to that eye.

Portions of the
image that are red will appear dark through the cyan filter,
while portions of colors composed only of green and blue will appear dark through the red filter.
Each eye therefore sees only the perspective it is supposed to see.” Wikipedia

Anaglyph images – empirical observations:

-Looking at various anaglyph images off the internet, I found out that depending on the depth
within the photograph (distance from the observer), there is a variable red-cyan misalignment.

– Anaglyph images usually have the object split sideways, on one side there is mostly red and on
the other there is mostly the complementary color – cyan (which looks like a light blue).

Some
pictures have the same sign color offset (red for instance is always to the left and the cyan is
always to the right within the whole picture) but others for instance have red to the left and
cyan to the right on the bottom area of the picture and red to the right and cyan to the left on
the top area of the picture.

Somewhere in the middle these pictures contain an area with no
color offset where the colors of the objects are correct and their edges are sharp.
<www.excelunusual.com>
2

Some explanations:

-The eye gasses send the red part of the image to one eye and the complementary (cyan) to
the other eye and that’s how we can reconstruct stereoscopic images.

– It makes sense that when an observer focuses on a part of the image (let’s say the middle
level) the depth levels before and behind that focus levels will split. In real life that is not too
visible because the eyes have a small distance between them so the separation is small and the
brain will filter out detail information except in the area where the eyes are focused.

– You can still see this “image splitting” in real life while watching an object (your finger) at
very close range (few inches in front of your nose) and trying to pay attention to the scene
behind the object.

– Stereoscopy tries to emulate nature by
placing two cameras each fitted with a
Far
range
different color filter, at a distance
between each other laterally and pointing
Mid
range
forward at a converging angle.
Close

– In the midrange the images will overlap
range
and there will be an almost perfect color
registration (alignment).

– In the close range the cyan image will
be offset to the right of the red image
and in the far range the cyan image will
be offset to the left of the red image.

<www.excelunusual.com>
3

Some anaglyphic photos:

– The anaglyph below is a good example
Here are some examples of anaglyph photos. Analyze the
of a well balanced close range and far
amount of color offset and the sign of this offset in
range.

In most anaglyph out there the
various regions of the picture and try determining the
far range is dominating.
various ranges.

Mid range:
Perfect color
registration, sharp edges
Far range:
Cyan – left
Red – right
Close range:
Cyan – right
Red – left
Close range:
Cyan – right
Mid range:
Red – left
Perfect color
registration, sharp edges

– In this anaglyph photo from Budapest the midrange is
chosen at infinity. The midrange is where there is no color
offset and the edges are clear when observed without using
glasses). There is no far range in this anaglyph.

<www.excelunusual.com>
4

Some anaglyphic photos – continuation:

Above there are two examples of well balanced There is no close range in this anaglyph. Matter of fact
anaglyphs. The top photo has a particularly large even the midrange is so close to the cameras that is barely
distance between the red and cyan cameras. visible in the lower right corner.
<www.excelunusual.com>
5

Some anaglyphic cameras:
Mid
range

-Depending on the angle between the cameras
Far
the mid range can be brought very close to the
range
cameras or sent very far.
Close

– Of course the smaller the convergence angle
range
between cameras the larger the separation
needs to be in order to obtain significant 3D Mid
range
effects. Large
Span

– For large landscapes, spans of a few meters
Small
or even tens of meters are not uncommon.
Span

In this case, special care has to be taken
to perfectly align the vertical angle
(altitude) of the cameras with respect to
each other to keep the image resolution sharp.

Some anaglyphic cameras:

An anaglyphic webcam

A professional anaglyphic camcorder

A high end digital anaglyphic camera
to be continued…

<www.excelunusual.com>
6