# Assignment 3 (Part I) - 3D Scanning

Due Monday 10/2 at 11:59 pm. You may work individually or in pairs.

## Overview

In this assignment, you will scan a real-life object with a 3D scanner. You will then clean up the scanned mesh to make it ready for 3D-printing. There are 3 different 3D scanners you can choose from:

• Microsoft Kinect V1
• Requies Windows 7+.
• Microsoft Kinect V2
• Requires Windows 8+.
• Intel RealSense F200
• Requires Windows 8+.

## Using Kinect V1 with the Provided Laptop

This section is only for those using the loaner laptop.

• There is a guest user account to be used for this assignment. If some other user is logged in, press "Switch" and then CTRL-ALT-DELETE. You should now see an option for "Other User."
• The user name is CSE-SUEDA-NB2\CompFab or Computational Fabrication, and the password is sueda-2017.
• Start "Kinect Fusion Explorer-WPF" from Desktop. You might also want to browse through the other Kinect apps by running the "Developer Toolkit Browser."
• You can save files to Desktop and copy them to a USB drive. Please delete all your files when you are done.
• Before you unplug the kinect device, make sure to safely disconnect hardware.

## Scanning with Kinect

Run "Kinect Fusion Explorer-WPF." It should open up a window shown figure below.

Once you launch the Kinect Fusion Explorer, it will automatically start scanning. To restart the scanning, click "Reset Reconstruction." There are few options that you can change:

• You can change the near and far distance of the scanner to clip away more background.
• You can also change the voxel resolution to reduce the final mesh size. The "Voxels Per Meter" parameter specifies the number of voxels in one meter, and the "Volume Voxel Resolution" parameter specifies the total number of voxels.
• You can compute the size of your scanning volume in meters by:

\text{Scanning Volume Size} = \frac{\text{Voxel Resolution}}{\text{Voxels Per Meter}}.

If you want to reduce the scanning volume size, you must reduce Voxel Resolution and increase Voxels Per Meter. This scanning volume is created when you first start scanning or when you press "Reset Reconstruction." If you find that your object is clipped, try resetting. See the image above for the settings used for the elephant toy.

Make sure you can go around the object without obstruction and without moving the object. A sample scanning process is shown in this video: http://www.youtube.com/watch?v=quGhaggn3cQ. Once you are happy with the scan, click "Create Mesh" to save.

## Scanning with RealSense

(By M. Baxter and C. Russel)

• Intel RealSense SDK version: 10.0.26.396
• OS: Windows 10

First connect the camera and install the drivers, then download and install the Intel RealSense SDK. If at any point you come across an error as shown below, where an installer fails to detect the Intel RealSense Camera, check in device manager under the imaging devices tab that you have a stable connection with the RealSense Camera. If the camera does not appear in the list, try restarting your computer without unplugging the camera at any point. If the camera appears in the list but seems to periodically disconnect, try using a different USB port.

If the error message persists but you have ensured the camera is connected correctly and your computer recognizes it, proceed with installation of the software and if you cannot access the camera from within the SDK modules, then try restarting your computer without unplugging the camera. Finally, if you still cannot use the modules, try uninstalling and reinstalling the camera drivers; after this failed Christine and I switched from using my windows desktop to my windows laptop and were able to get the camera working despite still getting the ”installer failed to detect an Intel RealSense 3D Camera” error message by only installing a subset of the SDK modules.

IMPORTANT NOTE: When choosing which modules to install, please note that our camera only started working with the 3D scanner after we had uninstalled certain modules that did not pertain to scanning 3D objects; and only with the 3D Scan (C#) application, the 3D Scan (C++) never appeared in our SDK Sample Browser.

First ensure your camera is detected by your 3D scan software, as in figure (a) below.

Then move the camera until your object is centered in the camera view and you are close enough for the camera to recognize the object by displaying a green box around it on the screen. Once you’ve done this, press ”Start Scanning.” If you cannot get the camera to display a green box around your object, you can press Start Scanning and attempt to manually find a sweet spot where your camera will recognize the object, figure (b). Please note that when your camera first recognizes the object, if it is not centered in the camera’s view, rotating around the object can be difficult as you will need to keep the object in that off-center location on the screen as you rotate.

As you can see if the camera loses track of the object it will prompt to realign the object with image in the screen, figure (c). As mentioned above this will happen more often if your object is not in the center of view when you start scanning.

Scanning works best when: the object is not reflective; there is ample light, including from below the object; the camera position is fixed; and the object being scanned is rotated at a slow, constant speed.

## Mesh Clean-Up

The mesh probably contains a lot of background. In order to remove the background, you can use mesh processing software such as Meshlab, Meshmixer, or Blender. Here, we use Meshlab to create a closed mesh.

1. Merge duplicated vertices to reduce mesh size:
• In the menu, go to Filters->Cleaning and Repairing->Merge Close Vertices. Set "perc on" to 0.1.
2. Select and remove vertices and triangles:
• Click Select Vertices button, drag a box to select faces and then click Delete button. The buttons are shown in the figure above.
3. Compute vertex normals to prepare for Poisson Surface Reconstruction:
• Filters->Normals, Curvatures and Orientation->Re-Compute Face Normals.
• Filters->Normals, Curvatures and Orientation->Re-Compute Vertex Normals.
4. Poisson Surface Reconstruction to create a closed surface:
• Filters->Remeshing, Simplification and Reconstruction->Screened Poisson Surface Reconstruction.
5. Look at the resulting mesh by going to View->Show Layers Dialog and then hiding the original mesh. With "Poisson mesh" selected, go to "Export Mesh As..." and Save to an STL file.

Here are the raw mesh and the cleaned mesh of the toy elephant.

## Hints

• Object: Choose your object wisely. The range sensor does not work well with objects that are:
• Highly reflective
• Transparent
• Very dark
• Range: Kinect has certain workable range. It does not work well if the object is too close or too far.
• Resolution: Sometimes the process might work better if you reduce the voxel resolution.

## Evaluation

• PDF writeup (see below)
• 3 minute in-class demo

## What to hand in

Please provide a report with your submission (PDF). The report should include the following:

• Names of your team members.
• Names of the device, O/S, and software version used.
• Describe difficulties in scanning. What surfaces are difficult to scan? Discuss what methods you use to fix the meshes.
• Screen shots of all the meshes you scanned. Please include both raw scanned meshes and cleaned meshes.
For this assignment, please only submit the PDF file. It should be named NETID.pdf (your email ID; e.g., sueda.pdf). If you're working in a pair, only one person needs to submit.