3D Photography

3D Girls and Guns

Wednesday, January 23, 2008

RealTime 3D in MatLab

I messed around in MatLab today to discover it has a fairly simple video capturing API. So, I hooked up two webcams and wrote a quick little program to merge the two video streams in realtime into a single anaglyph video steam. The result: A realtime 3D video stream. Here’s a screenshot (yes, my webcams suck):

I’m thinking it would be neat to put the cameras in a plastic face at the show and let people look at themselves in 3D…

posted by asm at 3:48 pm  


  1. 1.hello !!
    though this post is really old

    but its amazing that i found it

    i wanna do the same thing

    i wrote a coede but it seems it has problems if you would please send me your code or have a look on my code and tell me what’s the mistake with it

    this is my code ::::

    clear all
    close all
    vid = videoinput(‘winvideo’,1, ‘YUY2_640×480′);
    vid1 = videoinput(‘winvideo’,2, ‘YUY2_640×480′);
    % to convert to rgb colors
    vid.ReturnedColorSpace = ‘rgb’;
    vid1.ReturnedColorSpace = ‘rgb’;

    while (1)

    %retrieves all the frames acquired at the last trigger
    data = getdata(vid);
    data1 = getdata(vid1);
    %processes the color channels of the videos
    %to display them in one video
    stop(vid),delete(vid),clear vid;
    hope you can help me

    Comment by zia — December 14, 2010 @ 6:10 am

  2. hi tnx very much!good luck

    Comment by mostafa — April 18, 2011 @ 12:06 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

Warning: Undefined variable $user_ID in /usr/src/app/3d.syne.net/wp-content/themes/minima-black-for-wordpress-115/comments.php on line 43

Powered by Hamsters - All work © 2009