

Now consider the depth map and the result map images with coordinates ranging from to. But for other depth values, we will be getting the color from the previous strip at positions in the same scan line, but displaced proportionally to its depth. For example, if a given pixel depth is 0, we will copy the exactĬolor of the same pixel location in the previous strip. When drawing the missing strips from Figure 41-8b, we will be copying the content from the previous strip and displacing pixels horizontally based on the current pixel depth. Texture map, because each new strip uses the previous strip's image as a reference. For each strip we draw, we must copy its pixels to the result

We loop, drawing the remaining four strips from the result image. Next, we enable the fragment program and set the depth map, result map, and depth factor as parameters to it. We then have the result image, as shown in Figure 41-8b. (using glCopyTexSubImage2D to copy the region we just modified). We copy the strip pixels to the result texture map This is the pseudocode for the SIS rendering:Īt the beginning of the pseudocode, we simply draw the first strip, texture-mapped with the tile pattern, as in Figure 41-8a (no fragment program is needed, just normal texture mapping). Map, shown in Figure 41-8, into four strips ( num_strips) and divide the result map into five strips ( num_strips + 1), because we need a reference strip to start with. To simplify this example, we use four strips ( num_strips = 4), but for a true SIS we would use more. To render the SIS, we start by subdividing the depth map and the result image into vertical strips. Invert depth: Boolean value indicating whether depth values should be inverted (1 – depth).
Online stereogram reader full#
Depth factor: Floating-point value in the range 0.0 to 1.0, with 1.0 meaning full depth.Number of strips ( num_strips): Integer value, usually from 8 to 24.Whether to invert the depth values (white can be considered depth 0 or full-depth 1). When creating a new SIS, we need to consider parameters: the number of strips to use the depth factor, which can increase or decrease the depth perception (which in turn controls the amount of deformation applied to the pattern tiles) and 41.2 Creating a Single-Image StereogramĪn SIS is generated from a given depth map (that is, a grayscale image with depth information) and a tile pattern (usually a colored tile image), as in Figure 41-6.įigure 41-7 The Resulting Stereogram 41.2.1 Parameters Most popular SIS imagesĪre generated to be viewed this way. Viewers can cross their eyes behind the image plane, thereby inverting their depth perception but still resulting in a 3D image.

But in an SIS, because the separation between the strips is smaller than the distance between our eyes, there is anĪlternative, more comfortable way to view the image. With stereo photography and classic RDS images, viewers must always cross their eyes in front of the image plane. Theseĭifferences allow the perception of depth.įigure 41-5 Viewing a Stereogram with Four Stripsįor an RDS, the eye crossing point must be farther in front of the image plane (that is, closer to the viewer) than in an SIS, so that the displacement of the images seen is the size of the image itself. Our eyes are separated from each other by about 65 mm, and this disparity causes slightly different images to be presented to the brain. Two similar photographs, but from different positions displaced horizontally (like our eyes). The idea behind stereo photography is to take Stereo photography is very old, dating back to 1838, but some of the old stereo cameras and stereo photograph viewers, such as the one shown in Figure 41-1a, can still be found at antique shops. (representing the displacement between our eyes). Stereograms evolved from stereo photography, in which two photographs are taken from slightly different camera positions Vision-particularly depth perception and pattern recognition-created the random-dot stereogram (RDS). It all started back in the 1960s, when Bela Julesz, who worked at (AT&T) Bell Labs researching human 41.1 What Is a Stereogram?Ī stereogram is a 2D image that encodes stereo information so that, when viewed correctly, it reveals a hidden 3D scene.
