Laser Scanner…It’s Alive…sort of

I managed to finish the code last week for the laser scanner.

The way it works is it takes in the image from the camera, rotates it 90 degrees (because the camera is actually mounted rotated so that it can be perched). It then reads through each line in the image and notes the position of the most “Red” pixel. From there I’ve had it draw an image of the profile.

Knowing the position of the most Red pixel for each line of the image, and knowing the angle at which the object is, I have a polar coordinate for that point. From there using trig I can break it into three Cartesian coordinates (i.e. x, y , z). ‘x’ and ‘z’ are from the polar coordinates, ‘y’ is from the height for that line of pixels in the image.

It’s then added to a list of 3D points and the program creates a ‘Point Cloud’ of the object.

From there, the program then sends a signal to the Arduino to rotate 2 degrees for the next image to be processed and it repeats the process.

The 3D environment I use is XNA from microsoft. I have a lot of exsperience with it, and I find it works really well. It can also be integrated into windows forms.

There are a few issues still, like breaking down point cloud into a manageable set of faces(i.e. processing +56,000 different 3d points). I’ve also read up on how to write too a ‘.x’ (which XNA and Blender 3D both can use, from there I can use Blender to export it too other formats like .fbx, .3dx or .stl for 3D printers)

I’m using it simply because XNA can load .x files, and also that ‘.x’ files are easier to figure out then .fbx files.

Below are a few pictures of it working:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s