Stereogram

BSc module project. Written in MATLAB script.

This program creates a stereogram from a depth map.

  • sg.m - The command-line interface.
  • mystereogram.m - The bulk of the code. Run sg and follow the prompts. Here's an example using the depth map provided below (any greyscale bitmap can be used)...
     
     » sg 
     
     -- sg.m -- create a stereogram -- 
      
     depth image (greyscale indexed format) selection 
     please enter filename (surrounded by single quotes): 'ripple.bmp' 
     loading depth image... 
     please enter max. depth (0-1): 0.98 
     calculating depth information... 
     creating stereogram... 
     colour selection 
     0: all colours 
     1: reds 
     2: greens 
     3: blues 
     please enter 0-3: 1 
     please enter number of colours (>=2): 4 
     please enter distance of eyes from image (in cm >=10): 40 
     please enter pixel size (in mm >0): 1 
      
     -- end -- 
      
     » 
    
    It generates this stereogram. For those that don't know how to view a stereogram, focus past the image (in this case with your head 40cm away). I find that for this particular sterogram looking slightly right of the centre helps.
  • ripple.bmp - Example of a depth map (bmp format).
Last modified: 30/04/06 22:46:20
Go to top

Related Pages

No related pages or links.

Login/out

Login

Forgot Password?
Go to top
Go to top