- 3D Printing with RepRap Cookbook
- Richard Salinas
- 750字
- 2021-07-16 11:30:36
Aligning the scans with MeshLab
We have half a dozen or more shell segments that we made of our model with DAVID Laserscanner. How do we assemble all this into a completed model? One of the powerful features of MeshLab is the alignment tool, and in this recipe, we'll learn how to use it by stitching together all of our scans.
Getting ready
You'll need all the scans that you made of your model. They should be clean and free of all artifacts.
How to do it...
We will proceed as follows:
- Open your folder containing the
.obj
files you made in DAVID Laserscanner. Select all of them and click on Open. All of the scan segments will merge together on your workspace, shown as follows: - Go to the icon bar and select the Show Layer Dialog icon [
]. This will open a box to the right of the workspace, displaying a list of the scan layers.
- Go back to the icon bar and select the Align icon [
]. Two things will occur. First, a new window will pop open. This window contains a list of the open scan files (similar to the layer dialog box) with an addition of alignment options at the bottom. Secondly, the model segments have unique colors. This will help distinguish the segments from each other.
- In the Align Tool window, click on each of the small green eyes that precede the scan file, leaving the first two scans open. Now, you should only see two scan segments open in your workspace.
- To start the alignment process, we must first set a reference for the scans. To do this, select the first file in the list of scans. A gray bar will appear across the filename. Next, select Glue Here Mesh. An asterisk will appear before the filename.
- Next, select the second file. At the bottom of the window, two new alignment options have become available. Select Point Based Glueing. A new pop-up window appears.
- Now, we see the two selected scans side by side. Use the navigation controls to orient the scans in the same viewing position. This is important so that we can select the corresponding reference points on both scans.
- Starting with one scan, select a point by double-clicking on it. A tiny red box with a numeral appears. Find the corresponding point on the other scan and double-click on it. A tiny blue box with the same numeral appears. Continue to select points until you have a total of four matching pairs of reference points. Click on OK, and the alignment window closes.
- In the workspace, the two scans should now be stitched together, forming a more complete model. If the model isn't aligned correctly, then select the Unglue Mesh option and start again by choosing an extra pair of points. The more points accurately chosen, the more successful the alignment process.
- Next, select the third file and then select Point Based Glueing. A new pop-up window appears, with the third scan on the left-hand side. On the right-hand side, the two previous scans are shown stitched together. Select four corresponding pairs of reference points and choose OK. Make sure that you select the eye icon next to the third scan file in the Align Tool window. You should now see all the three scans aligned together.
- Continue the process of aligning all the scans. When you are finished, choose Process at the bottom of the Align Tool window. MeshLab now computes a final mesh-mesh alignment.
- It's a good idea to save your project with all the processing information, in case you have a need to modify it. To do this, go to the Menu and select File and Save Project. This will create a MeshLab
.mlp
file.
How it works...
The alignment tool extrapolates the best fit for your scans when you process them, but the scans are still separate layers, even though the program refers to gluing them during the alignment process. If you try to export your aligned model, only the last highlighted scan will save. This is because the alignment has not been fused. Be sure to save the alignment as a project file. In the next recipe, we'll learn how to merge all the scans into one solid shell.
See also
- For a video tutorial, Mister P offers 3D Scanning: Alignment, which can be seen on YouTube at http://www.youtube.com/watch?v=4g9Hap4rX0k