
Here we fill the window with the pattern. I will try to improve this) def get_linked_point(depthmap, d_width, d_height, p_width, sep):
CREATE YOUR OWN STEREOGRAM CODE
To correct this I paired every point of the depth map (not only the white one) in order to come back to the base shifting amount after the end of the star.Ĭode: (This code is the previous one quickly modified after the help of Neil Slater so it's not clean yet. What I didn't get is that because RDS are made by repeated patterns, shifting these pixels also create an opposite shifting with next patterns creating an other star of the opposite depth. What was wrong in my approch is that I only shift pixels that should create the star. To create 2 images stereograms you need to shift pixels of one image to make the depth illusion. The problem "I can see on the result 2 objects, 1 star "close" to me and an other star "far" from me" is due to the fact that I get the wrong approach when I try to generalize my understanding of stereograms made with 2 images to stereograms using repeated pattern. Point we make the shifted pixel equal to the other one List_linked_point.append(, ])ĭef display_stereogram(screen, s_width, pattern, p_width, linked_points): In this function we link each pixel in white in the depth map with theĬoordinate of the shifted pixel we will need to create the illusion You can either save the stereogram, or send it to your friends via email. Click Make Stereogram From there, the website returns a magic eye image through its autostereogram generator. I didn't clean it yet) import os, sysĭef get_linked_point(depthmap, d_width, d_height, sep): Input the variables to create your stereogram, such as text, clipart, and pattern. The reason I created this app is that I have seen tons of Stereogram apps in the App Store but most of them are simply a gallery containing dozens of static stereogram images. Note: I have tried with different size on shift and pattern and it doesn't seem to change anythingĬode: (Tell me if you need other part of the code or some comment about how it work. Here comes StereoStudio, which meets your desire StereoStudio is my first published iOS app.
CREATE YOUR OWN STEREOGRAM HOW TO
Maybe the problem is my poor english or understanding of what I've read but I will appreciate some detailed explanations since there not that much technical explanations on the web about how to code this from scratch. I have read many things on the subject but I don't get it. And there is different possible results depending of how I focus my eyes. I put this into practice with this depth map:īut I don't understand why I can see on the result 2 objects, 1 star "close" to me and an other star "far" from me.

From what I've understood, to create the illusion of depth, pixels are shifted so when we make them merge by changing focus the difference of shifting creates the illusion. I am trying to understand and code a python script that create a random-dot stereogram (RDS) from a depthmap and a random-dot generated pattern.
