PDA

View Full Version : Processing - 3D Laser Scan Software


grantmoore3d
07-24-2010, 04:39 PM
I figured this seemed the most appropriate place to stick this, I just wanted to make a thread for a project that I'm working on for fun. I wanted to experiment with creating a simple process that any artist could use to product a 3D object using lasers and free software / code.

Follow my progress here:
3D Scanning Project Blog (http://grantmoore3d.blogspot.com/search/label/3D%20Scan)

So far, I've managed to get a decent 3D representation in Processing from a simple video. My process thus far is as follows:


Set up a small servo that completes a revolution every 6 seconds, slower would be better, but I don't have the equipment right now
Place a line laser going straight up/down along the object
Place my 720p 30fps webcam at about 30 degrees from the laser, creating a right triangle (higher degree would occlude recesses too much, so 30 seems to work well)
Record a full revolution
Convert that video into a series of B&W images, masked so only the line I want appears
Feed them into the software that I've written, which finds the average brightest point, compares against a "center" value, then creates an array of distances using trigonometry
Once everything has been read in, it reconstructs the points in 3D for display


Ultimately, I will release it for free / open-source if anyone wants to use it or add to it. The plan is once I've figured out how to clean the data and fill in some gaps, to have it produce an OBJ. The software won't be super accurate, but it should be customizable and flexible enough that most people with some programming skills can get usable results.

http://4.bp.blogspot.com/_j0p9tUTU8mI/TD9rww-DrTI/AAAAAAAAAC0/nNcz50ZjWbU/s1600/007_ScanningDogToy.jpg

http://1.bp.blogspot.com/_j0p9tUTU8mI/TEp_h0rZVII/AAAAAAAAAD0/RmniDZTnjfU/s1600/018_DogToy_Front.jpg

Note: the video I recorded wasn't perfectly level, so one end is skewed. The process works fine, but it's very dependent on having perfect video to work from... which I do not. It looks a lot more impressive when you see it spinning.

Pink = good data
Green = bad / missing data that needs to be filled in
Blue = cropped data / ignored

Creepfree
07-27-2010, 12:11 PM
Dunno if i got it right but seems like your approach is based on keying a red "laser" line?What bit depth are your input images?I mean,are you sure that it'll be precise enough to capture all of the slight details?
Anyway,great job-r&d rocks in any forms :D

grantmoore3d
07-29-2010, 01:23 AM
It's just some $3 lasers and a webcam running at 720p so I'm not expecting any level of accuracy with my equipment. I'm mostly just working on this as a fun project to do with my girlfriend, but after it's done I may try building another cheap system with higher accuracy in mind. Either way, R&D is definitely a good way to spend an evening or two :beer:

ndeboar
07-29-2010, 03:37 AM
man, i started building a motion control camera rig in my spare time, and my girlfriend almost killed me! She wasn't happy when i started soldering on the chopping board.

CGTalk Moderation
07-29-2010, 03:37 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.