Projects 2022
Digital Camera to 3D Depth Mapper
In this personal project, I transformed my DSLR into a 3D Scanner using Python (OpenCV) and TwinCAT. The goal was to allow a 100$ digital camera to achieve similar results to $20,000 3D-scanning equipment. First I created a linear actuator assembly that can accept any consumer camera. This is optional however, a simple manual macro rail would suffice. The camera takes a set of shallow DOF macro images at different depths (focus bracketing).
The images can then be sent through my Python code. Given the depth increment, sensor size, and magnification, the Python program can quite accurately create a functional depth map of the object at nearly any resolution desired. The program slices up every image into quadrants, and uses Laplacian or Sobel edge detection to find the most in-focus areas of the image. It can then use the depth information to estimate where these areas are in 3D space. Finally, a 16-bit grayscale depth-map image is created which can then be viewed in a variety of programs (see below for output in Aurora Vision).