A dome of lights and cameras to produce high quality 3D scans
1st of February 2018
In my first post I talked about some of the structural elements of the dome and cameras I chose to do the scanning. From here we move on to preparing the dome for scanning by improving certain elements such as a turntable and a skin.
There are two difficult steps in building a geodesic dome: the hubs and the skin. It's quite difficult to make a skin that fits seamlessly over a frame. There are various designs, and quite a few are terrible! I've never really seen a good, amateur attempt at creating a good surface on a dome. However, I thought I'd give it a try.
Skinning a dome is important because reconstruction software tends to fail if the background is complex. This is doubly so if you are using a turntable (which is the general way of scanning small objects). So we need to mask out the background. We can do that all manually, or we can make things easier on ourselves by using a skin. Another effect of the skin is to soften the harsh LED lighting, converting the spots to something a little more diffuse.
I decided to use 3 levels of cone which approximates a sphere. The idea is to stitch these together, suspend the skin from the inside of the dome and poke the cameras through at each nodal point. To start with, one needs to do a little maths, figuring out how wide each cone needs to be, then unrolling each cone from 3D to 2D, printing off the final pattern then cutting the material.
With the math worked out, I write all the equations into python and end up with a set of values I can use to create a sketch. I tend to use either inkscape or librecad when I'm coming up with cutting patterns (lasers or material or whatever). Librecad (in the case) takes a little time to get used to, but it works. I printed out the pattern at a FedEx office. They have large format printers that are reasonably priced. With the pattern cut, you can pin it onto your material of choice. I bought a roll of camera flash diffuser fabric from eBay. Use a very good pair of scissors! Anyone who sews will know what I mean! :D
With the material cut, it's time to sew. It's worth making out where the nodal points will be, before we start sewing, just so we know where we need to add eyelets. I punch a hole with a hole punch, and use brass eyelets with a special tool that crimps the eyelets in place.
The skin is suspended from the inside of the dome using ribbon, which is hand sewn at various points around the skin. Pulling these taught and tying them off on the struts seems to work great.
I'm reasonably pleased with the result. It's still possible to see the individual LEDs through the mesh, however the background is removed enough to make automatic masking possible, or at least make the manual mode much easier.
At first, I was using cable-ties in order to get the cameras attached. Sadly, this is not ideal. The cameras are mounted too far forward and in the wrong place. What is the best thing to do? Well, take them apart and use a load of Gorilla Glue!
It turns out that the C910 can be taken apart reasonably easily. Once the clamp and outer casing is removed, there appears to be a metal plate at the back. This is perfect for mounting a nylon M6 bolt on the back. Using Gorilla glue, I can get a reasonably good join. It's important to keep an eye on the bolt as it dries; we want it to be perfectly straight. This would lead to problems later on with adjusting the view from each camera.Read more »
Making a 3D scanner is a tricky project. I learned a lot about the algorithms involved when I built a similar scanner for the University of Leeds sometime ago. Since that time, there have been many advances in the technology and now, one can buy a cheap, laser line scanner for not a lot of money. They all have their problems though. Some are low resolution, others don't capture the surface textures properly. One thing that is key though - you want to control the light. A good friend of mine Dr Hannah Dee over at Aberystwyth University, showed me a project she was working on involving a dome with controllable lights. The theory is, if you want to capture the texture of an object, you need to sample how it responds to different lighting conditions in order to recreate all these bump maps, normal maps, albedo maps etc. I figured this was a good place to start. My initial design didn't include a dome, but who doesn't love a Dome right?
I have a few objects in mind that I want to try and capture, so the dome has to be big enough to accommodate these objects. I made a rough estimate of the size the dome would need to be. I've still not found calculator and hub design that I trust I have to say! Not sure why, but although it's easy enough to generate the required strut lengths, the problems with geodesic domes all come down to the hub connectors. In the end, I decided to modify a design a found in thingiverse. As this design uses the wrong units, I converted it to good and correct metric units, using the program Design Spark Mechanical. This program is a little easier for me than Autodesk or solidworks, if I'm just doing minor corrections. I altered the hubs so they would accept 5mm thick acrylic.
Thanks to another friend, Dr Julie Freeman I managed to get the hubs 3D printed (using a proper 3D printer and not a glue-gun on rails!) and laser cut the struts. I added holes along the struts so that I could bolt on any things I'd forgotten down the line. The prints and cuts came out beautifully I think!
Despite how good the printed parts were, issues with the design did begin to creep in. The support material in the 3D printer is a waxy-like substance that you need to clean off with a special pressure washer. This is loads of fun I have to say, but the process is not perfect. There are lots of annoying left-over residues inside the slots for the struts. This means the fit was not always perfect and in some cases, the thin 5x5mm strut end would snap. I think a better locking mechanism will be needed next time, as oppose to a push/snap fit one. Top tip people - always make spares!
The first version of the dome was inspired by my previous attempts at a scanner. I wondered if it was possible to cover the dome in cheap, yet high resolution webcameras, instead of using a single SLR or equivalent? This would cut down on the time to take all the snaps required. My camera of choice is the Logitech C910. The reason for this is that I'd had a few lying around already from the previous gig and so buying a few more wouldn't increase the costs too much. The resolution is acceptable and they can be controlled via UVC under Linux.
This latter point is quite useful! It's very important to be able to programmatically control the white-balance, resolution and more critically, the focus. You can do all that with a variety of programs, my favourite being GUVCView. This program can be called from the command line with a list of settings, held in an XML file. So once you've played with the settings you want, you can save them out and use them again really easily.
This page has a good review of the field of view from both cameras. I can summarise the basic stats as follows:
Max res 2592 x 1944 Focus distances in cm with the non-continuous steps: 255...Read more »