File Exchange Pick of the Week

Our best user submissions

Autostereogram 8

Posted by Jiro Doke,

Jiro's pick this week is abSIRD by Daniel Armyr. Here's a fun pick for the week. This function takes a matrix, representing a height-map, and visualizes it using an Autostereogram. To quote Daniel, "the algorithm used is abSIRD, published in 2004 by Lewey Geselowitz. It is a fast, in-place algorithm that is exquisitely simple to implement." Can you see them? Hint: cross your eyes.
m = membrane(1, 250, 9, 2);
p = load('penny');

% Make it 4 times bigger (imresize from Image Processing Toolbox)
p2 = imresize(p.P, 4);

What a great way to visualize 3D data! I like this entry not only for the coolness factor, but also for how it is written. The code is robustly written with error checking and plenty of comments to describe the algorithm. I also like the published example code that he included with the entry. These files can be easily created using MATLAB's publishing capability, and it's a great way of showing how to use your code or explaining concepts. I especially like them when they are used with File Exchange entries. Comments Give this function a try (and cross your eyes) and let us know what you think here or leave a comment for Daniel.

Get the MATLAB code Published with MATLAB® 7.14


Comments are closed.

8 CommentsOldest to Newest

Tony Sturges replied on : 1 of 8

Do you really mean to cross your eyes? I’ve seen lots of these pictures on posters, but usually it requires that we relax our eyes so as to focus in the far distance. No matter how I try I cannot see either the membrane or the penny here. Strange.

Vince replied on : 2 of 8

I find that if I slowly uncross my eyes, the image comes out. It took a little bit of time to find the sweet spot, but it’s really interesting.

Jiro Doke replied on : 3 of 8

Tony, yes I really mean “cross your eyes”, at least that’s how I see it. I think there are different ways to do it. I usually cross my eyes to let the two images coming into my eyes overlap. But as Vince mentioned, if I let it overlap too much, then I have to slowly uncross.

Tony Sturges replied on : 4 of 8

Ah So. Of course, once we ” see it,” it is obvious :-) What I see is not quite what I was looking for, but that is the minor problem. I wear those modern glasses that are a fancy version of bifocals; continuously variable. After years of using them, my head automatically adjusts, so that when my brain thinks I’m looking at something across the street, my head tilts so that I am looking through the upper part of the lenses; in this case, I have to be aware of looking through the lower part of the lens to focus on the computer screen. so soon old, so late smart. Cool routine.