Make Your Own 3d Scanner!

283,079

427

45

Intro: Make Your Own 3d Scanner!

 My goals for this project were as follows:
Make scanner which
*could accurately and correctly produce computer models in 3D
*would work for objects under 1' x 1' x 1' in size
*wouldn't cost more than $20 on the project (Materials I have lying around don't count towards the cost, but including these materials, the scanner still costs only about $100.)

The final product works pretty well, and I hope to improve it's usability in the future by further automating it's performance and tweaking the software.

Step 1: The Basic Idea...Overview

In order to locate a point in 3d space, we need to describe one of several things. The simplest would simply be to give three numbers to describe it's position relative to another point in space. This is the format used by most computer models. Another way to describe the point would be to use three planes, or a plane and a line. What you'll see is that it's easiest to describe points in the third way, then convert them to the first to save them to standard format. So the question becomes, how to find the plane and the line? As it turns out, the first question is in the hardware, and the second in the software.

Step 2: The Basic Idea...Hardware

 As I'll try to do with the rest of the instructable, I'll first explain the basic idea, and then move on to my implementation. That way, you should be able to find suitable replacments for anything that you don't have.
So, we need to make a plane, then somehow record where that plane so that it can be processed by the computer. Although others in the past have used the edges of shadows to achieve this, I've gone for something a bit more exotic. I have a (very bright) green astronomy laser (a normal laser pointer might work too, astronomy pointers are expensive). I've shot it through a cylindrical lens, which makes it into a fan. This fan of light is what I'm using as a plane. It works fine, but be warned that the size of your scanner will be severely limited by the size of your lens: my lens in about a third of an inch in diameter, and with an approximately 2' cube for the frame, I'm limited to about a 2' by 6" by 6" scanning surface. A smaller lens would be better, but it's not necessary for what I'm doing.

Step 3: The Box

 The first step is to build a box to contain the scanner. The floor and back wall of the box are made out of melamine, the sides plywood, and the rest is 1 1/2" stock cut on a table saw. After working with the finished product, I can say that the melamine is unnecessary: pick some flat (and it really does need to be flat) plywood, and paint it white. It'll save you a few bucks. My box is about 1 1/2' to 2' in all dimensions, but that aspect is up to you the only other important part of the box is the rails on top. These should be precise, and fit nicely with a set of wheels. I've used 3/8" metal rod, and knex wheels for mine, but any similar set would do.

Step 4: The Laser Gantry

Next is the laser gantry. I've used an old piece of wood I had around for this. They say a picture it worth a thousand words so I'll put the detailed instructions on the pictures. The gantry is mounted so that it rolls along the rails at the top of the box. There's a hole in it, and the laser/lens unit is mounted so that the plane of light falls perpendicular to both the back and bottom of the box, and about halfway up each. Once the gantry and laser are set up, the physical setup is done. On to the camera setup.

Step 5: Camera Position...

The camera should be set off to the side, and above. This ensures that the laser line will deflect properly.
At this point, you should get a test object.  I've used a gnome statue, but anything with a distinctive shape, and good details at all levels should work.  Look at the camera, and make sure that the laser visibly deflects over the object. Look at the pictures below to get a sense of what I mean.

Step 6: The Basic Idea...software

 The ideas behind the software are also quite simple. There are a series of points, each of which correspond to the same pixel on the camera. In a sense, the image on the camera is a projected space of the real 3 dimensional space it's imaging. The trick is to learn how to transform points between the two spaces. As it turns out, this comes down to a fairly simple equation. If you're interested, I'll add scans of my development notebook for you to look through. Otherwise, I'll provide with my matlab implementation and documentation.

Step 7: Do Some Scans!

 Give it a try! Take some scans and see how it works. What you get from this scanner won't be a final model of the object: only the side facing the camera will be mapped, and the resolution is rather coarse. The way to fix this is to do multiple scans, then piece them together. For instructions on how to do this, see this excellent instructable. Happy scanning!

Step 8: New Directions...

 There are several directions I'd like to go in from here. Unfortunately, I probably won't get to it in the near future. I'll leave my ideas here for the DIYer more ambitious than I.

1) Automate-There are a couple things that would need to happen here. One is the software. Matlab might not be the best choice for this though, and I'm not quite as ambitious as to attempt it in another language. In addition, there would need to be some wizardry with electronics, some way to activate motors and such on computer command. Finally, the images would need to be taken and loaded realtime, something I'm not sure how to do. 

2) Add a turn table. Along with automation, this would allow for multiple scans to be taken at the same time. This would reduce the amount of time needed to make a complete model.

3) Scanning software: Ideally, the software would clean out the noise and mesh the point cloud it creates automatically.

Share

    Recommendations

    • Metalworking Contest

      Metalworking Contest
    • Furniture Contest 2018

      Furniture Contest 2018
    • Audio Contest 2018

      Audio Contest 2018

    45 Discussions

    0
    None
    sunlight305

    7 years ago on Step 6

    It's a very interesting thing,i want to know more about it,can you send me the source code.Thank you very much.My email:sunlight305@hotmail.com.

    1 reply

    Hi! Unfortunately, a recent hard drive failure means I don't have the Matlab code anymore. I'm putting together python code to do the same thing, since more people will be able to use this. Until I get that up, there's a fairly detailed description of how all this works at the link below. https://sites.google.com/site/oursler3dscanner/software
    ~Will

    0
    None
    nandoabadi

    1 year ago

    can i have the source code ?:)

    0
    None
    lauren152

    2 years ago

    I have to do a final project in matlab and my code is no where near as amazing as yours is!

    0
    None
    mehranzaryoun65

    3 years ago

    I've made my own turntable for a handmade 3d scanner, and I'm very curious about the software, could you send me the source code of Matlab or any documentation? My email is: mehran.zaryoun65@gmail.com

    0
    None
    mehranzaryoun65

    3 years ago

    I've made my own turntable for a handmade 3d scanner, and I'm very curious about the software, could you send me the source code of Matlab or any documentation? My email is: mehran.zaryoun65@gmail.com

    0
    None
    mehranzaryoun65

    3 years ago

    I've made my own turntable for a handmade 3d scanner, and I'm very curious about the software, could you send me the source code of Matlab or any documentation? My email is: mehran.zaryoun65@gmail.com

    0
    None
    mehranzaryoun65

    3 years ago

    I've made my own turntable for a handmade 3d scanner, and I'm very curious about the software, could you send me the source code of Matlab or any documentation? My email is: mehran.zaryoun65@gmail.com

    0
    None
    mehranzaryoun65

    3 years ago

    I've made my own turntable for a handmade 3d scanner, and I'm very curious about the software, could you send me the source code of Matlab or any documentation? My email is: mehran.zaryoun65@gmail.com

    0
    None
    mehranzaryoun65

    3 years ago

    Hello sir, would it be possible to send me the source code? Thank you in advanced.

    0
    None
    hawaiilees

    3 years ago on Introduction

    Hello!

    I would love to take a look into the work you began and see if there is a way to continue it. There are a team of entrepreneurs, myself included that would love to see this expand. My email is rich.mamsf@gmail.com

    Thanks and great work!

    0
    None
    Pustekuchen

    4 years ago on Step 6

    I try to build one, but I don't know how to convert the 2-D Points of my line in world coordinates. How can I make this?

    Thanks

    0
    None
    golfclub

    5 years ago on Introduction

    Hi.
    Great job
    May i have the code?
    golfclub4u2win@hotmail.com

    TKS

    0
    None
    Yettimania

    5 years ago on Introduction

    Did you ever complete this in python and can you post the matlab code? Did you use the Hough Transform here? I'm little confused as to does the transform only return linear lines?

    0
    None
    pierceRom

    6 years ago on Step 6

    Is there any way you could supply me your code please ?? Im doing a research project on this topic and it would be the biggest help if you could ?? My email is pierce jonRomero35@hotmail.com

    1 reply
    0
    None
    llluispierceRom

    Reply 6 years ago on Step 6

    Have you been able to get the code? I am looking for the Processing source! Thanks.