Code covered by the BSD License  

Highlights from
stereogram

4.0

4.0 | 3 ratings Rate this file 5 Downloads (last 30 days) File Size: 2.65 KB File ID: #14859
image thumbnail

stereogram

by Iari-Gabriel Marino

 

03 May 2007 (Updated 08 May 2007)

Random Dot Stereogram

| Watch this File

File Information
Description

stereogram: Random Dot Stereogram

stereogram(A), where A is a monochromatic image, plots the Random Dot Stereogram (RDS) of A. A should be defined as a matrix of doubles, but with integer values. In the stereogram, the regions of A with positive values will seem virtually fly in front of the screen, while those with negative values will seem to be behind the screen. The best maximum range of the values of A is -15,15. The script will NOT autoscale the data, allowing you to set the absolute height of each level with respect to the screen.

stereogram(A,'method') specifies alternate viewing methods.
The default is parallel-eyes method.Available methods are:

 'parallel-eyes'
 'crossed-eyes'

See http://www.vision3d.com/ to learn viewing stereograms.
 
The vertical white line in the stereogram helps the visualization. You can remove it to obtain a Single-Image Stereogram.

A Random Dot Stereogram (RDS) is a technique created by Dr. Bela Julesz, described in the book Foundations of Cyclopean Perception. RDS describes a pair of 2D images showing random dots which when viewed with a stereoscope produced a 3D image. When this technique is used to create an Autostereogram (also known as Single-Image Stereogram), a Random-dot autostereogram (SIRDS) is created. (Source: http://en.wikipedia.org/wiki/Random_dot_stereogram)

Please, feel free to contact me and suggest modifications.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
07 May 2007 John D'Errico

Reasonable help that could be better. The view_type parameter is allowed to be either 'parallel-eyes' or 'crossed-eyes'. There is no explanation of how one should view the image in these modes, nor any link that explains them. (Admittedly, 'crossed-eyes' seems fairly obvious.)

Worse, in order to actually set the view_type parameter, you need to edit the file. I'm sorry, but good code does not force you into editor to change a simple parameter.

Finally, a code that I would describe as of a high quality would be smart enough to autoscale the array, rather than forcing the user to do so.

07 May 2007 John D'Errico

Oh, I almost forgot. This code uses a function called truesize. Its not in my matlab release (R2006b), nor did I find it anywhere else, nor do I see any toolbox listed as a requirement.

09 May 2007 Iari-Gabriel Marino

I've updated the file following some of the suggestions by John D'Errico.

10 May 2007 John D'Errico

This has some repairs done to it. It no longer requires the truesize function to run. It allows the user to change view_types as an argument.

I'll admit that I could not get my eyes to see the 'parallel-eyes' view. Even the 'crossed-eyes' view was moderately hard sometimes. For large arrays (say 500x500), I found it hard to get the views to mesh. For small arrays, the figures are too small to see. Arrays of size somewhere around 200 on a side weemed to be a reasonable compromise to my eyes.

Finally, autoscaling the plot still seems to me to be a useful tool, perhaps as an option. But if one is comparing multiple surfaces, autoscaling might confuse things.

Please login to add a comment or rating.
Updates
04 May 2007

Bug fixed

08 May 2007

- Missing function bug fixed
- View method as optional input parameter

Tag Activity for this File
Tag Applied By Date/Time
specialized Iari-Gabriel Marino 22 Oct 2008 09:11:26
plotting Iari-Gabriel Marino 22 Oct 2008 09:11:26
random dot stereogram stereoscopy 3d Iari-Gabriel Marino 22 Oct 2008 09:11:26

Contact us at files@mathworks.com