-
Notifications
You must be signed in to change notification settings - Fork 63
Home
Stands for Structured Light Tool Kit. These are a collection of command line and GUI tools I have written with the intention of making operation of DIY structured light systems easier for myself. An effort has been made to divide the tools into logical units of work; it's possible to run the display program, the camera capture program, and the control program all on separate computers on the same network (or on just one).
Here's an example of a ~7" tall sea shell captured over 74 scans using a raspberry pi v1 camera + sony mp-cl1 projector + arduino-based turntable: https://sketchfab.com/models/5def256988594fae93ceb69b59fabbcc
- Finding intrinsic camera calibration: 3x3 matrix + radial/tangential distortion coefficients
- Finding intrinsic projector calibration: 3x3 matrix + radial/tangential distortion coefficients
- Finding extrinsic matrix for a stereo camera + projector setup (3x3 rotation matrix + 3x1 translation vector)
- Calculating dense correspondence map between camera and display pixels (screen or projector)
- Generating 3D point clouds from correspondence data and intrinsic+extrinsic calibration data
- Rendering a visualization of calibration data with rainbow color map and isolines of distortion magnitude per pixel
- Displaying timed structured light patterns via graphics adapter to display or projector
- Capturing timed images of structured light patterns via camera input
- Automated rotation of objects using a basic arduino stepper motor turntable
- Merging multiple point clouds for generating a static background point set to allow automated cleanup
- Background subtraction for cleaning up 3D point clouds by specifying a "background" point set
- Automated alignment of 3D point clouds (requires background subtraction to remove static objects)
- Cultural Heritage Preservation
A primary goal of structured light scanning is to calculate the dense correspondence between camera pixels and output pixels. By displaying black and white patterns to signal 0 and 1 at each pixel, a flat panel display or projector can simply "speak in binary" the coordinates to the camera. Multiple patterns are shown to signal each bit of the per-pixel address code (e.g. output pixel x address equals decimal 10 -> binary 1010 so white-black-white-black is displayed at that output device pixel to get the x address). The process of decoding images of displayed black-white patterns is executed as a simple rule for all camera pixels (was pixel bright or not).
Binary gray code structured light scanning involves displaying, capturing, and parsing sequences of black and white patterns. Uses include camera lens calibration and 3D point cloud reconstruction. By displaying specific patterns (on a display or projector) and capturing images of them, it is possible to calculate the correspondence between camera pixels and outut device pixels. More details available at https://en.wikipedia.org/wiki/Correspondence_problem https://en.wikipedia.org/wiki/Structured_Light_3D_Scanner
A very common thing encountered when dealing with stereo cameras and 3D is the correspondence problem. If you've got two cameras pointed at something, how can you figure out which pixel in the left camera corresponds to which pixel in the right camera? A common approach is to identify matching patterns between the images from each camera. With that goal in mind, structured light is the idea of switching from input-only (two cameras in stereo) to output-input (e.g. projector and camera in stereo). In the case of two cameras, the goal is to identify pairs of rays from each camera that intersect in real life (e.g. left camera pixel (30,68) corresponds with right camera pixel (65,44)). With a projector and a camera, it's possible to use the projector to "speak in binary" each ray's address to the camera in successive patterns, and solve the correspondence problem.
WIP