|3D Object Scanning|
View Java Applet
We spent a few days fiddling with it, and between us got it running from an Altera EPXA1 board and displaying the 16x16 pixel output. It worked pretty smoothly, even if the image quality wasn't great. The idea was quite simple. There were 16 LEDs, and 16 detectors opposite. You would light up each LED in turn and see if light could get between the objects to the opposite sensor. By rotating the object to be scanned at about 15 degree increments and doing the scan many times, an image could be built up using something known as the Radon transform. The Radon transform just extruded the 16 readings into columns on a 16x16 array, rotated it by the right amount, and added it to an accumulator. After all the steps, you get a top-down image.
The 3D Version of this turned into my Cambridge University Computer Science Degree's final year dissertation. You can view it HERE.
The Transform used is remarkably simple. I made a function that took as parameters x,y and z in a cube, and a rotation, and outputted projected x and y values. This is exactly the transform used to display 3D graphics so you can find it anywhere. It just rotates around the y axis, and then adds perspective from Z. You could also use a transform matrix but it'll be a bit slower. So... for every point in your 3D array, and every rotation, put it through this transform, and then use the coordinates to find a pixel in the image for that rotation. If the luminance in this pixel is less than than what you currently have in the array, do nothing, otherwise update the array to the new value.
What you end up with after this is an array where each point is either large if it is outside the object, or small if it is inside. The Marching Cubes algorithm (the same one used for metaballs - search google for 'polygonization of a scalar field') can be used on this array to draw a polygon at a certain level. You need to move this level up and down by a bit to get the skin drawn in the right place. The shape gained after this is often a bit jagged, so i perform a 3-dimensional gaussian blur on the array.
After all this, the polygons are reduced down a bit, and textures added to each of them using the original images from the camera.
|Created by and Copyright (c) Gordon Williams 2003|