For a project in my computational physics class, I wanted to create something more than a program. With an old webcam, a pantry turntable, and a cheap laser, I figured I could use MATLAB’s image processing abilities to create proof-of-concept 3d scanner.

By centering the object on the turntable, and projecting the laser line onto the object, I can use the camera to collect images while rotating the object at known intervals. The images are then fed into a MATLAB script that calculates the deviation of the laser from the center of the image. Using these deviations, I can plot the location in Cartesian coordinates, and have a rough estimation of the objects outer dimensions.