Professional Documents
Culture Documents
http://www.instructables.com/id/Structured-Light-3D-Scanning/
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
http://www.instructables.com/id/Structured-Light-3D-Scanning/
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Image Notes 1. We can replace this camera with a light source to solve the problem of identifying a unique point on the subject. 2. If we're looking at this scene from above, this angle is based on the x position of the subject and the FOV of the camera. 3. This arrow describes the optical axis of the camera (where the camera center is pointing).
Image Notes 1. i1, i2, i3 describe the intensity of projected patterns with respect to theta. In practice, theta is the y or x position in the image. 2. Given the captured intensities, this equation can be used to reconstruct the original theta.
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Image Notes 1. This is what it looks like when you project a single three phase pattern on a scene.
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Image Notes 1. This image represents the wrapped phase: the arctangent operation shown in the previous image.
Image Notes 1. Flood fill starts in the center and slowly walks outward, ignoring and not propagating across noisy data.
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Image Notes 1. This image represents the unwrapped phase, with the two pi discontinuities removed.
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Image Notes 1. Processing is a great way to get started with programming if you've never tried before.
Image Notes 1. Camera needs to be horizontally separated from projector to compensate for lens shift. This is the first 3D scanning setup I ever used.
Image Notes 1. Notice that the optical center of the projector is at the same distance from the scene as the camera's optical center. 2. The projector is shown here rotated counter clockwise. Either way works, but it will change the direction the patterns are projected and consequently the sign on the zscale parameter. 3. Notice that the camera's optical axis is tangent to the scene, and that the camera's optical center is higher than the projector's.
http://www.instructables.com/id/Structured-Light-3D-Scanning/
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Image Notes 1. This is what it looks like when you project a single three phase pattern on a scene.
Image Notes 1. Noise threshold, zscale, and zskew control the decoding. Render detail controls how many points are skipped during visualization. If the application is running slowly, increase this value to skip more points. 2. Be sure to save some screenshots of your work to share with others!
step 7: Variations
Congratulations, you made a 3D scan from only three images! So where do we go from here? To keep track of where I take this technique next, watch my Vimeo . Here are some things I've been looking into. Feel free to leave any ideas or questions in the comments section! 3D Motion This only gives us one scan. To capture motion with this technique requires a few more tricks. The first one is synchronizing a camera and projector so we can capture at a high rate. Commercial structured light systems use hardware and special electronics to do this. A DIY approach might use the vertical sync signal from a camera to drive a microcontroller that generates the three phase patterns for a projector. Without real sync, we can get pretty far with a 60 fps camera like the PS3Eye and a 60 Hz projector. Exporting the Data Exporting the 3D data for use with other applications is obviously important if you want to do something with the data. Maybe fabricating a miniature, or using the mesh for a character in a video game. A more complex application simply called decode.zip is available from the structured-light project. It can handle exporting into various 3D formats like .png depth maps, .ply and .obj triangle meshes and point clouds. It will also allow you to capture motion as described above. As this application develops, I'll write another Instructable describing how to capture 3D video. More Accurate Unwrapping Phase unwrapping, mentioned in Step 2, is a big part of phase-shift scanning. There isn't a single "right" answer to an unwrapping problem given the wrapped phase. However, the flood fill technique is clearly not ideal as it can create regions with large phase discontinuities along straight lines. Better phase unwrapping algorithms could avoid these obvious errors. Automatic Calibration We should be able to automatically approximate zskew, zscale and the noise threshold parameters by taking some test scans of reference subjects. Absolute Position Three phase scanning can only recover relative position by propagating phases during the unwrapping stage. In order to take absolute measurements of every position in a scene, we can use cosine patterns with many different frequencies, or use a technique called Gray code scanning. Gray codes assign a unique code to each stripe by using 10 patterns instead of 3. Invisible Capture for Performance Unless you like the aesthetic of flashing scrolling lines, structured light isn't the best way to capture 3D information on a stage in front of an audience. One solution to this involves modifying a projector to remove the infrared-cut filter and replace it with a visible light-cut filter. Then, with an IR camera, you can see the projected patterns without disturbing the scene in the visible spectrum.
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Image Notes 1. This is an example of what one of the gray code patterns look like. The others look similar, with varying frequencies. 2. When you initially collect gray codes, the values look like this. 3. When you convert the gray codes to binary, the displacement looks smooth and represents something similar to the phase image from phase-shift scanning.
Image Notes 1. The build your own 3D scanner has some great information about the deeper math behind structured light, and example implementations for gray code scanning.
http://www.instructables.com/id/Structured-Light-3D-Scanning/
Related Instructables
WhiteScanner3D slideshow Yellow Dots of (slideshow) by Mystery: Is Your wezyap Printer Spying on You? by EFForg
How to make 3D images of Make a life sized clouds by BobS Batmobile Tumbler and Batman themed Halloween display by jerjod
Weekly Project: A Handheld 3-D Camera: How to realize a Without Using a Stereoscopic 3D Camera by PSdp digital photoframe by madaeon
Advertisements
http://www.instructables.com/id/Structured-Light-3D-Scanning/