Creating Random-dot Stereogram (RDS) - Step-by-Step

 

Ai-Hou Wang, M.D., Ph.D.

 

 

The square seen by the right eye shifted to the left.

The square seen by the left eye shifted to the right.

Seen with both eyes,

The blue square will appear in front of the background.

(The monocular area looks always at the back plane.)

 

 

 

The square seen by the right eye shifted to the right.

The square seen by the left eye shifted to the left.

Seen with both eyes,

The blue rectangle will sink behind the background.

(The monocular area looks always at the back plane.)

 

 

 

Creating a random-dot stereogram with a hidden triangle.

Viewing the stereogram with red-blue goggles.

Right eye: blue lens, left eye: red lens.

 

• The triangle appears in front of the background with 7 pixels disparity.

* The triangle in the right-eye half-stereogram is shifted to the left by 4 pixels.

* The triangle in the left-eye half-stereogram is shifted to the right by 3 pixels.

 

• The background sinks behind the real plane with 4 pixels.

* The right-eye half-stereogram is shifted to the right by 2 pixels.

* The left-eye half-stereogram is shifted to the left by 2 pixels.

 

• The triangle appears in front of the real plane with 3 pixels.

 

 

Prepare three materials:

A random dot pattern for the foreground

A random dot pattern for the background

A shape to be embedded within the stereogram

(a triangle in this example)

 

 

Material 1

Generate a 50% density random dot pattern for the foreground

 

 

 

Material 2

Generate a 50% density random dot pattern for the background

 

 

 

Material 3

Create a shape to be embedded within the stereogram

(a triangle in this example)

(essentially any shape will do)

 

 

 

Create the right half-stereogram

 

 

The triangle and the foreground random dot pattern

are logically ANDed to form a "dot triangle."

                                                                                        

 

 

The "dot triangle" is shifted 4 pixels to the left.

 

The figure seen by the right eye shifted to the left.

The figure seen by the left eye shifted to the right.

Seen with both eyes,

The figure will appear in front of the background.

 

 

 

Reverse the black and white of the triangle

 

 

 

"Reversed triangle" shifted 4 pixels to the left

 

 

 

The “shifted reversed triangle” and the background random dot pattern

are logically ANDed to form the “dot background”.

 

 

 

The “dot triangle” and the “dot background”

are logically ORed to get the right half-stereogram.

 

 

 

The right half-stereogram shifted 2 pixels to the right

 

 

 

The right half-stereogram is convolved 5 times

to remove the high spatial frequency components

 

 

 

Make right half stereogram blue colored (cyan colored)

 

 

 

Create the left half-stereogram

 

 

The triangle and the foreground random dot pattern

are logically ANDed to form a "dot triangle."

 

 

 

The "dot triangle" is shifted 3 pixels to the right.

 

The figure seen by the right eye shifted to the left.

The figure seen by the left eye shifted to the right.

Seen with both eyes,

The figure will appear in front of the background.

 

 

 

Reverse the black and white of the triangle

 

 

 

"Reversed triangle" shifted 3 pixels to the right

 

 

 

The “shifted reversed triangle” and the background random dot pattern

are logically ANDed to form the “dot background”.

 

 

 

The “dot triangle” and the “dot background”

are logically ORed to get the left half-stereogram.

 

 

 

The left half-stereogram shifted 2 pixels to the left

 

 

 

The left half-stereogram is convolved 5 times

to remove the high spatial frequency components

 

 

 

Make left half stereogram red colored

 

 

 

The red left half-stereogram and the blue right half-stereogram

are logically Ored together to form the random-dot stereogram

with hidden triangle.

 

 

 

Rapid, step-by-step generation

of a random dot stereogram with

hidden checkerboard

 

 

 

Full speed generation

of a random dot stereogram with

hidden triangle

 

 

 

Thank You for Watching