The same technique used for Thom's face in the Radiohead "House of Cards" video. I'll walk you through setting up your projector and camera, and capturing images that can be decoded into a 3D point cloud using a Processing application.

Point Clouds with Depth of Field from Kyle McDonald on Vimeo.

House of Cards Google Code project

I've included a lot of discussion about how to make this technique work, and the general theory behind it. The basic idea is:

1 Download ThreePhase
2 Rotate a projector clockwise to "portrait"
3 Project the included images in /patterns, taking a picture of each
4 Resize the photos and replace the example images in /img with them

Step 1: Theory: Triangulation

If you just want to make a scan and don't care how it works, skip to Step 3! These first two steps are just some discussion of the technique.

Triangulation from Inherent Features
Most 3D scanning is based on triangulation (the exception being time-of-flight systems like Microsoft's "Natal"). Triangulation works on the basic trigonometric principle of taking three measurements of a triangle and using those to recover the remaining measurements.

If we take a picture of a small white ball from two perspectives, we will get two angle measurements (based on the position of the ball in the camera's images). If we also know the distance between the two cameras, we have two angles and a side. This allows us to calculate the distance to the white ball. This is how motion capture works (lots of reflective balls, lots of cameras). It is related to how humans see depth, and is used in disparity-based 3D scanning (for example, Point Grey's Bumblebee).

Triangulation from Projected Features
Instead of using multiple image sensors, we can replace one with a laser pointer. If we know the angle of the laser pointer, that's one angle. The other comes from the camera again, except we're looking for a laser dot instead of a white ball. The distance between the laser and camera gives us the side, and from this we can calculate the distance to the laser dot.

But cameras aren't limited to one point at a time, we could scan a whole line. This is the foundation of systems like the DAVID 3D Scanner, which sweep a line laser across the scene.

Or, better yet, we could project a bunch of lines and track them all simultaneously. This is called structured light scanning.
Where can i find the software? And would an hdmi pico projector work for this?
<p>Thats breathtaking...</p>
<p>Ok, so I placed the pictures into ThreePhase, and it isn't doing anything. All it does is open to a white screen. What is the solution?</p><p>Here are my three test pictures:</p>
<p>Its trendy :)</p>
<p>yep ..while searching on the internet i found this structured light scanner software, well yeah it coast me 50 euro as i remember but it works perfectly for me especially that it does not force the user to use a DSLR camera (like the flexScan3d software) or a very precise video projector ( like David3d scaner soft force you to use )</p><p>i guess it s the most cheapest 3D scanner soft now</p><p><a href="http://rghost.net/private/7TGTnVFLw/3e2648710775d90835ef717f5ec6d1f0" rel="nofollow">http://rghost.net/private/7TGTnVFLw/3e2648710775d9...</a></p>
<p>I started working on a structured light scanner using a SHOWWX as <br> well. I&rsquo;m planning on replacing the red laser in the projector with an <br> infrared one, with a corresponding filter on the camera. This way, the <br> scan is invisible to the human eye.</p><p>It also leaves the blue and green lasers in place to allow for <br>projection onto the scanned surface in real time (well, with a few <br>hundred millisecond delay). For example, you could place a white sphere <br> in front of the scanner, find its shape and location, and project the <br>Earth onto it. As you move the object, it continues to be tracked, <br>allowing your projection to stay onit.</p>
<p>HI, New to this 3d scanning. I'd like to test the 'ThreePhase' software.</p><p>The images in the pattern folder are 1024*768. This is not the native resolution of my beamer. Could/ should I make new patterns in the native res. of my beamer for better result?</p><p>And the line pattern is not 'sharp'. Why is this?</p>
<p>Very nice. Thanks</p>
<p>Updated for processing 2.X:</p><p>https://github.com/kippkitts/3PhaseScanning/tree/master/ThreePhase </p>
<p>I am also getting the error &quot;Cannot find class or type named PriorityQueue&quot;</p><p>Any ideas?</p>
<p>Same issue (also with LinkedList in ThreePhase-1): I put:</p><p>import java.util.*;</p><p>In any source, but a new error appeared: java.lang.NullPointerException :/</p>
<p>Thats cold</p>
<p>Nicely done... Amazing instructable</p>
<p>Hey Guys,</p><p>if I have just a &quot;single-dot-laser&quot; I can determine X, Y and Z in help of the Triangulation.</p><p>So Z is Z = (f*b*tan(alpha))/(f+x*tan(alpha))</p><p>where</p><p>f -focal length</p><p>b - Laser Camera Disance</p><p>alpha - Laser Angle</p><p>So I have a Problem there. I calculated x because I need it in mm. So I did the following:</p><p>x = (x_pixel/pizel_widh_Image-0.5)*SensorSizeX</p><p>But my measurement are wrong. I am sure the Formula for Z is right. But I am not sure about x. Is there some one who can help me?</p>
<p>Its nice<br><br></p>
<p>Its extraordinary</p>
<p><br>Its exceptional :)<br></p>
<p>TOO GOOD</p>
<p>Nicely done... Amazing instructable</p>
<p>Hi Kyle,thats really very interesting,but i have faced the same problem as Erlud before<br>the problrm is with PriorityQueue:<br>PriorityQueue toProcess; Processing cannot find a class or type named &quot;PriorityQueue&quot;.</p><p> Can anyone help me?</p>
<p>Thats interesting</p>
<p>I saw this first on Open Processing! I am glad I found how to do it, this is amazing! Thanks</p>
<p>Great post, what was the depth resolution you could get ? Can this method be used to reproduce fine details ?</p>
<p>Thank you for the post Kyle, awesome work.</p>
Very interesting and informative. I have a cnc router if the camera and projector where mounted on the &quot;y &quot; axis could a series of images be taken along the length of a wide relatively flat carvings nd the series of images be inter grated so the original be reproduced. Thanks Laurie
Hi Kyle<br> My name is Erich. I tried to run the program in Processing but I recei un error over PriorityQueue toProcess; that processing cannot find a class or type named &quot;PriorityQueue&quot;. <br>What am I doing wrong?
Very nice Kyle
Quite cool.
Wow, super cool Kyle!!
Thank you for the post Kyle, awesome work.
Thats remarkable
how do you feel about using processing vs c++ (oF) I feel like processing is REALLY laggy when dealing with things like this. Maybe I am missing something?
hi kyle <br>I recently tried this code , its amazing how u get a very good scan with just 3 pictures <br>I still didn't get a good result for my scan, I was wondering if you can help me with it <br>but I don't know how to paste picture on Instructables , can anyone help ?? <br> <br>thanks in advance
Real-time Structured Light Virtual 3D Scanner scans virtual 3D objects in the virtual environment. http://3dracs.real3d.pk

About This Instructable




More by kylemcdonald:Structured Light 3D Scanning Nandhopper 1-Bit Noise Synth Lo-fi Arduino Guitar Pedal 
Add instructable to: