Automated Turntable for Fringe Projection 3D Modeling
For a more thorough, technical analysis of the setup, visit the GitHub repository.
Project Overview
Virtual 3D modeling is no longer limited to CAD designers; with a camera and projector triangulated towards a subject in sight, pictures give enough information to generate point clouds revealing the subject's depth. By projecting sinusoidal fringe patterns on an object, observing how the fringes warp around an object versus how they project on a wall, and applying elegant trigonometry formulas, I made point clouds from a creamer and a [replica!] skull.
I combined the computer vision with a custom LEGO® turntable capable of rotating 15kg (33lb) cultural heritage objects, intending to produce a point cloud detailing an object's entire exterior. LEGO® bricks and an Arduino microcontroller were chosen to make this open source project affordable and flexible.
The input and output iteration explains the order of the program.
I combined the computer vision with a custom LEGO® turntable capable of rotating 15kg (33lb) cultural heritage objects, intending to produce a point cloud detailing an object's entire exterior. LEGO® bricks and an Arduino microcontroller were chosen to make this open source project affordable and flexible.
The input and output iteration explains the order of the program.
Custom LEGO® Setup
The turntable bears a high load courtesy of a ball bearing mechanism derived from this video. Gears transmit motion from the motor to the turntable, while gear reductions, use of a worm gear, and reinforcements completely prevent gear teeth from skipping. The motor is fixed beneath the turntable with two LEGO® pieces forming a shaft coupling.
Two LEGO® towers hoist the webcam and projectors in triangulated positions. The screw hole on handheld and web cameras approximate the size of a LEGO® friction pin, constraining it into place at whichever depth along the tower the user deems fit. The projector tower is particularly compatible with the AKASO mini projector, constraining all degrees of freedom without covering the buttons. LEGO® bricks' flexibility welcomes many positional angles by fixing each tower at two points along beams stemming from the turntable's ground.
Microcontroller
An Arduino UNO microcontroller commanded the turntable to rotate the subject between fringe projections, and the microcontroller conversed with Python serially. Once the user's desired frequencies are photographed across his/her desired number of phase shifts, Python uses a library I designed to serially tell the motor to rotate to turntable to its next position. Consequently, the turntable can be decoupled from the 3D modeling code for unrelated projects, which also includes a GUI.
3D Modeling Code
The code is primarily comprised by two programs: the calibration file and the fringe projection file. The calibration code projects 255 different images, one for each nonzero, grayscale, pixel intensity, to compare the projected intensity to the camera's captured intensity. The resulting lookup table is used by the fringe projection code to project calibrated sinusoidal patterns, yielding camera captures crucial to distinguishing the object from its surroundings.
Best Results
Future Possibilities
Depending on one's standard of accuracy and object of interest, the point clouds from different positions are ready to be combined into one. Better calibration could also be explored; a pixel-by-pixel calibration function is in the fringe projection file but was not executed per suspiciously subpar results.
For a more thorough, technical analysis of the setup, visit the GitHub repository.