Monday, April 18, 2011

Autostereoscopic Display Principles - Part 2

The main technology behind all auto-stereoscopic displays that exist today is based on multiplexing pixels or sub-pixels. For example, everybody knows the old 3D videos in Anaglyph (red and green glasses). These videos can also be represented by a kind of multiplex schema. Before we start giving examples, let’s check how a LCD based Monitor works.

The liquid crystals used by LCDs are able to change their brightness depending on the electrical voltage applied to them. These crystals are equipped with a special transistor (TFT) which makes it possible to change the direction of the liquid and therefore changing the transparency of each liquid-crystal based pixel. The pixels on a LCD are arranged as a matrix, as shown in the following picture.



LCDs are based on a variant of the additive color model. This model basically uses red, green and blue light in order to produce the other colors. On LCDs however, the colors are not mixed. Due to the fact that the sub-pixels beeing so small, we can assume this model for the purpose of this document, therefore we will call this model from now on “RGB color model”.




The additive model is somehow awkward for most people who worked with inks already. When using inks, when you add green, blue and red you end up with some kind of gray, on the RGB model however, you will end up with white. Well, you may ask yourself, how you produce black. This is very simple, you simply turn off all color components.


Multiplexing

As mentioned above, most autostereoscopic displays are based on some kind of multiplexing. In order to give you an example, let’s take the well-known anaglyph 3D technology used still today in many ways, as for example on YouTube.

According to 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

Well, if you remember how a LCD is constructed, it is very easy for us now to create a filter that will change the left and right pictures so that we “hide” the left picture using red, and the right picture using cyan. Let’s do it by multiplying the left picture by a vector:

For each pixel:
     Anaglyph_Left[i] = Color_Left[i] * Filter_Left
     Anaglyph_Right[i] = Color_Right[i] * Filter_Right
End

FinalPicture = Anaglyph_Left + Anaglyph_Right

Where:
Filter_Left = [1, 0, 0]
Filter_Right = [0, 1, 1]



The example above simply erases all blue and green color information of the left image and the red from the right image and then adds both of them up creating a new image which contains two perspectives. This is done by using two masks, one for the right [0, 1, 1] and one for the left [1, 0, 0].

Autostereoscopic displays do more or less the same, but in a way that no glasses are needed. The mask is designed in such a way that it fits the parallax barrier which is placed on top of the display.

On single-viewer displays the mask might be as simple as just zeroing all pixels on even columns for the left image and all pixels on the even column for the right image. On multi-viewer it gets a bit more complicated.

Let’s suppose we have a 5 view auto-stereoscopic display whose Mask is a 5x5 Matrix. This means, that we have one Matrix for each perspective, one for the first image, one for the second and so one. The pseudo-code for this multiplexing will be something like the following:

For each perspective
      For each pixel
            m_perpective[i] = perspective[n] * matrix[n]
      End
End

The good thing about it is that we can do the operation very fast using parallel computing like CUDA or OpenCL.

No comments:

Post a Comment