by date
Plan for Joseph Greenawalt
Plan for Joseph Greenawalt
| Name: | Joseph Greenawalt | ![]() |
|---|---|---|
| Date Posted: | May 21, 2005 | |
| Rating: | 4.0 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Joseph Greenawalt |
Blog post
My Homebrew 3D Laser Scanner
This is only tenuously related to game development but here goes :) Every couple of years it seems I'm overwhelmed with the desire to work on some kind of crazy mad scientist-esque project. Between the fall and spring semesters I gave in to the urge and created this contraption: home.cablelynx.com/~sgreennawalt/
(Note that the above page was originally created for viewing by a friend of mine, is very unpolished, filled with in-jokes, and skimpy on details)
How it works:
I used a radio shack laser line level to project a vertical red line onto the target object (positioned in the center of the turntable). The turntable is turned by a stepper motor still wired up to the old dot matrix printer that it came out of. When I want to turn the table, I just send out a paper feed escape sequence through the parallel port (feed paper 1/180 of an inch) using a bash shell script. To automate the firing of the camera, I mounted a leaf switch at the edge of the print head's range such that the switch is triggered when the print head is sent to the home position. The leaf switch is connected by two wires to the camera's shutter switch (through a hole drilled in the camera). The shell script feeds the paper (rotates table by small amount), homes the print head (takes picture) and then waits 5 seconds for the picture to be written to the camera's flash memory. The process then repeats until I manually stop it when the turntable has gone 360 degrees (or close enough to). Once the capture process is complete, I use the number of images captured to determine the angle between each "slice". I batch convert all of the images to PPM format (very easy to read) applying some filters to minimize noise. Then I process them with a small c++ program that I wrote which opens each image in order and finds the brightest point on each row of each image. The idea is that since the camera is to the left of the model and facing it at an angle, each point will be displaced more to the right side of the image if it is reflecting off part of the model that is further "foreword" (towards the front of the turn table). I made no attempt to triangulate the points, just stretched the horizontal distance between the points using a series of fudge factors until it looked about right. This process results in a series of 2D slices representing the model which are written to a big text file. I then read the vertices of each slice from the file into blender using a python script, rotating each slice around a vertical axis by an amount corespondent to the actual rotation angle of the turntable. And viola, a 3d-point cloud of a real world object in Blender!
I might put up a more detailed page describing how it works with source code although it is a real mess and I took some terrible shortcuts in the 3d math. Anyway, now that I've gotten that out of my system and am off from school I can get back to Torque :)
(Note that the above page was originally created for viewing by a friend of mine, is very unpolished, filled with in-jokes, and skimpy on details)
How it works:
I used a radio shack laser line level to project a vertical red line onto the target object (positioned in the center of the turntable). The turntable is turned by a stepper motor still wired up to the old dot matrix printer that it came out of. When I want to turn the table, I just send out a paper feed escape sequence through the parallel port (feed paper 1/180 of an inch) using a bash shell script. To automate the firing of the camera, I mounted a leaf switch at the edge of the print head's range such that the switch is triggered when the print head is sent to the home position. The leaf switch is connected by two wires to the camera's shutter switch (through a hole drilled in the camera). The shell script feeds the paper (rotates table by small amount), homes the print head (takes picture) and then waits 5 seconds for the picture to be written to the camera's flash memory. The process then repeats until I manually stop it when the turntable has gone 360 degrees (or close enough to). Once the capture process is complete, I use the number of images captured to determine the angle between each "slice". I batch convert all of the images to PPM format (very easy to read) applying some filters to minimize noise. Then I process them with a small c++ program that I wrote which opens each image in order and finds the brightest point on each row of each image. The idea is that since the camera is to the left of the model and facing it at an angle, each point will be displaced more to the right side of the image if it is reflecting off part of the model that is further "foreword" (towards the front of the turn table). I made no attempt to triangulate the points, just stretched the horizontal distance between the points using a series of fudge factors until it looked about right. This process results in a series of 2D slices representing the model which are written to a big text file. I then read the vertices of each slice from the file into blender using a python script, rotating each slice around a vertical axis by an amount corespondent to the actual rotation angle of the turntable. And viola, a 3d-point cloud of a real world object in Blender!
I might put up a more detailed page describing how it works with source code although it is a real mess and I took some terrible shortcuts in the 3d math. Anyway, now that I've gotten that out of my system and am off from school I can get back to Torque :)
Recent Blog Posts
| List: | 04/10/08 - Blender DTS Exporter 0.96 Released 09/11/07 - Blender Orange Guy Now available 08/10/07 - Blender DTS Exporter 0.95 Released 02/04/07 - Blender DTS Exporter 0.94 Released 12/26/06 - Blender DTS Exporter 0.93 Released 11/25/06 - Blender DTS Exporter version 0.92 released 02/15/06 - Blender Exporter User interface Overview, more to come. 05/21/05 - Plan for Joseph Greenawalt |
|---|
Submit your own resources!| Matt Fairfax (May 21, 2005 at 07:33 GMT) Resource Rating: 5 |
| Ben Garney (May 21, 2005 at 08:20 GMT) |
| Timothy Aste (May 21, 2005 at 08:27 GMT) |
| Joseph Greenawalt (May 21, 2005 at 08:47 GMT) |
| Nauris Krauze (May 21, 2005 at 09:10 GMT) |
| Adrian Walters (May 21, 2005 at 10:02 GMT) |
| Tom Bampton (May 21, 2005 at 13:44 GMT) |
| Nicolas Quijano (May 21, 2005 at 15:49 GMT) |
| Joseph Greenawalt (May 21, 2005 at 17:48 GMT) |
It seems to be working from here, did you get an error message?
@All:
Thanks for the encouragement, everyone!
| Phil Carlisle (May 21, 2005 at 20:04 GMT) |
Ah well, cool project! and cheap too!
This might make a good panorama capture head, if you stick the camera at the centroid of the turntable :)
| Joseph Greenawalt (May 22, 2005 at 02:00 GMT) |
You must be a member and be logged in to either append comments or rate this resource.



4.0 out of 5


