3D Printing with RepRap Cookbook
上QQ阅读APP看书,第一时间看更新

Scanning with DAVID Laserscanner

In this recipe, we'll learn how to scan an object from multiple views by carefully moving the object around a central point. Using the free edition of DAVID Laserscanner, we'll save the scans as low-resolution .obj files.

Getting ready

The camera should be set up and successfully calibrated. Before we make our first scan, we need to make a minor adjustment in our camera exposure. Position the toy block on its base, as close as possible to the calibration corner. Dim the lights and turn the red-line laser on. Focus the line on the block and adjust the camera exposure until only the line is visible and sharp. Try to keep the background as dark as possible.

How to do it...

We will proceed as follows:

  1. From the side menu, select 3D Laser Scanning. Under Scanning, choose Red in the rollout-box for Laser Color.
  2. Under Result Filtering, keep the default values as shown in the following screenshot:
    How to do it...
  3. From the top menu under Visibility, select Depth Map from the rollout-box.
  4. Hold the laser above the camera and position the laser line so that it falls across the top of the calibration corner. Try to keep the laser positioned from the same spot. From the menu, click on Start.
  5. Very slowly, tilt the laser line down from the fixed position. The line needs to sweep down across the entire object, as shown in the following image:
    How to do it...
  6. On the screen, you can see a live image of the color depth map of the scanned object. If the areas are not clear, a second pass could help.
    How to do it...
  7. When the scan is complete, click on Stop. Save the scan as an .obj file. With the free edition of the program, a warning window will appear, alerting you that your scan will save at a reduced resolution.
  8. Turn the block about 45 degrees clockwise. Be careful not to disturb your camera setup. Repeat the scanning process until you have a total of at least 6 scans representing a clear view around the block.
  9. Repeat the process for the coin. Support the coin vertically on its edge, but only make one scan of the surface. We're only concerned about one side of the coin for this exercise.

How it works...

Before we save each scan, we can alter three variables in Result Filtering. The following comparisons will illustrate the changes made when adjusting Interpolation, Smooth Average, and Median Average.

By adjusting Interpolation, the program will fill holes in the scan. The following image shows the Interpolation values from 0 to 2, without the smoothing filters:

How it works...

By adjusting Smooth Average, the program will smooth the scan. The following image shows the Smooth Average values from 1 to 3:

How it works...

By adjusting the Smooth Median, the program will smooth the scan. The following image shows the Smooth Median values from 1 to 3:

How it works...

Once we make our final adjustments, we can save the scan as an .obj file. We'll now have a collection of scans that are essentially shells representing multiple views of our object. Using all the shells, we'll stitch them together to make a complete model. In DAVID Laserscanner, there's a feature called ShapeFusion that provides tools that will clean the scans and merge them together. The free edition will allow access to these tools, but all the work will not be saved. In the following recipes, we'll learn how to stitch the shells together with another program called MeshLab.

There's more...

Depending on the hardware you utilize, DAVID Laserscanner is a very versatile system that can be refined for extraordinary results. Changing from an inexpensive red-line laser to a more expensive green or blue laser will increase the scanning sensitivity. Controlling the laser movement precisely with a stepper motor equipped with a planetary gearbox will also give better results. For illustrative purposes, a comparison between the free version of DAVID that utilizes the inexpensive equipment, covered in the preceding recipes, and the Pro version of DAVID that utilizes a motorized green laser is shown in the following image:

There's more...

The fine detail of the coin (remember that it only measures 30 mm across!) is captured with a 1024 x 768 resolution, provided that it is only available in the commercial version. Purchasing the program and upgrading the equipment is worth the investment if your needs require finer detail scanning.

There's more...