Here you'll see a step-by-step tutorial for setting up and running the Lenticular Display described here
Start by constructing the Lenticular Display. You will need:
Start by connecting the LCD display to a standard computer with a dual-head graphics card. It can be helpful to set up this screen as a second monitor, as normal 2D content will not be visible on the lenticular display. Give the LCD display intended for use with the lenticular sheet a white background, which will make it easier to calibrate later on.
It is also important to choose the correct lens pitch for your LCD (refer to slides 9 and 10 of the course under Unencumbered Displays for information on choosing the correct pitch and buying the sheets). Cut out the diffuser and lenticular sheet so that they match the dimensions of the LCD screen. At the Media Lab, we used a laser cutter to cut both materials, however a pair of scissors and a hand saw should give you enough accuracy if a laser cutter is not available. You can check around in your area for a Fab Lab. The lenticular sheet is used to create the multi-dimensional image, and the diffuser is used to prevent morié patterns, which in this case are rainbow-colored stripes created by the interaction of the lenticular sheet and pixel grid of the LCD.
Set up the screen by first covering the screen with the diffuser, and then by putting on the lenticular sheet over it. You need to make sure that the strips on the lenticular sheet are perfectly vertical, which you can judge by the straightness of the morié bands (the white background permits you to barely make out the bands, even with the diffuser in place). Align the cylindrical lenses with the pixel grid of the display by rotating the lenses until the morié bands are vertical. When the strips are completely vertical, clamp the screens together. The end result should resemble this:
The next step is calibrating your new lenticular display. The MATLAB file which you downloaded on the main page contains the code adjusted for the dimensions of one particular screen and lenticular sheet, so you will probably need to adjust the settings for your screen by calibrating. You can do this by running the calibration test in MATLAB. Here are the step-by-step instructions:
Running the file will generate two images like the ones below:
Figure 1 is the interlaced pattern of the calibration test image. Figure 2 is the light field and mosaic of views. Figure 1 is the image you want to use on the lenticular screen, as Figure 2 just shows the view from the different angle. As you can see from Figure 2, the image generated on the lenticular screen should be a black image from every angle except if viewing it from the center. (This effect is demonstrated in Slide 15 of the Unencumbered Displays section here) You will know that your screen is calibrated when this is the case.
The MATLAB file automatically saved the interlaced pattern image in the "patterns" folder under the "Lenticular Sheet" directory. Open the "patterns" folder and open the "calibration.png" file in an image viewer program. This is the interlaced pattern. Drag this onto the lenticular screen, and make the image full screen. You will need to make the image full screen to see the correct effect. If your image viewer program resamples the image, this calibration procedure will not work. If the mosaic of views described above, with a white image in the center of the screen and black elsewhere, appears on the lenticular screen, then the screen is calibrated.
However, if this is not the case, you will need to change the DPI settings in the interlace_lenticular.m file in MATLAB. Change the DPI (pixels per inch) settings on Line 26. You can test to see if they work by running the file and creating a new image for the calibration test. Keep making adjustments to this setting until the calibration test succeeds.
If you downloaded the sample images from the main page, you can see them in 3D on the lenticular screen. Open the "Lenticular Sheet" directory that you downloaded, and open the "images" directory. Here you'll find the different images that can be seen in 3D. For example, if you wanted to see the spheres in 3D, open the "spheres" directory where you'll find two files, spheres.ini and spheres.pov. The spheres.pov file is a POV-Ray file describing the light field of the spheres, and the spheres.ini file has commands for POV-Ray to render different views of the light field. You will need to render the image to make it viewable from all 10 angles. In Linux, you can do this by going to the terminal and typing in the command:
This will generate images from 10 different angles of the spheres, which will be saved in the "spheres" directory. Follow these steps to generate the calibration test image:
Just like you did in the calibration test, two images will appear: the interlaced pattern and the light field. Open the interlaced pattern image in the "patterns" directory, which should be listed as "spheres.png" and drag it to the lenticular screen. Make it full screen, and there you have the multi-dimensional image.
As you can see, as you walk across the display, you can see the different angles of the spheres. This is evident by their change in position relative to the background image and by the shifting of their shadows. The display is seen below by two of the ten different angles.
As you can see in Angle 1, which starts at the left, all the balls completely overlapping. As you move to the right, you begin to see through the gaps, until you get to Angle 10, which shows zero balls overlapping. After you move right of Angle 10, the screen goes back to Angle 1 and the process starts all over again. (Note: you can't see 3D in these pictures because 3D perception requires two different views to each of your eyes, and the camera and your display only capture and show a single view). This movement only works in the horizontal direction however. The illusion does not work as you tilt your head up and down because we have only added a 1D vertical lens array. For full vertical and horizontal parallax, a 2D lenslet array would be required. Code is provided on the main site for this type of lens array as well.
Using POV-Ray, you can create your own Lenticular images. Even if you are not familiar with the program, you can go online and find some POV-Ray sources. You can use a text editor application to write out the POV-Ray source code as long as you save it as a .pov file. To make it easier for the MATLAB script, you should save the source code in a new directory under the image directory. For example, if you made a cube, you could save it as "cube.pov" in a new "cube" directory in the "images" directory.
In order to enable the POV-Ray file for 3d viewing, you need to set up an orthographic camera. Generally, you can make the pov file orthographic by copying and pasting lines 18-38 and lines 43-53 of the spheres.pov file (found under the spheres directory) onto the beginning of the source code. This will set up the orthographic camera and it will make it available to render for lenticular viewing. This success of this "blind" method will vary according to the scene described in the .pov file you have selected.
You will then need to create a .ini file to give commands to the .pov file. You can use the "spheres.ini" file found under the "spheres" directory as the foundation of the new .ini code. The only thing you'll need to do is change the input file name in line 6 to whatever name you gave your file and change the output file name in line 8 to the same thing with a "-". For example, in the cube example above, you would change "spheres.pov" in line 6 to "cube.pov" and "spheres-" in line 8 to "cube-".
Once you do this, you just need to follow the rendering and MATLAB steps as you would do for running the sample images. You will then have created your own 3D image.
Tutorial written by Keyon Vafa